<?php
session_start();	
?>
<?php
include_once 'ayarlar.php';
$mysql_baglanti= new yonetici(); 
$mysql_baglanti->mysql_baglan();
error_reporting(E_ALL ^ E_NOTICE);
ini_set('error_reporting', E_ALL ^ E_NOTICE); 
?>
<? 
if (isset($_SESSION['adminuser'])){
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title><?=$site_name?></title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/colorpicker.css" />
<link rel="stylesheet" href="css/datepicker.css" />
<link rel="stylesheet" href="css/uniform.css" />
<link rel="stylesheet" href="css/select2.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-media.css" />
<link rel="stylesheet" href="css/bootstrap-wysihtml5.css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
<script src="js/jquery.min.js"></script> 
<script src="js/jquery.ui.custom.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/bootstrap-colorpicker.js"></script> 
<script src="js/bootstrap-datepicker.js"></script> 
<script src="js/jquery.toggle.buttons.html"></script> 
<script src="js/masked.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/select2.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/matrix.form_common.js"></script> 
<script src="js/wysihtml5-0.3.0.js"></script> 
<script src="js/jquery.peity.min.js"></script> 
    
</head>
<body>
<? include 'inc_header.php'?>
<? include 'inc_leftmenu.php'?>
<div id="content">
<div id="content-header">
  <div id="breadcrumb"> <a href="index.php" title="Anasayfaya Gİt" class="tip-bottom"><i class="icon-home"></i>ANASAYFA</a><a href="#" class="current">ÜRÜN SIRALA</a> </div>
  <h1>ÜRÜN SIRALA</h1>
</div>
<div class="container-fluid">
  <hr>
  <div class="row-fluid">
  
  
  	<div class="span6">
        <div class="widget-box">
          <div class="widget-title"> <span class="icon"><i class="icon-repeat"></i></span>
            <h5>MEVCUT SIRA</h5>
          </div>
          <div class="widget-content nopadding">
            <ul class="activity-list">
            	<? $query=mysql_query("Select * from project_draw where project='".$_GET['product']."' order by priority asc")?>
                <? while ($data=mysql_fetch_assoc($query)){?>
                	<li><a href="#"> <i class="icon-move"></i> <strong><?=stripslashes($data['priority'])?></strong>  <img src="../<?=stripslashes($data['file'])?>" width="50" height="50" /> </a></li>
                <? }?>
            </ul>
          </div>
        </div>
      </div>
       <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>



<script type="text/javascript">
		$(document).ready(function(){ 	
			function slideout(){
			setTimeout(function(){
			$("#uyari").slideUp("slow", function () {});}, 2000);}
			$("#uyari").hide();
			$(function() {
			$("#sortable").sortable({ opacity: 0.8, cursor: 'move', update: function() {
					var order = $(this).sortable("serialize") + '&f=order_product_draw'; 
					$.post("ajaxfunctions.php", order, function(theResponse){
						$("#response").html(theResponse);
						$("#uyari").slideDown('slow');
						slideout();
					}); 															 
				}								  
				});
			});
		});	
		</script> 
      	<div class="span6">
            <div class="widget-box">
              <div class="widget-title"> <span class="icon"><i class="icon-repeat"></i></span>
                <h5>YENİ SIRALAMA</h5>
              </div>
              <div class="widget-content nopadding">
                <ul id="sortable"  class="activity-list">
                    <? $query=mysql_query("Select * from project_draw where project='".$_GET['product']."' order by priority asc")?>
                    <? while ($data=mysql_fetch_assoc($query)){?>
                        <li id="arrayorder_<?=$data['id']?>"><a href="#"> <i class="icon-move"></i><strong><?=stripslashes($data['priority'])?></strong>  <img src="../<?=stripslashes($data['file'])?>" width="50" height="50" /></a></li>
                    <? }?>
                </ul>
              
              </div>
            </div>
      	</div>
  	</div>
</div></div>

</body>
</html>
<? } else { header('location:login.php');}?>