-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetinventory.php
More file actions
153 lines (141 loc) · 4.45 KB
/
Copy pathsetinventory.php
File metadata and controls
153 lines (141 loc) · 4.45 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
<?php
require_once('auth.php');
?>
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="febe/style.css" type="text/css" media="screen" charset="utf-8">
<script src="argiepolicarpio.js" type="text/javascript" charset="utf-8"></script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<!--sa poip up-->
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
</head>
<body>
<div id="container">
<div id="adminbar-outer" class="radius-bottom">
<div id="adminbar" class="radius-bottom">
<a id="logo" href="dashboard.php"></a>
<div id="details">
<a class="avatar" href="javascript: void(0)">
<img width="36" height="36" alt="avatar" src="img/avatar.jpg">
</a>
<div class="tcenter">
Hi
<strong>Admin</strong>
!
<br>
<a class="alightred" href="../index.php">Logout</a>
</div>
</div>
</div>
</div>
<div id="panel-outer" class="radius" style="opacity: 1;">
<div id="panel" class="radius">
<ul class="radius-top clearfix" id="main-menu">
<li>
<a href="dashboard.php">
<img alt="Dashboard" src="img/m-dashboard.png">
<span>Dashboard</span>
</a>
</li>
<li>
<a href="route.php">
<img alt="Statistics" src="img/m-custom.png">
<span>Bus</span>
</a>
</li>
<li>
<a class="active" href="setinventory.php">
<img alt="Statistics" src="img/m-statistics.png">
<span>Seat Inventory</span>
</a>
</li>
<div class="clearfix"></div>
</ul>
<div id="content" class="clearfix">
<label for="filter">Filter</label> <input type="text" name="filter" value="" id="filter" />
<table cellpadding="1" cellspacing="1" id="resultTable">
<thead>
<tr>
<th style="border-left: 1px solid #C1DAD7"> Date </th>
<th> Bus Type </th>
<th> Route </th>
<th> Seat Number </th>
<th> Transaction Code </th>
<th> Action </th>
</tr>
</thead>
<tbody>
<?php
include('../db.php');
$result = mysql_query("SELECT * FROM reserve");
while($row = mysql_fetch_array($result))
{
echo '<tr class="record">';
echo '<td style="border-left: 1px solid #C1DAD7;">'.$row['date'].'</td>';
$rrad=$row['bus'];
$results = mysql_query("SELECT * FROM route WHERE id='$rrad'");
while($rows = mysql_fetch_array($results))
{
echo '<td><div align="right">'.$rows['type'].'</div></td>';
echo '<td><div align="right">'.$rows['route'].'</div></td>';
}
echo '<td><div align="right">'.$row['seat'].'</div></td>';
echo '<td><div align="right">'.$row['transactionnum'].'</div></td>';
echo '<td><div align="center"><a href="#" id="'.$row['id'].'" class="delbutton" title="Click To Delete">delete</a></div></td>';
echo '</tr>';
}
?>
</tbody>
</table>
</div>
<div id="footer" class="radius-bottom">
2011-12 ©
<a class="afooter-link" href="">TurboAdmin 1.1</a>
by
<a class="afooter-link" href="">Begie</a>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</div>
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "deleteinventory.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>
</body>
</html>