Eco-$mart Manufacturers - Edit Manufacturer

<<<<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(); } $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $checkauth=mysql_query("SELECT pswadmin FROM psw WHERE usrn='$usrn'"); if(!$checkauth){ echo("Authorization Error: Cannot continue."); exit(); }else{ $ro=mysql_fetch_array($checkauth); if($ro[0]!="Yes"){ echo("Unauthorized"); exit(); }else{ $dummy="on"; }//pswadmin is yes }//checked auth $co = $_GET['co']; if($co == ""){ $co = $_POST['co']; } if($co == ""){ echo("

Cannot continue. No Company Name Provided.

"); exit(); } $dtnum=date(Ymd); $pageback = "mfg_edit.php"; mysql_select_db('ecosmar_products', $dbcnx); $getcats=mysql_query("SELECT item_start FROM cats ORDER BY item_start"); if(!$getcats){ echo("Could not get category list."); //echo mysql_error(); }else{ while($row=mysql_fetch_array($getcats)){ $itemstart[]= $row[0]; }//while getting cats }//got cats ///////////////////////changey mfg table $changey = $_POST['changey']; if($changey == "yes"){ $ID=$_POST['ID']; $co_name=stripslashes($_POST['co_name']); if($co_name != $co){ $namechange="on"; } $co_rep=stripslashes($_POST['co_rep']); $email=$_POST['email']; $order_email=$_POST['order_email']; $reg=$_POST['reg']; $address=stripslashes($_POST['address']); $city=stripslashes($_POST['city']); $state=$_POST['state']; $ZipCode=$_POST['ZipCode']; $country=$_POST['country']; $phone=$_POST['phone']; $FAX=$_POST['FAX']; $website=$_POST['website']; $co_name = htmlspecialchars($co_name, ENT_QUOTES, 'utf-8'); $co_rep = htmlspecialchars($co_rep, ENT_QUOTES, 'utf-8'); $address = htmlspecialchars($address, ENT_QUOTES, 'utf-8'); $city = htmlspecialchars($city, ENT_QUOTES, 'utf-8'); $changem = mysql_query("UPDATE mfg SET co_name='$co_name',co_rep='$co_rep',email='$email',order_email='$order_email',reg='$reg',address='$address',city='$city',state='$state',ZipCode='$ZipCode',country='$country',phone='$phone',FAX='$FAX',website='$website' WHERE ID='$ID'"); if(!$changem){ echo("

Could not update MFG information. Error:
".mysql_error()."

"); }else{ echo("

$co_name Updated"); if($namechange=="on"){ $getchprods=mysql_query("SELECT item FROM price WHERE MFG='$co'"); if(!$getchprods){ $air[]="Could not get price info for Company change. Error: ".mysql_error(); }else{ while($row=mysql_fetch_array($getchprods)){ $pch[]=$row['item']; }//while fetchin rows foreach($pch as $value){ $chprods=mysql_query("UPDATE price SET MFG='$co_name' WHERE item='$value'"); if(!$chprods){ $air[]="Could not update company name for: ".$value.". Error: ".mysql_error(); }else{ $suc[]=$value." Updated."; } }//4each }//got products for name change $co=$co_name; }//namechange is on }//updated mgf }//changey is yes ////////////////////////////////////////////////////////newly if($newly == "yes"){ $co = $_POST['co']; $newitems = $_POST[newitems]; $newskus = $_POST[newskus]; $newlists = $_POST[newlists]; $newretails = $_POST[newretails]; $newspecials = $_POST[newspecials]; $newdealers = $_POST[newdealers]; $newdealer_los = $_POST[newdealer_los]; $newdistributors = $_POST[newdistributors]; $newcosts = $_POST[newcosts]; $newunits = $_POST[newunits]; $newlo_unitss = $_POST[newlo_unitss]; $newcss = $_POST[newcss]; $newmins = $_POST[newmins]; $newup_dates = $_POST[newup_dates]; $newdescriptions = $_POST[newdescriptions]; $newcount = count($newitems); $i = 0; while($i < $newcount){ $item = $newitems[$i]; if($newitems[$i] != ""){ $whatif = substr($newitems[$i],0,2); if(in_array($whatif,$itemstart)){ $check = mysql_query("SELECT sku FROM price WHERE item='$item'"); if(!$check){ echo("

Could not check for duplicate item numbers. Error: ".mysql_error()."

"); }else{ $numbrows = mysql_num_rows($check); if($numbrows > 0){ $stop = "on"; $airitem[] = $item; $air[] = "Item already exists. Edit below."; }//number of rows is greater than 0 }//checked $sku = $newskus[$i]; $list = sprintf("%01.2f", $newlists[$i]); $retail = sprintf("%01.2f", $newretails[$i]); $special = sprintf("%01.2f", $newspecials[$i]); $dealer = sprintf("%01.2f", $newdealers[$i]); $dealer_lo = sprintf("%01.2f", $newdealer_los[$i]); $distributor = sprintf("%01.2f", $newdistributors[$i]); $cost = sprintf("%01.2f", $newcosts[$i]); $unit = $newunits[$i]; $lo_units = $newlo_unitss[$i]; $cs = $newcss[$i]; $min = $newmins[$i]; /////testing input if($dealer_lo > 0 and $lo_units == ""){ $stop = "on"; $airitem[] = $item; $air[] = "Dealer Low price, but no Low units."; $bglo_units = "yellow"; $airsku[] = $newskus[$i]; $airlist[] = sprintf("%01.2f", $newlists[$i]); $airretail[] = sprintf("%01.2f", $newretails[$i]); $airspecial[] = sprintf("%01.2f", $newspecials[$i]); $airdealer[] = sprintf("%01.2f", $newdealers[$i]); $airdealer_lo[] = sprintf("%01.2f", $newdealer_los[$i]); $airdistributor[] = sprintf("%01.2f", $newdistributors[$i]); $aircost[] = sprintf("%01.2f", $newcosts[$i]); $airunit[] = $newunits[$i]; $airlo_units[] = $newlo_unitss[$i]; $aircs[] = $newcss[$i]; $airmin[] = $newmins[$i]; $airdescript[] = stripslashes($newdescriptions[$i]); }//no lo units for dealer lo if($unit == "CS" and $cs == ""){ $stop = "on"; $air[] = "Units = CS, but no case lot specified."; $bgcase = "yellow"; if(!in_array($item, $airitem)){ $airitem[] = $item; $airsku[] = $newskus[$i]; $airlist[] = sprintf("%01.2f", $newlists[$i]); $airretail[] = sprintf("%01.2f", $newretails[$i]); $airspecial[] = sprintf("%01.2f", $newspecials[$i]); $airdealer[] = sprintf("%01.2f", $newdealers[$i]); $airdealer_lo[] = sprintf("%01.2f", $newdealer_los[$i]); $airdistributor[] = sprintf("%01.2f", $newdistributors[$i]); $aircost[] = sprintf("%01.2f", $newcosts[$i]); $airunit[] = $newunits[$i]; $airlo_units[] = $newlo_unitss[$i]; $aircs[] = $newcss[$i]; $airmin[] = $newmins[$i]; $airdescript[] = stripslashes($newdescriptions[$i]); }//not already in air array }//no lot for cases $descript = stripslashes($newdescriptions[$i]); $description = htmlspecialchars($descript, ENT_QUOTES, 'utf-8'); if($stop != "on"){ if($description != ""){ $newup = mysql_query("INSERT INTO price SET item='$item',sku='$sku',MFG='$co',list='$list',retail='$retail',special='$special',dealer='$dealer',dealer_lo='$dealer_lo',distributor='$distributor',cost='$cost',unit='$unit',lo_units='$lo_units',cs='$cs',min='$min',up_date='$dtnum',description='$description' "); if(!$newup){ echo("

Could not insert $item. Error: ".mysql_error()."

"); }else{ $inned[] = $item; } }//there is a description else{ $air[] = "No Product Description"; $bgdescript = "yellow"; if(!in_array($item, $airitem)){ $airitem[] = $item; $airsku[] = $newskus[$i]; $airMFG[] = $newMFGs[$i]; $airlist[] = sprintf("%01.2f", $newlists[$i]); $airretail[] = sprintf("%01.2f", $newretails[$i]); $airspecial[] = sprintf("%01.2f", $newspecials[$i]); $airdealer[] = sprintf("%01.2f", $newdealers[$i]); $airdealer_lo[] = sprintf("%01.2f", $newdealer_los[$i]); $airdistributor[] = sprintf("%01.2f", $newdistributors[$i]); $aircost[] = sprintf("%01.2f", $newcosts[$i]); $airunit[] = $newunits[$i]; $airlo_units[] = $newlo_unitss[$i]; $aircs[] = $newcss[$i]; $airmin[] = $newmins[$i]; $airdescript[] = stripslashes($newdescriptions[$i]); }//not already in air array } }//stop is not on }//item number has correct prefix else{ $air[] = "Incorrect Item Number Prefix"; $bgitem = "yellow"; if(!in_array($item, $airitem)){ $airitem[] = $item; $airsku[] = $newskus[$i]; $airMFG[] = $newMFGs[$i]; $airlist[] = sprintf("%01.2f", $newlists[$i]); $airretail[] = sprintf("%01.2f", $newretails[$i]); $airspecial[] = sprintf("%01.2f", $newspecials[$i]); $airdealer[] = sprintf("%01.2f", $newdealers[$i]); $airdealer_lo[] = sprintf("%01.2f", $newdealer_los[$i]); $airdistributor[] = sprintf("%01.2f", $newdistributors[$i]); $aircost[] = sprintf("%01.2f", $newcosts[$i]); $airunit[] = $newunits[$i]; $airlo_units[] = $newlo_unitss[$i]; $aircs[] = $newcss[$i]; $airmin[] = $newmins[$i]; $airdescript[] = stripslashes($newdescriptions[$i]); }//not already in air array } }//item number is present $i=$i+1; }//while counting newitems if(!empty($airitem)){ $newheadbg = "maroon"; $newheadcolor = "yellow"; echo("

Some items not inserted:"); $aircount = count($airitem); $a=0; while($a < $aircount){ echo("
$airitem[$a] : $air[$a]"); $a=$a+1; }//while counting air items echo("

"); }//there are air items if(!empty($inned)){ echo("

INSERTED: "); foreach($inned as $value){ echo("$value ¦¦ "); } } }//newly is yes /////////Edit newylot here /////////////////////////////////////////////////////////////newlylot if($newlylot == "yes"){ $stop = "off"; $inputer = $_POST['inputer']; $detail = rtrim($inputer, "\r\n"); $excol = explode("\r\n", $detail); $excount = count($excol); echo("

Processing $excount rows...

"); foreach($excol as $value){ $overwrite = "off"; $splits = explode("\t", $value); $countem = count($splits); if($countem == 16){ $whatif = substr($splits[0],0,2); if(in_array($whatif,$itemstart)){ $item = $splits[0]; $check = mysql_query("SELECT sku FROM price WHERE item='$item'"); if(!$check){ echo("

Could not check for duplicate item numbers. Error: ".mysql_error()."

"); }else{ $numbrows = mysql_num_rows($check); if($numbrows > 0){ $overwrite = "on"; $overitem[] = $item; }//there are dupes }//checked $sku = $splits[1]; $MFG = $splits[2]; $list = sprintf("%01.2f", $splits[3]); $retail = sprintf("%01.2f", $splits[4]); $special = sprintf("%01.2f", $splits[5]); $dealer = sprintf("%01.2f", $splits[6]); $dealer_lo = sprintf("%01.2f", $splits[7]); $distributor = sprintf("%01.2f", $splits[8]); $cost = sprintf("%01.2f", $splits[9]); $unit = $splits[10]; $lo_units = $splits[11]; $cs = $splits[12]; $min = $splits[13]; /////testing input if($dealer_lo > 0 and $lo_units == ""){ $stop = "on"; $airitem[] = $item; $air[] = "Dealer Low price, but no Low units."; } if($unit == "CS" and $cs == ""){ $stop = "on"; $airitem[] = $item; $air[] = "Units = CS, but no case lot specified."; } $descript = stripslashes($splits[15]); $description = htmlspecialchars($descript, ENT_QUOTES, 'utf-8'); if($stop != "on"){ if($overwrite != "on"){ if($description != ""){ $newup = mysql_query("INSERT INTO price SET item='$item',sku='$sku',MFG='$MFG',list='$list',retail='$retail',special='$special',dealer='$dealer',dealer_lo='$dealer_lo',distributor='$distributor',cost='$cost',unit='$unit',lo_units='$lo_units',cs='$cs',min='$min',up_date='$dtnum',description='$description' "); if(!$newup){ echo("

Could not insert $item. Error: ".mysql_error()."

"); }else{ $inned[] = $item; } }//there is a description else{ $airitem[] = $item; $air[] = "No Product Description"; } }//overwrite is not on else{ $oitem[] = $splits[0]; $osku[] = $splits[1]; $oMFG[] = $splits[2]; $olist[] = sprintf("%01.2f", $splits[3]); $oretail[] = sprintf("%01.2f", $splits[4]); $ospecial[] = sprintf("%01.2f", $splits[5]); $odealer[] = sprintf("%01.2f", $splits[6]); $odealer_lo[] = sprintf("%01.2f", $splits[7]); $odistributor[] = sprintf("%01.2f", $splits[8]); $ocost[] = sprintf("%01.2f", $splits[9]); $ounit[] = $splits[10]; $olo_units[] = $splits[11]; $ocs[] = $splits[12]; $omin[] = $splits[13]; $odescript[] = stripslashes($splits[15]); }//overwrite is on }//stop is not on }else{ $airitem[] = $item; $air[] = "Incorrect Item Number Prefix"; } }//15 columns else{ $airitem[] = $item; $air[] = "Column Mismatch"; } }//4each row if(!empty($airitem)){ echo("

Some items not inserted:"); $aircount = count($airitem); $a=0; while($a < $aircount){ echo("
$airitem[$a] : $air[$a]"); $a=$a+1; }//while counting air items echo("

"); }//there are air items if(!empty($inned)){ echo("

INSERTED: "); foreach($inned as $value){ echo("$value ¦¦ "); } }//products inned if(!empty($oitem)){ echo("

" . "

Overwrite these Item Numbers?"); $countows = count($oitem); $i = 0; while($i < $countows){ echo("
 " . "$oitem[$i]  ¦ " . "$osku[$i] ¦ " . "$oMFG[$i] ¦ " . "$olist[$i] ¦ " . "$oretail[$i] ¦ " . "$ospecial[$i] ¦ " . "$odealer[$i] ¦ " . "$odealer_lo[$i] ¦ " . "$odistributor[$i] ¦ " . "$ocost[$i] ¦ " . "$ounit[$i] ¦ " . "$olo_units[$i] ¦ " . "$ocs[$i] ¦ " . "$omin[$i] ¦ " . "$odescript[$i] ¦ "); $i = $i+1; }//while counting ows echo("

" . "" . "" . "" . "
"); }//overwrite is on }//newlylot is yes ////////////////////////////////////////////////uppy if($uppy == "yes"){ $outitems = $_POST[outitems]; if(!empty($outitems)){ echo("

REMOVED: "); foreach($outitems as $value){ $newitem = "9".$value; $hide = mysql_query("UPDATE price SET item='$newitem' WHERE item='$value' "); if(!$hide){ echo("

Could not trash $value. Error: ".mysql_error()."

"); }else{ echo("$value ¦¦ "); } }//4each echo("
Retrieve Deleted Items"); }//there are out items $changeitems = $_POST[changeitems]; $items = $_POST[items]; $skus = $_POST[skus]; $lists = $_POST[lists]; $retails = $_POST[retails]; $specials = $_POST[specials]; $dealers = $_POST[dealers]; $dealer_los = $_POST[dealer_los]; $distributors = $_POST[distributors]; $costs = $_POST[costs]; $units = $_POST[units]; $lo_unitss = $_POST[lo_unitss]; $css = $_POST[css]; $mins = $_POST[mins]; $up_dates = $_POST[up_dates]; $descriptions = $_POST[descriptions]; $itemcount = count($items); $changecount = count($changeitems); if($changecount < 1){ echo("

No changes made. You must check the box next to the Item you wish to edit.

"); }else{ $i=0; while($i < $itemcount){ if(in_array($items[$i], $changeitems)){ $item = $items[$i]; $sku = $skus[$i]; $list = sprintf("%01.2f", $lists[$i]); $retail = sprintf("%01.2f", $retails[$i]); $special = sprintf("%01.2f", $specials[$i]); $dealer = sprintf("%01.2f", $dealers[$i]); $dealer_lo = sprintf("%01.2f", $dealer_los[$i]); $distributor = sprintf("%01.2f", $distributors[$i]); $cost = sprintf("%01.2f", $costs[$i]); $unit = $units[$i]; $lo_units = $lo_unitss[$i]; $cs = $css[$i]; $min = $mins[$i]; $descript = stripslashes($descriptions[$i]); $description = htmlspecialchars($descript, ENT_QUOTES, 'utf-8'); $uppit = mysql_query("UPDATE price SET sku='$sku',list='$list',retail='$retail',special='$special',dealer='$dealer',dealer_lo='$dealer_los[$i]',distributor='$distributor',cost='$cost',unit='$unit',lo_units='$lo_units',cs='$cs',min='$min',up_date='$dtnum',description='$description' WHERE item='$item'"); if(!$uppit){ echo("

Unable to update $item[$i]. Error: ".mysql_error()."

"); }else{//add items to list of successful changes $upped[] = $item; } }//if item is in changeitems array $i = $i + 1; }//while counting items }//there are items checked to be changed if(!empty($upped)){ echo("

EDITED: "); foreach($upped as $value){ echo("$value ¦¦ "); } echo("

"); }//upped is not empty }//uppyisyes ///////////////////////shippy ////////////////////////////// $shippy=$_POST['shippy']; if($shippy=="yes"){ $allshipitems=$_POST[allshipitems]; $shipoutitems=$_POST[shipoutitems]; $shipchangeitems=$_POST[shipchangeitems]; if(!empty($shipoutitems)){ foreach($shipoutitems as $value){ $outit=mysql_query("DELETE FROM ship WHERE item='$value' LIMIT 1"); if(!$outit){ $air[]="Could not delete ".$value.". Error: ".mysql_error(); }else{ $suc[]=$value." Deleted."; } }//4each out item }//there are ship out items to delete $skus=$_POST[skus]; $upcs=$_POST[upcs]; $carriers=$_POST[carriers]; $crr_phones=$_POST[crr_phones]; $crr_accounts=$_POST[crr_accounts]; $classs=$_POST[classs]; $o_citys=$_POST[o_citys]; $o_countrys=$_POST[o_countrys]; $o_codes=$_POST[o_codes]; $units=$_POST[units]; $weight_lbss=$_POST[weight_lbss]; $height_ins=$_POST[height_ins]; $width_ins=$_POST[width_ins]; $length_ins=$_POST[length_ins]; $minimums=$_POST[minimums]; $handlings=$_POST[handlings]; $flats=$_POST[flats]; $rate_1s=$_POST[rate_1s]; $rate_wgt_1s=$_POST[rate_wgt_1s]; $rate_2s=$_POST[rate_2s]; $rate_wgt_2s=$_POST[rate_wgt_2s]; $rate_3s=$_POST[rate_3s]; $rate_wgt_3s=$_POST[rate_wgt_3s]; $i=0; $countem=count($allshipitems); while($i<$countem){ if(in_array($allshipitems[$i],$shipchangeitems)){ $upship=mysql_query("UPDATE ship SET sku='$skus[$i]',upc='$upcs[$i]',carrier='$carriers[$i]',crr_phone='$crr_phones[$i]',crr_account='$crr_accounts[$i]',class='$classs[$i]',o_city='$o_citys[$i]',o_country='$o_countrys[$i]',o_code='$o_codes[$i]',unit='$units[$i]',weight_lbs='$weight_lbss[$i]',height_in='$height_ins[$i]',width_in='$width_ins[$i]',length_in='$length_ins[$i]',minimum='$minimums[$i]',handling='$handlings[$i]',flat='$flats[$i]',rate_1='$rate_1s[$i]',rate_wgt_1='$rate_wgt_1s[$i]',rate_2='$rate_2s[$i]',rate_wgt_2='$rate_wgt_2s[$i]',rate_3='$rate_3s[$i]',rate_wgt_3='$rate_wgt_3s[$i]',up_date='$dtnum' WHERE item='$allshipitems[$i]'"); if(!$upship){ $air[]="Could not update ".$allshipitems[$i]." Error: ".mysql_error(); }else{ $suc[]=$allshipitems[$i]." Updated."; } }//item is in item change array $i=$i+1; }//while counting down all ship items }//shippy is yes ////////////////shipnew//////////////////////////// $newship=$_POST['newship']; if($newship=="yes"){ $newsID=$_POST['newsID']; $newsdesc=$_POST['newsdesc']; $sku=$_POST['sku']; $upc=$_POST['upc']; $carrier=$_POST['carrier']; $crr_phone=$_POST['crr_phone']; $crr_account=$_POST['crr_account']; $class=$_POST['class']; $o_city=$_POST['o_city']; $o_country=$_POST['o_country']; $o_code=$_POST['o_code']; $unit=$_POST['unit']; $weight_lbs=$_POST['weight_lbs']; $height_in=$_POST['height_in']; $width_in=$_POST['width_in']; $length_in=$_POST['length_in']; $minimum=$_POST['minimum']; $handling=$_POST['handling']; $flat=$_POST['flat']; $rate_1=$_POST['rate_1']; $rate_wgt_1=$_POST['rate_wgt_1']; $rate_2=$_POST['rate_2']; $rate_wgt_2=$_POST['rate_wgt_2']; $rate_3=$_POST['rate_3']; $rate_wgt_3=$_POST['rate_wgt_3']; $inny=mysql_query("INSERT INTO ship SET item='$newsID',sku='$sku',upc='$upc',carrier='$carrier',crr_phone='$crr_phone',crr_account='$crr_account',class='$class',o_city='$o_city',o_country='$o_country',o_code='$o_code',unit='$unit',weight_lbs='$weight_lbs',height_in='$height_in',width_in='$width_in',length_in='$length_in',minimum='$minimum',handling='$handling',flat='$flat',rate_1='$rate_1',rate_wgt_1='$rate_wgt_1',rate_2='$rate_2',rate_wgt_2='$rate_wgt_2',rate_3='$rate_3',rate_wgt_3='$rate_wgt_3',up_date='$dtnum',description='$newsdesc'"); if(!$inny){ $air[]="Could not insert ".$newsID.". Error: ".mysql_error(); }else{ $suc[]=$newsID." Inserted."; }///inserted }//newship is yes ///////////////get MFG info////////////////////////// $getem = mysql_query("SELECT ID,co_name,co_rep,email,order_email,reg,address,city,state,ZipCode,country,phone,FAX,website FROM mfg WHERE co_name='$co'"); if(!$getem){ echo("

Could not retrieve Manufacturer Information. Error:
".mysql_error()."

"); }else{ $row = mysql_fetch_array($getem); $ID = $row['ID']; $co_name = $row['co_name']; $co_rep = $row['co_rep']; $email = $row['email']; $order_email = $row['order_email']; $reg = $row['reg']; if($reg == "Yes"){ $checker = "CHECKED"; }else{ $checker = ""; } $address = $row['address']; $city = $row['city']; $state = $row['state']; $ZipCode = $row['ZipCode']; $country = $row['country']; $phone = $row['phone']; $FAX = $row['FAX']; $website = $row['website']; } if(!empty($air)){ echo("

Error: "); foreach($air as $value){ echo("$value ¦¦ "); }//4eachair }//air is not empty if(!empty($suc)){ echo("

Completed: "); foreach($suc as $value){ echo("$value ¦¦ "); }//4eachsuc }//success not empty ?>

*Company Name:
*Contact Name:
*E-mail:
Order E-mail:
Register Contacts with this Manufacturer
Phone:
Website:
Address:
City:
State:
Mail Code:
Country:
FAX:
Product ListAdd to Product List
Could not Get Item List
".mysql_error()."

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

No Items Designated for this Manufacturer.

"); }else{ echo("
" . "" . ""); $rouse = 0; while($row = mysql_fetch_array($getit)){ $rippy = $rouse/10; if(is_int($rippy) and $rippy != 0){ echo(""); } if($row[0]{0}!="9"){ echo("" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . "" . ""); $rouse = $rouse+1; }//first letter of item isnt 9 }//while getting it echo("
DEL" . " Edit " . "Item" . "sku" . "List" . "Retail" . "Special" . "Wholesale" . "Wholesale Lo" . "Distributor" . "Cost" . "Unit" . "Lo Units" . "Case" . "Minimum" . "Updated" . "Description" . "
DEL" . "Edit" . "Item" . "sku" . "List" . "Retail" . "Special" . "Wholesale" . "Wholesale Lo" . "Distributor" . "Cost" . "Unit" . "Lo Units" . "Case" . "Minimum" . "Updated" . "Description" . "
$row[0]
" . "" . "" . "" . "" . "" . "
"); }//there are products in numrows }//gotit ?>
Shipping ListAdd to Shipping List
"); }else{ while($row=mysql_fetch_array($getshipitems)){ $sIDs[]=$row[0]; $sskus[]=$row[1]; $sdescripts[]=$row[2]; }//while fetching items }//got ship items foreach($sIDs as $value){ $cjkshp=mysql_query("SELECT sku FROM ship WHERE item='$value'"); if(!$cjkshp){ $air[]="Cannot check for present shipping records. Error: ".mysql_error(); }else{ $row=mysql_fetch_array($cjkshp); $skewer=$row[0]; if($skewer!=""){ $shiprdy[]=$value; }//is not empty }//checked ship }//4 each item $i=0; $countshitems=count($sIDs); while($i<$countshitems){ if($sIDs[$i]{0}!="9" AND in_array($sIDs[$i],$shiprdy)){ $getoc=mysql_query("SELECT item,sku,upc,carrier,crr_phone,crr_account,class,o_city,o_country,o_code,unit,weight_lbs,height_in,width_in,length_in,minimum,handling,flat,rate_1,rate_wgt_1,rate_2,rate_wgt_2,rate_3,rate_wgt_3,up_date FROM ship WHERE item='$sIDs[$i]' ORDER BY item"); if(!$getoc){ echo(""); }else{ $got=mysql_fetch_array($getoc); $inshipitems[]=$got['item']; $sku=$got['sku']; $upc=$got['upc']; $carrier=$got['carrier']; $crr_phone=$got['crr_phone']; $crr_account=$got['crr_account']; $class=$got['class']; $o_city=$got['o_city']; $o_country=$got['o_country']; $o_code=$got['o_code']; $unit=$got['unit']; $weight_lbs=$got['weight_lbs']; $height_in=$got['height_in']; $width_in=$got['width_in']; $length_in=$got['length_in']; $minimum=$got['minimum']; $handling=$got['handling']; $flat=$got['flat']; $rate_1=$got['rate_1']; $rate_wgt_1=$got['rate_wgt_1']; $rate_2=$got['rate_2']; $rate_wgt_2=$got['rate_wgt_2']; $rate_3=$got['rate_3']; $rate_wgt_3=$got['rate_wgt_3']; $up_date=$got['up_date']; $chunk_up = chunk_split($up_date, 2, ':'); $chunk_arrr = explode(":", $chunk_up); $duem = $chunk_arrr[2].'/'.$chunk_arrr[3].'/'.$chunk_arrr[0].$chunk_arrr[1]; $cheker=$i/2; if(is_int($cheker)){ $shipbg="#eeeeee"; }else{ $shipbg="#E6E6E6"; } echo(""); }//got ocs }//not trash $i=$i+1; }//while counting down shipping item list if(!empty($inshipitems)){ echo(""); }//inshipitems is not empty else{ echo(""); }//inshipitems is empty ?>

Could not Get Item Shipping List
".mysql_error()."

Could not Get Item Shipping List
".mysql_error()."

" . "" . "" . "" . " ITEM: $sIDs[$i]" . "   sku: $sskus[$i]" . "   upc: " . "   Description: $sdescripts[$i]" . "   Updated: $duem" . "
" . "CARRIER:" . " " . "   Phone: " . "   Account: " . "   Class: " . "    FOB" . "   City: " . "   Ctry: " . "   Zip Code: " . "
" . "PER" . "   Unit:    Weight: lb." . "   Height: in." . "   Width: in." . "   Length: in." . "   Minimum: " . "   Handling: \$" . "
" . "RATE" . "   Flat:     Rate 1: \$" . " Weight 1: lbs." . "    Rate 2: \$" . " Weight 2: lbs." . "    Rate 3: \$" . " Weight 3: lbs." . "
" . "" . "" . "" . "" . "" . "
No Items Listed in Shipping for this Manufacturer.
Add Items to Product ListPlease Read Notes Below
Item sku List Retail Special Wholesale Wholesale Lo Distributor Cost Unit Lo Units Case Minimum Updated Description
Insert Rows into Product ListPlease Read Notes Below
Copy and Paste Rows from an Excel Spread Sheet into the Text Area below:

WARNING! Columns must match or item will be rejected.

"); echo(""); }//not already in shipping array and not trash else{ $outers=$outers+1; }//already in shipping $i=$i+1; }//while counting down ship IDs if($outers==$countem){ echo(""); } }//ship id array is not empty else{ echo(""); }//ship id array is empty ?>
Add Items to Shipping ListPlease Read Notes Below
" . " ITEM:" . " $sIDs[$i]"); echo("   sku: $sskus[$i]" . "   upc: " . "   Description: $sdescripts[$i]" . "   Updated: auto" . "
" . "CARRIER:" . " " . "   Phone: " . "   Account: " . "   Class: " . "    FOB" . "   City: " . "   Ctry: " . "   Zip Code: " . "
" . "PER" . "   Unit:    Weight: lb." . "   Height: in." . "   Width: in." . "   Length: in." . "   Minimum: " . "   Handling: \$" . "
" . "RATE" . "   Flat:     Rate 1: \$" . " Weight 1: lbs." . "    Rate 2: \$" . " Weight 2: lbs." . "    Rate 3: \$" . " Weight 3: lbs." . "
" . "" . "" . "" . "" . "" . "
All $co Items in shipping.
An Item must be added to the Product List before shipping information.
MUST READ:

IMPORTANT: The Item Number is the key in the Product Data Base. This is why the Item Number cannot be Duplicated or Edited in this program. If a product requires a new Item Number, it must be Added like a new product. Then the old Item Number should be removed. Notification of the change to applicable parties is recommended.

 Item Numbers must begin with an acceptable category prefix. If they do not, you will receive a message telling you so, and the item will not be added.

 When adding rows from a spread sheet, you must select the CONTENT of the rows to be added.
Simply selecting the rows in Excel will not work. You must select the actual fields in the spread sheet.

 Rows from a spread sheet must match columns in the data base.
To ensure a match, copy and paste the text in the text area below into the first row of your spreadsheet.

1. Right Click in the text area and click "Select All".   2. Right Click and Click "Copy" (Ctrl+C).   3. Select the first cell of the row where you are pasting in Excel.
4. Right Click and Click "Paste" (Ctrl+V).   Should Excel ask for more information, this is a Tab seperated list. (default)

 Errors: There are several reasons that a row of data may be rejected:
   : The Item Number may not match the category of the page from which it is being posted.
   : A Dealer Low price is specified, but Low Units is not.
   : Case has been specified as the Unit, but there is no case lot specified.
   : A Description has not been given for the item.
If entering data using the "Add Items" form table, your data will not be lost and you will be able to correct the error and send again. If you are entering data using the "Insert Rows" function, you will need to correct the data in your spreadsheet and copy and paste the rows again.

 PRICE DISPLAY: There are two areas where prices effect display.:
   : In the Eco-$mart Catalog. To display prices and activate the shopping cart, at least a Retail price must be designated. If List & Retail prices are set to 0.00, a "Quote Request" button will be displayed for that item instead of an "Add to Cart" button.
   : In the Representative Quoting area. If prices are ALL set to 0.00, the item will not be displayed for quoting. NOTE: Setting all prices to 0.00 does not remove the item from the catalog.

© 2010 Eco-$mart, Inc. eco-smart.com Administration Eco-$mart Products Add Manufacturer Trash Bin
Administration Eco-$mart Products Add Items Add Manufacturer Trash Bin