Problem! Please try to log in again.

"); exit(); } $repped=$_COOKIE['ecorep']; if($repped==""){ setcookie('ecorep',$usrn,time()+60*60*24*365*10,"/",".ecosmartinc.com"); } ?> Eco-$mart Administration Problem! Please try to log in again.

"); exit(); } $month = date("M"); $day = date("j"); $year = date("Y"); $arrow_rgt = ""; $arrow_sub_rgt = ""; /* $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $ok = @mysql_query("SELECT ID,first_name,last_name,usrn,email,pswd,pswrep,pswcon,pswcal,pswwbs,pswdls,pswvid,pswcat,pswpdb,pswsp,pswinv,pswweb,pswtr,pswpub,pswadmin,pswpsw,pswml,up_date FROM psw WHERE usrn ='$usrn'"); if (!$ok){ die ("

Error Selecting User from Data Base!
". 'Error:' . mysql_error() . '

'); } $result = mysql_fetch_row($ok); */ $sql = "SELECT ID,first_name,last_name,usrn,email,pswd,pswrep,pswcon,pswcal,pswwbs,pswdls,pswvid,pswcat,pswpdb,pswsp,pswinv,pswweb,pswtr,pswpub,pswadmin,pswpsw,pswml,up_date FROM psw WHERE usrn ='$usrn'"; $result = dbq($sql, "f"); //All the ones below this use the customer dbase, hence, will have 'o' flag if (!$result){ die ("

Dbase Error

"); } $id = $result[0]; $first_name = $result[1]; $last_name = $result[2]; $usrn = $result[3]; $email = $result[4]; $pswd = $result[5]; $pswrep = $result[6]; $pswcon = $result[7]; $pswcal = $result[8]; $pswwbs = $result[9]; $pswdls = $result[10]; $pswvid = $result[11]; $pswcat = $result[12]; $pswpdb = $result[13]; $pswsp = $result[14]; $pswinv = $result[15]; $pswweb = $result[16]; $pswtr = $result[17]; $pswpub = $result[18]; $pswadmin = $result[19]; $pswpsw = $result[20]; $pswml = $result[21]; $up_date = $result[22]; if($pswcal == 'Own'){ $cal = "
Project Calendar
"; }elseif($pswcal == 'RD'){ $cal = "Project Calendar" . "
Regional Project Calendar"; }elseif($pswcal == 'All'){ $cal = "Project Calendar" . "
All Project Calendars"; }else{ $cal = " "; } if($pswcon == 'Own'){ $con = "
My Contacts"; }elseif($pswcon == 'RD'){ $con = "My Contacts" . "
Regional Contacts"; }elseif($pswcon == 'All'){ $con = "My Contacts" . "
All Contacts" . "
Web Contacts"; }else{ $con = " "; } if($pswvid == 'OK'){ $aud = "Audio Library"; }else{ $aud = " "; } if($pswpsw == 'All'){ $aud2 = "
Audio Profiles"; }else{ $aud2 =" "; } if($pswpsw == 'All'){ $dls = "Downloads" . "
 Download List "; }elseif($pswdls == 'OK'){ $dls = "Downloads"; }else{ $dls = " "; } if($pswpsw == 'All'){ $vid = "Video"; }else{ $vid = " "; } if($pswwbs == 'Yes'){ $wbs = "My Webpage*"; }else{ $wbs = " "; } if($pswpub == 'Write'){ $pub = "Edit Public Calendar"; $ofc = "Edit Eco-\$mart Office"; }else{ $pub = " "; $ofc = " "; } if($pswtr == 'OK'){ $tr = "Traffic Report"; }else{ $tr = " "; } if($pswpsw == 'All'){ $agt = "Agents"; $off = "Offices"; $ref1 = "Referrers List"; $trk = "WebTrak"; $ref2 = "New Requested Referrers"; $psw = "Username/Password"; $inv1 = "QUOTES"; $inv2 = "New Invoices"; $wbf= "Webfeed"; } if($pswsp == 'Yes'){ $sp = "Special Pricing"; } if($pswpsw == 'Read'){ $psw = "Check Username/Password"; } if($pswpdb == 'Yes'){ $pdb = "Product Data Base"; $fpd = "Featured Product"; $phc = "Page Hit Counter"; $drl = "Dealers List"; $drp = "Dealer Products"; $mfg = "Manufacturers List"; $rfp = "Referred Products"; }else{ $pdb = " "; } //ecologged out if($pswinv == 'All'){ $ivt = "Product Inventory"; } $log = "Edit Log-in Information"; /* mysql_select_db('ecosmar_contacts', $dbcnx); $checkem = @mysql_query("SELECT react_month FROM con_reactivity WHERE usrn='$usrn'"); if(!$checkem){ echo('

Error Checking Activity.
' . 'Error: '. mysql_error(). '

'); }else{ $num_rows = mysql_num_rows($checkem); */ //ecoszzqh_contacts is actually a mix of contacts, friendly, and inventory. $num = dbq("SELECT react_month FROM con_reactivity WHERE usrn='$usrn'","co"); if($num == 0){ $act_flag = "icoconoff.gif"; }else{ $act_flag = "icoconon.gif"; } /* mysql_select_db('ecosmar_friendly', $dbcnx); $urges = @mysql_query("SELECT ID FROM messages WHERE usrn='$usrn' AND status='urgent'"); */ $unumrows = dbq("SELECT ID FROM messages WHERE usrn='$usrn' AND status='urgent'","co"); if($unumrows > 0){ $calurg = "URGENT MESSAGE"; }else{ $calurg = ""; } /* $listem = @mysql_query("SELECT ID FROM messages WHERE usrn='$usrn' AND status='unread'"); */ $num_rows = dbq("SELECT ID FROM messages WHERE usrn='$usrn' AND status='unread'","co"); if($num_rows > 0){ if($num_rows == 1){ $calmess = "1 New Message"; }else{ $calmess = "".$num_rows." New Messages"; } }else{ if($unumrows > 0){ $calmess = "No Other Messages"; }else{ $calmess = "No New Messages"; } } ?>
Please Log Out Eco-$mart, Inc.  On-line Administration
" . "" . "

Functions for  

  

icoconon.gif
Current Projects:
0){ while($row = mysql_fetch_array($new)){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("Hot" . " $ProjName - $ProjStat
"); } } */ $new = dbq("SELECT ID,Project_Name,status,due FROM task WHERE usrn='$usrn' AND status='Hot' ORDER BY due DESC","o"); foreach($new as $row){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("Hot" . " $ProjName - $ProjStat
"); } /* $newt = @mysql_query("SELECT ID,Project_Name,status,due FROM task WHERE usrn='$usrn' 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 Current Projects"); }else{ while($row = mysql_fetch_array($newt)){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("Hot" . "  $ProjName - $ProjStat
"); } } } */ $newt = dbq("SELECT ID,Project_Name,status,due FROM task WHERE usrn='$usrn' AND status='Open' ORDER BY due DESC", "o"); if (count($newt) == 0) echo "No Current Projects. \r\n"; foreach($newt as $row){ $ProjID = $row[0]; $ProjName = $row[1]; $ProjStat = $row[2]; echo("Hot" . "  $ProjName - $ProjStat
"); } ?>

 

Eco-$mart Quotes:
0){ while($row=mysql_fetch_array($getquotes)){ $QIDs[]=$row['ID']; $CIDs[]=$row['CID']; $start=$row['started']; $chunk_st = chunk_split($start, 2, ':'); $chunk_arrs = explode(":", $chunk_st); $starts = $chunk_arrs[2].'/'.$chunk_arrs[3].'/'.$chunk_arrs[0].$chunk_arrs[1]; $starteds[]= $starts; }//while getting rows }//there are rows else{ echo("

No Quotes Started

"); $stopit="stop"; }//no quotes }//got quotes */ $getquotes=dbq("SELECT ID,CID,started FROM quotes_inv WHERE usrn='$usrn' ORDER BY started DESC", "ao"); if (count($getquotes) == 0) echo("

No Quotes Started

"); foreach($getquotes as $row){ $QIDs[]=$row['ID']; $CIDs[]=$row['CID']; $start=$row['started']; $chunk_st = chunk_split($start, 2, ':'); $chunk_arrs = explode(":", $chunk_st); $starts = $chunk_arrs[2].'/'.$chunk_arrs[3].'/'.$chunk_arrs[0].$chunk_arrs[1]; $starteds[]= $starts; } if($stopit!="stop"){ $i=0; $countem=count($QIDs); /* mysql_select_db('ecosmar_contacts', $dbcnx); while($i<$countem){ $getqcon=mysql_query("SELECT first_Name,Name,Company FROM con_main WHERE ID='$CIDs[$i]'"); if(!$getqcon){ $air[]="Problem getting Quote Contacts. Error: ". mysql_error(); }else{ $qcon=mysql_fetch_array($getqcon); $first_Name=$qcon['first_Name']; $Name=$qcon['Name']; $Company=$qcon['Company']; if($Company!=""){ $greet=$Company; }else{ $greet=$first_Name." ".$Name; }//company is blank }//got quote contact */ while($i<$countem){ $qcon=dbq("SELECT first_Name,Name,Company FROM con_main WHERE ID='$CIDs[$i]'" , "ao"); if (count($qcon) > 0){ $qcon = $qcon[0]; $first_Name=$qcon['first_Name']; $Name=$qcon['Name']; $Company=$qcon['Company']; if($Company!=""){ $greet=$Company; }else{ $greet=$first_Name." ".$Name; }//company is blank }//got quote contact echo("

 • " . "X " . "Quote $QIDs[$i] - $greet
Started: $starteds[$i]

"); $i=$i+1; }//while counting down QIDs }//stopit is not stop if(!empty($air)){ foreach($air as $value){ echo("$value
"); }//foreach air }//air is not empty ?>

 

Downloads:
" . "
" . "General Administration:" . "
$agt" . "$ref1" . "$trk" . "$sp" . "
$off" . "$ref2" . "$psw" . "
" . "" . "
" . "Quotes" . "$inv1" . " " . "
"); } if($pswml == 'All'){ echo("" . "
" . "Mail:" . "
" . "" . "Mass Mail Contacts" . "" . "" . "Mass Mail Outside List" . "" . "" . "Sent Mail" . "
"); } if($pswpsw == 'All'){ echo("" . "" . "" . "" . "" . "
" . "Products:" . "
$pdb" . "$ivt" . "$wbf" . "
$drl" . "$drp" . "$mfg" . "
$fpd" . "$phc" . "$rfp" . "
"); } if($pswinv == 'Read'){ echo("" . "
" . "Products:" . "$ivtrd $ivtrw" . "
"); } ?>
 Website:
Memo:
No Memo Posted"); }else{ $author = $row['author']; $memo = stripslashes($row['memo']); $dtnum = $row['dtnum']; $chunk_mdt = chunk_split($dtnum, 2, ':'); $chunk_arrm = explode(":", $chunk_mdt); $duem = $chunk_arrm[2].'/'.$chunk_arrm[3].'/'.$chunk_arrm[0].$chunk_arrm[1]; echo("

From: $author -- $duem" . "

$memo" . "

 

"); } } */ $new = dbq("SELECT author,memo,dtnum FROM main_memo", "ao"); if (count($new) == 0) echo("

No Memo Posted"); foreach($new as $row){ $author = $row['author']; $memo = stripslashes($row['memo']); $dtnum = $row['dtnum']; $chunk_mdt = chunk_split($dtnum, 2, ':'); $chunk_arrm = explode(":", $chunk_mdt); $duem = $chunk_arrm[2].'/'.$chunk_arrm[3].'/'.$chunk_arrm[0].$chunk_arrm[1]; echo("

From: $author -- $duem" . "

$memo" . "

 

"); } ?>
" . "Edit Memo" . "

"); } ?>
 
©2007 - Data Base Interface - Custom Built at: kwgrubbs.com