<% /********************************************************************************* * Filename: printerssearch.php * Generated with CodeCharge 2.0.1 * PHP 4.0 & Templates build 10/09/2001 *********************************************************************************/ //------------------------------- // printerssearch CustomIncludes begin include ("./common.php"); include ("./header.php"); include ("./footer.php"); // printerssearch CustomIncludes end //------------------------------- session_start(); //=============================== // Save Page and File Name available into variables //------------------------------- $filename = "printerssearch.php"; $template_filename = "printerssearch.html"; //=============================== //=============================== // printerssearch PageSecurity begin // printerssearch PageSecurity end //=============================== //=============================== // printerssearch Open Event begin // printerssearch Open Event end //=============================== //=============================== // printerssearch OpenAnyPage Event start // printerssearch OpenAnyPage Event end //=============================== //=============================== //Save the name of the form and type of action into the variables //------------------------------- $sAction = get_param("FormAction"); $sForm = get_param("FormName"); //=============================== // printerssearch Show begin //=============================== // Display page //------------------------------- // Load HTML template for this page //------------------------------- $tpl = new Template($app_path); $tpl->load_file($template_filename, "main"); //------------------------------- // Load HTML template of Header and Footer //------------------------------- $tpl->load_file($header_filename, "Header"); $tpl->load_file($footer_filename, "Footer"); //------------------------------- $tpl->set_var("FileName", $filename); //------------------------------- // Step through each form //------------------------------- Menu_show();Footer_show();Search_show();otherproducts_show(); //------------------------------- // Process page templates //------------------------------- $tpl->parse("Header", false); $tpl->parse("Footer", false); //------------------------------- // Output the page to the browser //------------------------------- $tpl->pparse("main", false); // printerssearch Show end //=============================== // printerssearch Close Event begin // printerssearch Close Event end //=============================== //******************************************************************************** //=============================== // Display Search Form //------------------------------- function Search_show() { global $db; global $tpl; global $sForm; $sFormTitle = ""; $sActionFileName = "modelsearch.php"; //------------------------------- // Search Open Event begin // Search Open Event end //------------------------------- $tpl->set_var("FormTitle", $sFormTitle); $tpl->set_var("ActionPage", $sActionFileName); //------------------------------- // Set variables with search parameters //------------------------------- $fldOEM_Brand = strip(get_param("OEM_Brand")); //------------------------------- // Search Show begin //------------------------------- //------------------------------- // Search Show Event begin // Search Show Event end //------------------------------- $tpl->set_var("SearchLBOEM_Brand", ""); $lookup_OEM_Brand = db_fill_array("select distinct OEM_Brand, OEM_Brand from printers order by OEM_Brand ASC"); if(is_array($lookup_OEM_Brand)) { reset($lookup_OEM_Brand); while(list($key, $value) = each($lookup_OEM_Brand)) { $tpl->set_var("ID", $key); $tpl->set_var("Value", $value); if($key == $fldOEM_Brand) $tpl->set_var("Selected", "SELECTED" ); else $tpl->set_var("Selected", ""); $tpl->parse("SearchLBOEM_Brand", true); } } //------------------------------- // Search Show end //------------------------------- //------------------------------- // Search Close Event begin // Search Close Event end //------------------------------- $tpl->parse("FormSearch", false); //=============================== } //=============================== // Display Search Form //------------------------------- function otherproducts_show() { global $db; global $tpl; global $sForm; $sFormTitle = ""; $sActionFileName = "advsearchresults.php"; //------------------------------- // otherproducts Open Event begin // otherproducts Open Event end //------------------------------- $tpl->set_var("FormTitle", $sFormTitle); $tpl->set_var("ActionPage", $sActionFileName); //------------------------------- // Set variables with search parameters //------------------------------- $fldCATEGORY = strip(get_param("CATEGORY")); //------------------------------- // otherproducts Show begin //------------------------------- //------------------------------- // otherproducts Show Event begin // otherproducts Show Event end //------------------------------- $tpl->set_var("otherproductsLBCATEGORY", ""); $lookup_CATEGORY = db_fill_array("select distinct CATEGORY, CATEGORY from items_detail order by CATEGORY DESC"); if(is_array($lookup_CATEGORY)) { reset($lookup_CATEGORY); while(list($key, $value) = each($lookup_CATEGORY)) { $tpl->set_var("ID", $key); $tpl->set_var("Value", $value); if($key == $fldCATEGORY) $tpl->set_var("Selected", "SELECTED" ); else $tpl->set_var("Selected", ""); $tpl->parse("otherproductsLBCATEGORY", true); } } //------------------------------- // otherproducts Show end //------------------------------- //------------------------------- // otherproducts Close Event begin // otherproducts Close Event end //------------------------------- $tpl->parse("Formotherproducts", false); //=============================== } %>