[Phpslash-commit] CVS: phpslash-ft/public_html errordocument.php3,NONE,1.1
Brought to you by:
joestewart,
nhruby
From: Joe S. <joe...@us...> - 2002-02-20 23:16:03
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv8920/phpslash-ft/public_html Added Files: errordocument.php3 Log Message: adding errordocument.php3 --- NEW FILE: errordocument.php3 --- <?php // $Id: errordocument.php3,v 1.1 2002/02/20 23:15:59 joestewart Exp $ $pagetitle = "Page not found"; // The name to be displayed in the header $xsiteobject = "Error Document"; // This Defines The META Tag Object Type require("config.php3"); page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); if(!empty($HTTP_GET_VARS['login'])) { $auth->login_if($HTTP_GET_VARS['login']); } // Objects $block = new Block_i; $db = new slashDB; // Start of Page /* parse cmd line variables into array */ while ( list($key, $val) = each($HTTP_GET_VARS )) { $ary[$key] = $val; } /* defaults for main "index" page */ if ((!$section) AND (!$section_id)){ $section = $_PSL['site_homesection']; if(!$section) { $section = "Home"; } $ary['section'] = $section; } else { $pagetitle .= " - $section"; } $breadcrumb = breadcrumb( $ary); $_PSL['metatags']['object'] = $xsiteobject; slashhead($pagetitle,$_PSL['metatags']); $template = new Template($_PSL['templatedir']); $template->debug = 0; $template->set_file(array( index => "notfound.tpl" )); $template->set_var(array( ROOTDIR => $_PSL['rooturl'], IMAGEDIR => $_PSL['imagedir'], ERRORURL => $REDIRECT_URL )); $allstories = $template->parse(OUT,"index"); $leftblocks = $block->getBlocks($ary, "left"); $centerblocks = $block->getBlocks($ary, "center"); $rightblocks = $block->getBlocks($ary, "right"); if (empty($leftblocks)) { if (empty($rightblocks)) { // $centerblocks = $block->getBlocks($ary); // $tplfile = "index1col.tpl"; // default to 2 column for transparent upgrade $rightblocks = $block->getBlocks($ary); $tplfile = "index2colright.tpl"; } else { $tplfile = "index2colright.tpl"; } } elseif (empty($rightblocks)) { $tplfile = "index2colleft.tpl"; } else { $tplfile = "index3col.tpl"; } $template = new Template($_PSL['templatedir']); $template->debug = 0; $template->set_file(array( 'index' => $tplfile //"index3col.tpl" )); $template->set_var(array( 'ROOTDIR' => $_PSL['rooturl'], 'IMAGEDIR' => $_PSL['imageurl'], 'BREADCRUMB' => $breadcrumb, 'STORY_COLUMN' => $allstories, 'LEFT_BLOCK_COLUMN' => $leftblocks, 'CENTER_BLOCK_COLUMN' => $centerblocks, 'RIGHT_BLOCK_COLUMN' => $rightblocks )); $template->parse('OUT',"index"); $template->p('OUT'); slashfoot(); page_close(); ?> |