Browse Source

Last update before closing project. Thank you!

git-svn-id: https://svn.pioder.pl/uf-svn/uF@38 72ec579a-5ced-4fa4-82f3-afba5d98df2f
master
pioder 14 years ago
parent
commit
01741920b0
46 changed files with 652 additions and 661 deletions
  1. +37
    -37
      admin/admin_forums.php
  2. +21
    -21
      admin/admin_groups.php
  3. +13
    -13
      admin/admin_script.php
  4. +27
    -27
      admin/admin_users.php
  5. +26
    -26
      admin/banlist.php
  6. +24
    -24
      admin/censorlist.php
  7. +14
    -14
      admin/check_script.php
  8. +12
    -12
      admin/forum_info.php
  9. +10
    -10
      admin/header.php
  10. +10
    -10
      admin/index.php
  11. +14
    -14
      admin/mass_email.php
  12. +22
    -22
      admin/smilelist.php
  13. +2
    -2
      common.php
  14. +53
    -62
      eprofile.php
  15. +20
    -20
      forum.php
  16. +21
    -21
      groups.php
  17. +1
    -1
      includes/cache/cache_topic.php
  18. +1
    -1
      includes/classes/class_forum.php
  19. +2
    -2
      includes/classes/class_pms.php
  20. +2
    -2
      includes/classes/class_posting.php
  21. +1
    -1
      includes/classes/class_topic.php
  22. +1
    -1
      includes/classes/class_user.php
  23. +1
    -1
      includes/emailer.php
  24. +5
    -4
      includes/errors.php
  25. +24
    -11
      includes/misc_functions.php
  26. +7
    -7
      includes/pms/pms_folder.php
  27. +4
    -4
      includes/pms/pms_view.php
  28. +6
    -6
      includes/pms/pms_write.php
  29. +6
    -6
      includes/sessions.php
  30. +22
    -27
      index.php
  31. +18
    -18
      install1/index.php
  32. +1
    -1
      lngs/Polish/admin.php
  33. +1
    -1
      lngs/Polish/main.php
  34. +23
    -23
      login.php
  35. +17
    -17
      moderate.php
  36. +14
    -14
      pms.php
  37. +28
    -39
      posting.php
  38. +3
    -3
      quick_reply.php
  39. +22
    -20
      register.php
  40. +24
    -24
      search.php
  41. +3
    -3
      shoutbox.php
  42. +3
    -3
      skins/subPurple/overall_header.tpl
  43. +21
    -21
      topic.php
  44. +16
    -16
      user.php
  45. +25
    -25
      users.php
  46. +24
    -24
      warns.php

+ 37
- 37
admin/admin_forums.php View File

@ -9,19 +9,19 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -54,7 +54,7 @@ function GenerateDefaultDisplay()
'new_forum_submit'=>$lng['new_forum_submit'], 'new_forum_submit'=>$lng['new_forum_submit'],
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/forums_beam_body.tpl');
require('./template/forums_beam_body.tpl');
//add forums and categories //add forums and categories
$sql = "SELECT * FROM `".CATS_TABLE."` ORDER BY `sort`"; $sql = "SELECT * FROM `".CATS_TABLE."` ORDER BY `sort`";
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain categories information.'); $query = DataBase::sql_query($sql,CRITICAL,'Could not obtain categories information.');
@ -69,7 +69,7 @@ function GenerateDefaultDisplay()
'delete'=>$lng['delete'], 'delete'=>$lng['delete'],
'del_cat'=>$lng['c_del_cat'] '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++) for ($i=1; $i<=count($forum); $i++)
{ {
if ($forum[$i]['c_id']==$result['c_id']) if ($forum[$i]['c_id']==$result['c_id'])
@ -84,7 +84,7 @@ function GenerateDefaultDisplay()
'move_down'=>$lng['movedown'], 'move_down'=>$lng['movedown'],
'delete'=>$lng['delete'] 'delete'=>$lng['delete']
); );
include('./template/forum_forum_add.tpl');
require('./template/forum_forum_add.tpl');
} }
} }
echo '<span class="fsmall">&nbsp;<br></span>'; echo '<span class="fsmall">&nbsp;<br></span>';
@ -93,8 +93,8 @@ function GenerateDefaultDisplay()
'here_write_name_cat'=>$lng['here_write_name_cat'], 'here_write_name_cat'=>$lng['here_write_name_cat'],
'new_cat_submit'=>$lng['new_cat_submit'] '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'])) if (!isset($_GET['mode']))
{ {
@ -128,14 +128,14 @@ switch($_GET['mode'])
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_cat_name']; $message = $lng['to_short_cat_name'];
} }
} }
else else
{ {
$_POST['cat_name'] = ''; $_POST['cat_name'] = '';
$msg='./../skins/'.$default_skin.'/blank.tpl';
$msg='./template/blank.tpl';
} }
$skin = array( $skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'], 'here_write_name_forum'=>$lng['here_write_name_forum'],
@ -150,8 +150,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=new&submode=cat' 'action'=>'admin_forums.php?mode=new&submode=cat'
); );
Admin_Over::GenerateHeader(); 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; break;
} }
case 'forum': case 'forum':
@ -177,18 +177,18 @@ switch($_GET['mode'])
$last = $last +1; $last = $last +1;
$sql = "INSERT INTO `".FORUMS_TABLE."` VALUES ('$last','$forum_lock','$allow_moderate', '$forum_name', '$forum_desc', '0', '','$forum_cat','$sort')"; $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'); 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'); admin_message_forum($lng['forum_saved'],'admin_forums.php');
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_desc']; $message = $lng['to_short_forum_desc'];
} }
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_name']; $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_name'])) { $_POST['forum_name'] = ''; }
if (!isset($_POST['forum_desc'])) { $_POST['forum_desc'] = ''; } if (!isset($_POST['forum_desc'])) { $_POST['forum_desc'] = ''; }
$msg='./../skins/'.$default_skin.'/blank.tpl';
$msg='./template/blank.tpl';
} }
$skin = array( $skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'], 'here_write_name_forum'=>$lng['here_write_name_forum'],
@ -219,8 +219,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=new&submode=forum' 'action'=>'admin_forums.php?mode=new&submode=forum'
); );
Admin_Over::GenerateHeader(); 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; break;
} }
} }
@ -443,12 +443,12 @@ switch($_GET['mode'])
$sort = $sort+1; $sort = $sort+1;
$sql = "UPDATE `".CATS_TABLE."` SET `name`='$cat_name', `sort`='$sort' WHERE `c_id`='$cid'"; $sql = "UPDATE `".CATS_TABLE."` SET `name`='$cat_name', `sort`='$sort' WHERE `c_id`='$cid'";
DataBase::sql_query($sql,GENERAL,'Could not update category'); 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'); admin_message_forum($lng['cat_saved'],'admin_forums.php');
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_cat_name']; $message = $lng['to_short_cat_name'];
} }
} }
@ -462,7 +462,7 @@ switch($_GET['mode'])
admin_message_forum($lng['no_category'],'admin_forums.php?mode=view'); admin_message_forum($lng['no_category'],'admin_forums.php?mode=view');
} }
unset($tmp); unset($tmp);
$msg='./../skins/'.$default_skin.'/blank.tpl';
$msg='./template/blank.tpl';
} }
$skin = array( $skin = array(
'here_write_name_forum'=>$lng['here_write_name_forum'], '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 'action'=>'admin_forums.php?mode=edit&submode=cat&c='.$cid
); );
Admin_Over::GenerateHeader(); 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; break;
} }
case 'forum': case 'forum':
@ -517,18 +517,18 @@ switch($_GET['mode'])
`sort`='$sort' `sort`='$sort'
WHERE `f_id`='$fid'"; WHERE `f_id`='$fid'";
DataBase::sql_query($sql,GENERAL,'Could not update forum'); 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'); admin_message_forum($lng['forum_saved'],'admin_forums.php');
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_desc']; $message = $lng['to_short_forum_desc'];
} }
} }
else else
{ {
$msg = './../skins/'.$default_skin.'/post_error_body.tpl';
$msg = './template/post_error_body.tpl';
$message = $lng['to_short_forum_name']; $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')); $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']; $_POST['forum_name'] = $tmp['name'];
$msg='./../skins/'.$default_skin.'/blank.tpl';
$msg='./template/blank.tpl';
$_POST['forum_desc'] = $tmp['desc']; $_POST['forum_desc'] = $tmp['desc'];
if($tmp['name']=='') if($tmp['name']=='')
{ {
@ -565,8 +565,8 @@ switch($_GET['mode'])
'action'=>'admin_forums.php?mode=edit&submode=forum&f='.$fid 'action'=>'admin_forums.php?mode=edit&submode=forum&f='.$fid
); );
Admin_Over::GenerateHeader(); 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; break;
} }
} }

+ 21
- 21
admin/admin_groups.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -39,7 +39,7 @@ function GenerateDefaultDisplay()
$skin['L.groups'] = $lng['admin_groups']; $skin['L.groups'] = $lng['admin_groups'];
$skin['L.new_group'] = $lng['new_group']; $skin['L.new_group'] = $lng['new_group'];
Admin_Over::GenerateHeader(); 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`"; $sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`";
$query = DataBase::sql_query($sql, GENERAL, 'Could not obtain groups information.'); $query = DataBase::sql_query($sql, GENERAL, 'Could not obtain groups information.');
while($item = DataBase::fetch($query)) while($item = DataBase::fetch($query))
@ -53,10 +53,10 @@ function GenerateDefaultDisplay()
'delete'=>$lng['delete'], 'delete'=>$lng['delete'],
'c_delete'=>$lng['c_delete_group'] 'c_delete'=>$lng['c_delete_group']
); );
include('./template/group_add_body.tpl');
require('./template/group_add_body.tpl');
} }
echo '</table>'; echo '</table>';
include('./template/overall_footer.tpl');
require('./template/overall_footer.tpl');
} }
if (!isset($_GET['mode'])) if (!isset($_GET['mode']))
{ {
@ -124,8 +124,8 @@ switch($_GET['mode'])
'L.groups' => $lng['admin_groups'] 'L.groups' => $lng['admin_groups']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
case 'edit': case 'edit':
@ -165,7 +165,7 @@ switch($_GET['mode'])
$_POST['group_name'] = $g['name']; $_POST['group_name'] = $g['name'];
$_POST['group_desc'] = $g['desc']; $_POST['group_desc'] = $g['desc'];
$_POST['group_mod'] = User::UserInformation($g['m_id'],'nick'); $_POST['group_mod'] = User::UserInformation($g['m_id'],'nick');
$msg='./../skins/'.$default_skin.'/blank.tpl';
$msg='./template/blank.tpl';
} }
$skin = array( $skin = array(
'L.save'=>$lng['submit'], 'L.save'=>$lng['submit'],
@ -178,8 +178,8 @@ switch($_GET['mode'])
'L.groups' => $lng['admin_groups'] 'L.groups' => $lng['admin_groups']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
case 'moveup': case 'moveup':

+ 13
- 13
admin/admin_script.php View File

@ -9,19 +9,19 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -367,6 +367,6 @@ $skin = array(
); );
//do it! //do it!
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/admin_script.tpl');
include('./template/overall_footer.tpl');
require('./template/admin_script.tpl');
require('./template/overall_footer.tpl');
?> ?>

+ 27
- 27
admin/admin_users.php View File

@ -9,22 +9,22 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); $default_lang = Admin_Over::DefaultLang();
include('./../lngs/'.$default_lang.'/admin.php');
require('./../lngs/'.$default_lang.'/admin.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -275,8 +275,8 @@ switch($_GET['mode'])
$msg = './template/blank.tpl'; $msg = './template/blank.tpl';
} }
Admin_Over::GenerateHeader(); 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; break;
} }
case 'view': case 'view':
@ -320,14 +320,14 @@ switch($_GET['mode'])
{ {
case 'yes': case 'yes':
{ {
@setcookie('users_desc','desc',time()+3600);
@setcookie('users_desc','desc',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'desc'; $_COOKIE['users_desc'] = 'desc';
$desc = 'DESC'; $desc = 'DESC';
break; break;
} }
case 'no': case 'no':
{ {
@setcookie('users_desc','no',time()+3600);
@setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no'; $_COOKIE['users_desc'] = 'no';
$desc = ''; $desc = '';
break; break;
@ -336,7 +336,7 @@ switch($_GET['mode'])
} }
else else
{ {
@setcookie('users_desc','no',time()+3600);
@setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no'; $_COOKIE['users_desc'] = 'no';
$desc = ''; $desc = '';
} }
@ -353,25 +353,25 @@ switch($_GET['mode'])
{ {
case 'regdate': case 'regdate':
{ {
@setcookie('users_sort','regdate',time()+3600);
@setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate'; $_COOKIE['users_sort'] = 'regdate';
break; break;
} }
case 'lastvisit': case 'lastvisit':
{ {
@setcookie('users_sort','lastvisit',time()+3600);
@setcookie('users_sort','lastvisit',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'lastvisit'; $_COOKIE['users_sort'] = 'lastvisit';
break; break;
} }
case 'uname': case 'uname':
{ {
@setcookie('users_sort','uname',time()+3600);
@setcookie('users_sort','uname',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'uname'; $_COOKIE['users_sort'] = 'uname';
break; break;
} }
case 'posts': case 'posts':
{ {
@setcookie('users_sort','posts',time()+3600);
@setcookie('users_sort','posts',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'posts'; $_COOKIE['users_sort'] = 'posts';
break; break;
} }
@ -379,7 +379,7 @@ switch($_GET['mode'])
} }
else else
{ {
@setcookie('users_sort','regdate',time()+3600);
@setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate'; $_COOKIE['users_sort'] = 'regdate';
} }
} }
@ -404,7 +404,7 @@ switch($_GET['mode'])
); );
//do it! //do it!
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/users_beam_body.tpl');
require('./template/users_beam_body.tpl');
switch($_COOKIE['users_sort']) switch($_COOKIE['users_sort'])
{ {
case 'regdate': case 'regdate':
@ -439,7 +439,7 @@ switch($_GET['mode'])
'posts'=>$result['posts'], 'posts'=>$result['posts'],
'c_del_user'=>$lng['c_delete_user'] 'c_del_user'=>$lng['c_delete_user']
); );
include('./template/user_item_add_body.tpl');
require('./template/user_item_add_body.tpl');
} }
$skin = array( $skin = array(
'option_pages'=>ListPages($page, $count), 'option_pages'=>ListPages($page, $count),
@ -447,8 +447,8 @@ switch($_GET['mode'])
'lpage'=>$lng['page'], 'lpage'=>$lng['page'],
'lpages'=>$count '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; break;
} }
default: default:

+ 26
- 26
admin/banlist.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -85,8 +85,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1'] 'L.user_name.HELP' => $lng['banlist_info_1']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
@ -138,8 +138,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1'] 'L.user_name.HELP' => $lng['banlist_info_1']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
@ -194,8 +194,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1'] 'L.user_name.HELP' => $lng['banlist_info_1']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
@ -243,8 +243,8 @@ switch($_GET['mode'])
'L.file.HELP' => $lng['banlist_info_3'] 'L.file.HELP' => $lng['banlist_info_3']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
@ -313,8 +313,8 @@ switch($_GET['mode'])
'L.user_name.HELP' => $lng['banlist_info_1'] 'L.user_name.HELP' => $lng['banlist_info_1']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
@ -343,7 +343,7 @@ switch($_GET['mode'])
'L.clean_banlist' => $lng['banlist_clean'] 'L.clean_banlist' => $lng['banlist_clean']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/banlist_view_body.tpl');
require('./template/banlist_view_body.tpl');
if (DataBase::num_rows($query)<1) if (DataBase::num_rows($query)<1)
{ {
echo '<tr><td width="'.TABLES_WIDTH.'" colspan="5" height="19" echo '<tr><td width="'.TABLES_WIDTH.'" colspan="5" height="19"
@ -361,11 +361,11 @@ switch($_GET['mode'])
'L.delete'=>$lng['delete'], 'L.delete'=>$lng['delete'],
'L.edit'=>$lng['edit'] 'L.edit'=>$lng['edit']
); );
include('./template/banlist_item_add.tpl');
require('./template/banlist_item_add.tpl');
} }
} }
echo '</table>'; echo '</table>';
include('./template/overall_footer.tpl');
require('./template/overall_footer.tpl');
break; break;
} }
default: default:

+ 24
- 24
admin/censorlist.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -72,8 +72,8 @@ switch($_GET['mode'])
'L.censorlist'=>$lng['admin_censorlist'] 'L.censorlist'=>$lng['admin_censorlist']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/censorlist_upload_body.tpl');
include('./template/overall_footer.tpl');
require('./template/censorlist_upload_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -112,8 +112,8 @@ switch($_GET['mode'])
'L.censorlist'=>$lng['admin_censorlist'] 'L.censorlist'=>$lng['admin_censorlist']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/censorlist_add_edit_body.tpl');
include('./template/overall_footer.tpl');
require('./template/censorlist_add_edit_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -145,8 +145,8 @@ switch($_GET['mode'])
'L.censorlist'=>$lng['admin_censorlist'] 'L.censorlist'=>$lng['admin_censorlist']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/censorlist_add_edit_body.tpl');
include('./template/overall_footer.tpl');
require('./template/censorlist_add_edit_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -165,7 +165,7 @@ switch($_GET['mode'])
'L.view_all_words'=>$lng['view_all_words'] 'L.view_all_words'=>$lng['view_all_words']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/censorlist_view_body.tpl');
require('./template/censorlist_view_body.tpl');
if (DataBase::num_rows($query)<1) if (DataBase::num_rows($query)<1)
{ {
echo '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19" echo '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19"
@ -182,10 +182,10 @@ switch($_GET['mode'])
'L.delete'=>$lng['delete'], 'L.delete'=>$lng['delete'],
'L.edit'=>$lng['edit'], '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; break;
} }
case 'main': case 'main':
@ -199,8 +199,8 @@ switch($_GET['mode'])
'L.censorlist'=>$lng['admin_censorlist'] 'L.censorlist'=>$lng['admin_censorlist']
); );
Admin_Over::GenerateHeader(); 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; break;
} }
default: default:

+ 14
- 14
admin/check_script.php View File

@ -9,19 +9,19 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -178,7 +178,7 @@ $skin=array(
'successfully' => ($count <1) ? '<font color="green">'.$lng['files_is_good'].' ('.count($script_files).')</font>' : '<font color="red">'.$lng['files_not_good'].$count.'</font>' 'successfully' => ($count <1) ? '<font color="green">'.$lng['files_is_good'].' ('.count($script_files).')</font>' : '<font color="red">'.$lng['files_not_good'].$count.'</font>'
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/check_script.tpl');
require('./template/check_script.tpl');
for($i=0; $i<count($script_files);$i++) for($i=0; $i<count($script_files);$i++)
{ {
$actual = check_size_md5($script_files[$i]); $actual = check_size_md5($script_files[$i]);
@ -194,10 +194,10 @@ for($i=0; $i
'sum_actual'=>$actual, 'sum_actual'=>$actual,
'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')' 'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')'
); );
include('./template/invalidfile_body.tpl');
require('./template/invalidfile_body.tpl');
} }
} }
} }
include('./template/overall_footer.tpl');
require('./template/overall_footer.tpl');
?> ?>

+ 12
- 12
admin/forum_info.php View File

@ -9,18 +9,18 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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');
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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -102,6 +102,6 @@ $skin = array(
); );
//do it! //do it!
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/index_body.tpl');
include('./template/overall_footer.tpl');
require('./template/index_body.tpl');
require('./template/overall_footer.tpl');
?> ?>

+ 10
- 10
admin/header.php View File

@ -8,17 +8,17 @@
* @license see LICENSE.txt * @license see LICENSE.txt
**/ **/
define('IN_uF', true); define('IN_uF', true);
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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./../includes/sessions.php');
include('./../includes/classes/class_user.php');
include('./../common.php');
include('./../includes/admin/class_main.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('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -42,5 +42,5 @@ $skin = array(
'admin_styles' => $lng['styles'], 'admin_styles' => $lng['styles'],
'main_beam'=>$lng['pa_mainpage'] 'main_beam'=>$lng['pa_mainpage']
); );
include('./template/overall_header.tpl');
require('./template/overall_header.tpl');
?> ?>

+ 10
- 10
admin/index.php View File

@ -9,18 +9,18 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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');
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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();

+ 14
- 14
admin/mass_email.php View File

@ -9,20 +9,20 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./../includes/sessions.php');
include('./../includes/classes/class_user.php');
include('./../common.php');
include('./../includes/admin/class_main.php');
include('./../includes/emailer.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/emailer.php');
require('./../includes/classes/class_forum.php');
require('./../includes/admin/class_forum.php');
require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -62,6 +62,6 @@ $skin = array(
'L.main_beam'=>$lng['mass_email2'] 'L.main_beam'=>$lng['mass_email2']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/mass_email.tpl');
include('./template/overall_footer.tpl');
require('./template/mass_email.tpl');
require('./template/overall_footer.tpl');
?> ?>

+ 22
- 22
admin/smilelist.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); 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(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -72,8 +72,8 @@ switch($_GET['mode'])
'L.clear'=>$lng['reset'] 'L.clear'=>$lng['reset']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/smilelist_edit_body.tpl');
include('./template/overall_footer.tpl');
require('./template/smilelist_edit_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -121,8 +121,8 @@ switch($_GET['mode'])
'L.file.HELP' => $lng['smilelist_info_1'] 'L.file.HELP' => $lng['smilelist_info_1']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/smilelist_add_file_body.tpl');
include('./template/overall_footer.tpl');
require('./template/smilelist_add_file_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -174,8 +174,8 @@ switch($_GET['mode'])
'L.clear'=>$lng['reset'] 'L.clear'=>$lng['reset']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/smilelist_edit_body.tpl');
include('./template/overall_footer.tpl');
require('./template/smilelist_edit_body.tpl');
require('./template/overall_footer.tpl');
} }
break; break;
} }
@ -197,7 +197,7 @@ switch($_GET['mode'])
'L.clean_smilelist' => $lng['smilelist_clean'] 'L.clean_smilelist' => $lng['smilelist_clean']
); );
Admin_Over::GenerateHeader(); Admin_Over::GenerateHeader();
include('./template/smilelist_view_body.tpl');
require('./template/smilelist_view_body.tpl');
if (DataBase::num_rows($query)<1) if (DataBase::num_rows($query)<1)
{ {
echo '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19" echo '<table class="maintable"><tr><td width="'.TABLES_WIDTH.'" colspan="8" height="19"
@ -215,10 +215,10 @@ switch($_GET['mode'])
'L.delete'=>$lng['delete'], 'L.delete'=>$lng['delete'],
'L.edit'=>$lng['edit'] 'L.edit'=>$lng['edit']
); );
include('./template/smilelist_item_add.tpl');
require('./template/smilelist_item_add.tpl');
} }
} }
include('./template/overall_footer.tpl');
require('./template/overall_footer.tpl');
break; break;
} }
default: default:

+ 2
- 2
common.php View File

@ -61,8 +61,8 @@ if ($_SESSION['uid']>0)
$db_uid = $result['u_id']; $db_uid = $result['u_id'];
if (($db_ip==$ip) || ($db_uid==$uid)) if (($db_ip==$ip) || ($db_uid==$uid))
{ {
include('./includes/misc_functions.php');
include('./lngs/'.DefaultLang(true).'/main.php');
require('./includes/misc_functions.php');
require('./lngs/'.DefaultLang(true).'/main.php');
SessDelete($_SESSION['uid']); SessDelete($_SESSION['uid']);
$_SESSION['uid']='0'; $_SESSION['uid']='0';
message_forum($motive,'index.php', '10'); message_forum($motive,'index.php', '10');

+ 53
- 62
eprofile.php View File

@ -9,23 +9,23 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -44,6 +44,7 @@ foreach ($_POST as $name => $value)
} }
$msg=''; $msg='';
$errors = true; $errors = true;
$message = '';
if (isset($_POST['email'])) if (isset($_POST['email']))
{ {
if ( ereg ("^.+@.+\..+$", $_POST['email'])) if ( ereg ("^.+@.+\..+$", $_POST['email']))
@ -72,55 +73,45 @@ if (isset($_POST['email']))
} }
else else
{ {
if ($_POST['default_skin']!='-1')
if ($_POST['default_skin']=='-1')
{ {
if ($_POST['default_lang']!='-1')
{
if ($_POST['limit_tpid']!='-1')
{
if ($_POST['limit_ftid']!='-1')
{
if ($_POST['limit_users']!='-1')
{
if (strlen(trim($_POST['sig']))<$forum_config['sig_len'])
{
$errors = false;
}
else
{
$message = $lng['signature_too_long'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$message = $lng['no_limit_users'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$message = $lng['no_limit_ftid'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$message = $lng['no_limit_tpid'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
}
else
{
$message=$lng['invalid_lang'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
}
$message .= $lng['invalid_skin'].'<br />';
}
if ($_POST['default_lang']=='-1')
{
$message .= $lng['invalid_lang'].'<br />';
}
if ($_POST['limit_tpid']=='-1')
{
$message .= $lng['no_limit_tpid'].'<br />';
}
if ($_POST['limit_ftid'] =='-1')
{
$message .= $lng['no_limit_ftid'].'<br />';
}
if ($_POST['limit_users']=='-1')
{
$message .= $lng['no_limit_users'].'<br />';
}
if (strlen(trim($_POST['sig']))>$forum_config['sig_len'])
{
$message .= $lng['signature_too_long'].'<br />';
}
if ($message != '')
{
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
} }
else else
{ {
$message=$lng['invalid_skin'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
$errors = false;
} }
} }
if (!$errors) if (!$errors)
{ {
@ -209,7 +200,7 @@ if (isset($_POST['email']))
} }
else else
{ {
$message=$lng['invalid_email'];
$message .= $lng['invalid_email'];
$msg = './skins/'.$default_skin.'/post_error_body.tpl'; $msg = './skins/'.$default_skin.'/post_error_body.tpl';
} }
} }
@ -270,15 +261,15 @@ $skin = array(
'lavfile'=>$lng['avatar_file'], 'lavfile'=>$lng['avatar_file'],
'yes'=>$lng['yes'] 'yes'=>$lng['yes']
); );
$skin = array_push_assoc($skin,GenerateHeader($lng['leprofile'],'</a>&gt; <a href="eprofile.php" class="navigator">'.$lng['leprofile']));
$skin = array_push_assoc($skin,GenerateHeader($lng['leprofile'], '<a href="eprofile.php" class="navigator">'.$lng['leprofile']));
if ($msg=='') if ($msg=='')
{ {
$msg = './skins/'.$default_skin.'/blank.tpl'; $msg = './skins/'.$default_skin.'/blank.tpl';
} }
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/eprofile_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/eprofile_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 20
- 20
forum.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
$fid = intval($_GET['f']); $fid = intval($_GET['f']);
@ -31,13 +31,13 @@ SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
include('./includes/cache/cache_forums.php');
require('./includes/cache/cache_forums.php');
//add skin variables //add skin variables
$skin = array( $skin = array(
'ntopic' => ($forum['lock']==1) ? '<img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/lock.gif" 'ntopic' => ($forum['lock']==1) ? '<img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/lock.gif"
alt="ntopic" border="0"/>' : '<a href="posting.php?mode=ntopic&amp;f='.$_GET["f"].'"> alt="ntopic" border="0"/>' : '<a href="posting.php?mode=ntopic&amp;f='.$_GET["f"].'">
<img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic_active.gif\'"
<img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic_active.gif\'"
onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif\'" border="0" alt="reply"></a>', onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif\'" border="0" alt="reply"></a>',
'lposts'=>$lng['posts'], 'lposts'=>$lng['posts'],
'llastposts'=>$lng['lastpost'], 'llastposts'=>$lng['lastpost'],
@ -48,10 +48,10 @@ $skin = array(
'f_id' => $fid, 'f_id' => $fid,
'lang'=> $default_lang 'lang'=> $default_lang
); );
$skin = array_push_assoc($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name']));
$skin = array_push_assoc($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], '<a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/forum_body.tpl');
$sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".TOPICS_TABLE.".posts AS `postcount`, ".TOPICS_TABLE.".lastpost AS `topic_lastpost` FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".TOPICS_TABLE.".posts AS `postcount`, ".TOPICS_TABLE.".lastpost AS `topic_lastpost` FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE f_id='$fid' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain topics information'); $query = DataBase::sql_query($sql,GENERAL,'Could not obtain topics information');
$value = DataBase::num_rows($query); $value = DataBase::num_rows($query);
@ -68,7 +68,7 @@ if ($value>0)
'new_post'=>Topic::LastPostImg(), 'new_post'=>Topic::LastPostImg(),
'lastpost'=>Topic::LastPostInTopic($record['t_id']) 'lastpost'=>Topic::LastPostInTopic($record['t_id'])
); );
include('./skins/'.$default_skin.'/forum_forum_add.tpl');
require('./skins/'.$default_skin.'/forum_forum_add.tpl');
} }
$skin['noposts']=''; $skin['noposts']='';
} }
@ -89,8 +89,8 @@ $skin = array_push_assoc($skin, array(
onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic_active.gif\'" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic_active.gif\'"
onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif\'" border="0" alt="reply"></a>' onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif\'" border="0" alt="reply"></a>'
)); ));
include('./skins/'.$default_skin.'/forum_end_body.tpl');
require('./skins/'.$default_skin.'/forum_end_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 21
- 21
groups.php View File

@ -9,19 +9,19 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
require('./lngs/'.DefaultLang().'/main.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -89,8 +89,8 @@ if(isset($_GET['mode']))
$group['desc'] = $lng['mods_desc']; $group['desc'] = $lng['mods_desc'];
} }
unset($tmp); unset($tmp);
$skin = GenerateHeader($lng['showgroup'].': '.$group['name'], '</a>&gt; <a href="groups.php?mode=view&amp;id='.$group['g_id'].'" class="navigator">'.$lng['showgroup'].': '.$group['name']);
include('./skins/'.$default_skin.'/overall_header.tpl');
$skin = GenerateHeader($lng['showgroup'].': '.$group['name'], '<a href="groups.php" class="navigator">'.$lng['lgroups'].' &raquo; <a href="groups.php?mode=view&amp;id='.$group['g_id'].'" class="navigator">'.$group['name']);
require('./skins/'.$default_skin.'/overall_header.tpl');
$skin = array( $skin = array(
'moderate'=>(is_numeric($gid)) ? IfModGroup($group['m_id']) : '', 'moderate'=>(is_numeric($gid)) ? IfModGroup($group['m_id']) : '',
'name'=>$group['name'], 'name'=>$group['name'],
@ -101,7 +101,7 @@ if(isset($_GET['mode']))
'luname'=>$lng['user_name'], 'luname'=>$lng['user_name'],
'g_id'=>$group['g_id'] 'g_id'=>$group['g_id']
); );
include('./skins/'.$default_skin.'/group_view_head_body.tpl');
require('./skins/'.$default_skin.'/group_view_head_body.tpl');
if ($gid == 'admins') { $rnk = 2; } else {$rnk = 1;} if ($gid == 'admins') { $rnk = 2; } else {$rnk = 1;}
if (is_numeric($gid)) if (is_numeric($gid))
{ {
@ -124,7 +124,7 @@ if(isset($_GET['mode']))
'lastvisit'=>($result['lastvisit']>0) ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'], 'lastvisit'=>($result['lastvisit']>0) ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'],
'posts'=>$result['posts'] 'posts'=>$result['posts']
); );
include('./skins/'.$default_skin.'/users_item_add_body.tpl');
require('./skins/'.$default_skin.'/users_item_add_body.tpl');
} }
} }
else else
@ -134,7 +134,7 @@ if(isset($_GET['mode']))
echo '</table>'; echo '</table>';
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
} }
default: default:
@ -147,8 +147,8 @@ else
{ {
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
$skin = GenerateHeader($lng['lgroups'], '</a>&gt; <a href="groups.php" class="navigator">'.$lng['lgroups']);
include('./skins/'.$default_skin.'/overall_header.tpl');
$skin = GenerateHeader($lng['lgroups'], '<a href="groups.php" class="navigator">'.$lng['lgroups']);
require('./skins/'.$default_skin.'/overall_header.tpl');
$special_groups[] = array('admins', $lng['admins'], $lng['admins_desc']); $special_groups[] = array('admins', $lng['admins'], $lng['admins_desc']);
$special_groups[] = array('mods', $lng['mods'], $lng['mods_desc']); $special_groups[] = array('mods', $lng['mods'], $lng['mods_desc']);
$i = 0; $i = 0;
@ -160,7 +160,7 @@ else
'name' => '<span style="color: '.$color.'">'.$special_groups[$i][1].'</span>', 'name' => '<span style="color: '.$color.'">'.$special_groups[$i][1].'</span>',
'desc' =>$special_groups[$i][2] 'desc' =>$special_groups[$i][2]
); );
include('./skins/'.$default_skin.'/group_add_body.tpl');
require('./skins/'.$default_skin.'/group_add_body.tpl');
$i++; $i++;
} }
echo '<br />'; echo '<br />';
@ -176,7 +176,7 @@ else
'name'=>$item['name'], 'name'=>$item['name'],
'desc'=>$item['desc'] 'desc'=>$item['desc']
); );
include('./skins/'.$default_skin.'/group_add_body.tpl');
require('./skins/'.$default_skin.'/group_add_body.tpl');
} }
} }
else else
@ -186,6 +186,6 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
} }
?> ?>

+ 1
- 1
includes/cache/cache_topic.php View File

@ -55,7 +55,7 @@ while ($result = DataBase::fetch($query))
} }
//check online for user //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.'); $query = DataBase::sql_query($sql, GENERAL, 'Could not read user active.');
while($result = DataBase::fetch($query)) while($result = DataBase::fetch($query))
{ {

+ 1
- 1
includes/classes/class_forum.php View File

@ -104,7 +104,7 @@ class Forum
global $i; global $i;
global $forum; global $forum;
global $default_skin; global $default_skin;
$time = time()-129600;
$time = $_SERVER['REQUEST_TIME']-129600;
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)
{ {
if ($postsinforum>0) if ($postsinforum>0)

+ 2
- 2
includes/classes/class_pms.php View File

@ -80,14 +80,14 @@ class NewMessage
function AddToInbox($text, $name, $unid, $uid) function AddToInbox($text, $name, $unid, $uid)
{ {
$last = DataBase::new_id(PM_INBOX_TABLE); $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')"; $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'); DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox');
} }
function AddToSentbox($text, $name, $unid, $uid) function AddToSentbox($text, $name, $unid, $uid)
{ {
$last=DataBase::new_id(PM_SENTBOX_TABLE); $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')"; $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'); DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox');
} }

+ 2
- 2
includes/classes/class_posting.php View File

@ -26,7 +26,7 @@ class Post
$tpid = $result['tp_id'];//post in topic id $tpid = $result['tp_id'];//post in topic id
$tpid = $tpid+1; $tpid = $tpid+1;
# #
$time = time();
$time = $_SERVER['REQUEST_TIME'];
#add new post #add new post
$sql = "INSERT INTO `".POSTS_TABLE."` VALUES ('$last','$tid', '$uid', '$post', '".$_SERVER['HTTP_USER_AGENT']."', '$time', '$tpid', '$forum','$moderate','".$_SERVER['REMOTE_ADDR']."')"; $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.'); $query = DataBase::sql_query($sql,GENERAL,'Could not add new post.');
@ -49,7 +49,7 @@ class Post
{ {
//Select last topic //Select last topic
$moderate = Forum::ForumInformation($forum,'moderate'); $moderate = Forum::ForumInformation($forum,'moderate');
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$lastt=DataBase::new_id(TOPICS_TABLE); $lastt=DataBase::new_id(TOPICS_TABLE);
$sql = "INSERT INTO ".TOPICS_TABLE." VALUES ('$lastt', '$forum', '0', '$sticky', '$ntopic', '$uid','$time', '', '')"; $sql = "INSERT INTO ".TOPICS_TABLE." VALUES ('$lastt', '$forum', '0', '$sticky', '$ntopic', '$uid','$time', '', '')";
$query = DataBase::sql_query($sql,GENERAL,'Could not add new topic'); $query = DataBase::sql_query($sql,GENERAL,'Could not add new topic');

+ 1
- 1
includes/classes/class_topic.php View File

@ -68,7 +68,7 @@ class Topic
global $last_post; global $last_post;
global $record; global $record;
global $default_skin; global $default_skin;
$time = time()-129600;
$time = $_SERVER['REQUEST_TIME']-129600;
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)
{ {
if ($last_post[2]>$time) if ($last_post[2]>$time)

+ 1
- 1
includes/classes/class_user.php View File

@ -182,7 +182,7 @@ class User
{ {
global $forum_config; global $forum_config;
$last = DataBase::new_id(USERS_TABLE); $last = DataBase::new_id(USERS_TABLE);
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "INSERT INTO ".USERS_TABLE." VALUES $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');"; ('$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'); DataBase::sql_query($sql,CRITICAL,'Could not create new user');

+ 1
- 1
includes/emailer.php View File

@ -20,7 +20,7 @@ function SendEmail($email, $title, $content)
$email_headers = "MIME-Version: 1.0\r\n"; $email_headers = "MIME-Version: 1.0\r\n";
$email_headers .= "Content-type: text/html; charset=iso-8859-2\r\n"; $email_headers .= "Content-type: text/html; charset=iso-8859-2\r\n";
$email_headers .= "From: ".$forum_config['forumname']." \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 = ' $email_content = '
<html> <html>

+ 5
- 4
includes/errors.php View File

@ -46,16 +46,17 @@ function message_forum($text, $url, $interval = 1.8)
{ {
global $lng; global $lng;
global $forum_config; global $forum_config;
global $userdata;
$skin = array( $skin = array(
'url' => $url, 'url' => $url,
'msg' => $text, 'msg' => $text,
'queries' => '', 'queries' => '',
'pa_link' => '', 'pa_link' => '',
); );
$skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], '&gt; '.$lng['message_forum']));
$skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], '<span class="navigator">'.$lng['message_forum'].'</span>'));
die( die(
include('./skins/'.ViewSkinName().'/message_body.tpl')
);
require('./skins/'.ViewSkinName().'/message_body.tpl')
);
} }
function admin_message_forum($text, $url) function admin_message_forum($text, $url)
{ {
@ -66,7 +67,7 @@ $skin = array(
$skin['queries'] = ''; $skin['queries'] = '';
$skin['pa_link'] = ''; $skin['pa_link'] = '';
die( die(
include('./template/message_body.tpl')
require('./template/message_body.tpl')
); );
} }
?> ?>

+ 24
- 11
includes/misc_functions.php View File

@ -48,7 +48,13 @@ function GenerateHeader($title, $navigator)
'L.actual_time'=>$lng['lactualtime'], 'L.actual_time'=>$lng['lactualtime'],
'modelogin' => ($_SESSION['uid']>0) ? 'logout' : 'login', 'modelogin' => ($_SESSION['uid']>0) ? 'logout' : 'login',
'L.login' => ($_SESSION['uid']>0) ? $lng['lunlogin'] : $lng['llogin'], '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; 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); 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; 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 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; return $date;
} }
@ -283,7 +296,7 @@ function ViewSkinName()
global $forum_config; global $forum_config;
global $userdata; global $userdata;
if ($_SESSION['uid']>0)
if ($_SESSION['uid']>0 && basename($_SERVER['REQUEST_URI']) != 'login.php?mode=login')
{ {
$result = $userdata['skin']; $result = $userdata['skin'];
} }

+ 7
- 7
includes/pms/pms_folder.php View File

@ -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) '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']), '</a> &gt; <a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; '.$folder));
$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), '<a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &raquo; '.$folder));
//do it! //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']; $uid = $_SESSION['uid'];
if (!isset($_GET['submode'])) if (!isset($_GET['submode']))
@ -74,7 +74,7 @@ $count = DataBase::num_rows($query);
if ($count==0) if ($count==0)
{ {
$skin['nomsgs']='<tr><td width="750" colspan="4" height="19" class="fitem"><p class="fstandard" align="center">'.$lng['no_elements'].'!</p></td></tr>';
$skin['nomsgs']='<tr><td width="'.TABLES_WIDTH.'" colspan="4" height="19" class="fitem"><p class="fstandard" align="center">'.$lng['no_elements'].'!</p></td></tr>';
} }
else else
{ {
@ -89,12 +89,12 @@ else
'mode'=> ($_GET['submode']=='inbox') ? 'user' : 'author' 'mode'=> ($_GET['submode']=='inbox') ? 'user' : 'author'
); );
include('./skins/'.$default_skin.'/pms_folder_item_body.tpl');
require('./skins/'.$default_skin.'/pms_folder_item_body.tpl');
} }
$skin['nomsgs'] = ''; $skin['nomsgs'] = '';
} }
//do it! //do it!
include('./skins/'.$default_skin.'/pms_folder_end_body.tpl');
require('./skins/'.$default_skin.'/pms_folder_end_body.tpl');
if(RANK=='2') if(RANK=='2')
{ {
$skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>'; $skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>';
@ -107,5 +107,5 @@ else
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 4
- 4
includes/pms/pms_view.php View File

@ -109,14 +109,14 @@ $skin = array(
'lpinfo'=>$lng['postinfo'] 'lpinfo'=>$lng['postinfo']
); );
$skin = array_push_assoc($skin,GenerateHeader($lng['show_message'].': '.$result['name'], '</a> &gt; '.$folder.' &gt;
$skin = array_push_assoc($skin,GenerateHeader($lng['show_message'].': '.$result['name'], .$folder.' &raquo;
<a href="pms.php?mode=view&amp;submode='.$_GET['submode'].'&amp;id='. <a href="pms.php?mode=view&amp;submode='.$_GET['submode'].'&amp;id='.
$result['m_id'].'" class="navigator">'.$lng['show_message'] $result['m_id'].'" class="navigator">'.$lng['show_message']
.': '.$result['name'])); .': '.$result['name']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/msgs_msg_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/msgs_msg_body.tpl');
if(RANK=='2') if(RANK=='2')
{ {
$skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>'; $skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>';
@ -127,7 +127,7 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
?> ?>

+ 6
- 6
includes/pms/pms_write.php View File

@ -29,14 +29,14 @@ if ((isset($_POST['textedit'])) and (isset($_POST['nmsg'])) and (isset($_POST['u
//antiflood lock //antiflood lock
if (isset($_COOKIE['antiflood_time'])) if (isset($_COOKIE['antiflood_time']))
{ {
if ($_COOKIE['antiflood_time']>time())
if ($_COOKIE['antiflood_time']>$_SERVER['REQUEST_TIME'])
{ {
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
} }
} }
else else
{ {
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
setcookie('antiflood_time',($_SERVER['REQUEST_TIME'] + $forum_config['time_antiflood']));
$_POST['textedit'] = Secure::TagsReplace($_POST['textedit']); $_POST['textedit'] = Secure::TagsReplace($_POST['textedit']);
$_POST['nmsg'] = strip_tags($_POST['nmsg']); $_POST['nmsg'] = strip_tags($_POST['nmsg']);
Pms::SendMessage($_POST['textedit'],$_POST['nmsg'], $_POST['username']); Pms::SendMessage($_POST['textedit'],$_POST['nmsg'], $_POST['username']);
@ -91,7 +91,7 @@ $skin = array(
'lsentbox_full'=>($cnt[1]==$forum_config['pm_sentbox_max']) ? $lng['pm_sentbox_full'] : '' 'lsentbox_full'=>($cnt[1]==$forum_config['pm_sentbox_max']) ? $lng['pm_sentbox_full'] : ''
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], '</a>&gt;<a href="pms.php" class="navigator">'.$lng['lpm'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['write_pm']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], '<a href="pms.php" class="navigator">'.$lng['lpm'].' &raquo; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['write_pm']));
if ($msg=='') if ($msg=='')
{ {
@ -99,8 +99,8 @@ if ($msg=='')
} }
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/pms_new_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/pms_new_body.tpl');
if(RANK=='2') if(RANK=='2')
{ {
@ -113,6 +113,6 @@ else
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 6
- 6
includes/sessions.php View File

@ -40,12 +40,12 @@ if (empty($_SESSION['sessionid']))
if (empty($_COOKIE['queries'])) if (empty($_COOKIE['queries']))
{ {
$_COOKIE['queries']=0; $_COOKIE['queries']=0;
setcookie('queries','0',time()+31104000);
setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000);
} }
if($_COOKIE['queries']>0) if($_COOKIE['queries']>0)
{ {
setcookie('queries','0',time()+31104000);
setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000);
$_COOKIE['uid']='0'; $_COOKIE['uid']='0';
} }
@ -56,7 +56,7 @@ function SessRegister()
if ($uid>0) if ($uid>0)
{ {
SessDelete($uid); SessDelete($uid);
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "INSERT INTO ".SESSIONS_TABLE." VALUES ('', '".$_COOKIE[SESS_NAME]."','$uid','$time')"; $sql = "INSERT INTO ".SESSIONS_TABLE." VALUES ('', '".$_COOKIE[SESS_NAME]."','$uid','$time')";
$query = DataBase::sql_query($sql,GENERAL,'Could not add new session.',true); $query = DataBase::sql_query($sql,GENERAL,'Could not add new session.',true);
if (DataBase::num_rows($query)>0) if (DataBase::num_rows($query)>0)
@ -73,7 +73,7 @@ function SessRegister()
function SessDeleteOld() function SessDeleteOld()
{ {
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "DELETE FROM ".SESSIONS_TABLE." WHERE time+129600<$time;"; $sql = "DELETE FROM ".SESSIONS_TABLE." WHERE time+129600<$time;";
DataBase::sql_query($sql, GENERAL,'Could not delete session',true); DataBase::sql_query($sql, GENERAL,'Could not delete session',true);
} }
@ -96,7 +96,7 @@ function SessDelInvalid()
function SessDelete($uid) function SessDelete($uid)
{ {
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "DELETE FROM ".SESSIONS_TABLE." WHERE u_id='$uid'"; $sql = "DELETE FROM ".SESSIONS_TABLE." WHERE u_id='$uid'";
$query = DataBase::sql_query($sql, GENERAL,'Could not delete session',true); $query = DataBase::sql_query($sql, GENERAL,'Could not delete session',true);
if (DataBase::num_rows($query)>0) if (DataBase::num_rows($query)>0)
@ -113,7 +113,7 @@ function SessView()
global $user; global $user;
global $forum_config; global $forum_config;
$name = ''; $name = '';
$time = time();
$time = $_SERVER['REQUEST_TIME'];
$sql = "SELECT ".SESSIONS_TABLE.".*, ".USERS_TABLE.".*, ".SESSIONS_TABLE.".u_id AS u_id FROM ".SESSIONS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".USERS_TABLE.".u_id WHERE time+1250>$time;"; $sql = "SELECT ".SESSIONS_TABLE.".*, ".USERS_TABLE.".*, ".SESSIONS_TABLE.".u_id AS u_id FROM ".SESSIONS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".USERS_TABLE.".u_id WHERE time+1250>$time;";
$query = DataBase::sql_query($sql, GENERAL,'Could not obtain sessions information.'); $query = DataBase::sql_query($sql, GENERAL,'Could not obtain sessions information.');
if (DataBase::num_rows($query)>0) if (DataBase::num_rows($query)>0)

+ 22
- 27
index.php View File

@ -9,24 +9,24 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //include files
include('./config.php');
require('./config.php');
if (!UF_INSTALLED) if (!UF_INSTALLED)
{ {
header('Location: install/'); header('Location: install/');
} }
include('./includes/constants.php');
include('./includes/db.php');
include('./includes/errors.php');
require('./includes/constants.php');
require('./includes/db.php');
require('./includes/errors.php');
//connect to database //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/class_forum.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/class_forum.php');
require('./lngs/'.DefaultLang().'/main.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -34,21 +34,16 @@ SessDeleteOld();
$start = TimeGeneration(); $start = TimeGeneration();
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
$visit_count = SetCounter(); $visit_count = SetCounter();
include('./includes/cache/cache_index.php');
require('./includes/cache/cache_index.php');
//add skin variables //add skin variables
$skin = array( $skin = array(
'lactual_time'=>$lng['lactualtime'],
'actual_time'=>date('d-m-Y, G:i',time()),
'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() : ''
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['mainpage'], '</a>&gt; <a href="index.php" class="navigator">'.$lng['mainpage']));
$skin = array_push_assoc($skin, GenerateHeader($lng['mainpage'], '<a href="index.php" class="navigator">'.$lng['mainpage']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/index_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/index_body.tpl');
// //
//add forums and categories----------------------------------------------------- //add forums and categories-----------------------------------------------------
// //
@ -62,7 +57,7 @@ while($result = DataBase::fetch($query))
'lforumname' => $lng['forumname'], 'lforumname' => $lng['forumname'],
'lposts'=>$lng['posts'], 'lposts'=>$lng['posts'],
'llastposts'=>$lng['lastpost']); 'llastposts'=>$lng['lastpost']);
include('./skins/'.$default_skin.'/index_category_add.tpl');
require('./skins/'.$default_skin.'/index_category_add.tpl');
for ($i=1; $i<=count($forum); $i++) for ($i=1; $i<=count($forum); $i++)
{ {
if ($forum[$i]['c_id']==$result['c_id']) if ($forum[$i]['c_id']==$result['c_id'])
@ -80,11 +75,11 @@ while($result = DataBase::fetch($query))
'posts' => $postsinforum, 'posts' => $postsinforum,
'lastpost' =>Forum::LastPost($postsinforum, $forum[$i]['f_id']), 'lastpost' =>Forum::LastPost($postsinforum, $forum[$i]['f_id']),
); );
include('./skins/'.$default_skin.'/index_forum_add.tpl');
require('./skins/'.$default_skin.'/index_forum_add.tpl');
} }
} }
} }
echo '</table>';
echo '</table></div>';
} }
$sess = SessView(); $sess = SessView();
//add skin variables //add skin variables
@ -106,7 +101,7 @@ $skin =array(
); );
//ShoutBox pool :) //ShoutBox pool :)
// do it! // do it!
include('./skins/'.$default_skin.'/index_body_end.tpl');
require('./skins/'.$default_skin.'/index_body_end.tpl');
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)
{ {
if (($forum_config['view_shoutbox']) && ($userdata['view_shoutbox']==1)) if (($forum_config['view_shoutbox']) && ($userdata['view_shoutbox']==1))
@ -124,5 +119,5 @@ else
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 18
- 18
install1/index.php View File

@ -8,12 +8,12 @@
* @license see LICENSE.txt * @license see LICENSE.txt
**/ **/
define('IN_uF',true); define('IN_uF',true);
include('./../config.php');
include('./../includes/constants.php');
include('./../includes/errors.php');
include('./../includes/db.php');
include('./functions_add.php');
include('./../admin/check_script_data.php');
require('./../config.php');
require('./../includes/constants.php');
require('./../includes/errors.php');
require('./../includes/db.php');
require('./functions_add.php');
require('./../admin/check_script_data.php');
if (ini_get('short_open_tag')==0) if (ini_get('short_open_tag')==0)
{ {
@ -53,7 +53,7 @@ if(!isset($_COOKIE['lang']))
} }
if (@is_file('./../lngs/'.$_COOKIE['lang'].'/install.php')) if (@is_file('./../lngs/'.$_COOKIE['lang'].'/install.php'))
{ {
include('./../lngs/'.$_COOKIE['lang'].'/install.php');
require('./../lngs/'.$_COOKIE['lang'].'/install.php');
} }
$header = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> $header = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head> <head>
@ -79,7 +79,7 @@ switch($_GET['page'])
{ {
if (isset($_POST['lang'])) if (isset($_POST['lang']))
{ {
setcookie('lang',$_POST['lang'], time()+360000000);
setcookie('lang',$_POST['lang'], $_SERVER['REQUEST_TIME']+360000000);
header('Location: index.php?page=step2'); header('Location: index.php?page=step2');
} }
else else
@ -149,7 +149,7 @@ switch($_GET['page'])
'cat3.value'=> (@is_writable($folders[2])) ? '<font color="green">'.$lng['is_writable'].' - OK</font>' : '<font color="red">'.$lng['not_writable'].' Error - No OK</font>', 'cat3.value'=> (@is_writable($folders[2])) ? '<font color="green">'.$lng['is_writable'].' - OK</font>' : '<font color="red">'.$lng['not_writable'].' Error - No OK</font>',
'successfully' => ($count <1) ? '<font color="green">'.$lng['files_is_good'].' ('.count($script_files).')</font>' : '<font color="red">'.$lng['files_not_good'].' ('.$count.')</font>' 'successfully' => ($count <1) ? '<font color="green">'.$lng['files_is_good'].' ('.count($script_files).')</font>' : '<font color="red">'.$lng['files_not_good'].' ('.$count.')</font>'
); );
include('./tpls/install_check_script.tpl');
require('./tpls/install_check_script.tpl');
for($i=0; $i<count($script_files);$i++) for($i=0; $i<count($script_files);$i++)
{ {
$actual = check_size_md5($script_files[$i]); $actual = check_size_md5($script_files[$i]);
@ -161,7 +161,7 @@ switch($_GET['page'])
'sum_actual'=>$actual, 'sum_actual'=>$actual,
'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')' 'L.invalid_md5sum'=>$lng['invalid_md5sum'].' ('.substr($script_files[$i], strrpos($script_files[$i], '/') + 1, strlen($script_files[$i])).')'
); );
include('./tpls/invalidfile_body.tpl');
require('./tpls/invalidfile_body.tpl');
} }
} }
echo '<form action="index.php?page=step3" method="POST"><input type="hidden" name="next">'; echo '<form action="index.php?page=step3" method="POST"><input type="hidden" name="next">';
@ -194,7 +194,7 @@ switch($_GET['page'])
@fwrite(@fopen('../config.php','w'),$config_file) or message_die(GENERAL,'Could not write config file. Error with installation!',''); @fwrite(@fopen('../config.php','w'),$config_file) or message_die(GENERAL,'Could not write config file. Error with installation!','');
@mysql_query("SET NAMES 'utf8'",$connect); @mysql_query("SET NAMES 'utf8'",$connect);
@mysql_select_db($_POST['database'],$connect) or message_die(GENERAL,'Could not connect to database. Error with installation!',@mysql_error()); @mysql_select_db($_POST['database'],$connect) or message_die(GENERAL,'Could not connect to database. Error with installation!',@mysql_error());
include('./../includes/sql_parse.php');
require('./../includes/sql_parse.php');
$sql = @fread(@fopen('uf_tables.sql','r'),@filesize('uf_tables.sql')); $sql = @fread(@fopen('uf_tables.sql','r'),@filesize('uf_tables.sql'));
$sql = preg_replace('/uf_/', $_POST['mysql_prefix'], $sql); $sql = preg_replace('/uf_/', $_POST['mysql_prefix'], $sql);
$sql = remove_remarks($sql); $sql = remove_remarks($sql);
@ -203,7 +203,7 @@ switch($_GET['page'])
{ {
DataBase::sql_query($sql[$i],'ERROR','Error of SQL Query: '.$sql[$i].' Error with install script!'); DataBase::sql_query($sql[$i],'ERROR','Error of SQL Query: '.$sql[$i].' Error with install script!');
} }
DataBase::sql_query("UPDATE `".$_POST['mysql_prefix']."config` SET `value`='".time()."' WHERE `name`='date_install'",GENERAL,'Could not update date install information');
DataBase::sql_query("UPDATE `".$_POST['mysql_prefix']."config` SET `value`='".$_SERVER['REQUEST_TIME']."' WHERE `name`='date_install'",GENERAL,'Could not update date install information');
$patch = substr('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],0 ,-strlen('install/index.php?page=step4')); $patch = substr('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],0 ,-strlen('install/index.php?page=step4'));
DataBase::sql_query("UPDATE `".$_POST['mysql_prefix']."config` SET `value`='".$patch."' WHERE `name`='forumpatch'",GENERAL,'Could not update date install information'); DataBase::sql_query("UPDATE `".$_POST['mysql_prefix']."config` SET `value`='".$patch."' WHERE `name`='forumpatch'",GENERAL,'Could not update date install information');
header('Location: index.php?page=step5'); header('Location: index.php?page=step5');
@ -225,7 +225,7 @@ switch($_GET['page'])
'L.mysql_prefix'=>$lng['mysql_prefix'], 'L.mysql_prefix'=>$lng['mysql_prefix'],
'L.submit'=>$lng['start_install'], 'L.submit'=>$lng['start_install'],
); );
include('./tpls/install_step4.tpl');
require('./tpls/install_step4.tpl');
break; break;
} }
case 'step5': case 'step5':
@ -247,13 +247,13 @@ switch($_GET['page'])
`pass`='".md5(htmlspecialchars($_POST['password']))."', `pass`='".md5(htmlspecialchars($_POST['password']))."',
`email`='".htmlspecialchars($_POST['email'])."', `email`='".htmlspecialchars($_POST['email'])."',
`lang`= '".$_COOKIE['lang']."', `lang`= '".$_COOKIE['lang']."',
`regdate`='".time()."',
`lastvisit`='".time()."'
`regdate`='".$_SERVER['REQUEST_TIME']."',
`lastvisit`='".$_SERVER['REQUEST_TIME']."'
WHERE `u_id`='1';"; WHERE `u_id`='1';";
DataBase::sql_query($sql,CRITICAL,'Could not update user. Error with install script!'); DataBase::sql_query($sql,CRITICAL,'Could not update user. Error with install script!');
$sql = "UPDATE `".POSTS_TABLE."` SET `ptime`='".time()."' WHERE `p_id`='1'";
$sql = "UPDATE `".POSTS_TABLE."` SET `ptime`='".$_SERVER['REQUEST_TIME']."' WHERE `p_id`='1'";
DataBase::sql_query($sql,CRITICAL,'Could not update post. Error with install script!'); DataBase::sql_query($sql,CRITICAL,'Could not update post. Error with install script!');
$sql = "UPDATE `".TOPICS_TABLE."` SET `lastpost_time`='".time()."' WHERE `t_id`='1'";
$sql = "UPDATE `".TOPICS_TABLE."` SET `lastpost_time`='".$_SERVER['REQUEST_TIME']."' WHERE `t_id`='1'";
DataBase::sql_query($sql,CRITICAL,'Could not update topic. Error with install script!'); DataBase::sql_query($sql,CRITICAL,'Could not update topic. Error with install script!');
header('Location: index.php?page=step7'); header('Location: index.php?page=step7');
} }
@ -282,7 +282,7 @@ switch($_GET['page'])
'L.email'=>$lng['email'], 'L.email'=>$lng['email'],
'L.submit'=>$lng['save'] 'L.submit'=>$lng['save']
); );
include('./tpls/install_step6.tpl');
require('./tpls/install_step6.tpl');
break; break;
} }
case 'step7': case 'step7':

+ 1
- 1
lngs/Polish/admin.php View File

@ -7,7 +7,7 @@
* @link http://www.pioder.pl/ * @link http://www.pioder.pl/
* @license see LICENSE.txt * @license see LICENSE.txt
**/ **/
include('./../lngs/Polish/wysiwyg.php');
require('./../lngs/Polish/wysiwyg.php');
// //
//on all...------------------------------------------------ //on all...------------------------------------------------
// //

+ 1
- 1
lngs/Polish/main.php View File

@ -7,7 +7,7 @@
* @link http://www.pioder.pl/ * @link http://www.pioder.pl/
* @license see LICENSE.txt * @license see LICENSE.txt
**/ **/
include('./lngs/Polish/wysiwyg.php');
require('./lngs/Polish/wysiwyg.php');
//on header....------------------------------------------------------ //on header....------------------------------------------------------
// //
$lng['forumname']='Nazwa Forum'; $lng['forumname']='Nazwa Forum';

+ 23
- 23
login.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/emailer.php');
include('./includes/misc_functions.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/emailer.php');
require('./includes/misc_functions.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
include('./lngs/'.$default_lang.'/email.php');
include('./includes/classes/secure.php');
require('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/email.php');
require('./includes/classes/secure.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -83,14 +83,14 @@ if (isset($_GET['mode']))
$_SESSION['uid']='0'; $_SESSION['uid']='0';
message_forum($lng['account_disabled'],'index.php'); message_forum($lng['account_disabled'],'index.php');
} }
$ssid = md5(time().'donothackthiscriptplease!');//session identifier
$ssid = md5($_SERVER['REQUEST_TIME'].'donothackthiscriptplease!');//session identifier
$_SESSION['uid']=$user_id; $_SESSION['uid']=$user_id;
$_SESSION['sessionid']=$ssid; $_SESSION['sessionid']=$ssid;
//session register //session register
$sql = "INSERT INTO `".SESSIONS_TABLE."` VALUES ('', '".$_COOKIE[SESS_NAME]."','$user_id','".time()."')";//query
$sql = "INSERT INTO `".SESSIONS_TABLE."` VALUES ('', '".$_COOKIE[SESS_NAME]."','$user_id','".$_SERVER['REQUEST_TIME']."')";//query
DataBase::sql_query($sql,GENERAL,'Could not add new session.');//run query DataBase::sql_query($sql,GENERAL,'Could not add new session.');//run query
//next... //next...
$sql = "UPDATE `".USERS_TABLE."` SET lastvisit='".time()."' WHERE u_id='$user_id'";//update lastvisit for user
$sql = "UPDATE `".USERS_TABLE."` SET lastvisit='".$_SERVER['REQUEST_TIME']."' WHERE u_id='$user_id'";//update lastvisit for user
DataBase::sql_query($sql,GENERAL,'Could not update user lastvisit');//run query DataBase::sql_query($sql,GENERAL,'Could not update user lastvisit');//run query
$msg = $lng['youareloggedas'].': <b>'.$nick.'</b>';// messaage "login as.." $msg = $lng['youareloggedas'].': <b>'.$nick.'</b>';// messaage "login as.."
$stop = TimeGeneration();//generate generation's time $stop = TimeGeneration();//generate generation's time
@ -124,12 +124,12 @@ if (isset($_GET['mode']))
'llog_in'=> $lng['llog_in'], 'llog_in'=> $lng['llog_in'],
'msg' => $msg 'msg' => $msg
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['llogin'],'</a>&gt; <a href="login.php?mode=login" class="navigator">'.$lng['llogin']));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/login_body.tpl');
$skin = array_push_assoc($skin, GenerateHeader($lng['llogin'], '<a href="login.php?mode=login" class="navigator">'.$lng['llogin']));
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/login_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
} }
case 'forgotpassword': case 'forgotpassword':
@ -164,12 +164,12 @@ if (isset($_GET['mode']))
'lsave' => $lng['save'], 'lsave' => $lng['save'],
'pa_link'=>'' 'pa_link'=>''
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['lforgot_pass2'], '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lforgot_pass2']));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/newpass_body.tpl');
$skin = array_push_assoc($skin, GenerateHeader($lng['lforgot_pass2'], '<a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lforgot_pass2']));
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/newpass_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
} }
default: default:

+ 17
- 17
moderate.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/secure.php');
include('./includes/classes/class_mod.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_topic.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/secure.php');
require('./includes/classes/class_mod.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_topic.php');
require('./lngs/'.DefaultLang().'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -129,15 +129,15 @@ switch(trim($_GET['action']))
'L.reset' => $lng['reset'], 'L.reset' => $lng['reset'],
'OPTIONS.select_forum' => Forum::AddForums($tid) 'OPTIONS.select_forum' => Forum::AddForums($tid)
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'),'</a><a href="moderate.php?action=move&id='.$tid.'" class="navigator">'
$skin = array_push_assoc($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'), '<a href="moderate.php?action=move&id='.$tid.'" class="navigator">'
.$lng['move_topic'].': </a><a href="topic.php?t='.$tid.'" class="navigator">' .$lng['move_topic'].': </a><a href="topic.php?t='.$tid.'" class="navigator">'
.Topic::TopicInformation($tid,'name'))); .Topic::TopicInformation($tid,'name')));
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/move_topic_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/move_topic_body.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
} }
break; break;
} }

+ 14
- 14
pms.php View File

@ -9,22 +9,22 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/classes/class_pms.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/classes/class_pms.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
require('./lngs/'.DefaultLang().'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();

+ 28
- 39
posting.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
require('./lngs/'.DefaultLang().'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
SessDelInvalid(); SessDelInvalid();
@ -65,14 +65,14 @@ if (isset($_POST['textedit']))
//antiflood lock //antiflood lock
if (isset($_COOKIE['antiflood_time'])) if (isset($_COOKIE['antiflood_time']))
{ {
if ($_COOKIE['antiflood_time']>time())
if ($_COOKIE['antiflood_time']>$_SERVER['REQUEST_TIME'])
{ {
message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']); message_forum($lng['antiflood_enabled'],$_SERVER['REQUEST_URI']);
} }
} }
else else
{ {
setcookie('antiflood_time',(time() + $forum_config['time_antiflood']));
setcookie('antiflood_time',($_SERVER['REQUEST_TIME'] + $forum_config['time_antiflood']));
} }
//prepare post... //prepare post...
@ -231,41 +231,30 @@ switch ($_GET['mode'])
{ {
case 'ntopic': case 'ntopic':
{ {
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['writetopic'],
'lmainpage' => '</a>&gt; <a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].'</a> &gt;<a href="posting.php?mode=ntopic&amp;f='.$_GET['f'].'" class="navigator">'.$lng['writetopic']
));
$window_title = $lng['writetopic'];
$navigator_title = '<a href="forum.php?f='.$_GET['f'].'" class="navigator">'.$forum['name'].' &raquo; <a href="posting.php?mode=ntopic&amp;f='.$_GET['f'].'" class="navigator">'.$lng['writetopic'];
break; break;
} }
case 'edit': case 'edit':
{ {
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['editpost'],
'lmainpage' => '</a>&gt; <a href="posting.php?mode=edit&amp;id='.intval($_GET['id']).'"
class="navigator">'.$lng['editpost']
));
$window_title = $lng['editpost'];
$navigator_title = '<a href="posting.php?mode=edit&amp;id='.intval($_GET['id']).'" class="navigator">'.$lng['editpost'];
break; break;
} }
case 'rpost': case 'rpost':
{ {
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'),
'lmainpage' => '</a>&gt; <a href="posting.php?mode=rpost&amp;id='.intval($_GET['id']).'"
class="navigator">'.$lng['answer'].': </a><a href="topic.php?t='.$_GET['id'].'"
class="navigator">'.Topic::TopicInformation(intval($_GET['id']),'name')
));
$window_title = $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name');
$navigator_title = '<a href="posting.php?mode=rpost&amp;id='.intval($_GET['id']).'" class="navigator">'.$lng['answer'].': </a><a href="topic.php?t='.$_GET['id'].'"
class="navigator">'.Topic::TopicInformation(intval($_GET['id']),'name');
break; break;
} }
case 'qpost': case 'qpost':
{ {
$skin = array_push_assoc($skin, array(
'mainpage' => $lng['quote'],
'lmainpage' => '</a>&gt; <a href="posting.php?mode=qpost&amp;id='.$_GET['id'].'&amp;t='.$_GET['t'].'"
class="navigator">'.$lng['quote']
));
$window_title = $lng['quote'];
$navigator_title = '<a href="posting.php?mode=qpost&amp;id='.$_GET['id'].'&amp;t='.$_GET['t'].'" class="navigator">'.$lng['quote'];
break; break;
} }
@ -277,7 +266,7 @@ switch ($_GET['mode'])
break; break;
} }
} }
$skin = array_push_assoc($skin, GenerateHeader($window_title, $navigator_title));
$skin = array_push_assoc($skin, array( $skin = array_push_assoc($skin, array(
'smiles'=>Post::SmilesShow(), 'smiles'=>Post::SmilesShow(),
//labels //labels
@ -296,7 +285,7 @@ if ($msg=='')
} }
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/posting_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/posting_body.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 3
- 3
quick_reply.php View File

@ -18,8 +18,8 @@ foreach ($_POST as $name => $value)
$_POST[$name] = Secure::UseCensorlist($value); $_POST[$name] = Secure::UseCensorlist($value);
} }
} }
include('./lngs/'.$default_lang.'/quick_reply.php');
include('./includes/classes/class_posting.php');
require('./lngs/'.$default_lang.'/quick_reply.php');
require('./includes/classes/class_posting.php');
$skin = array( $skin = array(
'ltitle'=>$lng['title'], 'ltitle'=>$lng['title'],
'lmsg'=>$lng['message'], 'lmsg'=>$lng['message'],
@ -28,5 +28,5 @@ $skin = array(
'lreset'=>$lng['reset'], 'lreset'=>$lng['reset'],
'smiles'=>Post::SmilesShow() 'smiles'=>Post::SmilesShow()
); );
include('./skins/'.$default_skin.'/quick_reply_body.tpl');
require('./skins/'.$default_skin.'/quick_reply_body.tpl');
?> ?>

+ 22
- 20
register.php View File

@ -9,25 +9,25 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_topic.php');
include('./includes/emailer.php');
include('./includes/classes/class_mod.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_topic.php');
require('./includes/emailer.php');
require('./includes/classes/class_mod.php');
require('./includes/classes/secure.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
include('./lngs/'.$default_lang.'/email.php');
require('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/email.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -38,6 +38,7 @@ if ($_SESSION['uid']>0)
{ {
message_forum($lng['youareexist'],'index.php'); message_forum($lng['youareexist'],'index.php');
} }
foreach ($_POST as $name => $value) foreach ($_POST as $name => $value)
{ {
if ($forum_config['use_censorlist']) if ($forum_config['use_censorlist'])
@ -45,6 +46,7 @@ foreach ($_POST as $name => $value)
$_POST[$name] = Secure::UseCensorlist($value); $_POST[$name] = Secure::UseCensorlist($value);
} }
} }
$errors = false; $errors = false;
if (isset($_POST['email'])) if (isset($_POST['email']))
@ -160,15 +162,15 @@ $skin = array(
'pa_link'=>'' 'pa_link'=>''
); );
$_POST['allow_gg']='1'; $_POST['allow_gg']='1';
$skin = array_push_assoc($skin, GenerateHeader($lng['lregister'],'</a>&gt; <a href="register.php" class="navigator">'.$lng['lregister']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lregister'], '<a href="register.php" class="navigator">'.$lng['lregister']));
if ($msg=='') if ($msg=='')
{ {
$msg = './skins/'.$default_skin.'/blank.tpl'; $msg = './skins/'.$default_skin.'/blank.tpl';
} }
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/register_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/register_body.tpl');
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 24
- 24
search.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/secure.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
SessDelInvalid(); SessDelInvalid();
@ -97,7 +97,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
{ {
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)
{ {
$time = time()-129600;
$time = $_SERVER['REQUEST_TIME']-129600;
$sql = "SELECT COUNT(`t_id`) as `cnt` FROM ".TOPICS_TABLE." WHERE lastpost_time>$time"; $sql = "SELECT COUNT(`t_id`) as `cnt` FROM ".TOPICS_TABLE." WHERE lastpost_time>$time";
$count = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics')); $count = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics'));
$count = $count['cnt']; $count = $count['cnt'];
@ -117,7 +117,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
ORDER BY `sticky` DESC, `lastpost_time` DESC $limit"; ORDER BY `sticky` DESC, `lastpost_time` DESC $limit";
$errors = false; $errors = false;
$window_title = $lng['showlastposts']; $window_title = $lng['showlastposts'];
$navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['showlastposts'];
$navigator_title = '<a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['showlastposts'];
break; break;
} }
else else
@ -145,7 +145,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
$sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE `u_id`='".intval($_GET['u'])."' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; $sql = "SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE `u_id`='".intval($_GET['u'])."' ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$errors = false; $errors = false;
$window_title = $lng['view_user_topics']; $window_title = $lng['view_user_topics'];
$navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['view_user_topics'];
$navigator_title = '<a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['view_user_topics'];
break; break;
} }
else else
@ -187,7 +187,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$window_title = $lng['search_results']; $window_title = $lng['search_results'];
$navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['search_results'];
$navigator_title = '<a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['search_results'];
$errors = false; $errors = false;
} }
@ -211,8 +211,8 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
'lang'=> $default_lang 'lang'=> $default_lang
); );
$skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title)); $skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/forum_body.tpl');
$query = DataBase::sql_query($sql,GENERAL, 'Could not obtain topics information'); $query = DataBase::sql_query($sql,GENERAL, 'Could not obtain topics information');
$value = DataBase::num_rows($query); $value = DataBase::num_rows($query);
if ($value>0) if ($value>0)
@ -231,7 +231,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
'tposts'=>$record['posts'], 'tposts'=>$record['posts'],
'lastpost'=>Topic::LastPostInTopic($record['t_id']) 'lastpost'=>Topic::LastPostInTopic($record['t_id'])
); );
include('./skins/'.$default_skin.'/forum_forum_add.tpl');
require('./skins/'.$default_skin.'/forum_forum_add.tpl');
array_push($isset_topics, $record['t_id']); array_push($isset_topics, $record['t_id']);
} }
} }
@ -252,7 +252,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
$skin['keywords'] = $_POST['keywords']; $skin['keywords'] = $_POST['keywords'];
} }
include('./skins/'.$default_skin.'/search_end_body.tpl');
require('./skins/'.$default_skin.'/search_end_body.tpl');
} }
@ -266,10 +266,10 @@ else
'insert_keywords'=>$lng['insert_keywords'] 'insert_keywords'=>$lng['insert_keywords']
); );
$window_title = $lng['lsearch']; $window_title = $lng['lsearch'];
$navigator_title = '</a>&gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lsearch'];
$navigator_title = '<a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$lng['lsearch'];
$skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title)); $skin = array_push_assoc($skin,GenerateHeader($window_title,$navigator_title));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/search_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/search_body.tpl');
} }
if ($_SESSION['uid']>0) if ($_SESSION['uid']>0)
{ {
@ -288,5 +288,5 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 3
- 3
shoutbox.php View File

@ -24,9 +24,9 @@ if (isset($_GET['mode']))
$content = Post::SmilesReplace($content); $content = Post::SmilesReplace($content);
if ((strlen($content)>3) and (strlen($content)<300)) if ((strlen($content)>3) and (strlen($content)<300))
{ {
$sql = "DELETE FROM ".SHOUTBOX_TABLE." WHERE `mtime`<'".(time()-$forum_config['shoutbox_max_time'])."'";
$sql = "DELETE FROM ".SHOUTBOX_TABLE." WHERE `mtime`<'".($_SERVER['REQUEST_TIME']-$forum_config['shoutbox_max_time'])."'";
DataBase::sql_query($sql,GENERAL,'Could not delete old messages'); DataBase::sql_query($sql,GENERAL,'Could not delete old messages');
$sql = "INSERT INTO ".SHOUTBOX_TABLE." VALUES('','".$_SESSION['uid']."','".$content."','".time()."')";
$sql = "INSERT INTO ".SHOUTBOX_TABLE." VALUES('','".$_SESSION['uid']."','".$content."','".$_SERVER['REQUEST_TIME']."')";
DataBase::sql_query($sql,GENERAL,'Could not add shoutbox message'); DataBase::sql_query($sql,GENERAL,'Could not add shoutbox message');
} }
} }
@ -69,5 +69,5 @@ while($sb_msg = DataBase::fetch($query))
</td> </td>
</tr>'; </tr>';
} }
include('./skins/'.$default_skin.'/shoutbox_body.tpl');
require('./skins/'.$default_skin.'/shoutbox_body.tpl');
?> ?>

+ 3
- 3
skins/subPurple/overall_header.tpl View File

@ -43,9 +43,9 @@ function unset_color(element)
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;"> <div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px"> <table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
<tr> <tr>
<td>
<a href="index.php"><img border="0" src="skins/subPurple/images/uf_logo.gif" alt="&micro;F logo"></a></td>
<td width="502" height="75" valign="top">
<td align="center">
<a href="index.php"><img border="0" src="skins/subPurple/images/uf_logo.svg" height="130" alt="&micro;F logo"></a></td>
<td width="602" height="75" valign="top">
<p align="center"><span class="hforum"><? echo $skin['L.forumname']; ?></span><br><span class="fstandard"><i><?= $skin['L.forumdesc']; ?></i></span></p> <p align="center"><span class="hforum"><? echo $skin['L.forumname']; ?></span><br><span class="fstandard"><i><?= $skin['L.forumdesc']; ?></i></span></p>
<p align="center"> <p align="center">
<a href="users.php" class="flink"><?= $skin['L.users']; ?></a>&nbsp;&nbsp; <a href="users.php" class="flink"><?= $skin['L.users']; ?></a>&nbsp;&nbsp;

+ 21
- 21
topic.php View File

@ -9,23 +9,23 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/class_mod.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/class_mod.php');
require('./includes/classes/secure.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/main.php');
$tid = intval($_GET['t']); $tid = intval($_GET['t']);
$start = TimeGeneration(); $start = TimeGeneration();
@ -33,7 +33,7 @@ SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
include('./includes/cache/cache_topic.php');
require('./includes/cache/cache_topic.php');
$forum_locked = $forum['lock']; $forum_locked = $forum['lock'];
//add skin variables //add skin variables
@ -47,11 +47,11 @@ $skin = array(
onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a>' onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a>'
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], '</a>&gt; <a href="forum.php?f='.$fid.'" class="navigator">'.$forum['name'].'</a> &gt; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$topic['name']));
$skin = array_push_assoc($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], '<a href="forum.php?f='.$fid.'" class="navigator">'.$forum['name']. '</a> &raquo; <a href="'.$_SERVER['REQUEST_URI'].'" class="navigator">'.$topic['name']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/topic_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/topic_body.tpl');
$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".*, ".USERS_TABLE.".u_id AS user_id,".SESSIONS_TABLE.".* FROM `".POSTS_TABLE."` LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id LEFT JOIN ".SESSIONS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".POSTS_TABLE.".u_id WHERE t_id='$tid' ORDER BY tp_id $limit;"; $sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".*, ".USERS_TABLE.".u_id AS user_id,".SESSIONS_TABLE.".* FROM `".POSTS_TABLE."` LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id LEFT JOIN ".SESSIONS_TABLE." ON ".SESSIONS_TABLE.".u_id = ".POSTS_TABLE.".u_id WHERE t_id='$tid' ORDER BY tp_id $limit;";
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain post information.'); $query = DataBase::sql_query($sql,CRITICAL,'Could not obtain post information.');
@ -98,7 +98,7 @@ while($item=DataBase::fetch($query))
'ban'=> $lng['ban'], 'ban'=> $lng['ban'],
'edit_profile'=>$lng['edit_profile'], 'edit_profile'=>$lng['edit_profile'],
'add_warn'=>$lng['add_warn'], 'add_warn'=>$lng['add_warn'],
'online'=>($item['time']!=NULL) ? (($item['time']+1250)>time()) ? 'online.gif' : 'offline.gif' : 'offline.gif',
'online'=>($item['time']!=NULL) ? (($item['time']+1250)>$_SERVER['REQUEST_TIME']) ? 'online.gif' : 'offline.gif' : 'offline.gif',
//labels //labels
'L.warns'=>$lng['warns'], 'L.warns'=>$lng['warns'],
'lang'=>$default_lang, 'lang'=>$default_lang,
@ -116,7 +116,7 @@ while($item=DataBase::fetch($query))
'C.delete_post'=>$lng['c_delete_post'] 'C.delete_post'=>$lng['c_delete_post']
); );
//do it! //do it!
include('./skins/'.$default_skin.'/topic_post_body.tpl');
require('./skins/'.$default_skin.'/topic_post_body.tpl');
} }
//generate end template variables //generate end template variables
@ -140,7 +140,7 @@ $skin['lreply']=(($topic['lock']==1) or ($forum_locked==1))
<img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif" border="0" <img src="skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif" border="0"
onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply_active.gif\'" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply_active.gif\'"
onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a'; onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/reply.gif\'" border="0" alt="reply"></a';
include('./skins/'.$default_skin.'/topic_end_body.tpl');
require('./skins/'.$default_skin.'/topic_end_body.tpl');
if (($_SESSION['uid']>0) and ($topic['lock']==0) and ($forum_locked==0) and ($userdata['allow_qr']=='1')) if (($_SESSION['uid']>0) and ($topic['lock']==0) and ($forum_locked==0) and ($userdata['allow_qr']=='1'))
{ {
include './quick_reply.php'; include './quick_reply.php';
@ -162,5 +162,5 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 16
- 16
user.php View File

@ -9,20 +9,20 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/secure.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/secure.php');
$default_lang = DefaultLang(); $default_lang = DefaultLang();
include('./lngs/'.$default_lang.'/main.php');
require('./lngs/'.$default_lang.'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
$default_skin = ViewSkinName(); $default_skin = ViewSkinName();
SessDelInvalid(); SessDelInvalid();
@ -30,7 +30,7 @@ SessRegister();
SessDeleteOld(); SessDeleteOld();
$uid = intval($_GET['id']); $uid = intval($_GET['id']);
//check online for user //check online for user
$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE `u_id`='$uid' AND time+1250>".time()." LIMIT 1";
$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE `u_id`='$uid' AND time+1250>".$_SERVER['REQUEST_TIME']." LIMIT 1";
$query = DataBase::sql_query($sql, GENERAL, 'Could not read user active.'); $query = DataBase::sql_query($sql, GENERAL, 'Could not read user active.');
$result = DataBase::fetch($query); $result = DataBase::fetch($query);
if ($result['u_id']==$uid) if ($result['u_id']==$uid)
@ -97,10 +97,10 @@ $skin = array(
'user_email'=>($user_info['allow_email']=='1') ? '<a href="mailto:'.$user_info['email'].'"><img border="0" src="skins/'.$default_skin.'/images/email.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/email_active.gif\'" 'user_email'=>($user_info['allow_email']=='1') ? '<a href="mailto:'.$user_info['email'].'"><img border="0" src="skins/'.$default_skin.'/images/email.gif" onMouseOver="this.style.cursor=\'hand\'; this.src=\'skins/'.$default_skin.'/images/email_active.gif\'"
onMouseOut="this.src=\'skins/'.$default_skin.'/images/email.gif\'" alt="email"></a>' : '', onMouseOut="this.src=\'skins/'.$default_skin.'/images/email.gif\'" alt="email"></a>' : '',
); );
$skin = array_push_assoc($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], '</a>&gt; <a href="user.php?id='.$_GET['id'].'" class="navigator">'.$lng['showprofile'].': '.$user_info['nick']));
$skin = array_push_assoc($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], '<a href="user.php?id='.$_GET['id'].'" class="navigator">'.$lng['showprofile'].': '.$user_info['nick']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/user_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/user_body.tpl');
if($_SESSION['uid']>0) if($_SESSION['uid']>0)
{ {
if(RANK==2) if(RANK==2)
@ -118,5 +118,5 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 25
- 25
users.php View File

@ -9,20 +9,20 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/classes/class_topic.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_forum.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/classes/class_topic.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_forum.php');
$start = TimeGeneration(); $start = TimeGeneration();
include('./lngs/'.DefaultLang().'/main.php');
require('./lngs/'.DefaultLang().'/main.php');
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
SessDeleteOld(); SessDeleteOld();
@ -80,14 +80,14 @@ if (!isset($_COOKIE['users_desc']))
{ {
case 'yes': case 'yes':
{ {
@setcookie('users_desc','desc',time()+3600);
@setcookie('users_desc','desc',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'desc'; $_COOKIE['users_desc'] = 'desc';
$desc = 'DESC'; $desc = 'DESC';
break; break;
} }
case 'no': case 'no':
{ {
@setcookie('users_desc','no',time()+3600);
@setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no'; $_COOKIE['users_desc'] = 'no';
$desc = ''; $desc = '';
break; break;
@ -96,7 +96,7 @@ if (!isset($_COOKIE['users_desc']))
} }
else else
{ {
@setcookie('users_desc','no',time()+3600);
@setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_desc'] = 'no'; $_COOKIE['users_desc'] = 'no';
$desc = ''; $desc = '';
} }
@ -113,25 +113,25 @@ if (!isset($_COOKIE['users_sort']))
{ {
case 'regdate': case 'regdate':
{ {
@setcookie('users_sort','regdate',time()+3600);
@setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate'; $_COOKIE['users_sort'] = 'regdate';
break; break;
} }
case 'lastvisit': case 'lastvisit':
{ {
@setcookie('users_sort','lastvisit',time()+3600);
@setcookie('users_sort','lastvisit',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'lastvisit'; $_COOKIE['users_sort'] = 'lastvisit';
break; break;
} }
case 'uname': case 'uname':
{ {
@setcookie('users_sort','uname',time()+3600);
@setcookie('users_sort','uname',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'uname'; $_COOKIE['users_sort'] = 'uname';
break; break;
} }
case 'posts': case 'posts':
{ {
@setcookie('users_sort','posts',time()+3600);
@setcookie('users_sort','posts',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'posts'; $_COOKIE['users_sort'] = 'posts';
break; break;
} }
@ -139,7 +139,7 @@ if (!isset($_COOKIE['users_sort']))
} }
else else
{ {
@setcookie('users_sort','regdate',time()+3600);
@setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600);
$_COOKIE['users_sort'] = 'regdate'; $_COOKIE['users_sort'] = 'regdate';
} }
} }
@ -162,10 +162,10 @@ $skin = array(
'luname'=>$lng['user_name'], 'luname'=>$lng['user_name'],
'lgo'=>$lng['lgo'] 'lgo'=>$lng['lgo']
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['lusers'],'</a>&gt; <a href="users.php" class="navigator">'.$lng['lusers']));
$skin = array_push_assoc($skin, GenerateHeader($lng['lusers'], '<a href="users.php" class="navigator">'.$lng['lusers']));
//do it! //do it!
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/users_body.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/users_body.tpl');
switch($_COOKIE['users_sort']) switch($_COOKIE['users_sort'])
{ {
case 'regdate': case 'regdate':
@ -199,7 +199,7 @@ while($result = DataBase::fetch($query))
'lastvisit'=>($result['lastvisit']!='0') ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'], 'lastvisit'=>($result['lastvisit']!='0') ? date('d-m-Y, G:i',$result['lastvisit']) : $lng['never'],
'posts'=>$result['posts'] 'posts'=>$result['posts']
); );
include('./skins/'.$default_skin.'/users_item_add_body.tpl');
require('./skins/'.$default_skin.'/users_item_add_body.tpl');
} }
$skin = array( $skin = array(
'option_pages'=>ListPages($page, $count), 'option_pages'=>ListPages($page, $count),
@ -207,7 +207,7 @@ $skin = array(
'lpage'=>$lng['page'], 'lpage'=>$lng['page'],
'lpages'=>$count 'lpages'=>$count
); );
include('./skins/'.$default_skin.'/users_end_body.tpl');
require('./skins/'.$default_skin.'/users_end_body.tpl');
if($_SESSION['uid']>0) if($_SESSION['uid']>0)
{ {
if(RANK==2) if(RANK==2)
@ -225,5 +225,5 @@ else
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
$skin['queries'] = ShowQueries($start, $stop); $skin['queries'] = ShowQueries($start, $stop);
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
?> ?>

+ 24
- 24
warns.php View File

@ -9,21 +9,21 @@
**/ **/
define('IN_uF', true); define('IN_uF', true);
//include files //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 //connect to database
DataBase::db_connect(); DataBase::db_connect();
include('./includes/sessions.php');
include('./includes/classes/class_user.php');
include('./common.php');
include('./includes/misc_functions.php');
include('./includes/classes/class_topic.php');
include('./includes/classes/class_posting.php');
include('./includes/classes/class_forum.php');
include('./includes/classes/secure.php');
include('./lngs/'.DefaultLang().'/main.php');
require('./includes/sessions.php');
require('./includes/classes/class_user.php');
require('./common.php');
require('./includes/misc_functions.php');
require('./includes/classes/class_topic.php');
require('./includes/classes/class_posting.php');
require('./includes/classes/class_forum.php');
require('./includes/classes/secure.php');
require('./lngs/'.DefaultLang().'/main.php');
$start = TimeGeneration(); $start = TimeGeneration();
SessDelInvalid(); SessDelInvalid();
SessRegister(); SessRegister();
@ -109,7 +109,7 @@ switch(trim($_GET['mode']))
'lall_warns'=>$lng['all_warns'], 'lall_warns'=>$lng['all_warns'],
'queries'=>ShowQueries($start, TimeGeneration()) 'queries'=>ShowQueries($start, TimeGeneration())
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,'</a>&gt; <a href="warns.php?mode=add&amp;id='.$uid.'" class="navigator">'.$lng['add_warn'].': '.$nick_name));
$skin = array_push_assoc($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,'<a href="warns.php?mode=add&amp;id='.$uid.'" class="navigator">'.$lng['add_warn'].': '.$nick_name));
if(User::UserInformation($_SESSION['uid'],'rank')=='2') if(User::UserInformation($_SESSION['uid'],'rank')=='2')
{ {
$skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>'; $skin['pa_link']='<a href="admin/index.php" class="fsmall"><b>'.$lng['pa_link'].'</b></a>';
@ -118,9 +118,9 @@ switch(trim($_GET['mode']))
{ {
$skin['pa_link']=''; $skin['pa_link']='';
} }
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/warns_add_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/warns_add_body.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
} }
case 'view': case 'view':
@ -138,9 +138,9 @@ switch(trim($_GET['mode']))
'lvalue' => $lng['value'], 'lvalue' => $lng['value'],
'lmotive' => $lng['motive'] 'lmotive' => $lng['motive']
); );
$skin = array_push_assoc($skin, GenerateHeader($lng['show_warns'].': '.$user['nick'],'</a>&gt; <a href="warns.php?mode=view&amp;id='.$uid.'" class="navigator">'.$lng['show_warns'].': '.$user['nick']));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/warns_view_body.tpl');
$skin = array_push_assoc($skin, GenerateHeader($lng['show_warns'].': '.$user['nick'], '<a href="warns.php?mode=view&amp;id='.$uid.'" class="navigator">'.$lng['show_warns'].': '.$user['nick']));
require('./skins/'.$default_skin.'/overall_header.tpl');
require('./skins/'.$default_skin.'/warns_view_body.tpl');
$sql = "SELECT * FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'"; $sql = "SELECT * FROM `".WARNINGS_TABLE."` WHERE `u_id`='$uid'";
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain user warns information'); $query = DataBase::sql_query($sql,GENERAL,'Could not obtain user warns information');
$result = DataBase::num_rows($query); $result = DataBase::num_rows($query);
@ -151,7 +151,7 @@ switch(trim($_GET['mode']))
'value'=>$item['value'], 'value'=>$item['value'],
'motive'=>$item['motive'] 'motive'=>$item['motive']
); );
include('./skins/'.$default_skin.'/warns_view_item_body.tpl');
require('./skins/'.$default_skin.'/warns_view_item_body.tpl');
$warns_count = ($item['value']=='+') ? $warns_count + 1 : $warns_count -1; $warns_count = ($item['value']=='+') ? $warns_count + 1 : $warns_count -1;
} }
$stop = TimeGeneration(); $stop = TimeGeneration();
@ -175,10 +175,10 @@ switch(trim($_GET['mode']))
} }
else else
{ {
$skin['no_elements']='<tr><td width="748" colspan="2" class="fitem"><p class="fstandard" align="center">'.$lng['no_elements'].'!</p></td></tr>';
$skin['no_elements']='<tr><td width="'.TABLES_WIDTH.'" colspan="2" class="fitem"><p class="fstandard" align="center">'.$lng['no_elements'].'!</p></td></tr>';
} }
include('./skins/'.$default_skin.'/warns_view_end_body.tpl');
include('./skins/'.$default_skin.'/overall_footer.tpl');
require('./skins/'.$default_skin.'/warns_view_end_body.tpl');
require('./skins/'.$default_skin.'/overall_footer.tpl');
break; break;
} }
default: default:

Loading…
Cancel
Save