📄 removebookroom.php
字号:
<?
require_once('include/connection.php');
include('include/admin_or_user.php');
require_once('include/sqlfuns.php');
$room=base64_decode($_GET['room']);
$roomarray=explode(" ",$room);
$i=0;
while(isset($roomarray[$i])&&$roomarray[$i]!='')
{ $state=-1;
$selectsql=sprintf("select id from book where room_number like %s",GetSQLValueString("%".$roomarray[$i]."%", "text"));
$selectresult=odbc_exec($conn,$selectsql);
while(odbc_fetch_row($selectresult))
{ $state++;}
if($state==0)
{$updateroomsql = sprintf("update room set room_state=-1 where room_number=%s",
GetSQLValueString($roomarray[$i], "text"));
odbc_exec($conn,$updateroomsql);
}
$i++;
}
$delsql="delete from book where id=".$_GET['bookid'];
odbc_exec($conn,$delsql);
odbc_close($conn);
echo "<script>window.open('bookin.php',target='usermainframe');</script>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -