-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_game_info.php
More file actions
156 lines (126 loc) · 6.13 KB
/
Copy pathedit_game_info.php
File metadata and controls
156 lines (126 loc) · 6.13 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<?php
session_start();
include("functions.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, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Home Page | WGC</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!--More CSS features by author-->
<link rel="stylesheet" href="style_WestGames.css">
</head>
<body>
<nav class="navbar navbar-expand-xl navbar-light" style="background-color: #FAFFF2;">
<a class="navbar-brand" href="home_page_admin.php">West Games Club</a>
<p class="mr-auto" id="welcomeMsg"> Welcome <?php
$id = $_SESSION['id'];
$query = "SELECT Users.firstName FROM Users WHERE id=" . $id;
$result = mysqli_query($link, $query);
$row = mysqli_fetch_assoc($result);
echo($row['firstName']) ?>!</p>
<!--nav bar toggler-->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<!--nav bar with menu and collapse features-->
<div class="collapse navbar-collapse" id="navbarCollapse">
<form class="navbar-form navbar-right form-inline ml-auto" method="post">
<div class="form-group">
<input type="text" id="searchGame" name="searchGame" placeholder="search a game"
class="form-control mr-2"
value="<?php echo addslashes($_POST['searchGame']); ?>"/>
<input type="submit" name="submit" class="btn btn-success my-2 my-sm-0" value="Search Game">
</div>
</form>
<ul class="navbar-nav mr-auto ml-auto">
<li class="nav-item active dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Admin Functions
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="list_matches.php">List of Matches</a>
<a class="dropdown-item" href="leader_board_game.php">Leader Board - Game</a>
<a class="dropdown-item" href="leader_board_member.php">Leader Board - Member</a>
<a class="dropdown-item" href="won_percentage.php">Statics: Won-Played Percentage</a>
<a class="dropdown-item" href="matches_per_day.php">Statics: Number of Matches per Day</a>
<a class="dropdown-item" href="game_list.php">Game Management</a>
</div>
</li>
<li class="nav-item active">
<a class="nav-link" href="home_page_admin.php">Home Page <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="game_record_admin.php">Record Game</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="index.php?logout=1">Log Out</a>
</li>
</ul>
</div>
</nav>
<!--contents on page-->
<div class="jumbotron jumbotron-fluid">
<div class="container text-center">
<?php displayError() ?>
<div class="row">
<form method="post" class="mx-auto">
<table class="table-responsive table-dark"><h4 class="display-5">
Update Game Information</h4>
<tr>
<td>Game ID</td>
<td><?php echo $_GET['gid']; ?></td>
</tr>
<tr>
<td>Game Name</td>
<td><?php echo $_GET['gn']; ?></td>
</tr>
<tr>
<td>Number of Players</td>
<td><?php echo $_GET['gnp']; ?></td>
</tr>
<tr>
<td>Game Image</td>
<td><?php echo "<img style='width: 8rem;' src = 'images/" .$_GET['gimg']. "'>"; ?></td>
</tr>
<tr>
<td>Game Rating</td>
<td><input type="text" class="form-control text-center" name="newRating" value="<?php echo $_GET['gr']; ?>"/></td>
</tr>
<tr>
<td>Game Description</td>
<td><textarea class="form-control text-left" cols="70" rows="10" name="newGameDes"><?php echo $_GET['gdes']; ?></textarea></td>
</tr>
</table>
<input class="btn btn-warning my-2 my-sm-0\" type="submit" name="updateGameInfo" value="Update"/>
<input class="btn btn-warning my-2 my-sm-0\ ml-5" type="submit" name="cancelGameEdit" value="Cancel"/>
</form>
</div>
</div>
</div>
<!--footer-->
<div class="footer">
<div class="view1">
Copyright © 2019 West Games Club
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</body>
</html>