-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelete.php
More file actions
executable file
·105 lines (87 loc) · 3.39 KB
/
Copy pathdelete.php
File metadata and controls
executable file
·105 lines (87 loc) · 3.39 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Game Database</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- css -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/theme.bootstrap.css" rel="stylesheet">
<link href="css/select2.css" rel="stylesheet"/>
<!-- scripts -->
<script src="js/jquery-1.10.1.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/select2.js"></script>
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<script>
$(document).ready(function() { $("#e1").select2({ placeholder: "Select a Video Game",width: "element"}); });
</script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="index.php">Game On!</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="index.php">Home</a></li>
<li><a href="videogame.php">Video Games</a></li>
</ul>
<form class="navbar-search pull-right" action="search.php" action="get">
<input type="text" class="search-query" name="search" placeholder="Search">
</form>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<?php ini_set('display_errors',1);
error_reporting(E_ALL);
include_once("php/mysql.php");
if(isset($_POST['submit'])) {
if(isset($_POST['id'])) {
$vg_info = explode(',',$_POST['id']);
$result = delete_video_game($vg_info[0]);
echo "<div class='alert alert-danger'>
<button type='button' class='close' data-dismiss='alert'>×</button>
Video Game '".$vg_info[1]."' Deleted!</div>";
echo "<center><a href='videogame.php' class='btn btn-primary'>Back to Video Games</a></center>";
}
}
?>
</div>
<div class="container">
<form class="form-horizontal" id="delete-game" action="delete.php" method="post" data-validate="parsley">
<legend>Delete Video Game</legend>
<div class="control-group">
<label class="control-label" for="name">Video Game</label>
<div class="controls">
<select style="width: 300px;" id="e1" name="id" data-required="true">
<option></option>
<?php
build_video_game_options();
?>
</select>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-danger" id="delete" name="submit" value="delete">Delete</button>
<a href="videogame.php" class="btn">Cancel</a>
</div>
</form>
</div>
</div>
</body>
</html>