<<<<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(); } $ID = $_GET['ID']; $today = date("F j, Y"); $year = date(Y); $dtnum = date(Ymd); $y02 = $year - 2; $y01 = $year - 1; $y1 = $year + 1; $y2 = $year + 2; $y3 = $year + 3; $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $ok = @mysql_query("SELECT first_name,last_name FROM psw WHERE usrn='$usrn'"); if (!$ok) { echo 'Could not run query: ' . mysql_error(); exit; } $rowa = mysql_fetch_array($ok); $repname1 = $rowa[0]; $repname2 = $rowa[1]; $repname = $repname1." ".$repname2; ?>
Contacts Eco-$mart, Inc.  On-line Administration
Error retrieving data from data base.
' . 'Error: '. mysql_error(). '

'); } $row = mysql_fetch_array($listem); $ID = $row['ID']; $first_Name = $row['first_Name']; $Name = stripslashes($row['Name']); $Title = $row['Title']; $Company = stripslashes($row['Company']); $biztype = $row['biztype']; $Phone = $row['Phone']; $Address = stripslashes($row['Address']); $FAX = $row['FAX']; $City = stripslashes($row['City']); $email = $row['email']; $mkt = $row['mkt']; $State = $row['State']; $ZipCode = $row['ZipCode']; $alt_con = $row['alt_con']; $alt_title = $row['alt_title']; $alt_email = $row['alt_email']; $Link = $row['Link']; $dtnum = $row['dtnum']; $dtup = $row['dtup']; $usrn = $row['usrn']; $usremail = $row['usremail']; $price_level = $row['price_level']; if($price_level == "Dealer" or $price_level == "Wholesale"){ $pl1 = "Wholesale"; $pl2 = "Retail"; }else{ $pl1 = "Retail"; $pl2 = "Wholesale"; } $referred_by = $row['referred_by']; $referee = explode(':', $referred_by); $referrer = $referee[1]; $ref_name = $referee[2]; $ref_RID = $row['ref_RID']; if($mkt == 1){ $mktw = 'Yes'; $mktc = 'checked'; }else{ $mktw = 'No'; $mktc = ''; } ?>
 Manage Contact for    Calendar 
First Name: Title:
Last Name: Business:
Company: Phone:
Address: FAX:
City: Email:
State/Prov:  C’try: Domain:
Mail Code:  List for Email Marketing Program
 Alternate Contact:
  Name: 
     Title: 
   Email: 
Invoice Info:
Price Level: 
Referred by: Could not get Referrer List: ' . mysql_error(); }else{ echo(""); } }else{ echo $ref_name; echo(""); } if($ref_RID != "" AND $ref_RID != 0){ echo("
Registered Referrer.  ID: $ref_RID"); }else{ echo("
 "); } ?>
New Notes:  Notes are dated automatically.
   
Notes:
Error retrieving Notes from data base.
' . 'Error: '. mysql_error(). '

'); } while($rowc = mysql_fetch_array($listemc)){ $CID = $rowc[0]; $Notes = stripslashes($rowc[1]); $dtnum = $rowc[2]; $chunk_dtnum = chunk_split($dtnum, 2, ":"); $chunk_arr = explode(":", $chunk_dtnum); echo("

$chunk_arr[2]-$chunk_arr[3]-$chunk_arr[0]$chunk_arr[1] - $Notes

"); } ?>
Activity Report
Error retrieving data from data base.
' . 'Error: '. mysql_error(). '

'); } while($rowb = mysql_fetch_array($listemb)){ $act_ID = $rowb[0]; $act_y = $rowb[1]; $act_m = $rowb[2]; $act_d = $rowb[3]; $act_type = $rowb[4]; $act_resp = $rowb[5]; $dateup = $dtnum[6]; echo("

~ $act_m-$act_d-$act_y : $act_type : $act_resp

"); } $listemc = @mysql_query("SELECT ID,CID,react_year,react_month,react_day FROM con_reactivity WHERE CID='$ID'"); if (!$listemc) { echo('

Error retrieving data from data base.
' . 'Error: '. mysql_error(). '

'); } $num_rows = mysql_num_rows($listemc); if($num_rows < 1){ $act_flag = ""; }else{ $act_flag = ""; $rowc = mysql_fetch_row($listemc); $RID = $rowc[0]; $CID = $rowc[1]; $ract_y = $rowc[2]; $ract_m = $rowc[3]; $ract_d = $rowc[4]; if($ract_y == 0){ $ract = 'ASAP'; }else{ $ract = $ract_m.'-'.$ract_d.'-'.$ract_y; } echo("

$act_flag~ $ract   " . "Deactivate" . "

"); } ?>

Follow-up Report
  Date:       

 Type: Visit  Phone  Email

 Response: +Pos  ~NC  -Neg

Set RE-Contact Date (OPT)
  Date:       

Error getting quote data.
" . "Error: ". mysql_error()." "); }else{ $numrows = mysql_num_rows($listem); if($numrows < 1){ echo("
No Eco-\$mart Quotes"); }else{ echo("

" . "Eco-\$mart Quotes:

"); while($inv = mysql_fetch_array($listem)){ $QID = $inv[0]; $started=$inv[1]; $chunk_due = chunk_split($started, 2, ':'); $chunk_arrd = explode(":", $chunk_due); $start = $chunk_arrd[2].'/'.$chunk_arrd[3].'/'.$chunk_arrd[0].$chunk_arrd[1]; echo("

" . "X " . "Quote $QID - Started: $start

"); }//while getting quotes }//there are quotes }//got listem mysql_select_db('ecosmar_friendly', $dbcnx); $new = @mysql_query("SELECT ID,Project_Name,status,due FROM task WHERE usrn='$usrn' AND CID='$ID' AND status='Hot' ORDER BY due DESC"); if (!$new) { echo("
Problem getting Hot Projects. Error: ". mysql_error()); } $num_rows = mysql_num_rows($new); if($num_rows > 0){ echo("

" . "Current Projects:"); while($row = mysql_fetch_array($new)){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("
Hot" . " $ProjName - $ProjStat"); } }else{ $newt = @mysql_query("SELECT ID,Project_Name,status,due FROM task WHERE usrn='$usrn' AND CID='$ID' AND status='Open' ORDER BY due DESC"); if (!$newt) { echo("
Problem getting Projects. Error: ". mysql_error()); } $num_rows = mysql_num_rows($newt); if($num_rows < 1){ echo("
No Open Projects"); }else{ echo("

" . "Open Projects:"); while($row = mysql_fetch_array($newt)){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("
  $ProjName - $ProjStat"); } } } echo("

"); ?>
Contact Options
Option Status: Problem getting Mfg. Register". mysql_error() ."

"; }else{ $num_rows = mysql_num_rows($ok4); if($num_rows < 1){ echo ("

Not registered with Manufacturers."); }else{ echo ("

Registered with Manufacturers: "); } while($row4 = mysql_fetch_array($ok4)){ $thisID = $row4['ID']; $thisCID = $row4['CID']; $regarray[] = $row4['MID']; } $i = 0; $mfgcount = count($regarray); while($i < $mfgcount){ $ok5 = @mysql_query("SELECT prod_name FROM mfg WHERE ID='$regarray[$i]'"); if(!$ok5){ echo "

Problem getting Mfg. Register". mysql_error() ."

"; }else{ $row5 = mysql_fetch_array($ok5); $nameo = $row5[0]; echo ("
 $nameo "); } $i = $i+1; } } mysql_select_db('ecosmar_products', $dbcnx); $deely = mysql_query("SELECT proname FROM dealers WHERE zip='$ZipCode' AND email='$email'"); if(!$deely){ echo("Could not check Dealer Status."); }else{ $delcount = mysql_num_rows($deely); if($delcount < 1){ echo(" "); }else{ echo("

" . "Registered Dealer"); while($row = mysql_fetch_array($deely)){ echo("
 $row[0]"); } } } ?>

Register Contact:
• with Manufacturer
• as an Eco-$mart Dealer
• as an Eco-$mart Referrer
New Actions:
• New Eco-$mart Quote
• New Project
 
 Your Contacts   New Contact  Search Your Contacts
Get CSV Help  Return to Your Page 
Eco-$mart Products
©2010 - Data Base Interface - Custom Built at:  kwgrubbs.com