Don't want to use the PayPal shopping cart? Make a note of the product number(s) you wish to order and use our printable order form instead. Note that the order form will open in a new browser window so you can continue to browse the catalog.

"; /* $page tells the script what page full of entries to show and also helps with the page links at the bottom of the catalog. */ if (!isset($page)) $page=1; if (!isset($search)) $search=""; /* ************************************************************** END CONFIGURATION AND OTHER GLOBAL VARIABLES ************************************************************** */ /* ************************************************************** FUNCTIONS BEGIN HERE ************************************************************** */ /* this has the code that writes the html headers and footers (everything outside the "content begins/ends here" comments) */ include 'includes/pageends.php'; /* this brings in form data and/or URL querystring stuff */ include 'includes/formvars.php'; /* this has the read/write and other text file functions */ include 'includes/textfile.php'; /* contains various functions for handling arrays */ include 'includes/arrays.php'; /* contains catalog-specific functions */ include 'includes/catfuncs.php'; /* ************************************************************** FUNCTIONS END HERE ************************************************************** */ // fetch a keyed array of all the config variables $arrConfig = getConfigData($strConfigPath, $arrConfigKeys); // fetch a keyed array of all the categories $arrCategories = readTextFile($strCategoryPath); $arrCategories = Make_SubArrays($arrCategories, $strDelimiter, $arrCategoryKeys); // fetch a keyed array of all the products $arrAllProducts = readTextFile($strProductsPath); $arrAllProducts = Make_SubArrays($arrAllProducts, $strDelimiter, $arrProductsKeys); writePageHeader("Claudia Kelly's Collection - Catalog", "catalog"); ?>

Welcome to our online catalog!

You can choose to browse the entire catalog, select a category or sub-category of items from the menu below or search by keywords.

If you're searching for Claudia's bow ties they can be found at the Stuffed Shirt Tie Co. site.

Browsing Entire Catalog..."; echo $orderFormLink; foreach ($arrAllProducts as $value){ if (isInStock($arrAllProducts, $value["item_number"]))$arrSelectedProducts[] = $value; } $numCurrentProducts = count($arrSelectedProducts); break; // end case "all" case "cat": // category search echo "

Browsing the " . currentCategoryName() . " Category...

"; if (getCategoryText() != ""){ echo "

" . getCategoryText() . "

"; } echo $orderFormLink; $arrSelectedProducts = getProductsByCategory($catID); $numCurrentProducts = count($arrSelectedProducts); // but what if there's none available??? if ($numCurrentProducts < 1) noSearchResults(); break; // end case "cat" case "key": // keyword search echo "

Search Results...

"; echo $orderFormLink; $arrSelectedProducts = getProductsByKeyword($keys2search); $numCurrentProducts = count($arrSelectedProducts); // but what if there's none available??? if ($numCurrentProducts < 1) noSearchResults(); break; // end case "key" case "one": // single product search echo $orderFormLink; $arrSelectedProducts = GetSubArrayByID($arrAllProducts, $id, 'item_number'); $numCurrentProducts = 1; break; // end case "one" } // end switch ($search) ?>

Price: $" . $arrCurrentProduct["price"] . "
Product #: " . $arrCurrentProduct["item_number"] . "

"; // PAYPAL BUTTONS BEGIN HERE echo "

"; echo " "; echo "

"; // PAYPAL BUTTONS END HERE /* Check for and display any RELATED PRODUCT LINKS Only display if there ARE related products and at least one of them is currently in stock */ $bHasLiveRelated = false; if (trim($arrCurrentProduct["related_products"]) != "no"){ $arrRelatedProducts = explode($strRelatedItemsDelimiter, $arrCurrentProduct["related_products"]); $arrRelatedProducts = Make_SubArrays($arrRelatedProducts, $strRelatedItemSplitter, $arrRelatedProductsKeys); foreach($arrRelatedProducts as $value){ if(isInStock($arrAllProducts, $value['item_number'])){ $bHasLiveRelated = true; } // end if(isInStock($arrAllProducts, $value['item_number'])) } // end foreach($arrRelatedProducts as $value) if($bHasLiveRelated){ echo "Related Products:
"; $numChildren = count($arrRelatedProducts); for ($j = 0; $j < $numChildren; $j++){ if (isInStock($arrAllProducts, $arrRelatedProducts[$j]["item_number"])){ echo "" . $arrRelatedProducts[$j]["link_text"] . "
"; } // end if (isInStock($arrRelatedProducts[$j]["item_number"])) } // end for $j loop } // end if($bHasLiveRelated) } // end if ($arrSelectedProducts[$i]["related_products"] != "no") ?>
1){ echo "page: "; for ($i=1; $i<=$num_pages; $i++){ if ($i == $page){ echo "" . $i . " "; } else { echo "$i "; } // end if ($i == $page) } //end for ($i=1; $i<=$num_pages; $i++) loop } // end if ($num_pages > 1) elseif ($num_pages == 1) echo "page 1 of 1"; ?>