VbzCart/docs/archive/code/files/cat
About
- Purpose: Generates basic one-to-one catalog pages (one page each per title, department, and supplier)
- Naming: This is usually an index.php file located in an appropriate folder (vbz.net uses "cat/").
- History:
- 2009-03-07 Copied from actual site; has bugs
Bugs
2009-03-07
- http://vbz.net/cat/lb/66141/ dead link (or more correct page)
- http://vbz.net/cat/lb/66141/ empty
- the rest of the "Titles with no images" on http://vbz.net/stock/recent/ is good
- http://vbz.net/cat/zr/bm/5326/ empty
- the rest of the "Titles with no images" on http://vbz.net/stock/m/ is good
- http://vbz.net/cat/pw/ws/mme/ empty
- the rest of the "Titles with no images" on http://vbz.net/stock/l/ is good
- http://vbz.net/cat/lb/31712/frt-big/ "ordering page" link is broken, and apparently link to it from ordering page is also broken; title quotes with nothing inside
Code - index.php
<php><?php
- PURPOSE: vbz page generator
- VERSION: /topics/
// CONSTANTS // -- KF = boolean flag // -- KS = string // -- KWP = web path (URL including protocol) // -- KFP = file path // -- KRP = relative path $fltStart = microtime(true); // debugging activation define(KDO_DEBUG,0); define(KDO_DEBUG_STACK,0); // debugging options define(KDO_DEBUG_HTML,1); define(KDO_DEBUG_IMMED,1); define(KDO_DEBUG_DARK,0); define(KF_USE_WIKI,true); define(KF_CART_ABSOLUTE,false); /*
GET CONNECTED TO LIBRARIES
- /
require('../local.php'); require('site.php'); $strLibs .= ':'.KFP_WIKI.':'.KFP_WIKI.'includes/'; ini_set('include_path',$strLibs); require('store2.php');
// GLOBALS $fpTools = '/tools'; $fpPages = ; $fwpAbsPages = 'http://'.KS_PAGE_SERVER.$fpPages; $fwpAbsTools = 'http://'.KS_TOOLS_SERVER.$fpTools; $fwpCart = $fwpAbsPages.'/cart/'; $strCurServer = $_ENV['SERVER_NAME'];
// SET UP DEPENDENT VALUES if ($strCurServer != KS_TOOLS_SERVER) {
$fpTools = $fwpAbsTools; $fpPages = $fwpAbsPages;
} $fwpLogo = $fpTools.'/img/logos/v/';
// PROCESS PAGE REQUEST $page_uri = $_ENV['REQUEST_URI']; // prepare data objects InitData(KS_DB_VBZCART);
// process the request $objPage = new clsPageCat(); $objPage->GetQuery(); $objPage->DoRequest();
if (!$didPage) { // $objPage->Init(,'Unknown page','something is messed up','browse','Houston, we have a problem...'); // $objPage->DoError(); } if (KDO_DEBUG) {
print "DEBUG:
".$debug; }</php>