-
Notifications
You must be signed in to change notification settings - Fork 0
/
dequeue.php
55 lines (42 loc) · 1.32 KB
/
dequeue.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
<html>
<body>
<!--
<br />
<FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;"></FORM>
-->
<?php //echo $_GET['myperson'];?>
<?php //echo $_GET['item'];?>
<?php //$mylocalvar = $_GET['myperson'];?>
<?php
if ($mylocalvar == '')
$mylocalvar = $_GET['myperson'];
$myitem = $_GET['item'];
echo $mylocalvar . "a" . $myitem;
?>
<?php
if ($db_conn=OCILogon("ora_i0r7", "a41671785", "ug")){
//$cmdstr = 'INSERT INTO InQueue(theDate, I_Number, Email) VALUES (SYSDATE, \'';
//$cmdstr .= $_GET['item'] . '\', \'' . $_GET['myperson'] . '\')';
//$cmdstr = 'DELETE FROM InQueue Q WHERE Q.email = ' . $_GET['myperson'] . ' and Q.I_Number = ' . $_GET['item'];
$cmdstr = "DELETE FROM InQueue Q WHERE Q.email = '$mylocalvar' and Q.I_Number = '$myitem '";
// $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;
}
OCICommit($db_conn);
OCILogoff($db_conn);
}
include ('myQueue.php');
?>
</body>
</html>