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

"); exit(); } $usrn = $_GET['usrn']; if($usrn == ""){ $usrn = $_POST['usrn']; } if($usrn == ""){ echo("

<<<<Restricted Area>>>>" . "
Problem with your username. Please Log In again.

"); exit(); } ?>
Return to Your Page Eco-$mart Products
  Product Price Updater
Copy and Paste from Master Excel File:  Eco-$mart_Product_Prices_*.xls

Something is wrong. Cannot check for duplicate.
".mysql_error()."

"); }else{ $rochk = mysql_fetch_array($chk); if($rochk[0] == ""){ if($gem[0] != ""){ $into = mysql_query("INSERT INTO price SET item='$gem[0]',sku='$gem[1]',list='$gem[2]',retail='$gem[3]',special='$gem[4]',dealer='$gem[5]',dealer_lo='$gem[6]',distributor='$gem[7]',cost='$gem[8]',unit='$gem[9]',lo_units='$gem[10]',cs='$gem[11]',min='$gem[12]',up_date='$dtnum',description='$gem[14]'"); if(!$into){ echo("

Could not insert new row for $gem[0]
".mysql_error()."

"); }else{ $countyes = $countyes + 1; } }else{ $countyes = $countyes + 1; } }elseif($rochk[0] != ""){ $result = array_diff_assoc($rochk, $gem); if(empty($result)){ $countyes = $countyes + 1; }else{ $uppit = mysql_query("UPDATE price SET sku='$gem[1]',list='$gem[2]',retail='$gem[3]',special='$gem[4]',dealer='$gem[5]',dealer_lo='$gem[6]',distributor='$gem[7]',cost='$gem[8]',unit='$gem[9]',lo_units='$gem[10]',cs='$gem[11]',min='$gem[12]',up_date='$dtnum',description='$gem[14]' WHERE item='$gem[0]'"); if(!$uppit){ echo("

Could not update $gem[0]
".mysql_error()."

"); }else{ $countyes = $countyes + 1; } } } } }//4each if(!empty($outage)){ foreach($outage as $value){ $out = mysql_query("DELETE FROM price WHERE item='$value' LIMIT 1"); if(!out){ echo("

Could not delete ".$value."
".mysql_error()."

"); }else{ echo("$value Deleted, "); } }//4ea $sql = mysql_query("OPTIMIZE TABLE 'price'"); if($sql){ echo("Data Base Optimization Complete."); } } if($countthem == $countyes){ echo("

Successful Update of Price List.

"); }else{ echo("

Problems Overwriting Price List.

"); } ?>
Eco-$mart Products
©2008 - Data Base Interface - Custom Built at:  kwgrubbs.com