-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallbarcodes.php
45 lines (35 loc) · 1.04 KB
/
allbarcodes.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
<?php
session_start();
include ('../../checklist/includes/db.inc.php');
include ('../../checklist/includes/loggedin.php');
?>
<html>
<head><title>All Items Currently Checked Out</title>
<script type="text/javascript" language="javascript">
function goToRecord(bc){
// alert(bc);
document.iAmAForm.elements["barcode_field"].value = bc;
document.iAmAForm.elements["bc_action"].value = 'lookup';
document.iAmAForm.submit();
}
</script>
</head>
<body>
<form action="index.php" method="post" name="iAmAForm">
<input type="hidden" name="barcode_field" value="" />
<input type="hidden" name="bc_action" value="" />
</form>
<?php
$db = CreateConnection();
$sql = "SELECT * FROM eqp_out WHERE 1";
$result = mysql_query($sql,$db);
if (mysql_num_rows($result)==0) {
echo "<h3>No Items Currently Checked Out</h3>";
} else {
echo "<h3>All Items Currently Checked Out:</h3>";
while ($row = mysql_fetch_assoc($result)) {
print "<a href='javascript:goToRecord(\"".$row['barcode']."\");'>".$row['barcode'] . "</a> " . $row['item']."<br />";
}
}
?>
</body></html>