A lightweight forum engine written in PHP. Repository is now obsolete and read-only. http://www.pioder.pl/uforum.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

107 lines
2.7 KiB

<?
/**
* @package uForum
* @file admin/forum_info.php
* @version $Id$
* @copyright 2007-2010 (c) PioDer <[email protected]>
* @link http://www.pioder.pl/
* @license see LICENSE.txt
**/
define('IN_uF', true);
//include files
require('./../config.php');
require('./../includes/constants.php');
require('./../includes/db.php');
require('./../includes/errors.php');
//connect to database
DataBase::db_connect();
require('./../includes/sessions.php');
require('./../includes/classes/class_user.php');
require('./../common.php');
require('./../includes/admin/class_main.php');
require('./../includes/classes/class_forum.php');
require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
if (User::UserInformation($_SESSION['uid'],'rank')!=2)
{
admin_message_forum($lng['yournotadmin'],'../index.php');
}
//check script version...
$errno = 0;
$errstr = '';
$version = '';
if ($open = fsockopen('www.pioder.pl', 80, $errno, $errstr, 10))
{
fputs($open, "GET /updates.php?app=uf HTTP/1.1\r\n");
fputs($open, "HOST: www.pioder.pl\r\n");
fputs($open, "Connection: close\r\n\r\n");
$get_info = false;
while (!feof($open))
{
if ($get_info)
{
$version .= fread($open, 1024);
}
else
{
if (fgets($open, 1024) == "\r\n")
{
$get_info = true;
}
}
}
fclose($open);
if ($version==VERSION)
{
$result = $lng['noupdates'];
}
else
{
$result = $lng['updatenow'];
}
}
else
{
echo '
<table width="'.TABLES_WIDTH.'" class="maintable" align="center">
<tr>
<td class="fstandard">
<font color="red"><b>Could not connect to script server. Server is unavailable.</b></font>
</td>
</tr>
</table>';
$result = $lng['noupdates'];
}
unset($addr,$open, $version, $get_info, $errstr, $errno);
//add skin variables
$skin = array(
'dsf_pa'=>$lng['dsf_pa'],
'index'=>$lng['index'],
'gotoforum'=>$lng['go_to_forum'],
'scriptstat'=>$lng['scriptstat'],
'scriptoptions'=>$lng['scriptconfig'],
'admin_forums'=>$lng['admin_forums'],
'admin_groups'=>$lng['admin_groups'],
'admin_users'=>$lng['admin_users'],
'admin_banlist'=>$lng['admin_banlist'],
'main_beam'=>$lng['pa_mainpage'],
'L.forum_stats'=>$lng['forum_stats'],
'L.install_date'=>$lng['forum_installed'],
'L.topics'=>$lng['topics'],
'L.posts'=>$lng['posts'],
'L.script_version'=>$lng['scriptversion'],
'L.updates'=>$lng['updates'],
'install_date'=>date('d-m-Y, G:i',$forum_config['date_install']),
'topics'=>Admin_Over::TotalTopics(),
'posts'=>Admin_Over::TotalPosts(),
'updates'=>$result,
'L.welcome_pa'=>$lng['pa_welcome']
);
//do it!
Admin_Over::GenerateHeader();
require('./template/index_body.tpl');
require('./template/overall_footer.tpl');
?>