

  <?php $j=$navs/10; for($i=0;$i<=$j;$i++){?>

  

   <li class="<?php if($i==0){echo 'active';}?> lisclass page-item"><a href="<?php echo $i*10;?>" class="page-link change_page"><?php echo $i+1;?></a></li>

  <?php }?>

  

  

  <script>

  $(document).ready(function(){

	 $.ajax({

			 type: "POST",

			 url: '<?php echo base_url();?>admin/orders_ajax',

			 data: {offset:0,ostatus:"<?php echo $ostatus;?>"},

			 success: function(res){

				// alert("asdf");

				$("#orders_ajax").html(res)

			 }

	 });

	 $(".change_page").click(function(e){e.preventDefault();

	 	 $(".lisclass").removeClass("active");

		 $(this).closest("li").addClass("active");

		 var offset=$(this).attr("href");

		 $.ajax({

			 type: "POST",

			 url: '<?php echo base_url();?>admin/orders_ajax',

			 data: {offset:offset,ostatus:"<?php echo $ostatus;?>",uid:"<?php echo $uid;?>"},

			 success: function(res){

				$("#orders_ajax").html(res)

			 }

	 	 });

	 });

  });

  </script>

