-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategoryitems.php
More file actions
executable file
·105 lines (102 loc) · 2.52 KB
/
Copy pathcategoryitems.php
File metadata and controls
executable file
·105 lines (102 loc) · 2.52 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
<?php
session_start();
if (!isset($_SESSION['user']))
{
header("Location: login.php");
}
?>
<?php
require "config.php";
error_reporting(E_ALL);
ini_set("display_errors",1);
$cat=$_GET['id'];
$query1=mysql_query("SELECT id, descr FROM courts WHERE type = $cat ORDER BY descr");
$query2=mysql_query("SELECT descr FROM categories WHERE id = $cat");
$row2 = mysql_fetch_array($query2);
?>
<html>
<head><title><?php echo $row2['descr']; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="images/favicon.ico" />
<link href= "css/adminsettingsstyle.css" rel="stylesheet" type="text/css">
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript">
<!--
function popup(url)
{
var width = 590;
var height = 200;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=no';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'windowname5', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->
</script>
<script type="text/javascript">
function confirmDelete() {
return confirm("Are you sure you wish to delete this entry?");
}
</script>
<script type="text/javascript">
function show_alert()
{
alert("The form data will be added to your database.");
}
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#commentForm").validate();
});
</script>
</head>
<body>
<table>
<tr>
<td><FONT SIZE="4"><?php echo $row2['descr']; ?></FONT></td>
<td align="right"><a href='#' onClick='window.location.reload( true );'>Reload</a></td>
<td><a href="adminsettings.php">Back</a></td>
</tr>
</table>
<h4>Items</h4>
<table>
<tr>
<td>
<input type="submit" value="New Item" onclick="popup('insertitem.php?catid=<?php echo $cat; ?>')" class="button" />
</td>
</tr>
<tr>
<td>
<?php
echo"<table>
<thead>
<tr>
<th>Item</th>
<th>Delete</th>
</tr>
</thead>";
while($row1 = mysql_fetch_array($query1))
{
echo "<tr>";
echo "<td><a href='javascript: void(0)' onclick=popup('updateitem.php?itemid=" . $row1['id'] . "');>" . $row1['descr'] . "</td>";
echo "<td><A href='deletemod.php?g=".$row1['id']."' onclick='return confirmDelete();'>Delete it</A></td>";
echo "</tr>";
}
echo "</table>";
?>
</td>
</tr>
</table>
</body>
</html>