if($_REQUEST['reset']==1){ $GLOBALS['db']->query("update ecmpricekopias_ecmproducts set position=0 where ecmpricekopia_id='".$_REQUEST['record']."'"); header("Location: index.php?module=EcmPriceKopias&action=productsOrder&record=".$_REQUEST['record']); } if($_REQUEST['save']){ $b=explode("|",$_REQUEST['sort_order']); $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']."'"; $GLOBALS['db']->query($z); } header("Location: index.php?module=EcmPriceKopias&action=DetailView&record=".$_REQUEST['record']); } $z="select id from ecmpricekopias_ecmproducts where ecmpricekopia_id='".$_REQUEST['record']."' and deleted='0'"; $w=$GLOBALS['db']->query($z); $ile=mysql_num_rows($w); ?>
Set Products Order: query($z); $r=$GLOBALS['db']->fetchByAssoc($w); print " ".$r['name']; ?> |