/* index.php - Zeigt einfach nur das Forum an */
require_once("functions.php");
require_once("loadset.php");
require_once("auth.php");
require_once($config['lng_folder']."/lng_main.php");
$allowed = 1; // Zugang wird erst einmal gewährt
if(!isset($faction) && isset($upb)) $faction = $upb;
elseif(!isset($faction)) $faction= '';
$Robot=0;
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$IPEM = $_SERVER["REMOTE_ADDR"];
if (strstr($host,"googlebot")) $Robot=1;
if (strstr($host,"yahoo")) $Robot=1;
if (strstr($host,"msnbot")) $Robot=1;
//if (strstr($host,"verizon.net")) $Robot=1;
if (strstr($host,"sbcglobal")) $Robot=1;
if (strstr($host,"static.giga-dns.com")) $Robot=1;
if (strstr($host,"virginmedia.com")) $Robot=1;
if (strstr($host,"bredbandsbolaget.se")) $Robot=1;
if (strstr($host,"yandex.ru")) $Robot=1;
if (strstr($host,"46.229.168")) $Robot=1; // www.semrush.com/bot.html
if (strstr($IPEM,"46.229.168")) $Robot=1;
if($session_upbconnection != "1") { // Überprüfen, ob User bei dieser Session schon im Forum war
$session_upbconnection = 1;
//session_register("session_upbconnection"); // Session-Variable setzen php4
$_SESSION['session_upbconnection'] = 1; //php5
mylog("6","Egy Vendég belépett a fórumba. (IP: %2)");
}
if($config['use_diskfreespace'] == 1) {
if(round(diskfreespace(".")/1024) <= $config['warn_admin_fds']*1024) { // Überprüfen, ob genügend Speicherplatz vorhanden ist
$fds_file = myfile("vars/fds.var");
if($fds_file[0] != "1" && $fds_file[0] != "2") {
$datum = makesdatum(mydate());
$search = array("{DATE}","{ADMINLOGINLINK}");
$replace = array($datum,$config['address_to_forum']."/ad_login.php");
$email_file = myfread($config['lng_folder'].'/mails/discfreespace_warning.dat');
$email_file = str_replace($search,$replace,$email_file);
mylog("1","Speicherplatzwarnung; Admin benachrichtigt"); // loggen
myfwrite("vars/fds.var",1,"w");
mymail($config['admin_email'],$lng['mail_subjects']['discfreespace_warning'],$email_file);
}
if(round(diskfreespace(".")/1024) <= $config['close_forum_fds']*1024) { // Überprüfen, ob Alarm aktiviert werden muss
$config['uc'] = 1; // Wartungsmodus aktivieren
if($fds_file[0] != "2") {
$datum = makesdatum(mydate());
$search = array("{DATE}","{ADMINLOGINLINK}");
$replace = array($datum,$config['address_to_forum']."/ad_login.php");
$email_file = myfread($config['lng_folder'].'/mails/discfreespace_alarm.dat');
$email_file = str_replace($search,$replace,$email_file);
mymail($config['admin_email'],$lng['mail_subjects']['discfreespace_alarm'],$email_file);
mylog("1","Speicherplatzalarm; Admin benachrichtigt; Forum geschlossen"); // loggen
myfwrite("vars/fds.var",2,"w");
}
}
}
}
if($config['uc'] == 1 && $user_data['status'] != 1) {
$config['forum_logo'] == '' ? $show_logo = '' : $show_logo = "
";
// Ha a fórum ki van kapcsolva
?>
Under Construction
$allowed = 0; // Zugang nicht erlaubt
}
elseif($Robot=="1") // Robot kitiltása
{
$allowed = 0;
}
elseif($plus_setting[1] == 1 and $user_data['status']=="4") // plusz Tiltás cookie alapján
{
include("pageheader.php");
echo navbar($lng['No_access']);
print"Sajnos ki lettél tiltva.";
include("pagetail.php");
$allowed = 0;
}
elseif(check_ip_access($REMOTE_ADDR,-1) != 1) {
$endtime = get_ip_sperre_endtime($REMOTE_ADDR,-1);
if($endtime == -1) $endtime = $lng['banned_forever'];
else {
$endtime = ceil(($endtime - time()) / 60);
$endtime = sprintf($lng['banned_for_x_minutes'],$endtime);
}
include("pageheader.php");
echo navbar($lng['No_access']);
echo get_message("ip_banned_everywhere",'
'.$endtime);
include("pagetail.php");
$allowed = 0;
}
elseif($config['must_be_logged_in'] == 1 && $user_logged_in != 1 && $faction != "register" && $faction != "aktivacio" && $faction != "kepeslap" && $faction != "hitvallas" && $faction != "login" && $faction != "regeln" && $faction != "sendpw" && $faction != "changepw" && $faction != "tamogatas") {
include("pageheader.php");
echo navbar($lng['No_access']);
//Csak bejelentkezett tagok láthatják echo get_message('members_only','
'.sprintf($lng['links']['register_or_login']."
","",'',"",' '));
echo get_message('members_only','
'.sprintf($lng['links']['register_or_login']." ","",'',"",' '));
include("maittvolt.php"); //vendég láthatja kik voltak itt
$parameter_vendeg=1;
print"
";
include("today.php"); //vendég láthatja a mai hozzászólásokat
include("pagetail.php");
$allowed = 0;
}
//Csak bejelentkezett tagok láthatják vége
if($allowed == 1) {
switch($faction) {
// reply.php
case "hitvallas":
include("pageheader.php");
include("hitvallas.php");
include("pagetail.php");
break;
case "vip":
include("pageheader.php");
include("vip.php");
include("pagetail.php");
break;
case "reply":
setcookie("upbwhere","index.php?faction=reply&forum_id=$forum_id&thread_id=$thread_id");
include("pageheader.php");
include("reply.php");
include("pagetail.php");
break;
// newtopic.php
case "newtopic":
setcookie("upbwhere","index.php?faction=newtopic&forum_id=$forum_id");
if($tema=="igen")
{
include("pageheader.php");
include("newtopic.php");
include("pagetail.php");
}
else
{
include("pageheader.php");
include("temalistazo.php");
include("pagetail.php");
}
break;
// aktiváció
case "aktivacio":
include("pageheader.php");
include("aktivacio.php");
include("pagetail.php");
break;
// editpoll.php
case "editpoll":
include('editpoll.php');
break;
// vote.php
case "vote":
include('vote.php');
break;
// newtopic.php
case "newpoll":
setcookie("upbwhere","index.php?faction=newpoll&forum_id=$forum_id");
include("newpoll.php");
include("pagetail.php");
break;
// edit.php
case "edit":
include("pageheader.php");
include("edit.php");
include("pagetail.php");
break;
// profile.php
case "profile":
include("profile.php");
include("pagetail.php");
break;
// login.php
case "login":
include("login.php");
include("pagetail.php");
break;
// logout.php
case "logout":
include("logout.php");
break;
// faq.php
case "faq":
include("pageheader.php");
include("faq.php");
include("pagetail.php");
break;
// faq.php
case "kepeslap":
include("pageheader.php");
include("fokepeslap.php");
include("pagetail.php");
break;
// register.php
case "register":
include("pageheader.php");
//include("register.php"); //eredeti
//include("regisztracio.php"); //én irtam
include("regisztraciom.php"); //én irtam
include("pagetail.php");
break;
// pm.php
case "pm":
include("pm.php");
include("pagetail.php");
break;
// regeln.php
case "regeln":
include("pageheader.php");
include("regeln.php");
include("pagetail.php");
break;
// tamogatas.php
case "tamogatas":
include("pageheader.php");
include("tamogatas.php");
include("pagetail.php");
break;
// search.php
case "search":
include("pageheader.php");
include("search.php");
include("pagetail.php");
break;
// topic.php
case "topic":
include("pageheader.php");
include("topic.php");
include("pagetail.php");
break;
// wio.php
case "wio":
include("wio.php");
break;
// viewip.php
case "viewip":
include("pageheader.php");
include("viewip.php");
include("pagetail.php");
break;
case "mlist":
include("pageheader.php");
include("listmember.php");
include("pagetail.php");
break;
// sendpw.php
case "sendpw":
include("sendpw.php");
include("pagetail.php");
break;
// Hozzászólásaim
case "hozzaszolasaim":
include("pageheader.php");
include("hozzaszolasaim.php");
include("pagetail.php");
break;
// id_post.php
case "idpost":
include("pageheader.php");
include("id_post.php");
include("pagetail.php");
break;
// changepw.php
case "changepw":
include("changepw.php");
include("pagetail.php");
break;
// formmail.php
case "formmail":
include("pageheader.php");
include("formmail.php");
include("pagetail.php");
break;
// today.php
case "today":
include("pageheader.php");
include("today.php");
include("pagetail.php");
break;
// abos.php
case 'abos':
include("pageheader.php");
include("abos.php");
include("pagetail.php");
break;
// readforum.php
default:
if(check_ip_access($REMOTE_ADDR,$forum_id) != 1) {
$endtime = get_ip_sperre_endtime($REMOTE_ADDR,$forum_id);
if($endtime == -1) $endtime = $lng['banned_forever'];
else {
$endtime = ceil(($endtime - time()) / 60);
$endtime = sprintf($lng['banned_for_x_minutes'],$endtime);
}
include("pageheader.php");
echo navbar("".get_forum_name($forum_id)."\t".$lng['templates']['ip_banned_one_forum'][0]);
echo get_message("ip_banned_one_forum",'
'.$endtime);
include("pagetail.php");
}
else {
if($mode == "viewforum") {
setcookie("upbwhere","index.php?mode=viewforum&forum_id=$forum_id"); // Redirect-Cookie für nach dem Einloggen
// setcookie("forum,$forum_id",time(),time()+(3600*24*365),$config['path_to_forum']); // Cookie, um letzten Besuch festzustellen
}
elseif($mode == "viewthread") {
setcookie("upbwhere","index.php?mode=viewthread&forum_id=$forum_id&thread=$thread"); // Redirect-Cookie für nach dem Einloggen
//hibas setcookie("topic,$forum_id,$thread",time(),time()+(3600*24*365),$config['path_to_forum']); // Cookie, um letzten Besuch festzustellen
//setcookie("jezusertplap","$session_id",time()+(3600*24*365),"/"); // Cookie ba is elmentettem
$temp_var = "session.tview.$forum_id.$thread";
if($$temp_var != 1) {
$$temp_var = 1;
increase_topic_views($forum_id,$thread,1);
//session_register($temp_var); // Hier wird die Variable mit dem Namen des Inhalts von $temp_var registriert und nicht die Variable $temp_var selbst! php4
$_SESSION['$temp_var'] = 1; //php5
}
}
else setcookie("upbwhere","index.php");
if (isset($o) && ($o==1 || $o==0)) setcookie("order", "$o");
include("pageheader.php");
include("readforum.php");
include("pagetail.php");
}
break;
// credits.php *g*
case "credits":
include("credits.php");
break;
}
}
?>