-
Notifications
You must be signed in to change notification settings - Fork 0
/
myQueue.php
103 lines (86 loc) · 1.89 KB
/
myQueue.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
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
<html>
<head>
<style type="text/css">
.auto-style1 {
font-size: large;
}
</style>
</head>
<body>
<h1> My Queue</h1>
<?php
if ($mylocalvar == '')
$mylocalvar = $_GET['myperson'];
echo $mylocalvar . " a";
?>
<FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;"><br>
<br>
<br><span class="auto-style1">Click on an item to remove it from the queue</span></FORM>
<?php $mylocalvar = $_GET['myperson'];
;?>
<?php
if ($db_conn=OCILogon("ora_i0r7", "a41671785", "ug")){
//$cmdstr = "select i.i_number, i.value, i.description, i.available from item i , ownedby o where o.i_number=i.i_number and i.available='F' and o.email <> '$mylocalvar'";
$cmdstr = "select i.i_number, i.value, i.description, i.available from item i , inqueue q
where q.i_number=i.i_number and q.email='$mylocalvar'";
$parsed = OCIParse($db_conn,$cmdstr);
if (!$parsed){
$err = OCIError($db_conn);
echo htmlentities($err['message']);
exit;
}
$r=OCIExecute($parsed, OCI_DEFAULT);
if(!$r){
$err = oci_error($parsed);
echo htmlentities($err['message']);
exit;
}
echo "<br /> Data Retrieved <br />";
?>
<TABLE border="1">
<tr>
<td>
Item
</td>
<td>
Value
</td>
<td>
Description
</td>
<td>
Avail
</td>
</tr>
<?php
while($row = OCI_Fetch_Array($parsed, OCI_BOTH)){
echo "<TR>";
echo "<TD>";
echo "<a href=\"dequeue.php?item=$row[0]&myperson=$mylocalvar\">";
echo $row[0];
echo "</a>";
echo "</TD><TD>";
echo $row[1];
echo "</TD><TD>";
echo $row[2];
echo "</TD><TD>";
echo $row[3];
echo "</TD>>";
echo "<tr />";
}
echo "</TABLE>";
OCILogoff($db_conn);
}
?>
<hr />
<?php echo $_GET['myperson'];?>
<?php echo $_GET['item'];?>
<?php
echo "<br/>";
echo "mylocalvar for using with queries = $mylocalvar";
echo "<br/>";
echo "<br/>";
echo "$cmdstr \n";
?>
</body>
</html>