Add php files
This commit is contained in:
16
modules/EcmPrices/saveProductsOrder.php
Executable file
16
modules/EcmPrices/saveProductsOrder.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<?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 ecmprices_ecmproducts set position='".$i."' where deleted='0' and ecmproduct_id='".$boxy[$i-1]."' and ecmprice_id='".$_REQUEST['record']."'";
|
||||
if($GLOBALS['db']->query($z))$ok=1;
|
||||
else $error="Error";
|
||||
}
|
||||
if($error)print $error;
|
||||
else print "Saved";
|
||||
exit;
|
||||
?>
|
||||
Reference in New Issue
Block a user