Eco-$mart Product List - Manage Deleted Items
$dtnum = date(Ymd); $dnum = date(Ymd)*11; $from = $_GET['fr']; if($from == ""){ $from = $_POST['fr']; } if($from != $dnum){ echo("<<<<Restricted Area>>>>" .
"
Sorry, you must Log In to view this Page
$usrn Logged In
"); $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_products', $dbcnx); }else{ echo("<<<<Restricted Area>>>>" .
"
Sorry, you are not authorized to view this Page
Permanently change the status of deleted items.
WARNING! Deleting items from this page is permanent.
$uppy = $_POST['uppy']; if($uppy == "yes"){ $eraseitems = $_POST[eraseitems]; $retrieveitems = $_POST[retrieveitems]; if(!empty($eraseitems)){ foreach($eraseitems as $value){ $out = mysql_query("DELETE FROM price WHERE item='$value' LIMIT 1"); if(!$out){ echo("Unable to delete $value. Error: ".mysql_error()."
"); }else{ $outed[] = $value; } }//4each erase item if(!empty($outed)){ echo("DELETED: "); foreach($outed as $value){ echo("$value ¦¦ "); } echo("
"); }//outed not empty $sql = mysql_query("OPTIMIZE TABLE 'price'"); if($sql){ echo("Data Base Optimization Complete.
"); } }//eraseitems is not empty if(!empty($retrieveitems)){ foreach($retrieveitems as $value){ $fixitem = substr($value,1); $fixit = mysql_query("UPDATE price SET item='$fixitem' WHERE item='$value' "); if(!$fixit){ echo("Unable to restore $fixitem. Error: ".mysql_error()."
"); }else{ $fixed[] = $value; } }//4each retrievitems if(!empty($fixed)){ echo("RESTORED: "); foreach($fixed as $value){ echo("$value ¦¦ "); }//4eachfixed }//fixed not empty }//retrieveitems is not empty }//uppyisyes $itemstart = "9"; if($start == "MFG"){ $getit = mysql_query("SELECT item,sku,MFG,list,retail,special,dealer,dealer_lo,distributor,cost,unit,lo_units,cs,min,up_date,description FROM price WHERE item LIKE '$itemstart%' AND MFG='$co' ORDER BY item"); }else{ $getit = mysql_query("SELECT item,sku,MFG,list,retail,special,dealer,dealer_lo,distributor,cost,unit,lo_units,cs,min,up_date,description FROM price WHERE item LIKE '$itemstart%' ORDER BY item"); } if(!$getit){ echo("
Could not retrieve previously deleted items.
".mysql_error()."
No Items in Trash Bin.
"); }else{ echo(""); }//there are products in numrows }//gotit ?>© 2010 Eco-$mart, Inc. eco-smart.com Administration Eco-$mart Products if($pageback != "" and $start != ""){ echo("" . "BACK" . ""); } ?> |
Administration Eco-$mart Products if($pageback != "" and $start != ""){ echo("" . "BACK" . ""); } ?> |