Files
crm.e5.pl/modules/EcmPriceKopias/saveProductsOrder.php

17 lines
482 B
PHP
Raw Permalink Normal View History

2024-04-27 09:23:34 +02:00
<?php
set_time_limit(9999999);
$b=explode(",",str_replace(" ","",$_GET['boxes']));
$i=1;
foreach($b as $box){
if(strlen($box)>=1 && $box!="" && $box!=" ")$boxy[]=$box;
}
for($i=1;$i<=count($boxy);$i++){
$z="update ecmpricekopias_ecmproducts set position='".$i."' where deleted='0' and ecmproduct_id='".$boxy[$i-1]."' and ecmpricekopia_id='".$_REQUEST['record']."'";
if($GLOBALS['db']->query($z))$ok=1;
else $error="Error";
}
if($error)print $error;
else print "Saved";
exit;
?>