Eco-$mart Product List - Manage Deleted Items

<<<<Restricted Area>>>>" . "
Sorry, you must Log In to view this Page

"); exit(); } $usrn = $_GET['usrn']; if($usrn == ""){ $usrn = $_POST['usrn']; } if($usrn == "Matt Ross" or $usrn == "Kent Grubbs"){ echo("

$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

"); exit(); } $pageback = $_GET['pageback']; if($pageback == ""){ $pageback = $_POST['pageback']; } $start = $_GET['start']; if($start == ""){ $start = $_POST['start']; } if($start == "MFG"){ $bakk = $pageback; }else{ $bakk = $start."/".$pageback; } $co=stripslashes($_GET['co']); ?>

Permanently change the status of deleted items.

WARNING! Deleting items from this page is permanent.

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()."

"); }else{ $numrows = mysql_num_rows($getit); if($numrows < 1){ echo("

No Items in Trash Bin.

"); }else{ echo("
" . "" . ""); while($row = mysql_fetch_array($getit)){ $olditem = substr($row[0],1); echo("" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . ""); }//while getting it echo("
DEL" . "Restore" . "Item" . "sku" . "MFG" . "List" . "Retail" . "Special" . "Dealer" . "Dealer Lo" . "Distributor" . "Cost" . "Unit" . "Lo Units" . "Case" . "Minimum" . "Updated" . "Description" . "
$olditem$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]$row[7]$row[8]$row[9]$row[10]$row[11]$row[12]$row[13]$row[14]$row[15]
" . "" . "" . "" . "" . "" . "" . "
"); }//there are products in numrows }//gotit ?>
© 2010 Eco-$mart, Inc. eco-smart.com Administration Eco-$mart Products " . "BACK" . ""); } ?>
Administration Eco-$mart Products " . "BACK" . ""); } ?>