diff --git a/admin/admin_forums.php b/admin/admin_forums.php
index b18fe58..846c1fd 100644
--- a/admin/admin_forums.php
+++ b/admin/admin_forums.php
@@ -9,19 +9,19 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/classes/class_forum.php');
-include('./../includes/admin/class_forum.php');
-include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
+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('./../includes/admin/class_forum.php');
+require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -54,7 +54,7 @@ function GenerateDefaultDisplay()
'new_forum_submit'=>$lng['new_forum_submit'],
);
Admin_Over::GenerateHeader();
- include('./template/forums_beam_body.tpl');
+ require('./template/forums_beam_body.tpl');
//add forums and categories
$sql = "SELECT * FROM `".CATS_TABLE."` ORDER BY `sort`";
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain categories information.');
@@ -69,7 +69,7 @@ function GenerateDefaultDisplay()
'delete'=>$lng['delete'],
'del_cat'=>$lng['c_del_cat']
);
- include('./template/forum_category_add.tpl');
+ require('./template/forum_category_add.tpl');
for ($i=1; $i<=count($forum); $i++)
{
if ($forum[$i]['c_id']==$result['c_id'])
@@ -84,7 +84,7 @@ function GenerateDefaultDisplay()
'move_down'=>$lng['movedown'],
'delete'=>$lng['delete']
);
- include('./template/forum_forum_add.tpl');
+ require('./template/forum_forum_add.tpl');
}
}
echo '
';
@@ -93,8 +93,8 @@ function GenerateDefaultDisplay()
'here_write_name_cat'=>$lng['here_write_name_cat'],
'new_cat_submit'=>$lng['new_cat_submit']
);
- include('./template/forums_view_end_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/forums_view_end_body.tpl');
+ require('./template/overall_footer.tpl');
}
if (!isset($_GET['mode']))
{
@@ -128,14 +128,14 @@ switch($_GET['mode'])
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_cat_name'];
}
}
else
{
$_POST['cat_name'] = '';
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
}
$skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'],
@@ -150,8 +150,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=new&submode=cat'
);
Admin_Over::GenerateHeader();
- include('./template/cat_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/cat_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
case 'forum':
@@ -177,18 +177,18 @@ switch($_GET['mode'])
$last = $last +1;
$sql = "INSERT INTO `".FORUMS_TABLE."` VALUES ('$last','$forum_lock','$allow_moderate', '$forum_name', '$forum_desc', '0', '','$forum_cat','$sort')";
DataBase::sql_query($sql,GENERAL,'Could not add forum');
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
admin_message_forum($lng['forum_saved'],'admin_forums.php');
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_desc'];
}
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_name'];
}
}
@@ -196,7 +196,7 @@ switch($_GET['mode'])
{
if (!isset($_POST['forum_name'])) { $_POST['forum_name'] = ''; }
if (!isset($_POST['forum_desc'])) { $_POST['forum_desc'] = ''; }
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
}
$skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'],
@@ -219,8 +219,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=new&submode=forum'
);
Admin_Over::GenerateHeader();
- include('./template/forum_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/forum_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
}
@@ -443,12 +443,12 @@ switch($_GET['mode'])
$sort = $sort+1;
$sql = "UPDATE `".CATS_TABLE."` SET `name`='$cat_name', `sort`='$sort' WHERE `c_id`='$cid'";
DataBase::sql_query($sql,GENERAL,'Could not update category');
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
admin_message_forum($lng['cat_saved'],'admin_forums.php');
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_cat_name'];
}
}
@@ -462,7 +462,7 @@ switch($_GET['mode'])
admin_message_forum($lng['no_category'],'admin_forums.php?mode=view');
}
unset($tmp);
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
}
$skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'],
@@ -477,8 +477,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=edit&submode=cat&c='.$cid
);
Admin_Over::GenerateHeader();
- include('./template/cat_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/cat_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
case 'forum':
@@ -517,18 +517,18 @@ switch($_GET['mode'])
`sort`='$sort'
WHERE `f_id`='$fid'";
DataBase::sql_query($sql,GENERAL,'Could not update forum');
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
admin_message_forum($lng['forum_saved'],'admin_forums.php');
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_desc'];
}
}
else
{
- $msg = './../skins/'.$default_skin.'/post_error_body.tpl';
+ $msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_name'];
}
}
@@ -536,7 +536,7 @@ switch($_GET['mode'])
{
$tmp = DataBase::fetch(DataBase::sql_query("SELECT `name`, `desc` FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'",GENERAL,'Could not obtain forum information'));
$_POST['forum_name'] = $tmp['name'];
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
$_POST['forum_desc'] = $tmp['desc'];
if($tmp['name']=='')
{
@@ -565,8 +565,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=edit&submode=forum&f='.$fid
);
Admin_Over::GenerateHeader();
- include('./template/forum_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/forum_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
}
diff --git a/admin/admin_groups.php b/admin/admin_groups.php
index 199441e..60b7099 100644
--- a/admin/admin_groups.php
+++ b/admin/admin_groups.php
@@ -9,21 +9,21 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
-include('./../includes/classes/class_pms.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
+require('./../includes/classes/class_pms.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/classes/class_forum.php');
-include('./../includes/admin/class_forum.php');
-include('./../includes/classes/secure.php');
-include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
+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('./../includes/admin/class_forum.php');
+require('./../includes/classes/secure.php');
+require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -39,7 +39,7 @@ function GenerateDefaultDisplay()
$skin['L.groups'] = $lng['admin_groups'];
$skin['L.new_group'] = $lng['new_group'];
Admin_Over::GenerateHeader();
- include('./template/groups_beam_body.tpl');
+ require('./template/groups_beam_body.tpl');
$sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`";
$query = DataBase::sql_query($sql, GENERAL, 'Could not obtain groups information.');
while($item = DataBase::fetch($query))
@@ -53,10 +53,10 @@ function GenerateDefaultDisplay()
'delete'=>$lng['delete'],
'c_delete'=>$lng['c_delete_group']
);
- include('./template/group_add_body.tpl');
+ require('./template/group_add_body.tpl');
}
echo '';
- include('./template/overall_footer.tpl');
+ require('./template/overall_footer.tpl');
}
if (!isset($_GET['mode']))
{
@@ -124,8 +124,8 @@ switch($_GET['mode'])
'L.groups' => $lng['admin_groups']
);
Admin_Over::GenerateHeader();
- include('./template/group_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/group_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
case 'edit':
@@ -165,7 +165,7 @@ switch($_GET['mode'])
$_POST['group_name'] = $g['name'];
$_POST['group_desc'] = $g['desc'];
$_POST['group_mod'] = User::UserInformation($g['m_id'],'nick');
- $msg='./../skins/'.$default_skin.'/blank.tpl';
+ $msg='./template/blank.tpl';
}
$skin = array(
'L.save'=>$lng['submit'],
@@ -178,8 +178,8 @@ switch($_GET['mode'])
'L.groups' => $lng['admin_groups']
);
Admin_Over::GenerateHeader();
- include('./template/group_new_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/group_new_edit_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
case 'moveup':
diff --git a/admin/admin_script.php b/admin/admin_script.php
index 2ae4eb4..33d306e 100644
--- a/admin/admin_script.php
+++ b/admin/admin_script.php
@@ -9,19 +9,19 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/classes/class_forum.php');
-include('./../includes/misc_functions.php');
-include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
+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('./../includes/misc_functions.php');
+require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -367,6 +367,6 @@ $skin = array(
);
//do it!
Admin_Over::GenerateHeader();
-include('./template/admin_script.tpl');
-include('./template/overall_footer.tpl');
+require('./template/admin_script.tpl');
+require('./template/overall_footer.tpl');
?>
diff --git a/admin/admin_users.php b/admin/admin_users.php
index 073a025..ae0a3b7 100644
--- a/admin/admin_users.php
+++ b/admin/admin_users.php
@@ -9,22 +9,22 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/misc_functions.php');
-include('./../includes/classes/class_topic.php');
-include('./../includes/classes/class_posting.php');
-include('./../includes/classes/secure.php');
+require('./../includes/sessions.php');
+require('./../includes/classes/class_user.php');
+require('./../common.php');
+require('./../includes/admin/class_main.php');
+require('./../includes/misc_functions.php');
+require('./../includes/classes/class_topic.php');
+require('./../includes/classes/class_posting.php');
+require('./../includes/classes/secure.php');
$default_lang = Admin_Over::DefaultLang();
-include('./../lngs/'.$default_lang.'/admin.php');
+require('./../lngs/'.$default_lang.'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -275,8 +275,8 @@ switch($_GET['mode'])
$msg = './template/blank.tpl';
}
Admin_Over::GenerateHeader();
- include('./template/user_edit_body.tpl');
- include('./template/overall_footer.tpl');;
+ require('./template/user_edit_body.tpl');
+ require('./template/overall_footer.tpl');;
break;
}
case 'view':
@@ -320,14 +320,14 @@ switch($_GET['mode'])
{
case 'yes':
{
- @setcookie('users_desc','desc',time()+3600);
+ @setcookie('users_desc','desc',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'desc';
$desc = 'DESC';
break;
}
case 'no':
{
- @setcookie('users_desc','no',time()+3600);
+ @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no';
$desc = '';
break;
@@ -336,7 +336,7 @@ switch($_GET['mode'])
}
else
{
- @setcookie('users_desc','no',time()+3600);
+ @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no';
$desc = '';
}
@@ -353,25 +353,25 @@ switch($_GET['mode'])
{
case 'regdate':
{
- @setcookie('users_sort','regdate',time()+3600);
+ @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate';
break;
}
case 'lastvisit':
{
- @setcookie('users_sort','lastvisit',time()+3600);
+ @setcookie('users_sort','lastvisit',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'lastvisit';
break;
}
case 'uname':
{
- @setcookie('users_sort','uname',time()+3600);
+ @setcookie('users_sort','uname',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'uname';
break;
}
case 'posts':
{
- @setcookie('users_sort','posts',time()+3600);
+ @setcookie('users_sort','posts',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'posts';
break;
}
@@ -379,7 +379,7 @@ switch($_GET['mode'])
}
else
{
- @setcookie('users_sort','regdate',time()+3600);
+ @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate';
}
}
@@ -404,7 +404,7 @@ switch($_GET['mode'])
);
//do it!
Admin_Over::GenerateHeader();
- include('./template/users_beam_body.tpl');
+ require('./template/users_beam_body.tpl');
switch($_COOKIE['users_sort'])
{
case 'regdate':
@@ -439,7 +439,7 @@ switch($_GET['mode'])
'posts'=>$result['posts'],
'c_del_user'=>$lng['c_delete_user']
);
- include('./template/user_item_add_body.tpl');
+ require('./template/user_item_add_body.tpl');
}
$skin = array(
'option_pages'=>ListPages($page, $count),
@@ -447,8 +447,8 @@ switch($_GET['mode'])
'lpage'=>$lng['page'],
'lpages'=>$count
);
- include('./template/users_end_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/users_end_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
default:
diff --git a/admin/banlist.php b/admin/banlist.php
index 13f69d0..e35e138 100644
--- a/admin/banlist.php
+++ b/admin/banlist.php
@@ -9,21 +9,21 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
-include('./../includes/classes/class_pms.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
+require('./../includes/classes/class_pms.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/classes/class_forum.php');
-include('./../includes/admin/class_forum.php');
-include('./../includes/classes/secure.php');
-include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
+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('./../includes/admin/class_forum.php');
+require('./../includes/classes/secure.php');
+require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -85,8 +85,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_add_user_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/banlist_add_user_body.tpl');
+ require('./template/overall_footer.tpl');
}
break;
}
@@ -138,8 +138,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_add_ip_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/banlist_add_ip_body.tpl');
+ require('./template/overall_footer.tpl');
}
break;
}
@@ -194,8 +194,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/banlist_edit_body.tpl');
+ require('./template/overall_footer.tpl');
}
break;
}
@@ -243,8 +243,8 @@ switch($_GET['mode'])
'L.file.HELP' => $lng['banlist_info_3']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_add_file_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/banlist_add_file_body.tpl');
+ require('./template/overall_footer.tpl');
}
break;
}
@@ -313,8 +313,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_edit_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/banlist_edit_body.tpl');
+ require('./template/overall_footer.tpl');
}
break;
}
@@ -343,7 +343,7 @@ switch($_GET['mode'])
'L.clean_banlist' => $lng['banlist_clean']
);
Admin_Over::GenerateHeader();
- include('./template/banlist_view_body.tpl');
+ require('./template/banlist_view_body.tpl');
if (DataBase::num_rows($query)<1)
{
echo '
$lng['delete'],
'L.edit'=>$lng['edit'],
);
- include('./template/censorlist_list_word.tpl');
+ require('./template/censorlist_list_word.tpl');
}
}
- include('./template/overall_footer.tpl');
+ require('./template/overall_footer.tpl');
break;
}
case 'main':
@@ -199,8 +199,8 @@ switch($_GET['mode'])
'L.censorlist'=>$lng['admin_censorlist']
);
Admin_Over::GenerateHeader();
- include('./template/censorlist_main_body.tpl');
- include('./template/overall_footer.tpl');
+ require('./template/censorlist_main_body.tpl');
+ require('./template/overall_footer.tpl');
break;
}
default:
diff --git a/admin/check_script.php b/admin/check_script.php
index f84822d..5bafbed 100644
--- a/admin/check_script.php
+++ b/admin/check_script.php
@@ -9,19 +9,19 @@
**/
define('IN_uF', true);
//include files
-include('./../config.php');
-include('./../includes/constants.php');
-include('./../includes/db.php');
-include('./../includes/errors.php');
+require('./../config.php');
+require('./../includes/constants.php');
+require('./../includes/db.php');
+require('./../includes/errors.php');
//connect to database
DataBase::db_connect();
-include('./../includes/sessions.php');
-include('./../includes/classes/class_user.php');
-include('./../common.php');
-include('./../includes/admin/class_main.php');
-include('./../includes/classes/class_forum.php');
-include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
-include('./../admin/check_script_data.php');
+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');
+require('./../admin/check_script_data.php');
SessDelInvalid();
SessRegister();
SessDeleteOld();
@@ -178,7 +178,7 @@ $skin=array(
'successfully' => ($count <1) ? ''.$lng['files_is_good'].' ('.count($script_files).')' : ''.$lng['files_not_good'].$count.''
);
Admin_Over::GenerateHeader();
-include('./template/check_script.tpl');
+require('./template/check_script.tpl');
for($i=0; $i
'; @@ -176,7 +176,7 @@ else 'name'=>$item['name'], 'desc'=>$item['desc'] ); - include('./skins/'.$default_skin.'/group_add_body.tpl'); + require('./skins/'.$default_skin.'/group_add_body.tpl'); } } else @@ -186,6 +186,6 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); - include('./skins/'.$default_skin.'/overall_footer.tpl'); + require('./skins/'.$default_skin.'/overall_footer.tpl'); } ?> diff --git a/includes/cache/cache_topic.php b/includes/cache/cache_topic.php index 1f20934..c9b4973 100644 --- a/includes/cache/cache_topic.php +++ b/includes/cache/cache_topic.php @@ -55,7 +55,7 @@ while ($result = DataBase::fetch($query)) } //check online for user -$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".time(); +$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".$_SERVER['REQUEST_TIME']; $query = DataBase::sql_query($sql, GENERAL, 'Could not read user active.'); while($result = DataBase::fetch($query)) { diff --git a/includes/classes/class_forum.php b/includes/classes/class_forum.php index da9a12c..8068418 100644 --- a/includes/classes/class_forum.php +++ b/includes/classes/class_forum.php @@ -104,7 +104,7 @@ class Forum global $i; global $forum; global $default_skin; - $time = time()-129600; + $time = $_SERVER['REQUEST_TIME']-129600; if ($_SESSION['uid']>0) { if ($postsinforum>0) diff --git a/includes/classes/class_pms.php b/includes/classes/class_pms.php index 5aa90dd..5534c99 100644 --- a/includes/classes/class_pms.php +++ b/includes/classes/class_pms.php @@ -80,14 +80,14 @@ class NewMessage function AddToInbox($text, $name, $unid, $uid) { $last = DataBase::new_id(PM_INBOX_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO `".PM_INBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid','0')"; DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox'); } function AddToSentbox($text, $name, $unid, $uid) { $last=DataBase::new_id(PM_SENTBOX_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO `".PM_SENTBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid')"; DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox'); } diff --git a/includes/classes/class_posting.php b/includes/classes/class_posting.php index 130c9d6..2d83aa1 100644 --- a/includes/classes/class_posting.php +++ b/includes/classes/class_posting.php @@ -26,7 +26,7 @@ class Post $tpid = $result['tp_id'];//post in topic id $tpid = $tpid+1; # - $time = time(); + $time = $_SERVER['REQUEST_TIME']; #add new post $sql = "INSERT INTO `".POSTS_TABLE."` VALUES ('$last','$tid', '$uid', '$post', '".$_SERVER['HTTP_USER_AGENT']."', '$time', '$tpid', '$forum','$moderate','".$_SERVER['REMOTE_ADDR']."')"; $query = DataBase::sql_query($sql,GENERAL,'Could not add new post.'); @@ -49,7 +49,7 @@ class Post { //Select last topic $moderate = Forum::ForumInformation($forum,'moderate'); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $lastt=DataBase::new_id(TOPICS_TABLE); $sql = "INSERT INTO ".TOPICS_TABLE." VALUES ('$lastt', '$forum', '0', '$sticky', '$ntopic', '$uid','$time', '', '')"; $query = DataBase::sql_query($sql,GENERAL,'Could not add new topic'); diff --git a/includes/classes/class_topic.php b/includes/classes/class_topic.php index 4f5cd29..6c75140 100644 --- a/includes/classes/class_topic.php +++ b/includes/classes/class_topic.php @@ -68,7 +68,7 @@ class Topic global $last_post; global $record; global $default_skin; - $time = time()-129600; + $time = $_SERVER['REQUEST_TIME']-129600; if ($_SESSION['uid']>0) { if ($last_post[2]>$time) diff --git a/includes/classes/class_user.php b/includes/classes/class_user.php index 52e2e2f..1a0ab6e 100644 --- a/includes/classes/class_user.php +++ b/includes/classes/class_user.php @@ -182,7 +182,7 @@ class User { global $forum_config; $last = DataBase::new_id(USERS_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO ".USERS_TABLE." VALUES ('$last', '$nick', '$pass', '$email', '0', '$time', '0', '$gg', '$allow_gg', '$allow_email', '$allow_qr', '".$forum_config['view_shoutbox']."', '".$forum_config['defaultskin']."', '".$forum_config['defaultlang']."','".$forum_config['limit_tpid']."', '".$forum_config['limit_ftid']."', '".$forum_config['limit_users']."', '$sig', '$av', '1','0','$interests');"; DataBase::sql_query($sql,CRITICAL,'Could not create new user'); diff --git a/includes/emailer.php b/includes/emailer.php index 73f0a73..97ecab6 100644 --- a/includes/emailer.php +++ b/includes/emailer.php @@ -20,7 +20,7 @@ function SendEmail($email, $title, $content) $email_headers = "MIME-Version: 1.0\r\n"; $email_headers .= "Content-type: text/html; charset=iso-8859-2\r\n"; $email_headers .= "From: ".$forum_config['forumname']." \n"; - $email_date = date('d-m-Y, G:i',time()); + $email_date = date('d-m-Y, G:i',$_SERVER['REQUEST_TIME']); $email_content = ' diff --git a/includes/errors.php b/includes/errors.php index 8e202d4..18115e7 100644 --- a/includes/errors.php +++ b/includes/errors.php @@ -46,16 +46,17 @@ function message_forum($text, $url, $interval = 1.8) { global $lng; global $forum_config; + global $userdata; $skin = array( 'url' => $url, 'msg' => $text, 'queries' => '', 'pa_link' => '', ); - $skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], '> '.$lng['message_forum'])); + $skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], ' ')); die( - include('./skins/'.ViewSkinName().'/message_body.tpl') - ); + require('./skins/'.ViewSkinName().'/message_body.tpl') + ); } function admin_message_forum($text, $url) { @@ -66,7 +67,7 @@ $skin = array( $skin['queries'] = ''; $skin['pa_link'] = ''; die( - include('./template/message_body.tpl') + require('./template/message_body.tpl') ); } ?> diff --git a/includes/misc_functions.php b/includes/misc_functions.php index 918e954..24d6b8a 100644 --- a/includes/misc_functions.php +++ b/includes/misc_functions.php @@ -48,7 +48,13 @@ function GenerateHeader($title, $navigator) 'L.actual_time'=>$lng['lactualtime'], 'modelogin' => ($_SESSION['uid']>0) ? 'logout' : 'login', 'L.login' => ($_SESSION['uid']>0) ? $lng['lunlogin'] : $lng['llogin'], - 'L.pa_link' => $lng['pa_link'] + 'L.pa_link' => $lng['pa_link'], + 'lactual_time'=>$lng['lactualtime'], + 'actual_time'=>GenerateTime($_SERVER['REQUEST_TIME'], true), + 'loged_as' => User::LogedAs($_SESSION['sessionid'], $_SESSION['uid']), + 'lyoure' => ($_SESSION['uid']>0) ? $lng['you_re'] : '', + 'lpm_msgs' => ($_SESSION['uid']>0) ? $lng['pm_messages'] : '', + 'amsgs' => ($_SESSION['uid']>0) ? User::UserPMs() : '' ); return $skin; @@ -137,24 +143,31 @@ function UserAgent($agent) return array('icon_' . $system . '.gif', 'icon_' . $browser . '.gif', ($system=='unknown') ? $lng['unknown'] : $system, ($browser=='unknown') ? $lng['unknown'] : $browser); } -function GenerateTime($request_time) +function GenerateTime($request_time, $n = false) { global $lng; - if (date('d M Y',$request_time)== date('d M Y',time())) + if (!$n) { - $date = $lng['today'].', '.date('G:i', $request_time); - } - else - { - if ((date('d',$request_time))== (date('d',time())-1) && (date('m-Y',$request_time)== date('m-Y',time()))) + if (date('d M Y',$request_time)== date('d M Y',$_SERVER['REQUEST_TIME'])) { - $date = $lng['yesterday'].', '.date('G:i', $request_time); + $date = $lng['today'].', '.date('G:i', $request_time); } else { - $date = date('d M Y, G:i',$request_time); + if ((date('d',$request_time))== (date('d',$_SERVER['REQUEST_TIME'])-1) && (date('m-Y',$request_time)== date('m-Y',$_SERVER['REQUEST_TIME']))) + { + $date = $lng['yesterday'].', '.date('G:i', $request_time); + } + else + { + $date = date('d M Y, G:i',$request_time); + } } } + else + { + $date = date('d M Y, G:i',$request_time); + } return $date; } @@ -283,7 +296,7 @@ function ViewSkinName() global $forum_config; global $userdata; - if ($_SESSION['uid']>0) + if ($_SESSION['uid']>0 && basename($_SERVER['REQUEST_URI']) != 'login.php?mode=login') { $result = $userdata['skin']; } diff --git a/includes/pms/pms_folder.php b/includes/pms/pms_folder.php index 9f14e8d..3dfbbe5 100644 --- a/includes/pms/pms_folder.php +++ b/includes/pms/pms_folder.php @@ -40,10 +40,10 @@ $skin = array( 'msg_per'=>($_GET['submode']=='inbox') ? round(($cnt[0]/$forum_config['pm_inbox_max'])*100,1) : round(($cnt[1]/$forum_config['pm_sentbox_max'])*100,1) ); -$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), ' > '.$lng['lpm'].' > '.$folder)); +$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), ''.$lng['lpm'].' » '.$folder)); //do it! -include('./skins/'.$default_skin.'/overall_header.tpl'); -include('./skins/'.$default_skin.'/pms_folder_body.tpl'); +require('./skins/'.$default_skin.'/overall_header.tpl'); +require('./skins/'.$default_skin.'/pms_folder_body.tpl'); $uid = $_SESSION['uid']; if (!isset($_GET['submode'])) @@ -74,7 +74,7 @@ $count = DataBase::num_rows($query); if ($count==0) { - $skin['nomsgs']=' '.$lng['no_elements'].'! '.$lng['no_elements'].'! |