";} } $id=hackerDefense($id); if ($id!="") { if(!is_numeric($id)) {$id="";} } $aff_id=hackerDefense($aff_id); if (!isset($cart_id)) { $cookie_expire=8800; $time=time(); if ($remote_address=="") { $remote_address=strtoupper(uniqid("WOM1")); } if (ereg("MSIE", getenv("HTTP_USER_AGENT"))) { $ck_time=time()+8800; setcookie("cart_id","$remote_address-$time-$aff_id",$ck_time+$cookie_expire,"/",".compasservicesinc.com",0); // Original code //setcookie("user","$val",$date,"/",".worldofmobility.co.uk",0); } else { setcookie("cart_id","$remote_address-$time-$aff_id",time()+8800,"/",".compasservicesinc.com",0); } } else { $temp=split("-",$cart_id); $ip=$temp[0]; $time=$temp[1]; $aff_id=$temp[2]; } $id=$cart_id; mysql_connect("$DBHost","$DBUser","$DBPass"); mysql_select_db("$DB"); $result=mysql_query("select * from $items where id='$sku_id'"); $row = mysql_fetch_row($result); $item_sku=$row[1]; $item_name=$row[4]; $category=$row[2]; $subcategory=$row[3]; $extra_title=$row[19]; $keywords=$row[20]; $style="font-size: 9pt; height: auto; width: auto;"; if ($sku_id!="") { echo "\n"; echo "\n"; echo "\n\n"; echo "$item_name | $extra_title | Do It Yourself Pest Control Products | Kissimmee Orlando Pest Control\n"; echo "\n"; echo " \n"; include('header.php'); } else { commonHeader("cart.php",""); } echo "
\n"; //echo "\n\n\n\n"; if ($command=="calc" || $add2cart=="OrderNow") { mysql_connect("$DBHost","$DBUser","$DBPass"); mysql_select_db("$DB"); // Find Multi Price echo "\n\n"; if ($price_id!="") { $result=mysql_query("select * from multi_price where id='$price_id'"); $row = mysql_fetch_row($result); if ($row[4]!=1) { $base_price=$row[3]*$quantity; } else { $orig_price_id=$price_id; $result2=mysql_query("select * from multi_price where item_id='$sku_id' and top_qty>'$quantity' order by top_qty asc"); $temp_count=mysql_num_rows($result2); if ($temp_count>0) { $row2 = mysql_fetch_row($result2); $price_id=$row2[0]; $base_price=$row2[3]*$quantity; if ($orig_price_id!=$price_id) { echo "
Adjusted Quantity Pricing: $$row2[3] x $quantity

\n"; } } else { $result2=mysql_query("select * from multi_price where item_id='$sku_id' order by top_qty desc"); $row2 = mysql_fetch_row($result2); $price_id=$row2[0]; $base_price=$row2[3]*$quantity; if ($orig_price_id!=$price_id) { echo "
Adjusted Quantity Pricing: $$row2[3] x $quantity

\n"; } } } } // Main Price is set, so check options. echo "\n\n\n"; echo "\n\n\n"; if ($option_count>0) { echo "\n\n\n"; for ($i=0;$i<$option_count;$i++) { echo "\n\n\n"; $temp_option=explode("|",$option_value[$i]); echo "\n\n\n"; if ($temp_option[2]!="") { $item_price=$item_price+$temp_option[2]; } $cart_option_name[$i]=$temp_option[0]; $cart_option_id[$i]=$temp_option[1]; $cart_option_value[$i]=$temp_option[3]; } //$item_price=$item_price+$base_price; //$price_shown=$item_price; } $item_price=$item_price+$base_price; $price_shown=$item_price; if ($add2cart=='OrderNow') { if ($quantity=="" || $quantity==0) {$quantity=1;} if ($price_shown=="0.00" || $price_shown=="" || $price_shown=="0") { $add_cart_error=1; } echo "\n\n"; $date_now=time(); if ($add_cart_error==0) { mysql("$DB", "INSERT INTO cart (id,cust_id,sku_id,quantity,from_multi,final_price,aff_id,date_in) values ('','$cart_id','$sku_id','$quantity','$price_id','$price_shown','$aff_id','$date_now')"); $result=mysql_query("select * from cart where cust_id='$cart_id' and sku_id='$sku_id' and date_in='$date_now'"); $row = mysql_fetch_row($result); $cart_item_id=$row[0]; // Section off information for options side of cart. if ($option_count>0) { for ($i=0;$i<$option_count;$i++) { if ($option_value[$i]!="") { mysql("$DB", "INSERT INTO cart_options (id,cust_id,sku_id,item_option_id,item_option_value,cart_id,date_in) values ('','$cart_id','$sku_id','$option_id[$i]','$cart_option_id[$i]','$cart_item_id','$date_now')"); } } } echo "
Item Added To Cart
\n"; $item_counter=0; $result=mysql_query("select quantity from cart where cust_id='$cart_id'"); while ($row = mysql_fetch_row($result)) { $item_counter++; } echo "\n"; if ($item_counter==1) { echo "
You have $item_counter item in your cart. View Cart

"; } elseif ($item_counter>1) { echo "
You have $item_counter items in your cart. View Cart

"; } echo "
\n"; } else { echo "
Item NOT Added To Cart
\n"; echo "
$add_cart_error_name[$add_cart_error]
\n"; } } } echo "\n\n"; echo "
\n"; echo "
\n"; echo ""; echo "Your are here: Home :: "; $result2=mysql_query("select * from categories where cat_id='$category'"); $row2 = mysql_fetch_row($result2); echo "$row2[1]"; if ($subcategory!="0") { $result3=mysql_query("select * from subcategory where id='$subcategory'"); $row3 = mysql_fetch_row($result3); echo " :: $row3[1]"; } echo ""; echo " :: $item_name"; echo ""; echo ""; echo "
\n"; echo "Pest Control Products\n"; echo "
\n"; echo "
\n"; echo "\n"; // Pull Cart Item Information $result=mysql_query("select * from $items where id='$sku_id'"); while ($row = mysql_fetch_row($result)) { echo "
"; // echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; if ($row[11] !=""){ echo "\n"; echo "\n"; echo"
$row[19]"; } else { echo "
"; } // Show Quick Specs echo "

\n"; if ($foo=="foo") { echo ""; $result4=mysql_query("select * from item_quick_specs where sku_id='$sku_id'"); while ($row4 = mysql_fetch_row($result4)) { echo ""; } } echo "
Quick Specifications:
·
$row4[2]
"; echo "
$row[4]
"; echo "
Pest ControlProducts
\n"; echo "
\n"; echo "$row[6]
"; //if ($row[9]!=0 && $row[9]!="0.00") { // echo "
MSRP: $$row[9]\n"; //} echo "
\n"; /*echo "
\n"; # Use Which Price if ($row[18]!=1) { if ($row[8]==1) { // Special Price $base_price=$row[9]; echo "\n"; if ($item_price!="" && $item_price!=$base_price) { echo"\n"; echo ""; echo ""; echo "\n"; } */ echo "
Our Price: $$item_price\n"; echo "
(Price Shown With Upgrades)
\n"; echo "\n"; } else { echo"
Our Price: $$row[9]\n"; echo "\n"; } } else { $base_price=$row[7]; // Use Regular Price echo "\n"; if ($item_price!="" && $item_price!=$base_price) { if ($item_price!="0.00") { echo"
Our Price: $$item_price\n"; echo "
(Price Shown With Upgrades)
\n"; echo "\n"; } else { echo "
\n"; } } else { if ($row[7]!="0.00") { echo"
Our Price: $$row[7]\n"; echo "\n"; } else { echo "
\n"; } } } } else { $result2=mysql_query("select * from multi_price where sku_id='$sku_id'"); echo "Select:\n"; } */ /*if ($row[7]!="0.00") { echo "
\n"; echo"Quantity:

Submit
\n"; // Show Main Specifications //echo "
$row[16]
\n"; //echo "
\n"; //if ((($date_now/100000)-($row[13]/100000))<10){ // echo"
New Item!\n"; // } // echo " 
\n"; //if ($row[5]==1) { // echo"
Item On Special!\n"; // } echo "
\n"; if ($foo=="foo") { echo "
\n"; echo ""; echo ""; echo "
"; $spec_bgcolor1=""; $spec_bgcolor2="#EEEEEE"; $spec_bgcolor=$spec_bgcolor1; echo "\n"; echo ""; $result4=mysql_query("select * from item_full_specs where sku_id='$sku_id' order by option_order asc"); while ($row4 = mysql_fetch_row($result4)) { echo ""; if ($spec_bgcolor==$spec_bgcolor1) { $spec_bgcolor=$spec_bgcolor2; } else { $spec_bgcolor=$spec_bgcolor1; } } echo "
Detailed Specifications:"; echo "
\n"; echo "
$row4[2]: 
$row4[3]
\n"; echo "

"; // End Spec table } if ($foo=="foo") { // Begin Option and Order echo "\n"; echo "
\n"; // Customize section for item. //echo "Customize section.
"; // Check to see if we need to include options //if ($row[12]==1) { echo "Customized Your Order:
\n"; echo "\n"; $option_count=0; $result2=mysql_query("select * from item_options where sku_id='$sku_id'"); while ($row2 = mysql_fetch_row($result2)) { if ($row2[1]==$sku_id) { echo "\n"; echo "\n"; echo "\n"; if ($row2[3]==4) { echo "\n"; } elseif ($row2[3]==3) { /// Radio Button Option echo "\n"; } elseif ($row2[3]==2) { /// Check Box Single Button echo "\n"; } elseif ($row2[3]==1) { echo "\n"; } echo "\n"; $option_count++; } } echo "\n"; echo "\n"; if ($option_count>0) { echo ""; } else { echo "\n"; } echo "
$row2[2]\n"; echo "\n"; $result4=mysql_query("select * from item_options_value where option_id='$row2[0]' order by option_value_order asc"); while ($row4 = mysql_fetch_row($result4)) { echo " $row4[2] +$$row4[4]
\n"; } else { echo "'$row4[2]|$row4[0]' "; if (stripslashes($option_value[$option_count])=="$row4[2]|$row4[0]") {echo "checked";} echo "> $row4[2]
\n"; } } echo "
\n"; $result4=mysql_query("select * from item_options_value where option_id='$row2[0]' order by option_value_order_asc"); while ($row4 = mysql_fetch_row($result4)) { echo " $row4[2] +$$row4[4]
\n"; } else { echo "'$row4[2]|$row4[0]' "; if (stripslashes($option_value[$option_count])=="$row4[2]|$row4[0]") {echo "checked";} echo "> $row4[2]
\n"; } } echo "
\n"; $result4=mysql_query("select * from item_options_value where option_id='$row2[0]' order by option_value_order"); $row4 = mysql_fetch_row($result4); echo " $row4[2] +$$row4[4]
\n"; } else { echo "'$row4[2]|$row4[0]' "; if (stripslashes($option_value[$option_count])=="$row4[2]|$row4[0]") {echo "checked";} echo "> $row4[2]
\n"; } echo "

No Customization
Options Available
\n"; //} //} // End Customized Section echo "
\n"; echo "Buy:
\n"; echo "
\n"; # Use Which Price if ($row[18]!=1) { if ($row[8]==1) { // Special Price $base_price=$row[9]; echo "\n"; if ($item_price!="" && $item_price!=$base_price) { echo""; //echo "\n"; // echo "\n"; } echo "
Your Price: £$item_price\n"; echo "\n"; } else { echo"Your Price: £$row[9]\n"; echo "\n"; } } else { $base_price=$row[7]; // Use Regular Price echo "\n"; if ($item_price!="" && $item_price!=$base_price) { if ($item_price!="0.00") { echo"Your Price: $$item_price\n"; echo "\n"; } else { echo "\n"; } } else { if ($row[7]!="0.00") { echo"Our Price: $$row[7]\n"; echo "\n"; } else { echo "\n"; } } } } else { $result2=mysql_query("select * from multi_price where sku_id='$sku_id'"); echo "Select:\n"; } echo "
Here\n"; if($row[7]!="0.00") { //echo"Quantity:\n"; //echo "


Submit
\n"; echo "
\n"; } echo "
\n"; $i++; } // Add to view count //if ($sku!="") { // $date_year=date("Y",time()); // $date_month=date("m",time()); // $date_stamp="$date_year$date_month"; // Check to see if item has been viewed this month // $result=mysql_query("select * from item_views where sku='$sku' and date='$date_stamp'"); // $row = mysql_fetch_row($result); // if ($row[1]==$sku) { // // Add one to the view count for sku already logged // mysql("$DB", "UPDATE item_views SET views=views+1 where id='$row[0]'"); // } else { // // Insert item into view count // mysql("$DB", "INSERT INTO item_views (id,sku,date,views) values ('', '$sku', '$date_stamp','1')"); // } //} echo "
"; echo "\n"; // Create Quote Form echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "Request Information On This Product:"; echo "
\n"; echo "
Your Name:
E-mail:
Phone:
Comments
\n"; echo "


\n"; //commonMenu(); echo "
\n"; ?> 0) { echo "

View Cart | "; echo "Continue Browsing


\n"; echo "\n"; } commonFooter(); ?>