-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
36 lines (33 loc) · 914 Bytes
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
$fl->assignInclude("header", "./templates/header.tpl");
$fl->assignInclude("footer", "./templates/footer.tpl");
if((isset($login)&&$login==1) || (isset($authenticated)&&$authenticated==1))
{
$fl->assignInclude('accountmenu', './templates/accountmenu.tpl');
}
$fl->prepare();
$fl->assignGlobal("FILEROOT", $fileroot);
if((isset($login)&&$login==1) || (isset($authenticated)&&$authenticated==1))
{
$fl->assignGlobal("TARGET", "logout");
$fl->assign("LOGGEDIN_USERNAME", get_realname($username));
}
else
{
$fl->assignGlobal("TARGET", "login");
$fl->newBlock("logininput");
$fl->newBlock("passwordinput");
if(ereg("index.php", $_SERVER['REQUEST_URI']))
{
$fl->newBlock("joinform");
}
}
if(isset($username)&&get_userlevel($username)==3)
{
$fl->newBlock("admin");
}
elseif(isset($username)&&isset($COOKIE['LoginCookie'])&&get_userlevel($username)!=3)
{
$fl->newBlock("nonadmin");
}
?>