VbzCart/archive/code/files/cat

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | archive‎ | code‎ | files
Jump to navigation Jump to search

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

Code - index.php

<php><?php

  1. PURPOSE: vbz page generator
  2. 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>