$status = $_COOKIE['status'];
$repped=$_COOKIE['ecorep'];
$mycat=$_COOKIE['ecosmartmycat'];
$print = $_POST['print'];
$ctd=$_GET['ctd'];
if($print == "yes"){
if($ctd==""){
$goprint = "onLoad='javascript:printWindow()'";
}//if not coming from mycatalog
$status="";
$repped="";
$pgbg="white";
}else{
$goprint = "";
$pgbg="#BDDEA0";
}
$cat="DL";
$catname="Daylighting";
$catback="catdaylite.php";
$subcat="Residential / Small Commercial Daylighting";
$back="catdaylite2.php";
$page_name="catdaylite2_1";
$pageback=$page_name.".php";
$here="catdaylite2_1.php";
$hereprint=$here."?print=yes";
$page=$page_name;//change folder if needed
$prodname="Residential Tubular Daylighting Skylight Parts and Accessories";
$mycathere=$here;
if($mycat!=""){
$mycat_link="Add to My Catalog";
}else{
$mycat_link="My Catalog";
}
$items[]="DL-DayTub-Lite";
$itemnames[]="42W Fluorescent Interior Light for Tubular Daylighting Unit";
$items[]="DL-DayTubElb-10";
$itemnames[]="Adjustable Elbow for 10 in. Daylighting Unit";
$items[]="DL-DayTubElb-13";
$itemnames[]="Adjustable Elbow for 13 in. Daylighting Unit";
$items[]="DL-DayTubElb-18";
$itemnames[]="Adjustable Elbow for 18 in. Daylighting Unit";
$items[]="DL-DayTubElb-21";
$itemnames[]="Adjustable Elbow for 21 in. Daylighting Unit";
$items[]="DL-DayTubExt-10";
$itemnames[]="2 ft. Extension for 10 in. Daylighting Unit";
$items[]="DL-DayTubExt-13";
$itemnames[]="2 ft. Extension for 13 in. Daylighting Unit";
$items[]="DL-DayTubExt-18";
$itemnames[]="2 ft. Extension for 18 in. Daylighting Unit";
$items[]="DL-DayTubExt-21";
$itemnames[]="2 ft. Extension for 21 in. Daylighting Unit";
$items[]="DL-DayTubExt-24";
$itemnames[]="2 ft. Extension for 24 in. Daylighting Unit";
$items[]="DL-DayTubSkrt-10";
$itemnames[]="Aluminum Skirt for Tile Roof for 10 in. Daylighting Unit";
$items[]="DL-DayTubSkrt-13";
$itemnames[]="Aluminum Skirt for Tile Roof for 13 in. Daylighting Unit";
$items[]="DL-DayTubSkrt-18";
$itemnames[]="Aluminum Skirt for Tile Roof for 18 in. Daylighting Unit";
/////////////////////////////////////////////////////
$dbcnx = new mysqli('localhost', 'ecoszzqh_produser', 'cata1og', 'ecoszzqh_products');
foreach($items as $value){
$result = $dbcnx->query("SELECT list,retail,special,dealer,unit,cs FROM price WHERE item = '$value'");
if (!$result) {
//echo("ERROR:".mysql_error()."
");
$mess[]="Eco-\$mart Price: Quoted*";
$pay[] = "no";
}else{
$row = $result->fetch_row();
$list = $row['list'];
$retail = $row['retail'];
$special = $row['special'];
$dealer = $row['dealer'];
$unit = $row['unit'];
$units[]=$unit;
$cs = $row['cs']*1;
if($unit == "CS" and $cs > 0){
$unit = "CS*".$cs;
$caseit = "on";
}else{
$caseit = "off";
}
if($dealer !="" and $dealer!=0.00 and $dealer!="0.00" and $dealer>1){
$qoks[]=$value;
}
if($status == 'wholesale'){$charge=$special; $bergen = 'Special';}
elseif($status == 'dealer'){$charge=$dealer; $bergen = 'Wholesale';}
else{$charge=$retail; $bergen = "";}
if($retail == "0.00" and $list == "0.00" or $retail="" or $list==""){
$mess[]="Eco-\$mart Price: Quoted";
$pay[] = "no";
}else{
if($retail != "0.00" and $list == "0.00"){
$pay[] = "yes";
if($bergen != ""){
$mess[]="Regular Price: \$".$retail."" .
" Eco-\$mart ".$bergen." Price: \$".$charge."";
}else{
$mess[]="Eco-\$mart Price: \$".$charge." ".$unit."";
}//no special pricing
}//retail is not 0 and list is
else{//all present
$pay[] = "yes";
if($bergen != ""){
$mess[]="List Price: \$".$list."".
" Regular Price: \$".$retail."" .
"
Eco-\$mart ".$bergen." Price: \$".$charge." ".$unit."";
}else{//list but no special pricing
$mess[]="List Price: \$".$list."".
" Eco-\$mart Price: \$".$charge." ".$unit."";
}
}//allpresent
}//retail and list are 0.00
if($caseit == "on"){
$cso[] = $cs.":".$charge;
$casecharge = $charge * $cs;
$price[] = sprintf("%01.2f", $casecharge);
}else{
$price[] = $charge;
$cso[] = "";
}//no cases
if($status == 'dealer' and $print=="yes")
$mess[]="Eco-\$mart Wholesale Price: \$".$charge." ".$unit."";
}//got result
}//4eachitem
?>
Residential / Small Commercial Daylighting
Parts/Accessories
Each Tubular Day Lighting Unit includes exterior acrylic dome, 4’ long reflective light tube, roof flashing, caulk, interior lens and trim.
Below you will find parts and accessories that will aid in installation and improve the function of the unit.
" .
" $itemnames[$i] $items[$i] $mess[$i] " . " | " . " |
" .
" $itemnames[$i] $items[$i] $mess[$i]"); if($print!="yes"){ echo(" | " . "" . "" . "Quote "); }//print is not yes echo(" |
" .
" $itemnames[$i] $items[$i] $mess[$i] |
Shipping Calculated on next page. |
" . "" . "©2010 Eco-\$mart, Inc." . " (888) 329-2705" . " info@eco-smart.com" . " www.eco-smart.com" . " |
" .
" $mycat_link " . " << Return to $subcat" . " | ||
" . "" . " ©2010 Eco-\$mart, Inc." . " (888) 329-2705" . " info@eco-smart.com" . " www.eco-smart.com" . " | " . " QUOTE " . " | " . " PRINT " . " |
" .
"
" . " Eco-\$mart Representative $repped Logged In. "); mysql_select_db('ecosmar_inv', $dbcnx); $getquote = $dbcnx->query("SELECT ID,CID FROM quotes WHERE usrn='$repped'"); if(!$getquote){ $air[]="Could not get quotes for ".$repped.". Error: ".mysql_error(); $show="off"; }else{ $numquos=mysql_num_rows($getquote); if($numquos < 1){ $show="off"; $air[]="No Quotes Started."; }else{//there are quotes while($rowq=mysql_fetch_array($getquote)){ $QIDs[]=$rowq['ID']; $CIDs[]=$rowq['CID']; }//while getting and filling arrays mysql_select_db('ecosmar_contacts', $dbcnx); foreach($CIDs as $value){ $getcon=mysql_query("SELECT first_Name,Name,Company FROM con_main WHERE ID='$value'"); if(!$getcon){ $air[]="Could not get contact info for contact. Error: ".mysql_error(); $show="off"; }else{ $rowc=mysql_fetch_array($getcon); $first_Name=$rowc[0]; $Name=$rowc[1]; $Company=$rowc[2]; if($Company!=""){ $quocos[]=$Company; }else{ $quocos[]=$first_Name." ".$Name; } }//got contact }//4each quote/contact ID }//there are quotes }//got quote $i=0; $countem=count($items); while($i<$countem){ if(in_array($items[$i],$qoks)){ $ast[]=$items[$i]; $astname[]=$itemnames[$i]; }//in array with dealer prices $i=$i+1; }//while counting items if(empty($ast)){ $air[]="No Quotes. No qualifying prices."; $show="off"; } if($show=="on"){ echo("");
foreach($air as $value){
echo(" ");
}//air is not empty
}//print is not yes
?>
$value"); }//4each echo(" |