[insert_php]
// NOTE! DO NOT EDIT PAGE IN WORDPRESS!!!!
// database connection stuff
// NOTE ->$cat=$_GET["cat"];<- added by Steve McNutt, line is needed for proper access.
// NOTE ->$row=$_GET["row"];<- added by Steve McNutt, line is needed for proper access. (4-27-07)
$page = "catalog";
$URL = $_SERVER["HTTP_HOST"];
$cat=$_GET["cat"];
$commCat=$_GET["commCat"];
$barCount=$_GET["barCount"];
$brushDia=$_GET["brushDia"];
$sortColumn=$_GET["sortColumn"];
$host = $URL;
include($_SERVER['DOCUMENT_ROOT']."/catalog/password.php");
//if ( $cat == "" ) {
// $cat = 20;
if ($sortColumn == ""){
$sortColumn="Bar_Count";
}
// set items per page
$limit = 900;
// including the navbar class
include($_SERVER['DOCUMENT_ROOT']."/catalog/navbar.php");
// including the category arrays
include($_SERVER['DOCUMENT_ROOT']."/catalog/category.php");
// Include selector creation code
include($_SERVER['DOCUMENT_ROOT']."/catalog/selector.php");
echo "
"; // **Category Selector** $strNameField = 'Comm_Catg'; $strMaskName = 'Comm Cat'; $strNameOrdinal = 'comm_cat_select'; $strTableName='catalog'; $currentValue=$commCat; echo "Comm Category: "; myDropdown($strNameField, $strTableName, $strNameOrdinal, $strMaskName, $currentValue); //Put wildcard setting under where the drop down selectors are chosen if ($commCat=="ALL"){ $commCat="'%'"; } echo " |
"; // **Bar Count Selector** $strNameField = 'Bar_Count'; $strMaskName = 'Bar Count'; $strNameOrdinal = 'bar_count_select'; $strTableName='catalog'; $currentValue=$barCount; echo "Bar Count: "; myDropdown($strNameField, $strTableName, $strNameOrdinal, $strMaskName, $currentValue); //Put wildcard setting under where the drop down selectors are chosen if ($barCount=="ALL"){ $barCount="'%'"; } echo " |
"; // **Brush Diameter selector** $strNameField = 'Brush_Dia'; $strMaskName = 'Brush Dia'; $strNameOrdinal = 'brush_dia_select'; $strTableName='catalog'; $currentValue=$brushDia; echo "Brush Diameter: "; myDropdown($strNameField, $strTableName, $strNameOrdinal, $strMaskName, $currentValue); //Put wildcard setting under where the drop down selectors are chosen if ($brushDia=="ALL"){ $brushDia="'%'"; } echo " |
";
[/insert_php]
[insert_php]
// initiate it!
$nav = new navbar;
// set how many records to show at a time
$nav->numrowsperpage = $limit;
$db = mysql_connect( $host, $user, $password);
mysql_select_db($database, $db) or die(mysql_errno() . ": " . mysql_error() . "
");
$sql = "SELECT Comm_Catg,Bar_Count,Brush_Dia,Bar_Length,Bore,Riser_Dia,Riser_Width,Overall_Length,Mica_Dia,Slot_Width,Slot_Depth,Rear_Ext,Front_Ext,Comm_Type,TCS_Part from catalog
WHERE Comm_Catg LIKE ".$commCat." AND Bar_Count LIKE ".$barCount." AND Brush_Dia LIKE ".$brushDia."";
// the third parameter of execute() is optional
$result = $nav->execute($sql, $db, "mysql");
// handle the returned result set
$rows = mysql_num_rows($result);
for ($y = 0; $y < $rows; $y++) {
$data = mysql_fetch_object($result);
echo $data->url ;
}
[/insert_php]
|