-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
67 lines (54 loc) · 1.78 KB
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
if(!isset($cfg))
{
$cfg = include_once "cfg/config.php";
}
include_once $cfg->ROOT_PATH."/func/startup.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
echo "<title>".$lang[0]."</title>";
echo "<link rel='icon' href='$cfg->ROOT_URL/images/IK-smalltransparent.png'/>";
echo "<link rel='stylesheet' type='text/css' href='$cfg->ROOT_URL/css/style.css'/>";
$jQueryUrl = $cfg->ROOT_URL."/js/jquery.min.js";
$jQueryUrl = str_replace("/", "\/", $jQueryUrl);
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="<?php echo $jQueryUrl; ?>"><\/script>')</script>
<?php
$scriptUrl = $cfg->ROOT_URL."/js/script.js";
$scriptUrl = str_replace("/", "\/", $scriptUrl);
echo "<script src=\"$scriptUrl\"></script>";
?>
</head>
<body>
<?php
include_once $cfg->ROOT_PATH."/func/listLanguages.php";
if(isset($_SESSION['username']))
{
echo "<a href='$cfg->ROOT_URL/editProfile.php'>".$lang[1]."</a>";
if(include $cfg->ROOT_PATH."/func/queries/adminLogin.php")
{
echo "<br>";
echo "<a href='$cfg->ROOT_URL/admin.php'>".$lang[96]."</a>";
}
}
else
{
echo "<a href='$cfg->ROOT_URL/login.php'>".$lang[2]."</a>";
echo "<br>";
echo "<a href='$cfg->ROOT_URL/register.php'>".$lang[3]."</a>";
}
if(isset($_SERVER['PATH_INFO']))
{
$_SESSION['profile'] = ltrim($_SERVER['PATH_INFO'], '/');
include_once $cfg->ROOT_PATH."/func/queries/displayProfile.php";
}
?>
</body>
</html>