name . " sign": "Custom " . $_REQUEST['clipart'] . " graphic"; $DESCRIPTION = $_REQUEST['clipart'] === "view" ? "Clipart that can be carved in the personalized " . $prod->name . " wood sign": "Custom " . $_REQUEST['clipart'] . " clipart that can be carved in the personalized " . $prod->name . " wood sign"; }elseif(!empty($_REQUEST['help'])) { if($_REQUEST['help'] === "template") { $DOC_TITLE = "Help with the personalized " . $_GET['name'] . " wood sign template"; $DESCRIPTION = "Instructions about how to change and edit personalized " . $_GET['name'] . " templates."; }elseif($_REQUEST['help'] === "text"){ $DOC_TITLE = "Help with text on the " . $_GET['name'] . " wood signs"; $DESCRIPTION = "Instructions for adding, editing, and creating the personalized messages on the " . $_GET['name'] . " wood signs."; }elseif($_REQUEST['help'] === "graphics"){ $DOC_TITLE = "Help with graphics on the " . $_GET['name'] . " wood signs"; $DESCRIPTION = "Adding, moving and editing personalized graphics for the " . $_GET['name'] . " wood signs." ; } }else{ $DOC_TITLE = $prod ? "Personalized " . $prod->name . " Signs": "Product Not Found"; $DESCRIPTION = $prod->description; } if(!empty($CART->options[$prod->name])){ foreach($CART->options[$prod->name] as $k => $v){ ++$k; } }else{ $k = 0; } $_SESSION['optionid'] = $prod->name . $k; include("$CFG->templatedir/header.php"); if(!empty($_REQUEST['clipart'])) { include("$CFG->templatedir/clipart.php"); }else{ include("$CFG->templatedir/wood_signs.php"); } include("$CFG->templatedir/footer.php"); /****************************************************************************** * FUNCTIONS *****************************************************************************/ function load_product($name) { /* load up the product details for a product with id $id and return it as * an object, or false if the object couldn't be loaded (ie. it's not found) */ $qid = db_query(" SELECT p.id ,p.name ,p.description ,p.price ,p.wood ,p.size FROM products p WHERE p.name = '$name' "); if ($qid) { return db_fetch_object($qid); } else { return false; } } function get_products() { $qid = db_query(" SELECT * FROM products "); return $qid; } ?>