Location: PHPKode > projects > WB News > admin/index.php
<?php

/*========================================================*\
||########################################################||
||#                                                      #||
||#     WB News v2.0.0                                   #||
||# ---------------------------------------------------- #||
||#     Copyright (c) 2004-2007                          #||
||#     Created: 15th August 2005                        #||
||#     Filename: index.php                              #||
||#                                                      #||
||########################################################||
/*========================================================*/

/**
 *  @author $Author: pmcilwaine $
 *	@version $Id: index.php,v 1.2.2.2 2008/06/21 03:24:52 pmcilwaine Exp $
 */

require_once( "global.php" );
$auth->login_if( !$auth->has_perm( "canadmin" ) );

$page = new PageTemplateEngine( BuildPath("admin/main-page.ihtml") );

$tmpl->SetFilename( BuildPath("admin/index.ihtml") );

$params = array(
	"entry" => "\t<li>%s</li>\n\t",
	"separator" => FALSE,
	"links" => buildmenu(),
	"enable_id" => TRUE
	);
$menu = include( INCDIR . "/page-menu.php" );

$params = array(
	"entry" => "\t<li>%s</li>\n\t",
	"separator" => FALSE,
	"class_open" => "open",
	"links" => toolbarmenu()
	);
$toolbar = include( INCDIR . "/page-menu.php" );

$tmpl->AddParam( "menu", $menu );
$tmpl->AddParam( "userinfo", $userinfo );

$info =& $tmpl->AddParam( "info", array() );
$info = array(
	"OS_VERSION" => php_uname("s"),
	"PHP_VERSION" => phpversion(),
	"DB_TYPE" => $DB->db_type,
	"DB_VERSION" => $DB->GetVersion(),
	"NEWS_VERSION" => $config["version"],
	"NEWS_ARTICLES" => $DB->CountBy( TBL_NEWS ),
	"USERS_TOTAL" => $DB->CountBy( TBL_USERS, NULL, NULL, NULL, "userid" )
	);

$page->AddParam( "toolbar", $toolbar );
$page->AddParam( "userinfo", $userinfo );

$pagemenu =& $tmpl->AddParam( "pagemenu", array() );
$page->BindParam( "pagemenu", $tmpl );

$params = array(
	"entry" => "\t<li>%s</li>\n\t",
	"separator" => "\t<li>|</li>\n\t",
	"links" => buildmenu( $theme_info["pagemenu_build"] )
	);
$params = array_merge( $params, $theme_info["pagemenu"] );
$pagemenu = include( INCDIR . "/page-menu.php" );

$page->ParseContent( $tmpl->GetHTML() );
$page->ShowPage();

?>
Return current item: WB News