-
Notifications
You must be signed in to change notification settings - Fork 1
/
literary.php
87 lines (86 loc) · 3.2 KB
/
literary.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
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device width, initial-scale=1, shrink-to-fit=no">
<title>Luna - Login</title>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet">
<link href="dramacss.css" rel="stylesheet">
</head>
<body style="background-color: #C3C3E5; color: #443266">
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a href="#" class="navbar-brand">Krieva</a>
<div class="collapse navbar-collapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a href="userpage.php" class="nav-link">Home</a>
</li>
<li class="nav-item">
<a href="chooseevent.php" class="nav-link">Register</a>
</li>
</ul>
</div>
</nav>
</header>
<div class="container-fluid">
<div class="row" style="padding-top: 60px;">
<div class="col-2"></div>
<div class="col-7">
<h1 class="text-center">Literary</h1>
</div>
</div>
<div class="row" style="padding-top: 20px;">
<div class="col-2"></div>
<div class="col-7">
<main>
<?php
require_once("config.php");
$query = 'SELECT event_name, details FROM events';
$response = @mysqli_query($dbc, $query);
if($response) {
while ($row = mysqli_fetch_array($response)) {
if($row['event_name']=='Literary')
echo '<section><h2 id = "Starter">'.$row['details'].'</h2></section>';
}
}
require_once ("temp.php");
$query = 'SELECT list, description FROM literary';
$response = @mysqli_query($dbc, $query);
if($response) {
while ($row = mysqli_fetch_array($response)) {
echo ' <section> <h3 style="display: none" id = "' .$row['list'] .'">' .$row['description'] .'</h3></section>';
}
}
?>
</main>
</div>
<nav class='sidebar col-2'><ul class="nav nav-pills flex-column">
<?php
require_once('config.php');
$query = 'SELECT list FROM literary ' ;
$response = @mysqli_query($dbc, $query);
if($response) {
while ($row = mysqli_fetch_array($response)) {
echo '<li class="nav-item"><a href="#" class="nav-link" onclick="reply_click(this.textContent)">' . $row['list'] . '</a></li>';
}
}
?>
</ul>
</nav>
</div>
</div>
<script type="text/javascript">
localStorage.setItem("pre", "Starter");
function reply_click(clicked_id)
{
var prev = document.getElementById(localStorage.getItem("pre"));
var dis = document.getElementById(clicked_id);
dis.style.display = "block";
prev.style.display = "none";
localStorage.setItem("pre", clicked_id);
}
</script>
</body>
</html>