header("HTTP/1.1 200 OK");
include("dbdb.php");
$var_array = explode("/",$_SERVER['REQUEST_URI']);
$num = sizeof($var_array);
function count_all($arg)
{
// skip if argument is empty
if ($arg) {
// not an array, return 1 (base case)
if(!is_array($arg))
return 1;
// else call recursively for all elements $arg
foreach($arg as $key => $val)
$count += count_all($val);
return $count;
}
}
$num = count_all($url_array);
$itemcat=$var_array[1];
$item=$var_array[2];
$var_array = explode(".",$item);
$itemget=$var_array[0];
$pagetest=$var_array[1];
$itemnum = $itemget - $quan1;
if ($pagetest != "html"){
$itemnum = "404";
$prodid = "Not Found";
$description = "Not Found";
$title = "Not Found";
$price = "0";
$quanity = "Not Found";
$newprice = $price * $stprice;
$prodid2 = $prodid + $quan1;
}
else
{
$itemnum = $_GET['id'];
if($itemnum > 100000)
{
$itemnum = $itemnum - 22222;
$sqlquery = "select * from inventory3 where prodid = '$itemnum'";
}
else
{
$itemnum = $itemnum - 22222;
$sqlquery = "select * from inventory2 where prodid = '$itemnum'";
}
dbConnect("$dbname");
$query = mysql_query ("$sqlquery");
$numrows = mysql_num_rows($query);
if ($numrows == "0"){
$itemnum = "404";
$prodid = "-22222";
$description = "Not Found";
$title = "Not Found";
$price = "0";
$quanity = "Not Found";
$newprice = $price * $stprice;
$prodid2 = $prodid + $quan1;
}
else
{
function Money($float) { return sprintf("%01.2f", $float); }
$prodid = mysql_result($query,$I,"prodid");
$description = mysql_result($query,$I,"description");
$description = str_replace('""','"',$description);
$title = mysql_result($query,$I,"title");
$title = str_replace('""','"',$title);
$retail = mysql_result($query,$I,"retail");
$price = mysql_result($query,$I,"price");
$price = stripslashes($price);
$price = str_replace("$","",$price);
$newprice = $price + $price;
$sale = mysql_result($query,$I,"sale");
if($newprice < 30) { $newprice = $retail; }
if($newprice > 70) { $newprice = $newprice - "10.00"; }
if($newprice > 150) { $newprice = $newprice - "10.00"; }
if($newprice > 200) { $newprice = $newprice - "10.00"; }
$newprice = Money($newprice + "0.00");
//flat rate shipping for paypal
$shipping = "5.95";
$quantity = mysql_result($query,$I,"quantity");
$title = strtolower($title);
$title2 = ucfirst($title);
$title = ucwords($title);
$description2 = str_replace('"','',$description);
$prodid2 = $prodid + $quan1;
}
}
?>
$headline = substr($prodid2,3,1);
$headline2 = substr($prodid2,4,1);
if ($headline == "1") { $sheadline = "Purchase the"; }
if ($headline == "2") { $sheadline = "Get it here."; }
if ($headline == "3") { $sheadline = "We Have the"; }
if ($headline == "4") { $sheadline = "Get Your"; }
if ($headline == "5") { $sheadline = "We have the"; }
if ($headline == "6") { $sheadline = "You found it!"; }
if ($headline == "7") { $sheadline = "It is Here!"; }
if ($headline == "8") { $sheadline = "Yes!"; }
if ($headline == "9") { $sheadline = "Product: "; }
if ($headline == "0") { $sheadline = "Item: "; }
if ($headline2 == "1") { $lheadline = "on Sale at AYOK"; }
if ($headline2 == "2") { $lheadline = "Sale Priced"; }
if ($headline2 == "3") { $lheadline = "on sale now."; }
if ($headline2 == "4") { $lheadline = " - See it now."; }
if ($headline2 == "5") { $lheadline = " - See more details."; }
if ($headline2 == "6") { $lheadline = " : Low Prices"; }
if ($headline2 == "7") { $lheadline = " ~ Sale Prices"; }
if ($headline2 == "8") { $lheadline = " : Get Yours Today!"; }
if ($headline2 == "9") { $lheadline = " : Details"; }
if ($headline2 == "0") { $lheadline = " : Information"; }
?>
AyOk # -
. Quanity: .
Continental U.S. Shipping only $5.95, no matter how many items you order.
Quantity:
Sale Price $ Ay Ok Products at Ay Ok Prices!
if($prodid == "-22222") { $prodid = "noimage"; }
?>
if(file_exists($_SERVER['DOCUMENT_ROOT'] . '/product-images/1024-768/' . $prodid2 . '.jpg'))
{
?>
}
else
{
?>
}
if(file_exists($_SERVER['DOCUMENT_ROOT'] . '/product-images/1024-768/' . $prodid2. 'Z.jpg'))
{
?>
}
?>
include('menu.php'); ?>
©Copyright 2003-2011 Ay Ok .com, and it's licensors. All Rights Reserved. We reserve the right to cancel and refund any order if there is a pricing or description error, or it is out of stock.