diff --git a/admin/admin_forums.php b/admin/admin_forums.php index b18fe58..846c1fd 100644 --- a/admin/admin_forums.php +++ b/admin/admin_forums.php @@ -9,19 +9,19 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/admin/class_forum.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/admin/class_forum.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -54,7 +54,7 @@ function GenerateDefaultDisplay() 'new_forum_submit'=>$lng['new_forum_submit'], ); Admin_Over::GenerateHeader(); - include('./template/forums_beam_body.tpl'); + require('./template/forums_beam_body.tpl'); //add forums and categories $sql = "SELECT * FROM `".CATS_TABLE."` ORDER BY `sort`"; $query = DataBase::sql_query($sql,CRITICAL,'Could not obtain categories information.'); @@ -69,7 +69,7 @@ function GenerateDefaultDisplay() 'delete'=>$lng['delete'], 'del_cat'=>$lng['c_del_cat'] ); - include('./template/forum_category_add.tpl'); + require('./template/forum_category_add.tpl'); for ($i=1; $i<=count($forum); $i++) { if ($forum[$i]['c_id']==$result['c_id']) @@ -84,7 +84,7 @@ function GenerateDefaultDisplay() 'move_down'=>$lng['movedown'], 'delete'=>$lng['delete'] ); - include('./template/forum_forum_add.tpl'); + require('./template/forum_forum_add.tpl'); } } echo ' 
'; @@ -93,8 +93,8 @@ function GenerateDefaultDisplay() 'here_write_name_cat'=>$lng['here_write_name_cat'], 'new_cat_submit'=>$lng['new_cat_submit'] ); - include('./template/forums_view_end_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/forums_view_end_body.tpl'); + require('./template/overall_footer.tpl'); } if (!isset($_GET['mode'])) { @@ -128,14 +128,14 @@ switch($_GET['mode']) } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_cat_name']; } } else { $_POST['cat_name'] = ''; - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; } $skin = array( 'here_write_name_forum'=>$lng['here_write_name_forum'], @@ -150,8 +150,8 @@ switch($_GET['mode']) 'action'=>'admin_forums.php?mode=new&submode=cat' ); Admin_Over::GenerateHeader(); - include('./template/cat_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/cat_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } case 'forum': @@ -177,18 +177,18 @@ switch($_GET['mode']) $last = $last +1; $sql = "INSERT INTO `".FORUMS_TABLE."` VALUES ('$last','$forum_lock','$allow_moderate', '$forum_name', '$forum_desc', '0', '','$forum_cat','$sort')"; DataBase::sql_query($sql,GENERAL,'Could not add forum'); - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; admin_message_forum($lng['forum_saved'],'admin_forums.php'); } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_forum_desc']; } } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_forum_name']; } } @@ -196,7 +196,7 @@ switch($_GET['mode']) { if (!isset($_POST['forum_name'])) { $_POST['forum_name'] = ''; } if (!isset($_POST['forum_desc'])) { $_POST['forum_desc'] = ''; } - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; } $skin = array( 'here_write_name_forum'=>$lng['here_write_name_forum'], @@ -219,8 +219,8 @@ switch($_GET['mode']) 'action'=>'admin_forums.php?mode=new&submode=forum' ); Admin_Over::GenerateHeader(); - include('./template/forum_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/forum_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } } @@ -443,12 +443,12 @@ switch($_GET['mode']) $sort = $sort+1; $sql = "UPDATE `".CATS_TABLE."` SET `name`='$cat_name', `sort`='$sort' WHERE `c_id`='$cid'"; DataBase::sql_query($sql,GENERAL,'Could not update category'); - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; admin_message_forum($lng['cat_saved'],'admin_forums.php'); } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_cat_name']; } } @@ -462,7 +462,7 @@ switch($_GET['mode']) admin_message_forum($lng['no_category'],'admin_forums.php?mode=view'); } unset($tmp); - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; } $skin = array( 'here_write_name_forum'=>$lng['here_write_name_forum'], @@ -477,8 +477,8 @@ switch($_GET['mode']) 'action'=>'admin_forums.php?mode=edit&submode=cat&c='.$cid ); Admin_Over::GenerateHeader(); - include('./template/cat_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/cat_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } case 'forum': @@ -517,18 +517,18 @@ switch($_GET['mode']) `sort`='$sort' WHERE `f_id`='$fid'"; DataBase::sql_query($sql,GENERAL,'Could not update forum'); - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; admin_message_forum($lng['forum_saved'],'admin_forums.php'); } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_forum_desc']; } } else { - $msg = './../skins/'.$default_skin.'/post_error_body.tpl'; + $msg = './template/post_error_body.tpl'; $message = $lng['to_short_forum_name']; } } @@ -536,7 +536,7 @@ switch($_GET['mode']) { $tmp = DataBase::fetch(DataBase::sql_query("SELECT `name`, `desc` FROM `".FORUMS_TABLE."` WHERE `f_id`='$fid'",GENERAL,'Could not obtain forum information')); $_POST['forum_name'] = $tmp['name']; - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; $_POST['forum_desc'] = $tmp['desc']; if($tmp['name']=='') { @@ -565,8 +565,8 @@ switch($_GET['mode']) 'action'=>'admin_forums.php?mode=edit&submode=forum&f='.$fid ); Admin_Over::GenerateHeader(); - include('./template/forum_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/forum_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } } diff --git a/admin/admin_groups.php b/admin/admin_groups.php index 199441e..60b7099 100644 --- a/admin/admin_groups.php +++ b/admin/admin_groups.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); -include('./../includes/classes/class_pms.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); +require('./../includes/classes/class_pms.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/admin/class_forum.php'); -include('./../includes/classes/secure.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/admin/class_forum.php'); +require('./../includes/classes/secure.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -39,7 +39,7 @@ function GenerateDefaultDisplay() $skin['L.groups'] = $lng['admin_groups']; $skin['L.new_group'] = $lng['new_group']; Admin_Over::GenerateHeader(); - include('./template/groups_beam_body.tpl'); + require('./template/groups_beam_body.tpl'); $sql = "SELECT `g_id`, `name`, `desc` FROM `".GROUPS_TABLE."` ORDER BY `sort`"; $query = DataBase::sql_query($sql, GENERAL, 'Could not obtain groups information.'); while($item = DataBase::fetch($query)) @@ -53,10 +53,10 @@ function GenerateDefaultDisplay() 'delete'=>$lng['delete'], 'c_delete'=>$lng['c_delete_group'] ); - include('./template/group_add_body.tpl'); + require('./template/group_add_body.tpl'); } echo ''; - include('./template/overall_footer.tpl'); + require('./template/overall_footer.tpl'); } if (!isset($_GET['mode'])) { @@ -124,8 +124,8 @@ switch($_GET['mode']) 'L.groups' => $lng['admin_groups'] ); Admin_Over::GenerateHeader(); - include('./template/group_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/group_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } case 'edit': @@ -165,7 +165,7 @@ switch($_GET['mode']) $_POST['group_name'] = $g['name']; $_POST['group_desc'] = $g['desc']; $_POST['group_mod'] = User::UserInformation($g['m_id'],'nick'); - $msg='./../skins/'.$default_skin.'/blank.tpl'; + $msg='./template/blank.tpl'; } $skin = array( 'L.save'=>$lng['submit'], @@ -178,8 +178,8 @@ switch($_GET['mode']) 'L.groups' => $lng['admin_groups'] ); Admin_Over::GenerateHeader(); - include('./template/group_new_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/group_new_edit_body.tpl'); + require('./template/overall_footer.tpl'); break; } case 'moveup': diff --git a/admin/admin_script.php b/admin/admin_script.php index 2ae4eb4..33d306e 100644 --- a/admin/admin_script.php +++ b/admin/admin_script.php @@ -9,19 +9,19 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/misc_functions.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/misc_functions.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -367,6 +367,6 @@ $skin = array( ); //do it! Admin_Over::GenerateHeader(); -include('./template/admin_script.tpl'); -include('./template/overall_footer.tpl'); +require('./template/admin_script.tpl'); +require('./template/overall_footer.tpl'); ?> diff --git a/admin/admin_users.php b/admin/admin_users.php index 073a025..ae0a3b7 100644 --- a/admin/admin_users.php +++ b/admin/admin_users.php @@ -9,22 +9,22 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/misc_functions.php'); -include('./../includes/classes/class_topic.php'); -include('./../includes/classes/class_posting.php'); -include('./../includes/classes/secure.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/misc_functions.php'); +require('./../includes/classes/class_topic.php'); +require('./../includes/classes/class_posting.php'); +require('./../includes/classes/secure.php'); $default_lang = Admin_Over::DefaultLang(); -include('./../lngs/'.$default_lang.'/admin.php'); +require('./../lngs/'.$default_lang.'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -275,8 +275,8 @@ switch($_GET['mode']) $msg = './template/blank.tpl'; } Admin_Over::GenerateHeader(); - include('./template/user_edit_body.tpl'); - include('./template/overall_footer.tpl');; + require('./template/user_edit_body.tpl'); + require('./template/overall_footer.tpl');; break; } case 'view': @@ -320,14 +320,14 @@ switch($_GET['mode']) { case 'yes': { - @setcookie('users_desc','desc',time()+3600); + @setcookie('users_desc','desc',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'desc'; $desc = 'DESC'; break; } case 'no': { - @setcookie('users_desc','no',time()+3600); + @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'no'; $desc = ''; break; @@ -336,7 +336,7 @@ switch($_GET['mode']) } else { - @setcookie('users_desc','no',time()+3600); + @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'no'; $desc = ''; } @@ -353,25 +353,25 @@ switch($_GET['mode']) { case 'regdate': { - @setcookie('users_sort','regdate',time()+3600); + @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'regdate'; break; } case 'lastvisit': { - @setcookie('users_sort','lastvisit',time()+3600); + @setcookie('users_sort','lastvisit',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'lastvisit'; break; } case 'uname': { - @setcookie('users_sort','uname',time()+3600); + @setcookie('users_sort','uname',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'uname'; break; } case 'posts': { - @setcookie('users_sort','posts',time()+3600); + @setcookie('users_sort','posts',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'posts'; break; } @@ -379,7 +379,7 @@ switch($_GET['mode']) } else { - @setcookie('users_sort','regdate',time()+3600); + @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'regdate'; } } @@ -404,7 +404,7 @@ switch($_GET['mode']) ); //do it! Admin_Over::GenerateHeader(); - include('./template/users_beam_body.tpl'); + require('./template/users_beam_body.tpl'); switch($_COOKIE['users_sort']) { case 'regdate': @@ -439,7 +439,7 @@ switch($_GET['mode']) 'posts'=>$result['posts'], 'c_del_user'=>$lng['c_delete_user'] ); - include('./template/user_item_add_body.tpl'); + require('./template/user_item_add_body.tpl'); } $skin = array( 'option_pages'=>ListPages($page, $count), @@ -447,8 +447,8 @@ switch($_GET['mode']) 'lpage'=>$lng['page'], 'lpages'=>$count ); - include('./template/users_end_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/users_end_body.tpl'); + require('./template/overall_footer.tpl'); break; } default: diff --git a/admin/banlist.php b/admin/banlist.php index 13f69d0..e35e138 100644 --- a/admin/banlist.php +++ b/admin/banlist.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); -include('./../includes/classes/class_pms.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); +require('./../includes/classes/class_pms.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/admin/class_forum.php'); -include('./../includes/classes/secure.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/admin/class_forum.php'); +require('./../includes/classes/secure.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -85,8 +85,8 @@ switch($_GET['mode']) 'L.user_name.HELP' => $lng['banlist_info_1'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_add_user_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/banlist_add_user_body.tpl'); + require('./template/overall_footer.tpl'); } break; } @@ -138,8 +138,8 @@ switch($_GET['mode']) 'L.user_name.HELP' => $lng['banlist_info_1'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_add_ip_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/banlist_add_ip_body.tpl'); + require('./template/overall_footer.tpl'); } break; } @@ -194,8 +194,8 @@ switch($_GET['mode']) 'L.user_name.HELP' => $lng['banlist_info_1'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/banlist_edit_body.tpl'); + require('./template/overall_footer.tpl'); } break; } @@ -243,8 +243,8 @@ switch($_GET['mode']) 'L.file.HELP' => $lng['banlist_info_3'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_add_file_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/banlist_add_file_body.tpl'); + require('./template/overall_footer.tpl'); } break; } @@ -313,8 +313,8 @@ switch($_GET['mode']) 'L.user_name.HELP' => $lng['banlist_info_1'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_edit_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/banlist_edit_body.tpl'); + require('./template/overall_footer.tpl'); } break; } @@ -343,7 +343,7 @@ switch($_GET['mode']) 'L.clean_banlist' => $lng['banlist_clean'] ); Admin_Over::GenerateHeader(); - include('./template/banlist_view_body.tpl'); + require('./template/banlist_view_body.tpl'); if (DataBase::num_rows($query)<1) { echo '$lng['delete'], 'L.edit'=>$lng['edit'] ); - include('./template/banlist_item_add.tpl'); + require('./template/banlist_item_add.tpl'); } } echo ''; - include('./template/overall_footer.tpl'); + require('./template/overall_footer.tpl'); break; } default: diff --git a/admin/censorlist.php b/admin/censorlist.php index 06bf761..3869275 100644 --- a/admin/censorlist.php +++ b/admin/censorlist.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); -include('./../includes/classes/class_pms.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); +require('./../includes/classes/class_pms.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/admin/class_forum.php'); -include('./../includes/classes/secure.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/admin/class_forum.php'); +require('./../includes/classes/secure.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -72,8 +72,8 @@ switch($_GET['mode']) 'L.censorlist'=>$lng['admin_censorlist'] ); 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; } @@ -112,8 +112,8 @@ switch($_GET['mode']) 'L.censorlist'=>$lng['admin_censorlist'] ); 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; } @@ -145,8 +145,8 @@ switch($_GET['mode']) 'L.censorlist'=>$lng['admin_censorlist'] ); 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; } @@ -165,7 +165,7 @@ switch($_GET['mode']) 'L.view_all_words'=>$lng['view_all_words'] ); Admin_Over::GenerateHeader(); - include('./template/censorlist_view_body.tpl'); + require('./template/censorlist_view_body.tpl'); if (DataBase::num_rows($query)<1) { echo ''; + $skin['nomsgs']=''; } else { @@ -89,12 +89,12 @@ else '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'] = ''; } //do it! -include('./skins/'.$default_skin.'/pms_folder_end_body.tpl'); +require('./skins/'.$default_skin.'/pms_folder_end_body.tpl'); if(RANK=='2') { $skin['pa_link']=''.$lng['pa_link'].''; @@ -107,5 +107,5 @@ else $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/includes/pms/pms_view.php b/includes/pms/pms_view.php index 7360934..01c2b84 100644 --- a/includes/pms/pms_view.php +++ b/includes/pms/pms_view.php @@ -109,14 +109,14 @@ $skin = array( 'lpinfo'=>$lng['postinfo'] ); -$skin = array_push_assoc($skin,GenerateHeader($lng['show_message'].': '.$result['name'], ' > '.$folder.' > +$skin = array_push_assoc($skin,GenerateHeader($lng['show_message'].': '.$result['name'], .$folder.' » '.$lng['show_message'] .': '.$result['name'])); //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') { $skin['pa_link']=''.$lng['pa_link'].''; @@ -127,7 +127,7 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); break; ?> diff --git a/includes/pms/pms_write.php b/includes/pms/pms_write.php index decd966..c1c8159 100644 --- a/includes/pms/pms_write.php +++ b/includes/pms/pms_write.php @@ -29,14 +29,14 @@ if ((isset($_POST['textedit'])) and (isset($_POST['nmsg'])) and (isset($_POST['u //antiflood lock 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']); } } 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['nmsg'] = strip_tags($_POST['nmsg']); 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'] : '' ); -$skin = array_push_assoc($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], '>'.$lng['lpm'].' > '.$lng['write_pm'])); +$skin = array_push_assoc($skin, GenerateHeader($lng['lpm'].': '.$lng['write_pm'], ''.$lng['lpm'].' » '.$lng['write_pm'])); if ($msg=='') { @@ -99,8 +99,8 @@ if ($msg=='') } //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') { @@ -113,6 +113,6 @@ else $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/includes/sessions.php b/includes/sessions.php index e908ac0..ff9d095 100644 --- a/includes/sessions.php +++ b/includes/sessions.php @@ -40,12 +40,12 @@ if (empty($_SESSION['sessionid'])) if (empty($_COOKIE['queries'])) { $_COOKIE['queries']=0; - setcookie('queries','0',time()+31104000); + setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000); } if($_COOKIE['queries']>0) { - setcookie('queries','0',time()+31104000); + setcookie('queries','0',$_SERVER['REQUEST_TIME']+31104000); $_COOKIE['uid']='0'; } @@ -56,7 +56,7 @@ function SessRegister() if ($uid>0) { SessDelete($uid); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO ".SESSIONS_TABLE." VALUES ('', '".$_COOKIE[SESS_NAME]."','$uid','$time')"; $query = DataBase::sql_query($sql,GENERAL,'Could not add new session.',true); if (DataBase::num_rows($query)>0) @@ -73,7 +73,7 @@ function SessRegister() function SessDeleteOld() { - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "DELETE FROM ".SESSIONS_TABLE." WHERE time+129600<$time;"; DataBase::sql_query($sql, GENERAL,'Could not delete session',true); } @@ -96,7 +96,7 @@ function SessDelInvalid() function SessDelete($uid) { - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "DELETE FROM ".SESSIONS_TABLE." WHERE u_id='$uid'"; $query = DataBase::sql_query($sql, GENERAL,'Could not delete session',true); if (DataBase::num_rows($query)>0) @@ -113,7 +113,7 @@ function SessView() global $user; global $forum_config; $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;"; $query = DataBase::sql_query($sql, GENERAL,'Could not obtain sessions information.'); if (DataBase::num_rows($query)>0) diff --git a/index.php b/index.php index 560edf6..307a083 100644 --- a/index.php +++ b/index.php @@ -9,24 +9,24 @@ **/ define('IN_uF', true); //include files -include('./config.php'); +require('./config.php'); if (!UF_INSTALLED) { 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 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(); SessRegister(); @@ -34,21 +34,16 @@ SessDeleteOld(); $start = TimeGeneration(); $default_skin = ViewSkinName(); $visit_count = SetCounter(); -include('./includes/cache/cache_index.php'); +require('./includes/cache/cache_index.php'); //add skin variables $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'], '> '.$lng['mainpage'])); +$skin = array_push_assoc($skin, GenerateHeader($lng['mainpage'], ''.$lng['mainpage'])); //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----------------------------------------------------- // @@ -62,7 +57,7 @@ while($result = DataBase::fetch($query)) 'lforumname' => $lng['forumname'], 'lposts'=>$lng['posts'], '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++) { if ($forum[$i]['c_id']==$result['c_id']) @@ -80,11 +75,11 @@ while($result = DataBase::fetch($query)) 'posts' => $postsinforum, '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 '
$lng['delete'], 'L.edit'=>$lng['edit'], ); - include('./template/censorlist_list_word.tpl'); + require('./template/censorlist_list_word.tpl'); } } - include('./template/overall_footer.tpl'); + require('./template/overall_footer.tpl'); break; } case 'main': @@ -199,8 +199,8 @@ switch($_GET['mode']) 'L.censorlist'=>$lng['admin_censorlist'] ); Admin_Over::GenerateHeader(); - include('./template/censorlist_main_body.tpl'); - include('./template/overall_footer.tpl'); + require('./template/censorlist_main_body.tpl'); + require('./template/overall_footer.tpl'); break; } default: diff --git a/admin/check_script.php b/admin/check_script.php index f84822d..5bafbed 100644 --- a/admin/check_script.php +++ b/admin/check_script.php @@ -9,19 +9,19 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); -include('./../admin/check_script_data.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../admin/check_script_data.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -178,7 +178,7 @@ $skin=array( 'successfully' => ($count <1) ? ''.$lng['files_is_good'].' ('.count($script_files).')' : ''.$lng['files_not_good'].$count.'' ); Admin_Over::GenerateHeader(); -include('./template/check_script.tpl'); +require('./template/check_script.tpl'); for($i=0; $i$actual, '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'); ?> diff --git a/admin/forum_info.php b/admin/forum_info.php index a23fed7..594ea93 100644 --- a/admin/forum_info.php +++ b/admin/forum_info.php @@ -9,18 +9,18 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -102,6 +102,6 @@ $skin = array( ); //do it! Admin_Over::GenerateHeader(); -include('./template/index_body.tpl'); -include('./template/overall_footer.tpl'); +require('./template/index_body.tpl'); +require('./template/overall_footer.tpl'); ?> diff --git a/admin/header.php b/admin/header.php index da0499f..5a6a195 100644 --- a/admin/header.php +++ b/admin/header.php @@ -8,17 +8,17 @@ * @license see LICENSE.txt **/ 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 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(); SessRegister(); SessDeleteOld(); @@ -42,5 +42,5 @@ $skin = array( 'admin_styles' => $lng['styles'], 'main_beam'=>$lng['pa_mainpage'] ); - include('./template/overall_header.tpl'); + require('./template/overall_header.tpl'); ?> diff --git a/admin/index.php b/admin/index.php index 6e647e4..e5d959d 100644 --- a/admin/index.php +++ b/admin/index.php @@ -9,18 +9,18 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); diff --git a/admin/mass_email.php b/admin/mass_email.php index cfcacf0..ce8e451 100644 --- a/admin/mass_email.php +++ b/admin/mass_email.php @@ -9,20 +9,20 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/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(); SessRegister(); SessDeleteOld(); @@ -62,6 +62,6 @@ $skin = array( 'L.main_beam'=>$lng['mass_email2'] ); Admin_Over::GenerateHeader(); -include('./template/mass_email.tpl'); -include('./template/overall_footer.tpl'); +require('./template/mass_email.tpl'); +require('./template/overall_footer.tpl'); ?> diff --git a/admin/smilelist.php b/admin/smilelist.php index 7a5222c..7f51fc8 100644 --- a/admin/smilelist.php +++ b/admin/smilelist.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./../config.php'); -include('./../includes/constants.php'); -include('./../includes/db.php'); -include('./../includes/errors.php'); -include('./../includes/classes/class_pms.php'); +require('./../config.php'); +require('./../includes/constants.php'); +require('./../includes/db.php'); +require('./../includes/errors.php'); +require('./../includes/classes/class_pms.php'); //connect to database DataBase::db_connect(); -include('./../includes/sessions.php'); -include('./../includes/classes/class_user.php'); -include('./../common.php'); -include('./../includes/admin/class_main.php'); -include('./../includes/classes/class_forum.php'); -include('./../includes/admin/class_forum.php'); -include('./../includes/classes/secure.php'); -include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); +require('./../includes/sessions.php'); +require('./../includes/classes/class_user.php'); +require('./../common.php'); +require('./../includes/admin/class_main.php'); +require('./../includes/classes/class_forum.php'); +require('./../includes/admin/class_forum.php'); +require('./../includes/classes/secure.php'); +require('./../lngs/'.Admin_Over::DefaultLang().'/admin.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -72,8 +72,8 @@ switch($_GET['mode']) 'L.clear'=>$lng['reset'] ); 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; } @@ -121,8 +121,8 @@ switch($_GET['mode']) 'L.file.HELP' => $lng['smilelist_info_1'] ); 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; } @@ -174,8 +174,8 @@ switch($_GET['mode']) 'L.clear'=>$lng['reset'] ); 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; } @@ -197,7 +197,7 @@ switch($_GET['mode']) 'L.clean_smilelist' => $lng['smilelist_clean'] ); Admin_Over::GenerateHeader(); - include('./template/smilelist_view_body.tpl'); + require('./template/smilelist_view_body.tpl'); if (DataBase::num_rows($query)<1) { echo '
$lng['delete'], '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; } default: diff --git a/common.php b/common.php index 3b41930..feed8d9 100644 --- a/common.php +++ b/common.php @@ -61,8 +61,8 @@ if ($_SESSION['uid']>0) $db_uid = $result['u_id']; 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']); $_SESSION['uid']='0'; message_forum($motive,'index.php', '10'); diff --git a/eprofile.php b/eprofile.php index 907c01e..799c2d1 100644 --- a/eprofile.php +++ b/eprofile.php @@ -9,23 +9,23 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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_lang = DefaultLang(); -include('./lngs/'.$default_lang.'/main.php'); +require('./lngs/'.$default_lang.'/main.php'); $start = TimeGeneration(); SessDelInvalid(); SessRegister(); @@ -44,6 +44,7 @@ foreach ($_POST as $name => $value) } $msg=''; $errors = true; +$message = ''; if (isset($_POST['email'])) { if ( ereg ("^.+@.+\..+$", $_POST['email'])) @@ -72,55 +73,45 @@ if (isset($_POST['email'])) } 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'].'
'; + } + + if ($_POST['default_lang']=='-1') + { + $message .= $lng['invalid_lang'].'
'; + } + + if ($_POST['limit_tpid']=='-1') + { + $message .= $lng['no_limit_tpid'].'
'; + } + + if ($_POST['limit_ftid'] =='-1') + { + $message .= $lng['no_limit_ftid'].'
'; + } + + if ($_POST['limit_users']=='-1') + { + $message .= $lng['no_limit_users'].'
'; + } + + if (strlen(trim($_POST['sig']))>$forum_config['sig_len']) + { + $message .= $lng['signature_too_long'].'
'; + } + + if ($message != '') + { + $msg = './skins/'.$default_skin.'/post_error_body.tpl'; } else { - $message=$lng['invalid_skin']; - $msg = './skins/'.$default_skin.'/post_error_body.tpl'; + $errors = false; } + } if (!$errors) { @@ -209,7 +200,7 @@ if (isset($_POST['email'])) } else { - $message=$lng['invalid_email']; + $message .= $lng['invalid_email']; $msg = './skins/'.$default_skin.'/post_error_body.tpl'; } } @@ -270,15 +261,15 @@ $skin = array( 'lavfile'=>$lng['avatar_file'], 'yes'=>$lng['yes'] ); -$skin = array_push_assoc($skin,GenerateHeader($lng['leprofile'],'> '.$lng['leprofile'])); +$skin = array_push_assoc($skin,GenerateHeader($lng['leprofile'], ''.$lng['leprofile'])); if ($msg=='') { $msg = './skins/'.$default_skin.'/blank.tpl'; } //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(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/forum.php b/forum.php index eb412c5..a8bd6ba 100644 --- a/forum.php +++ b/forum.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -include('./lngs/'.$default_lang.'/main.php'); +require('./lngs/'.$default_lang.'/main.php'); $start = TimeGeneration(); $fid = intval($_GET['f']); @@ -31,13 +31,13 @@ SessDelInvalid(); SessRegister(); SessDeleteOld(); -include('./includes/cache/cache_forums.php'); +require('./includes/cache/cache_forums.php'); //add skin variables $skin = array( 'ntopic' => ($forum['lock']==1) ? 'ntopic' : ' - reply', 'lposts'=>$lng['posts'], 'llastposts'=>$lng['lastpost'], @@ -48,10 +48,10 @@ $skin = array( 'f_id' => $fid, 'lang'=> $default_lang ); -$skin = array_push_assoc($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], '> '.$forum['name'])); +$skin = array_push_assoc($skin,GenerateHeader($lng['showforum'].': '.$forum['name'], ''.$forum['name'])); //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;"; $query = DataBase::sql_query($sql,GENERAL,'Could not obtain topics information'); $value = DataBase::num_rows($query); @@ -68,7 +68,7 @@ if ($value>0) 'new_post'=>Topic::LastPostImg(), 'lastpost'=>Topic::LastPostInTopic($record['t_id']) ); - include('./skins/'.$default_skin.'/forum_forum_add.tpl'); + require('./skins/'.$default_skin.'/forum_forum_add.tpl'); } $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\'"� onMouseOut="this.src=\'skins/'.$default_skin.'/images/lng_'.$default_lang.'/topic.gif\'" border="0" alt="reply">' )); -include('./skins/'.$default_skin.'/forum_end_body.tpl'); +require('./skins/'.$default_skin.'/forum_end_body.tpl'); $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/groups.php b/groups.php index 2c2f07c..be48231 100644 --- a/groups.php +++ b/groups.php @@ -9,19 +9,19 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); SessRegister(); SessDeleteOld(); @@ -89,8 +89,8 @@ if(isset($_GET['mode'])) $group['desc'] = $lng['mods_desc']; } unset($tmp); - $skin = GenerateHeader($lng['showgroup'].': '.$group['name'], '> '.$lng['showgroup'].': '.$group['name']); - include('./skins/'.$default_skin.'/overall_header.tpl'); + $skin = GenerateHeader($lng['showgroup'].': '.$group['name'], ''.$lng['lgroups'].' » '.$group['name']); + require('./skins/'.$default_skin.'/overall_header.tpl'); $skin = array( 'moderate'=>(is_numeric($gid)) ? IfModGroup($group['m_id']) : '', 'name'=>$group['name'], @@ -101,7 +101,7 @@ if(isset($_GET['mode'])) 'luname'=>$lng['user_name'], '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 (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'], 'posts'=>$result['posts'] ); - include('./skins/'.$default_skin.'/users_item_add_body.tpl'); + require('./skins/'.$default_skin.'/users_item_add_body.tpl'); } } else @@ -134,7 +134,7 @@ if(isset($_GET['mode'])) echo '
'; $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); - include('./skins/'.$default_skin.'/overall_footer.tpl'); + require('./skins/'.$default_skin.'/overall_footer.tpl'); break; } default: @@ -147,8 +147,8 @@ else { $default_skin = ViewSkinName(); - $skin = GenerateHeader($lng['lgroups'], '> '.$lng['lgroups']); - include('./skins/'.$default_skin.'/overall_header.tpl'); + $skin = GenerateHeader($lng['lgroups'], ''.$lng['lgroups']); + require('./skins/'.$default_skin.'/overall_header.tpl'); $special_groups[] = array('admins', $lng['admins'], $lng['admins_desc']); $special_groups[] = array('mods', $lng['mods'], $lng['mods_desc']); $i = 0; @@ -160,7 +160,7 @@ else 'name' => ''.$special_groups[$i][1].'', 'desc' =>$special_groups[$i][2] ); - include('./skins/'.$default_skin.'/group_add_body.tpl'); + require('./skins/'.$default_skin.'/group_add_body.tpl'); $i++; } echo '
'; @@ -176,7 +176,7 @@ else 'name'=>$item['name'], 'desc'=>$item['desc'] ); - include('./skins/'.$default_skin.'/group_add_body.tpl'); + require('./skins/'.$default_skin.'/group_add_body.tpl'); } } else @@ -186,6 +186,6 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); - include('./skins/'.$default_skin.'/overall_footer.tpl'); + require('./skins/'.$default_skin.'/overall_footer.tpl'); } ?> diff --git a/includes/cache/cache_topic.php b/includes/cache/cache_topic.php index 1f20934..c9b4973 100644 --- a/includes/cache/cache_topic.php +++ b/includes/cache/cache_topic.php @@ -55,7 +55,7 @@ while ($result = DataBase::fetch($query)) } //check online for user -$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".time(); +$sql = "SELECT `s_id`, `u_id`, `time` FROM ".SESSIONS_TABLE." WHERE time+1250>".$_SERVER['REQUEST_TIME']; $query = DataBase::sql_query($sql, GENERAL, 'Could not read user active.'); while($result = DataBase::fetch($query)) { diff --git a/includes/classes/class_forum.php b/includes/classes/class_forum.php index da9a12c..8068418 100644 --- a/includes/classes/class_forum.php +++ b/includes/classes/class_forum.php @@ -104,7 +104,7 @@ class Forum global $i; global $forum; global $default_skin; - $time = time()-129600; + $time = $_SERVER['REQUEST_TIME']-129600; if ($_SESSION['uid']>0) { if ($postsinforum>0) diff --git a/includes/classes/class_pms.php b/includes/classes/class_pms.php index 5aa90dd..5534c99 100644 --- a/includes/classes/class_pms.php +++ b/includes/classes/class_pms.php @@ -80,14 +80,14 @@ class NewMessage function AddToInbox($text, $name, $unid, $uid) { $last = DataBase::new_id(PM_INBOX_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO `".PM_INBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid','0')"; DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox'); } function AddToSentbox($text, $name, $unid, $uid) { $last=DataBase::new_id(PM_SENTBOX_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO `".PM_SENTBOX_TABLE."` VALUES ('$last', '$uid', '$name', '$text', '$time', '$unid')"; DataBase::sql_query($sql,GENERAL,'Could not add new message at inbox'); } diff --git a/includes/classes/class_posting.php b/includes/classes/class_posting.php index 130c9d6..2d83aa1 100644 --- a/includes/classes/class_posting.php +++ b/includes/classes/class_posting.php @@ -26,7 +26,7 @@ class Post $tpid = $result['tp_id'];//post in topic id $tpid = $tpid+1; # - $time = time(); + $time = $_SERVER['REQUEST_TIME']; #add new post $sql = "INSERT INTO `".POSTS_TABLE."` VALUES ('$last','$tid', '$uid', '$post', '".$_SERVER['HTTP_USER_AGENT']."', '$time', '$tpid', '$forum','$moderate','".$_SERVER['REMOTE_ADDR']."')"; $query = DataBase::sql_query($sql,GENERAL,'Could not add new post.'); @@ -49,7 +49,7 @@ class Post { //Select last topic $moderate = Forum::ForumInformation($forum,'moderate'); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $lastt=DataBase::new_id(TOPICS_TABLE); $sql = "INSERT INTO ".TOPICS_TABLE." VALUES ('$lastt', '$forum', '0', '$sticky', '$ntopic', '$uid','$time', '', '')"; $query = DataBase::sql_query($sql,GENERAL,'Could not add new topic'); diff --git a/includes/classes/class_topic.php b/includes/classes/class_topic.php index 4f5cd29..6c75140 100644 --- a/includes/classes/class_topic.php +++ b/includes/classes/class_topic.php @@ -68,7 +68,7 @@ class Topic global $last_post; global $record; global $default_skin; - $time = time()-129600; + $time = $_SERVER['REQUEST_TIME']-129600; if ($_SESSION['uid']>0) { if ($last_post[2]>$time) diff --git a/includes/classes/class_user.php b/includes/classes/class_user.php index 52e2e2f..1a0ab6e 100644 --- a/includes/classes/class_user.php +++ b/includes/classes/class_user.php @@ -182,7 +182,7 @@ class User { global $forum_config; $last = DataBase::new_id(USERS_TABLE); - $time = time(); + $time = $_SERVER['REQUEST_TIME']; $sql = "INSERT INTO ".USERS_TABLE." VALUES ('$last', '$nick', '$pass', '$email', '0', '$time', '0', '$gg', '$allow_gg', '$allow_email', '$allow_qr', '".$forum_config['view_shoutbox']."', '".$forum_config['defaultskin']."', '".$forum_config['defaultlang']."','".$forum_config['limit_tpid']."', '".$forum_config['limit_ftid']."', '".$forum_config['limit_users']."', '$sig', '$av', '1','0','$interests');"; DataBase::sql_query($sql,CRITICAL,'Could not create new user'); diff --git a/includes/emailer.php b/includes/emailer.php index 73f0a73..97ecab6 100644 --- a/includes/emailer.php +++ b/includes/emailer.php @@ -20,7 +20,7 @@ function SendEmail($email, $title, $content) $email_headers = "MIME-Version: 1.0\r\n"; $email_headers .= "Content-type: text/html; charset=iso-8859-2\r\n"; $email_headers .= "From: ".$forum_config['forumname']." \n"; - $email_date = date('d-m-Y, G:i',time()); + $email_date = date('d-m-Y, G:i',$_SERVER['REQUEST_TIME']); $email_content = ' diff --git a/includes/errors.php b/includes/errors.php index 8e202d4..18115e7 100644 --- a/includes/errors.php +++ b/includes/errors.php @@ -46,16 +46,17 @@ function message_forum($text, $url, $interval = 1.8) { global $lng; global $forum_config; + global $userdata; $skin = array( 'url' => $url, 'msg' => $text, 'queries' => '', 'pa_link' => '', ); - $skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], '> '.$lng['message_forum'])); + $skin = array_push_assoc($skin,GenerateHeader($lng['message_forum'], ''.$lng['message_forum'].'')); die( - include('./skins/'.ViewSkinName().'/message_body.tpl') - ); + require('./skins/'.ViewSkinName().'/message_body.tpl') + ); } function admin_message_forum($text, $url) { @@ -66,7 +67,7 @@ $skin = array( $skin['queries'] = ''; $skin['pa_link'] = ''; die( - include('./template/message_body.tpl') + require('./template/message_body.tpl') ); } ?> diff --git a/includes/misc_functions.php b/includes/misc_functions.php index 918e954..24d6b8a 100644 --- a/includes/misc_functions.php +++ b/includes/misc_functions.php @@ -48,7 +48,13 @@ function GenerateHeader($title, $navigator) 'L.actual_time'=>$lng['lactualtime'], 'modelogin' => ($_SESSION['uid']>0) ? 'logout' : 'login', 'L.login' => ($_SESSION['uid']>0) ? $lng['lunlogin'] : $lng['llogin'], - 'L.pa_link' => $lng['pa_link'] + 'L.pa_link' => $lng['pa_link'], + 'lactual_time'=>$lng['lactualtime'], + 'actual_time'=>GenerateTime($_SERVER['REQUEST_TIME'], true), + 'loged_as' => User::LogedAs($_SESSION['sessionid'], $_SESSION['uid']), + 'lyoure' => ($_SESSION['uid']>0) ? $lng['you_re'] : '', + 'lpm_msgs' => ($_SESSION['uid']>0) ? $lng['pm_messages'] : '', + 'amsgs' => ($_SESSION['uid']>0) ? User::UserPMs() : '' ); return $skin; @@ -137,24 +143,31 @@ function UserAgent($agent) return array('icon_' . $system . '.gif', 'icon_' . $browser . '.gif', ($system=='unknown') ? $lng['unknown'] : $system, ($browser=='unknown') ? $lng['unknown'] : $browser); } -function GenerateTime($request_time) +function GenerateTime($request_time, $n = false) { global $lng; - if (date('d M Y',$request_time)== date('d M Y',time())) + if (!$n) { - $date = $lng['today'].', '.date('G:i', $request_time); - } - else - { - if ((date('d',$request_time))== (date('d',time())-1) && (date('m-Y',$request_time)== date('m-Y',time()))) + if (date('d M Y',$request_time)== date('d M Y',$_SERVER['REQUEST_TIME'])) { - $date = $lng['yesterday'].', '.date('G:i', $request_time); + $date = $lng['today'].', '.date('G:i', $request_time); } else { - $date = date('d M Y, G:i',$request_time); + if ((date('d',$request_time))== (date('d',$_SERVER['REQUEST_TIME'])-1) && (date('m-Y',$request_time)== date('m-Y',$_SERVER['REQUEST_TIME']))) + { + $date = $lng['yesterday'].', '.date('G:i', $request_time); + } + else + { + $date = date('d M Y, G:i',$request_time); + } } } + else + { + $date = date('d M Y, G:i',$request_time); + } return $date; } @@ -283,7 +296,7 @@ function ViewSkinName() global $forum_config; global $userdata; - if ($_SESSION['uid']>0) + if ($_SESSION['uid']>0 && basename($_SERVER['REQUEST_URI']) != 'login.php?mode=login') { $result = $userdata['skin']; } diff --git a/includes/pms/pms_folder.php b/includes/pms/pms_folder.php index 9f14e8d..3dfbbe5 100644 --- a/includes/pms/pms_folder.php +++ b/includes/pms/pms_folder.php @@ -40,10 +40,10 @@ $skin = array( 'msg_per'=>($_GET['submode']=='inbox') ? round(($cnt[0]/$forum_config['pm_inbox_max'])*100,1) : round(($cnt[1]/$forum_config['pm_sentbox_max'])*100,1) ); -$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), '
> '.$lng['lpm'].' > '.$folder)); +$skin = array_push_assoc($skin,GenerateHeader($lng['lpm'].': '.(($_GET['submode']=='sentbox') ? $lng['sentbox'] : $lng['inbox']), ''.$lng['lpm'].' » '.$folder)); //do it! -include('./skins/'.$default_skin.'/overall_header.tpl'); -include('./skins/'.$default_skin.'/pms_folder_body.tpl'); +require('./skins/'.$default_skin.'/overall_header.tpl'); +require('./skins/'.$default_skin.'/pms_folder_body.tpl'); $uid = $_SESSION['uid']; if (!isset($_GET['submode'])) @@ -74,7 +74,7 @@ $count = DataBase::num_rows($query); if ($count==0) { - $skin['nomsgs']='

'.$lng['no_elements'].'!

'.$lng['no_elements'].'!

'; + echo ''; } $sess = SessView(); //add skin variables @@ -106,7 +101,7 @@ $skin =array( ); //ShoutBox pool :) // do it! -include('./skins/'.$default_skin.'/index_body_end.tpl'); +require('./skins/'.$default_skin.'/index_body_end.tpl'); if ($_SESSION['uid']>0) { if (($forum_config['view_shoutbox']) && ($userdata['view_shoutbox']==1)) @@ -124,5 +119,5 @@ else $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/install1/index.php b/install1/index.php index 462fa5c..e6bcd8a 100644 --- a/install1/index.php +++ b/install1/index.php @@ -8,12 +8,12 @@ * @license see LICENSE.txt **/ 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) { @@ -53,7 +53,7 @@ if(!isset($_COOKIE['lang'])) } if (@is_file('./../lngs/'.$_COOKIE['lang'].'/install.php')) { - include('./../lngs/'.$_COOKIE['lang'].'/install.php'); + require('./../lngs/'.$_COOKIE['lang'].'/install.php'); } $header = ' @@ -79,7 +79,7 @@ switch($_GET['page']) { if (isset($_POST['lang'])) { - setcookie('lang',$_POST['lang'], time()+360000000); + setcookie('lang',$_POST['lang'], $_SERVER['REQUEST_TIME']+360000000); header('Location: index.php?page=step2'); } else @@ -149,7 +149,7 @@ switch($_GET['page']) 'cat3.value'=> (@is_writable($folders[2])) ? ''.$lng['is_writable'].' - OK' : ''.$lng['not_writable'].' Error - No OK', 'successfully' => ($count <1) ? ''.$lng['files_is_good'].' ('.count($script_files).')' : ''.$lng['files_not_good'].' ('.$count.')' ); - include('./tpls/install_check_script.tpl'); + require('./tpls/install_check_script.tpl'); for($i=0; $i$actual, '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 '
'; @@ -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!',''); @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()); - include('./../includes/sql_parse.php'); + require('./../includes/sql_parse.php'); $sql = @fread(@fopen('uf_tables.sql','r'),@filesize('uf_tables.sql')); $sql = preg_replace('/uf_/', $_POST['mysql_prefix'], $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("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')); 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'); @@ -225,7 +225,7 @@ switch($_GET['page']) 'L.mysql_prefix'=>$lng['mysql_prefix'], 'L.submit'=>$lng['start_install'], ); - include('./tpls/install_step4.tpl'); + require('./tpls/install_step4.tpl'); break; } case 'step5': @@ -247,13 +247,13 @@ switch($_GET['page']) `pass`='".md5(htmlspecialchars($_POST['password']))."', `email`='".htmlspecialchars($_POST['email'])."', `lang`= '".$_COOKIE['lang']."', - `regdate`='".time()."', - `lastvisit`='".time()."' + `regdate`='".$_SERVER['REQUEST_TIME']."', + `lastvisit`='".$_SERVER['REQUEST_TIME']."' WHERE `u_id`='1';"; 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!'); - $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!'); header('Location: index.php?page=step7'); } @@ -282,7 +282,7 @@ switch($_GET['page']) 'L.email'=>$lng['email'], 'L.submit'=>$lng['save'] ); - include('./tpls/install_step6.tpl'); + require('./tpls/install_step6.tpl'); break; } case 'step7': diff --git a/lngs/Polish/admin.php b/lngs/Polish/admin.php index a295fba..de9cb61 100644 --- a/lngs/Polish/admin.php +++ b/lngs/Polish/admin.php @@ -7,7 +7,7 @@ * @link http://www.pioder.pl/ * @license see LICENSE.txt **/ -include('./../lngs/Polish/wysiwyg.php'); +require('./../lngs/Polish/wysiwyg.php'); // //on all...------------------------------------------------ // diff --git a/lngs/Polish/main.php b/lngs/Polish/main.php index dace35e..446b04b 100644 --- a/lngs/Polish/main.php +++ b/lngs/Polish/main.php @@ -7,7 +7,7 @@ * @link http://www.pioder.pl/ * @license see LICENSE.txt **/ -include('./lngs/Polish/wysiwyg.php'); +require('./lngs/Polish/wysiwyg.php'); //on header....------------------------------------------------------ // $lng['forumname']='Nazwa Forum'; diff --git a/login.php b/login.php index 95355ee..1878103 100644 --- a/login.php +++ b/login.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -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(); SessDelInvalid(); SessRegister(); @@ -83,14 +83,14 @@ if (isset($_GET['mode'])) $_SESSION['uid']='0'; 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['sessionid']=$ssid; //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 //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 $msg = $lng['youareloggedas'].': '.$nick.'';// messaage "login as.." $stop = TimeGeneration();//generate generation's time @@ -124,12 +124,12 @@ if (isset($_GET['mode'])) 'llog_in'=> $lng['llog_in'], 'msg' => $msg ); - $skin = array_push_assoc($skin, GenerateHeader($lng['llogin'],'> '.$lng['llogin'])); - include('./skins/'.$default_skin.'/overall_header.tpl'); - include('./skins/'.$default_skin.'/login_body.tpl'); + $skin = array_push_assoc($skin, GenerateHeader($lng['llogin'], ''.$lng['llogin'])); + require('./skins/'.$default_skin.'/overall_header.tpl'); + require('./skins/'.$default_skin.'/login_body.tpl'); $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); - include('./skins/'.$default_skin.'/overall_footer.tpl'); + require('./skins/'.$default_skin.'/overall_footer.tpl'); break; } case 'forgotpassword': @@ -164,12 +164,12 @@ if (isset($_GET['mode'])) 'lsave' => $lng['save'], 'pa_link'=>'' ); - $skin = array_push_assoc($skin, GenerateHeader($lng['lforgot_pass2'], '> '.$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'], ''.$lng['lforgot_pass2'])); + require('./skins/'.$default_skin.'/overall_header.tpl'); + require('./skins/'.$default_skin.'/newpass_body.tpl'); $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); - include('./skins/'.$default_skin.'/overall_footer.tpl'); + require('./skins/'.$default_skin.'/overall_footer.tpl'); break; } default: diff --git a/moderate.php b/moderate.php index 89feff5..c32c151 100644 --- a/moderate.php +++ b/moderate.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); SessDelInvalid(); SessRegister(); @@ -129,15 +129,15 @@ switch(trim($_GET['action'])) 'L.reset' => $lng['reset'], 'OPTIONS.select_forum' => Forum::AddForums($tid) ); - $skin = array_push_assoc($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'),'' + $skin = array_push_assoc($skin, GenerateHeader($lng['move_topic'].': '.Topic::TopicInformation($tid,'name'), '' .$lng['move_topic'].': ' .Topic::TopicInformation($tid,'name'))); $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); //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; } diff --git a/pms.php b/pms.php index c838839..884f2da 100644 --- a/pms.php +++ b/pms.php @@ -9,22 +9,22 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); SessDelInvalid(); SessRegister(); diff --git a/posting.php b/posting.php index b515cf9..452b020 100644 --- a/posting.php +++ b/posting.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); $default_skin = ViewSkinName(); SessDelInvalid(); @@ -65,14 +65,14 @@ if (isset($_POST['textedit'])) //antiflood lock 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']); } } else { - setcookie('antiflood_time',(time() + $forum_config['time_antiflood'])); + setcookie('antiflood_time',($_SERVER['REQUEST_TIME'] + $forum_config['time_antiflood'])); } //prepare post... @@ -231,41 +231,30 @@ switch ($_GET['mode']) { case 'ntopic': { - $skin = array_push_assoc($skin, array( - 'mainpage' => $lng['writetopic'], - 'lmainpage' => '> '.$forum['name'].' >'.$lng['writetopic'] - )); + $window_title = $lng['writetopic']; + $navigator_title = ''.$forum['name'].' » '.$lng['writetopic']; break; } case 'edit': { - $skin = array_push_assoc($skin, array( - 'mainpage' => $lng['editpost'], - 'lmainpage' => '> '.$lng['editpost'] - )); + $window_title = $lng['editpost']; + $navigator_title = ''.$lng['editpost']; break; } case 'rpost': { - $skin = array_push_assoc($skin, array( - 'mainpage' => $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'), - 'lmainpage' => '> '.$lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name') - )); + $window_title = $lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'); + $navigator_title = ''.$lng['answer'].': '.Topic::TopicInformation(intval($_GET['id']),'name'); break; } case 'qpost': { - $skin = array_push_assoc($skin, array( - 'mainpage' => $lng['quote'], - 'lmainpage' => '> '.$lng['quote'] - )); + $window_title = $lng['quote']; + $navigator_title = ''.$lng['quote']; break; } @@ -277,7 +266,7 @@ switch ($_GET['mode']) break; } } - +$skin = array_push_assoc($skin, GenerateHeader($window_title, $navigator_title)); $skin = array_push_assoc($skin, array( 'smiles'=>Post::SmilesShow(), //labels @@ -296,7 +285,7 @@ if ($msg=='') } //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'); ?> diff --git a/quick_reply.php b/quick_reply.php index 3f62cce..ed7b296 100644 --- a/quick_reply.php +++ b/quick_reply.php @@ -18,8 +18,8 @@ foreach ($_POST as $name => $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( 'ltitle'=>$lng['title'], 'lmsg'=>$lng['message'], @@ -28,5 +28,5 @@ $skin = array( 'lreset'=>$lng['reset'], 'smiles'=>Post::SmilesShow() ); -include('./skins/'.$default_skin.'/quick_reply_body.tpl'); +require('./skins/'.$default_skin.'/quick_reply_body.tpl'); ?> diff --git a/register.php b/register.php index f4ed1fc..0439e82 100644 --- a/register.php +++ b/register.php @@ -9,25 +9,25 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -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(); SessDelInvalid(); SessRegister(); @@ -38,6 +38,7 @@ if ($_SESSION['uid']>0) { message_forum($lng['youareexist'],'index.php'); } + foreach ($_POST as $name => $value) { if ($forum_config['use_censorlist']) @@ -45,6 +46,7 @@ foreach ($_POST as $name => $value) $_POST[$name] = Secure::UseCensorlist($value); } } + $errors = false; if (isset($_POST['email'])) @@ -160,15 +162,15 @@ $skin = array( 'pa_link'=>'' ); $_POST['allow_gg']='1'; -$skin = array_push_assoc($skin, GenerateHeader($lng['lregister'],'> '.$lng['lregister'])); +$skin = array_push_assoc($skin, GenerateHeader($lng['lregister'], ''.$lng['lregister'])); if ($msg=='') { $msg = './skins/'.$default_skin.'/blank.tpl'; } //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(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/search.php b/search.php index b99489c..fc5df7f 100644 --- a/search.php +++ b/search.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -include('./lngs/'.$default_lang.'/main.php'); +require('./lngs/'.$default_lang.'/main.php'); $start = TimeGeneration(); $default_skin = ViewSkinName(); SessDelInvalid(); @@ -97,7 +97,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co { 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"; $count = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics')); $count = $count['cnt']; @@ -117,7 +117,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co ORDER BY `sticky` DESC, `lastpost_time` DESC $limit"; $errors = false; $window_title = $lng['showlastposts']; - $navigator_title = '> '.$lng['showlastposts']; + $navigator_title = ''.$lng['showlastposts']; break; } 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;"; $errors = false; $window_title = $lng['view_user_topics']; - $navigator_title = '> '.$lng['view_user_topics']; + $navigator_title = ''.$lng['view_user_topics']; break; } else @@ -187,7 +187,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;"; $window_title = $lng['search_results']; - $navigator_title = '> '.$lng['search_results']; + $navigator_title = ''.$lng['search_results']; $errors = false; } @@ -211,8 +211,8 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co 'lang'=> $default_lang ); $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'); $value = DataBase::num_rows($query); if ($value>0) @@ -231,7 +231,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co 'tposts'=>$record['posts'], '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']); } } @@ -252,7 +252,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co $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'] ); $window_title = $lng['lsearch']; - $navigator_title = '> '.$lng['lsearch']; + $navigator_title = ''.$lng['lsearch']; $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) { @@ -288,5 +288,5 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/shoutbox.php b/shoutbox.php index a53fd03..f26cb66 100644 --- a/shoutbox.php +++ b/shoutbox.php @@ -24,9 +24,9 @@ if (isset($_GET['mode'])) $content = Post::SmilesReplace($content); 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'); - $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'); } } @@ -69,5 +69,5 @@ while($sb_msg = DataBase::fetch($query)) '; } -include('./skins/'.$default_skin.'/shoutbox_body.tpl'); +require('./skins/'.$default_skin.'/shoutbox_body.tpl'); ?> diff --git a/skins/subPurple/overall_header.tpl b/skins/subPurple/overall_header.tpl index 900c3dd..383c551 100644 --- a/skins/subPurple/overall_header.tpl +++ b/skins/subPurple/overall_header.tpl @@ -43,9 +43,9 @@ function unset_color(element)
- - + '; + $skin['no_elements']=''; } - 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; } default:
- µF logo + + µF logo


   diff --git a/topic.php b/topic.php index e49e2a9..21801ec 100644 --- a/topic.php +++ b/topic.php @@ -9,23 +9,23 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -include('./lngs/'.$default_lang.'/main.php'); +require('./lngs/'.$default_lang.'/main.php'); $tid = intval($_GET['t']); $start = TimeGeneration(); @@ -33,7 +33,7 @@ SessDelInvalid(); SessRegister(); SessDeleteOld(); $default_skin = ViewSkinName(); -include('./includes/cache/cache_topic.php'); +require('./includes/cache/cache_topic.php'); $forum_locked = $forum['lock']; //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">' ); -$skin = array_push_assoc($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], '> '.$forum['name'].' > '.$topic['name'])); +$skin = array_push_assoc($skin, GenerateHeader($lng['showtopic'].': '.$topic['name'], ''.$forum['name']. ' » '.$topic['name'])); //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;"; $query = DataBase::sql_query($sql,CRITICAL,'Could not obtain post information.'); @@ -98,7 +98,7 @@ while($item=DataBase::fetch($query)) 'ban'=> $lng['ban'], 'edit_profile'=>$lng['edit_profile'], '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 'L.warns'=>$lng['warns'], 'lang'=>$default_lang, @@ -116,7 +116,7 @@ while($item=DataBase::fetch($query)) 'C.delete_post'=>$lng['c_delete_post'] ); //do it! - include('./skins/'.$default_skin.'/topic_post_body.tpl'); + require('./skins/'.$default_skin.'/topic_post_body.tpl'); } //generate end template variables @@ -140,7 +140,7 @@ $skin['lreply']=(($topic['lock']==1) or ($forum_locked==1)) reply0) and ($topic['lock']==0) and ($forum_locked==0) and ($userdata['allow_qr']=='1')) { include './quick_reply.php'; @@ -162,5 +162,5 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/user.php b/user.php index 3620ced..4b5c896 100644 --- a/user.php +++ b/user.php @@ -9,20 +9,20 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -include('./lngs/'.$default_lang.'/main.php'); +require('./lngs/'.$default_lang.'/main.php'); $start = TimeGeneration(); $default_skin = ViewSkinName(); SessDelInvalid(); @@ -30,7 +30,7 @@ SessRegister(); SessDeleteOld(); $uid = intval($_GET['id']); //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.'); $result = DataBase::fetch($query); if ($result['u_id']==$uid) @@ -97,10 +97,10 @@ $skin = array( 'user_email'=>($user_info['allow_email']=='1') ? 'email' : '', ); -$skin = array_push_assoc($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], '> '.$lng['showprofile'].': '.$user_info['nick'])); +$skin = array_push_assoc($skin,GenerateHeader($lng['showprofile'].': '.$user_info['nick'], ''.$lng['showprofile'].': '.$user_info['nick'])); //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(RANK==2) @@ -118,5 +118,5 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/users.php b/users.php index 40785a5..8003af4 100644 --- a/users.php +++ b/users.php @@ -9,20 +9,20 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); -include('./lngs/'.DefaultLang().'/main.php'); +require('./lngs/'.DefaultLang().'/main.php'); SessDelInvalid(); SessRegister(); SessDeleteOld(); @@ -80,14 +80,14 @@ if (!isset($_COOKIE['users_desc'])) { case 'yes': { - @setcookie('users_desc','desc',time()+3600); + @setcookie('users_desc','desc',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'desc'; $desc = 'DESC'; break; } case 'no': { - @setcookie('users_desc','no',time()+3600); + @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'no'; $desc = ''; break; @@ -96,7 +96,7 @@ if (!isset($_COOKIE['users_desc'])) } else { - @setcookie('users_desc','no',time()+3600); + @setcookie('users_desc','no',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_desc'] = 'no'; $desc = ''; } @@ -113,25 +113,25 @@ if (!isset($_COOKIE['users_sort'])) { case 'regdate': { - @setcookie('users_sort','regdate',time()+3600); + @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'regdate'; break; } case 'lastvisit': { - @setcookie('users_sort','lastvisit',time()+3600); + @setcookie('users_sort','lastvisit',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'lastvisit'; break; } case 'uname': { - @setcookie('users_sort','uname',time()+3600); + @setcookie('users_sort','uname',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'uname'; break; } case 'posts': { - @setcookie('users_sort','posts',time()+3600); + @setcookie('users_sort','posts',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'posts'; break; } @@ -139,7 +139,7 @@ if (!isset($_COOKIE['users_sort'])) } else { - @setcookie('users_sort','regdate',time()+3600); + @setcookie('users_sort','regdate',$_SERVER['REQUEST_TIME']+3600); $_COOKIE['users_sort'] = 'regdate'; } } @@ -162,10 +162,10 @@ $skin = array( 'luname'=>$lng['user_name'], 'lgo'=>$lng['lgo'] ); -$skin = array_push_assoc($skin, GenerateHeader($lng['lusers'],'> '.$lng['lusers'])); +$skin = array_push_assoc($skin, GenerateHeader($lng['lusers'], ''.$lng['lusers'])); //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']) { 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'], 'posts'=>$result['posts'] ); - include('./skins/'.$default_skin.'/users_item_add_body.tpl'); + require('./skins/'.$default_skin.'/users_item_add_body.tpl'); } $skin = array( 'option_pages'=>ListPages($page, $count), @@ -207,7 +207,7 @@ $skin = array( 'lpage'=>$lng['page'], 'lpages'=>$count ); -include('./skins/'.$default_skin.'/users_end_body.tpl'); +require('./skins/'.$default_skin.'/users_end_body.tpl'); if($_SESSION['uid']>0) { if(RANK==2) @@ -225,5 +225,5 @@ else } $stop = TimeGeneration(); $skin['queries'] = ShowQueries($start, $stop); -include('./skins/'.$default_skin.'/overall_footer.tpl'); +require('./skins/'.$default_skin.'/overall_footer.tpl'); ?> diff --git a/warns.php b/warns.php index b55567a..0c13962 100644 --- a/warns.php +++ b/warns.php @@ -9,21 +9,21 @@ **/ define('IN_uF', true); //include files -include('./config.php'); -include('./includes/constants.php'); -include('./includes/db.php'); -include('./includes/errors.php'); +require('./config.php'); +require('./includes/constants.php'); +require('./includes/db.php'); +require('./includes/errors.php'); //connect to database DataBase::db_connect(); -include('./includes/sessions.php'); -include('./includes/classes/class_user.php'); -include('./common.php'); -include('./includes/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(); SessDelInvalid(); SessRegister(); @@ -109,7 +109,7 @@ switch(trim($_GET['mode'])) 'lall_warns'=>$lng['all_warns'], 'queries'=>ShowQueries($start, TimeGeneration()) ); - $skin = array_push_assoc($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,'> '.$lng['add_warn'].': '.$nick_name)); + $skin = array_push_assoc($skin, GenerateHeader($lng['add_warn'].': '.$nick_name,''.$lng['add_warn'].': '.$nick_name)); if(User::UserInformation($_SESSION['uid'],'rank')=='2') { $skin['pa_link']=''.$lng['pa_link'].''; @@ -118,9 +118,9 @@ switch(trim($_GET['mode'])) { $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; } case 'view': @@ -138,9 +138,9 @@ switch(trim($_GET['mode'])) 'lvalue' => $lng['value'], 'lmotive' => $lng['motive'] ); - $skin = array_push_assoc($skin, GenerateHeader($lng['show_warns'].': '.$user['nick'],'> '.$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'], ''.$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'"; $query = DataBase::sql_query($sql,GENERAL,'Could not obtain user warns information'); $result = DataBase::num_rows($query); @@ -151,7 +151,7 @@ switch(trim($_GET['mode'])) 'value'=>$item['value'], '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; } $stop = TimeGeneration(); @@ -175,10 +175,10 @@ switch(trim($_GET['mode'])) } else { - $skin['no_elements']='

'.$lng['no_elements'].'!

'.$lng['no_elements'].'!