* @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 '
Could not connect to script server. Server is unavailable.
'; $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'); ?>