-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
83 lines (72 loc) · 2.25 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
ob_start();
//include dependencies
include("includes/init.php");
//initialize mysql connection
$config = new General();
$db = $config->sql_connect();
//check if logged
if($_GET['act'] != "login" AND $_GET['act'] != "api" AND !$config->isLogged()) {
header("location:/login");
}
//include the file (template) requested
if(isset($_GET['act'])) {
$cale = 'content/'.$_GET['act'].'.php';
if(file_exists($cale)) { include($cale); }
else { include("content/error.php"); }
}
else { include("content/default.php"); }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<?=$absolute_url?>"/>
<meta charset="utf-8">
<title><?=$title?></title>
<meta name="author" content="Dragoi Ciprian (www.cipy.ro) @ Hackathon Competition">
<!--Favicon -->
<link rel="icon" type="image/ico" href="static/img/favicon.ico" />
<!-- Styles -->
<link href="static/css/bootstrap.css" rel="stylesheet">
<link href="static/css/style.css" rel="stylesheet">
<!-- Javascript files -->
<script type="text/javascript" src="static/js/jquery.js"></script>
<script type="text/javascript" src="static/js/bootstrap.js"></script>
<script type="text/javascript" src="static/js/library.js"></script>
<script type="text/javascript">
<?=$javascript_code?>
</script>
</head>
<body>
<?php if($_GET['act'] != "login") { ?>
<!-- Header -->
<div class="navbar">
<div class="navbar-inner">
<div class="container" style="width: auto;">
<a class="brand" href="/">LinkVulcano.com</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="/websites"><i class="icon-globe icon-white"></i> Websites</a></li>
<li><a href="/slots"><i class="icon-tags icon-white"></i> Slots</a></li>
<li><a href="/links"><i class="icon-bookmark icon-white"></i> Links</a></li>
</ul>
<ul class="nav pull-right">
<li class="dropdown">
<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white"></i> Settings <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/account"><i class="icon-lock"></i> Login credentials</a></li>
<li><a href="/logout"><i class="icon-off"></i> Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<?php } ?>
<?php
//show template
echo $content;
?>
</body>
</html>