-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindexdummy.php
81 lines (81 loc) · 2.1 KB
/
indexdummy.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
<!DOCTYPE HTML>
<html>
<head>
<title>Guitar Tutorials</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<?php
include("login_functions.php");
?>
</head>
<body>
<div id="bodyshadow">
<header>
<div id="loginstatus">
<?php
//if(loggedin()){
if(isset($_SESSION['username'])){
echo "<a href='index.php?site=home'>".$_SESSION['username']."</a> | <a href='logout.php'>Log out</a>";
}
else echo "<a href='index.php?site=login'>Log in</a>";
?>
</div>
<nav >
<b>
<a class="navidation" href="index.php?site=start" class="active"
<?php
if(!isset($_GET['site']))
{
?> style="color: #cf701e;" <?php
}elseif($_GET['site'] == 'start')
{
?> style="color: #cf701e;" <?php
}
?>>START</a>
<a class="navidation" href="index.php?site=tutorials"
<?php
if(isset($_GET['site'])&&$_GET['site'] == 'tutorials')
{
?> style="text-decoration:underline" <?php
}?>>
TUTORIALS</a>
<?php
if(loggedin()){
echo "<a class='navidation' href='index.php?site=new_tutorial'";
if(isset($_GET['site'])&&$_GET['site'] == 'new_tutorial')
{
echo "style='color: #cf701e;'";
}
echo ">NEW TUTORIAL</a>";
echo "<a class='navidation' href='index.php?site=home'>".$_SESSION['username']."</a>";
}
?>
</b>
</nav>
</header>
<div id="content">
<?php
if(isset($_GET['site'])){
switch($_GET['site']){
case 'start':
include("start.php");
break;
case 'tutorials':
include("xml_tutorials.php");
break;
case 'home':
include("user_xml.php");
break;
case 'new_tutorial':
include("new_tutorial_xml.php");
break;
case 'login':
include("login.php");
break;
}
}
else include("start.php");
?>
</div>
</div>
</body>
</html>