<?php
$check_regcode = settings("regcode");
if($chkMe == "unlogged")
{
$nickname = _welcome_guest;
if($check_regcode == 1)
{
$regcode = show("user/sliderlogin/register_regcode2", array("confirm" => _register_confirm,
"confirm_add" => _register_confirm_add,));
} else {
$regcode = "";
}
if($secureLogin == 1) $secure = show("menu/secure", array("help" => _login_secure_help));
$qry = db("SELECT unreg FROM ".$db['login_msg']." ");
$get = _fetch($qry);
$user = $nickname;
$loginnews = str_replace("[user]", $user, $get[unreg]);
$memberlogin .= show("menu/sliderlogin/memberlogin", array("dis" => $dis,
"secure" => $secure,
"permanent" => _login_permanent,
"lostpwd" => _login_lostpwd,
"name" => _loginname,
"nick" => _nick,
"pwd" => _pwd));
$register = show("menu/sliderlogin/register", array("register" => _register,
"dis" => $dis,
"signup" => _login_signup,
"name" => _loginname,
"nickname" => $nickname,
"nick" => _nick,
"pwd" => _pwd,
"pwd2" => _pwd2,
"email" => _email,
"r_name" => "",
"r_nick" => "",
"r_email" => "",
"value" => _button_value_reg,
"regcode" => $regcode));
$news = show("menu/sliderlogin/news", array("news" => bbcode ($loginnews)));
$sliderlogin = show("menu/sliderlogin/login_new", array("loginout" => ' <a id="open" class="open" href="#">Log In | Register</a>',
"nickname" => $nickname,
"show" => $news,
"show1" => $memberlogin,
"show2" => $register));
} else {
if($chkMe == "1") $rank = "user";
if($chkMe == "2") $rank = "trial";
if($chkMe == "3") $rank = "member";
if($chkMe == "4") $rank = "admin";
$qry = db("SELECT * FROM ".$db['login_msg']." ");
$get = _fetch($qry);
$user = autor($userid, "welcome");
$news = $get[$rank];
$loginnews = str_replace("[user]", $user, $get[$rank]);
$kat = array (nav_user, nav_trial, nav_member, nav_admin);
for($x = 0; $x < count($kat); $x++) {
if($k = _fetch(db("SELECT `level` FROM ".$db['navi_kats']." WHERE `placeholder` = '".up($kat[$x])."'")))
{
$intern = ($chkMe >= 2) ? '' : " AND s1.`internal` = '0'";
$permissions = ($kat[$x] == 'nav_admin' && admin_perms($userid)) ? "" : $intern." AND ".intval($chkMe)." >= '".intval($k['level'])."'";
$qry = db("SELECT s1.* FROM ".$db['navi']." AS s1 LEFT JOIN ".$db['navi_kats']." AS s2 ON s1.kat = s2.placeholder
WHERE s1.kat = '".up($kat[$x])."' AND s1.`shown` = '1' ".$permissions."
ORDER BY s1.pos");
while($get = _fetch($qry))
{
if($get['type'] == 0) $link = '';
elseif($get['type'] == 1 || $get['type'] == 2 || $get['type'] == 3) {
$name = ($get['wichtig'] == 1) ? '<span class="fontWichtig">'.navi_name(re($get['name'])).'</span>' : navi_name(re($get['name']));
$target = ($get['target'] == 1) ? '_blank' : '_self';
if(file_exists($designpath.'/menu/sliderlogin/'.$get['kat'].'.html')) {
$link = show("menu/sliderlogin/".$get['kat']."", array("target" => $target,
"href" => re($get['url']),
"title" => strip_tags($name),
"css" => ucfirst(str_replace('nav_', '', re($get['kat']))),
"link" => $name));
} else {
$link = show("menu/sliderlogin/nav_link", array("target" => $target,
"href" => re($get['url']),
"title" => strip_tags($name),
"css" => ucfirst(str_replace('nav_', '', re($get['kat']))),
"link" => $name));
}
$table = strstr($link, '<tr>') ? true : false;
}
$navi .= $link;
}
}
}
$qryft = db("SELECT s1.t_text,s1.id,s1.topic,s1.kid,s2.kattopic,s3.intern,s1.sticky
FROM ".$db['f_threads']." s1, ".$db['f_skats']." s2, ".$db['f_kats']." s3
WHERE s1.kid = s2.id
AND s2.sid = s3.id
ORDER BY s1.lp DESC
LIMIT 10");
while($getft = _fetch($qryft))
{
if(fintern($getft['kid']))
{
$lp = cnt($db['f_posts'], " WHERE sid = '".$getft['id']."'");
$pagenr = ceil($lp/10);
if($pagenr == 0) $page = 1;
else $page = $pagenr;
$qryp = db("SELECT text FROM ".$db['f_posts']."
WHERE kid = '".$getft['kid']."'
AND sid = '".$getft['id']."'
ORDER BY date DESC
LIMIT 1");
$getp = _fetch($qryp);
if(_rows($qryp)) $text = strip_tags($getp['text']);
else $text = strip_tags($getft['t_text']);
if($getft['intern'] != 1) $intern = "";
else $intern = '<span class="fontWichtig">'._internal.':</span> ';
if($getft['sticky'] != 1) $wichtig = "";
else $wichtig = '<span class="fontWichtig">'._sticky.':</span> ';
$ftopics .= show("menu/sliderlogin/login_forum", array("id" => $getft['id'],
"pagenr" => $page,
"p" => $lp +1,
"intern" => $intern,
"wichtig" => $wichtig,
"lpost" => cut(re($text), 100),
"kat" => re($getft['kattopic']),
"titel" => re(cut($getft['topic'], 25)),
"kid" => $getft['kid']));
}
}
$lvl = data($userid,"level");
if($lvl == 1) $mylevel = _status_user;
elseif($lvl == 2) $mylevel = _status_trial;
elseif($lvl == 3) $mylevel = _status_member;
elseif($lvl == 4) $mylevel = _status_admin;
if($chkMe == "unlogged")
{
$userinfo = "";
} else {
$check = cnt($db['msg'], " WHERE an = '".$userid."' AND readed = 0 AND see_u = 0");
if($check == 1)
{
$cnt = 1;
$mymsg = show(_lobby_mymessage, array("cnt" => $cnt));
} elseif ($check > 1) {
$cnt = $check;
$mymsg = show(_lobby_mymessages, array("cnt" => $cnt));
} else {
$mymsg ="";
}
$userinfo .= show("menu/sliderlogin/userinfo", array("level" => $mylevel,
"plevel" => _admin_user_level,
"plogins" => _profil_logins,
"prank" => _profil_position,
"nmsg" => "Neue ". _msg,
"mylogins" => userstats($userid, "logins"),
"myrank" => getrank($userid),
"class" => $class,
"mymsg" => $mymsg,
"pic" => userpic($userid,113,140)));
}
$news = show("menu/sliderlogin/news", array("news" => bbcode ($loginnews)));
$show1 .= show("menu/sliderlogin/membermenue", array("menue" => $navi,
"userinfo" => $userinfo));
$show2 .= show("menu/sliderlogin/fposts", array("fposts" => $ftopics));
$sliderlogin = show("menu/sliderlogin/login_new", array("register" => _register,
"what" => _login_login,
"dis" => $dis,
"secure" => $secure,
"signup" => _login_signup,
"permanent" => _login_permanent,
"lostpwd" => _login_lostpwd,
"name" => _loginname,
"nickname" => autor($userid, "welcome"),
"loginout" => '<a id="open" class="open" href="#">More</a>',
"nick" => _nick,
"pwd" => _pwd,
"pwd2" => _pwd2,
"email" => _email,
"r_name" => "",
"r_nick" => "",
"r_email" => "",
"show" => $news,
"show1" => $show1,
"show2" => $show2,
"value" => _button_value_reg,
"regcode" => $regcode));
}
?>
|