<<<<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(); } $MID=$_POST['listmfg']; ?>
Contacts Eco-$mart, Inc.  On-line Administration
 Contact Registration List by Manufacturer Below is a text area containing a Comma Separated List for pasting into any spreadsheet.
Paste at cell A1 for best results. In some programs, you will need to designate the insert as from a Comma Separated List
Could not retrieve Manufacturer Info.
" . "Error: ". mysql_error(). ""); }else{ $rouse=mysql_fetch_array($getem); $co_company=$rouse['co_name']; $co_rep=$rouse['co_rep']; $co_email=$rouse['email']; }//gotem $listem = @mysql_query("SELECT CID FROM mfg_con WHERE MID='$MID'"); if (!$listem) { echo("
Could not retrieve Registered Contacts.
" . "Error: ". mysql_error(). "
"); } $num_rows = mysql_num_rows($listem); if($num_rows < 1){ echo("
No Manufacturer Contacts Registered
"); }else{ while($conrow=mysql_fetch_array($listem)){ $CIDs[]=$conrow['CID']; }//while getting contacts }//there are contacts registered mysql_select_db('ecosmar_contacts', $dbcnx); foreach($CIDs as $value){ $getcon=mysql_query("SELECT first_Name,Name,Company,biztype,Phone,Address,City,State,ZipCode,usrn FROM con_main WHERE ID='$value'"); if(!$getcon){ $erro[]=$value; }else{ $rowd=mysql_fetch_array($getcon); $first_Names[]=str_replace(","," ",$rowd['first_Name']); $Names[]=str_replace(","," ",$rowd['Name']); $Companys[]=str_replace(","," ",$rowd['Company']); $biztypes[]=$rowd['biztype']; $Phones[]=$rowd['Phone']; $Addresss[]=str_replace(","," ",$rowd['Address']); $Citys[]=str_replace(","," ",$rowd['City']); $States[]=str_replace(","," ",$rowd['State']); $ZipCodes[]=substr($rowd['ZipCode'],0,5); $rep_usrns[]=str_replace(","," ",$rowd['usrn']); }//gotcon }//4eachCIDs if(!empty($erro)){ echo("
Contact Information Incomplete. Contact IDs not retrieved:
"); foreach($erro as $value){ echo("$value, "); } echo("
"); }//there were errors $counted=count($rep_usrns); if($counted>0){ echo("
" . "" . "" . "
" . "MANUFACTURER:,$co_company,,CONTACT:,$co_rep,,EMAIL:,$co_email,,

" . "NAME1,NAME2,COMPANY,BUSINESS,PHONE,ADDRESS,CITY,STATE,ZIP,REPRESENTATIVE
\n"); $i=0; while($i<$counted){ echo("$first_Names[$i],$Names[$i],$Companys[$i],$biztypes[$i],$Phones[$i],$Addresss[$i],$Citys[$i],$States[$i],$ZipCodes[$i],$rep_usrns[$i]
"); $i=$i+1; }//while counting down echo("
"); }//more than 0 contacts registered ?>
TESTED - 10/07/2010 " . "" . "
" . "" . "
" . " New Referrers " . "" . " List Referrers " . "" . " Your Contacts " . "" . " All Contacts " . "" . " Return to Your Page " . "
" . "
" . "Eco-$mart Products" . "
" . "" . "
©2007 - Data Base Interface - Custom Built at: " . "kwgrubbs.com" . "
"); }else{ echo("
" . "" . "
" . "" . "
" . " Eco-\$mart Administration " . "" . " New Referrers " . "
" . "
" . "Eco-$mart Products" . "
" . "" . "
©2010 - Data Base Interface - Custom Built at: " . "kwgrubbs.com" . "
"); } ?>