"; //print_r($_SERVER); //echo ""; //error_reporting(E_ALL); //ini_set('display_errors','On'); //SAMPLE URL forsalesticker.com/decals/elk+decal //SAMPLE URL forsalesticker.com/car+for+sale+sign/side+window+sign //se_vende_sign.jpg /* print_r($_GET); Array ( [typeid] => 1 [name] => side window sign ) */ include('/home/forsales/public_html/incs/connect.php'); //get left side links $sql = "SELECT Pname, PTurl FROM Prods LEFT JOIN ProdTypes ON P_PTid=PTid ORDER BY P_PTid, Pprice DESC"; $res = mysql_query($sql) or die(mysql_error()); while($row=mysql_fetch_array($res)) { list($prod[], $modurl[]) = $row; } //get colors of vinyl $sql = "SELECT Color FROM colors ORDER BY Cid"; $res = mysql_query($sql) or die(mysql_error()); while($row=mysql_fetch_array($res)) { list($vinyl_colors[]) = $row; } $show_phone = false; if ($_GET['typeid'] == 1) $show_phone = true; //$sql = "SELECT Pid, Pname, Pshortdesc, Plongdesc, Pprice, Pjpgbig, Pmeta_desc, Pmeta_word FROM Prods WHERE P_PTid = '" . $_GET['typeid'] . "' AND Pname = '" . mysql_real_escape_string(str_replace('+',' ', $_GET['name'])) . "'"; if ($_GET['name']) { $sql = "SELECT Pid, Pname, Plongdesc, Pprice, Pwidth, Pheight, Pmeta_desc, Pmeta_word, PinvoiceImg FROM Prods WHERE P_PTid = '" . $_GET['typeid'] . "' AND Pname = '" . mysql_real_escape_string($_GET['name']) . "'"; $res = mysql_query($sql) or die(mysql_error()); if (mysql_num_rows($res) != 1) //if no match to this product { mail('forsalesticker.com@gmail.com','product page 404',$sql); include('/home/forsales/public_html/404.htm'); die(); } list($pid, $pname, $plong, $pprice, $pwidth, $pheight, $meta_description, $meta_keywords, $preview_image) =mysql_fetch_row($res); $pjpg = '/pickies/prodPics/' . str_replace(' ', '_', strtolower($pname)) . '.jpg'; //check if the file does not exist //if the image does not exist - use a default one } else { //get everything of that type I guess //forsalesticker.com/car+for+sale+sign/ $sql = "SELECT PTname, PTurl, PTmeta_desc, PTmeta_word FROM ProdTypes WHERE PTid = '" . $_GET['typeid'] . "'"; list($type_name, $type_url, $meta_description, $meta_keywords) = mysql_fetch_row(mysql_query($sql)); //include header $title = "$type_name | Free Shipping | ForSaleSticker.com"; include('/home/forsales/public_html/incs/header.htm'); echo "

$type_name

"; //list products $sql = "SELECT Pid, Pname, Pshortdesc, Pwidth, Pheight, Pprice FROM Prods WHERE P_PTid = '" . $_GET['typeid'] . "'"; $res = mysql_query($sql) or die(mysql_error()); while($row=mysql_fetch_array($res)) { list($pid, $pname, $pshort, $pwidth, $pheight, $pprice) = $row; $img = str_replace(' ', '_', strtolower($pname)) . '_sm.jpg'; $link = ''; echo "
$link $link $pname
$pwidth inches x $pheight inches
\$$pprice
$link $pshort
"; } //include footer include('/home/forsales/public_html/incs/footer.htm'); die; } //meta and title tags //get the product name for the product type $sql = "SELECT PTname FROM ProdTypes WHERE PTid=" . mysql_real_escape_string($_GET['typeid']); list($product_type_name) = mysql_fetch_row(mysql_query($sql)); $title = "$product_type_name | $pname | Free Shipping | ForSaleSticker.com"; include('/home/forsales/public_html/incs/header.htm'); ?>
Phone:
Third Line:
Quantity:
Color:
  Free Shipping!
Total: $


">


Price:
$

Size:
inches x inches



0 && $modurl[$v] != $modurl[$v-1] ) echo '

'; echo "
" . $prod[$v] . "
"; } ?>