-
Notifications
You must be signed in to change notification settings - Fork 9
/
dictate-unlock2.php
39 lines (35 loc) · 1.14 KB
/
dictate-unlock2.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
<?php
############################################
# ThaiRIS (Thai Radiology Information System)
# Version: 1.0
# File last modified: 8 Nov 2016
# File name:
# Description :
# http://www.thairis.net
# Email : info.xraythai@gmail.com
############################################
include ("session.php");
include ("connectdb.php");
$ORDERID = $_GET['ORDERID'];
$USERID = $_GET['USERID'];
$sql ="select LOCKBY FROM xray_request_detail WHERE ID='$ORDERID'";
$result = mysql_query($sql);
while ($row =mysql_fetch_array($result))
{
$USERLOCKID = $row['LOCKBY'];
}
if ($USERLOCKID == '')
{
echo "<form action=dictate.php><input type=hidden name='ORDERID' value='".$ORDERID."'><input type=submit value=Start></form>";
}
if (($USERLOCKID !== '')and ($USERLOCKID !== $userid))
{
echo "<center><img src=icon/lock.gif onClick=unlockexam2(".$row['ORDERID'].")></center>";
}
if ($USERLOCKID == $userid)
{
$sql = "UPDATE xray_request_detail SET LOCKBY ='' WHERE xray_request_detail.ID = '$ORDERID'";
mysql_query($sql);
echo "<form action=dictate.php><input type=hidden name='ORDERID' value='".$ORDERID."'><input type=submit value=Start></form>";
}
?>