<?php
$addon_path="../../";

include $addon_path."includes/config.php";
include $addon_path."includes/database.php";
include $addon_path."includes/keyword.php";
include $addon_path."includes/function.php";
include $addon_path."includes/session.php";

?>

<html>
<head>
<title><?php echo $sys_browser_title; ?></title>
<LINK REL="SHORTCUT ICON" HREF="images/pcart_logo.png" >

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

        
<meta http-equiv=content-type content="text/html; charset=GB2312">
    
<LINK href="<?php print $addon_path."theme/desktop/".$cssPath1; ?>" rel=stylesheet >
<LINK href="<?php print $addon_path."theme/desktop/".$cssPath2; ?>" rel=stylesheet >
<LINK href="<?php print $addon_path."theme/desktop/".$cssPath3; ?>" rel=stylesheet >
<LINK href="<?php print $addon_path."theme/desktop/".$cssPath4; ?>" rel=stylesheet >
<LINK href="<?php print $addon_path."theme/desktop/".$cssPath5; ?>" rel=stylesheet >


<LINK href="<?php print $addon_path.$fontPath; ?>" rel=stylesheet>
    
    
    
    
    
<script language="javascript" src="<?php print $addon_path.$jsPath1; ?>"></script>
<script language="javascript" src="<?php print $addon_path.$jsPath2; ?>"></script>
<script language="javascript" src="<?php print $addon_path.$jsPath3; ?>"></script>
<script language="javascript" src="<?php print $addon_path.$jsPath4; ?>"></script>
   
</head>


<script language="javascript" src="../../plugin/jquery/jquery-3.2.1.min.js" ></script>
<script language="javascript" src="../../plugin/jquery-ui-1.12.1.custom/jquery-ui.min.js" ></script>


<link rel="stylesheet" href="../../plugin/jquery-ui-1.12.1.custom/jquery-ui.theme.css">
  
  <style>
  #sortable { list-style-type: none; margin: 0; padding: 0; width: 280px; }
  #sortable li { margin: 10px; font-size:12px;padding: 10px;  padding-top:10px;height: 36px; text-align:left;}
  
  </style>
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#sortable" ).sortable();
    
    $( "#sortable" ).sortable({
	  axis: "y"
	});

    $( "#sortable" ).disableSelection();
  } );
  
  
  function compute_list()
  {
	var sortedIDs = $( "#sortable" ).sortable( "toArray" );  
	//alert(sortedIDs);  
	
	document.export_column_form.cols.value=sortedIDs;
	document.export_column_form.submit();
  }
  
  
  
  
  </script>



  
 <?php 
 
 
 
 //ksort($header_col);
 
  
  
  //========================PHP Processing======================================

  
  
  
  
echo "<form name='export_column_form' action='interface.php' method='POST'>";
echo "<input type=hidden name='cols' value='' >";
//echo "<br>";
//echo "<input type=button class='button button-blue' value='Save Setting' onclick=\"compute_list()\" align=left >";
	
echo "<div style='padding:3px;margin:3px;width:300px;text-align:center;overflow:hidden;' align=left >";

	 
	echo "<ul id='sortable'>";
		
	
	
	$header_col[1] = "R1";
	$header_col_status[1] = "Vacant";
	$header_col_name[1]="Item A";
	
	
	
	$header_col[2] = "R2";
	$header_col_status[2] = "Vacant";
	$header_col_name[2]="Item B";
	
	$header_col[3] = "R3";
	$header_col_status[3] = "Vacant";
	$header_col_name[3]="Item C";
	
	$header_col[4] = "R4";
	$header_col_status[4] = "Vacant";
	$header_col_name[4]="Item D";
	
	
	$header_col[5] = "R5";
	$header_col_status[5] = "Vacant";
	$header_col_name[5]="Item E";
	
	
	foreach($header_col as $col_key => $col_value)
	{
		
		echo "<li class=\"ui-state-default\" id='".$col_key."' >";
		
		echo "<div style='float:left;margin-right:10px;width:100px;'>";
		
	
		echo "<span class='fa fa-bars' style='margin:5px;'></span>";
		
		echo $header_col_name[$col_key];
		echo "</div>";
		
			

			
		
			
			
		echo "</li>";
		
	}
	
	 
		
		
	echo "</ul>";
	 
	 
	 
	 
echo "</div>";
echo "</form>";
 
 
?>
 


<?php
include $addon_path."includes/end.php";
?>
