-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
135 lines (115 loc) · 4.87 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?php
require('common.php');
// retrieve char list
$query = "SELECT discordname, charname, charclass, setno, time FROM characters ORDER BY discordname";
try
{
$stmt = $db->query($query);
}
catch(PDOException $ex)
{
die("Failed to run query");
}
$charrows = $stmt->fetchAll();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title>Members stats</title>
<meta name="description" content="Stats for each members of Miracle">
<meta name="author" content="sagiri">
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="https://fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="images/favicon.png">
<!-- Vue JS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<script src="https://unpkg.com/vue"></script>
<style>
.ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
.li {
float: left;
}
.li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
.li a:hover {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
</style>
</head>
<body>
<div class="nav-bar">
<ul class="ul">
<li class="li active"><a href="index.php">Char List</a></li>
<li class="li"><a href="statlist.php">Stat List</a></li>
<li class="li"><a href="">Stat simulator(wip)</a></li>
<li class="li"><a href="data/index.html">Knowledge Base</a></li>
</ul>
</div>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<div class="container" id="app">
<div class="row">
<div class="six columns" style="margin-top:5%">
<h4>Characters list</h4>
</div>
</div>
<table class="u-full-width">
<thead>
<tr>
<th>Discord name</th>
<th>IGN</th>
<th>Class</th>
<th>timestamp</th>
<th>Gears</th>
<th>Stats</th>
</tr>
</thead>
<tbody>
<?php
foreach($charrows as $charrow){
echo '<tr><td>'.$charrow['discordname'].'</td>';
echo '<td>'.$charrow['charname'].'</td>';
echo '<td>'.$charrow['charclass'].'</td>';
echo '<td>'.$charrow['time'].'</td>';
echo '<td><button class="button" href="update.php?setno='.$charrow['setno'].'" disabled>Update</button></td>';
echo '<td><a class="button button-primary" href="update.php?setno='.$charrow['setno'].'">Update</a></td></tr>';
}
?>
</tbody>
</table>
<a class="button button-primary" href="update.php">New character info</a>
<!-- Always wrap checkbox and radio inputs in a label and use a <span class="label-body"> inside of it -->
<!-- Note: The class .u-full-width is just a utility class shorthand for width: 100% -->
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
</body>
</html>