Файл: admincenter.php
Строк: 73
<?
/***************************************************************************
* ExBB v.1.1 *
* Copyright (c) 2002-20хх by Alexander Subhankulov aka Warlock *
* *
* http://www.exbb.revansh.com *
* email: admin@exbb.revansh.com *
* *
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
session_start();
define('IN_ADMIN', true);
include('common.php');
include('./data/boardstats.php');
$vars = parsed_vars();
$action = $vars['action'];
if ( defined('IS_ADMIN') ) {
if ( isset($vars['action']) && $vars['action'] == 'navbar' ) {
$title_page = $exbb['boardname'];
include('./templates/'.$exbb['default_style'].'all_header.tpl');
include('./templates/'.$exbb['default_style'].'admin/nav_bar.tpl');
include('./templates/'.$exbb['default_style'].'footer.tpl');
}
elseif( isset($vars['action']) && $vars['action'] == 'main' ) {
$filetoopen = $exbb['home_path'].'data/allforums.php';
$files = get_file($filetoopen);
$boarddays = ( time() - $exbb['boardstart'] ) / 86400;
$posts_per_day = sprintf("%.2f", $exbb['totalposts'] / $boarddays);
$topics_per_day = sprintf("%.2f", $exbb['totalthreads'] / $boarddays);
$users_per_day = sprintf("%.2f", $exbb['totalmembers'] / $boarddays);
if ($users_per_day > intval($exbb['totalmembers']) ) $users_per_day = $exbb['totalmembers'];
$boardstart = date("d.m.Y - H:i",$exbb['boardstart']);
$filetoopen = $exbb['home_path'].'data/onlinedata.php';
$onlinedata = get_file($filetoopen);
$onlinedata = count($onlinedata);
$php_ver = phpversion();
$gzip = (!$exbb['do_gzip_compress']) ? $lang['Off'] : $lang['On'];
$uploads = 0;
if ($dir = opendir( $exbb['home_path'].'uploads' )) {
while (false !== ($file = readdir($dir))) {
if ( strstr( $file, 'file-' ) ) {
$uploads += @filesize( $exbb['home_path'].'uploads/' . $file );
}
}
closedir( $dir );
}
$uploads = round($uploads / 1024);
$title_page = $exbb['boardname'];
include('./templates/'.$exbb['default_style'].'all_header.tpl');
include('./templates/'.$exbb['default_style'].'admin/index_body.tpl');
include('./templates/'.$exbb['default_style'].'footer.tpl');
}
else {
include('./templates/'.$exbb['default_style'].'admin/index_frameset.tpl');
}
} else { Header('Location: index.php'); exit;}
include('page_tail.php');
?>