detail.php
来自「通达OA2007SE源代码 非常好的」· PHP 代码 · 共 299 行
PHP
299 行
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>图书详细资料 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
';
$query = ((''.'SELECT * from BOOK_INFO where BOOK_ID=').$BOOK_ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$BOOK_NAME = $ROW['BOOK_NAME'];
$TYPE_ID = $ROW['TYPE_ID'];
$AUTHOR = $ROW['AUTHOR'];
$ISBN = $ROW['ISBN'];
$PUB_HOUSE = $ROW['PUB_HOUSE'];
$PUB_DATE = $ROW['PUB_DATE'];
$AREA = $ROW['AREA'];
$AMT = $ROW['AMT'];
$PRICE = $ROW['PRICE'];
$BRIEF = $ROW['BRIEF'];
$OPEN = $ROW['OPEN'];
$LEND = $ROW['LEND'];
$BORR_PERSON = $ROW['BORR_PERSON'];
$MEMO = $ROW['MEMO'];
$DEPT = $ROW['DEPT'];
$BOOK_NO = $ROW['BOOK_NO'];
$BOOK_NAME = str_replace ('<', '<', $BOOK_NAME);
$BOOK_NAME = str_replace ('>', '>', $BOOK_NAME);
$BOOK_NAME = stripslashes ($BOOK_NAME);
$AUTHOR = str_replace ('<', '<', $AUTHOR);
$AUTHOR = str_replace ('>', '>', $AUTHOR);
$AUTHOR = stripslashes ($AUTHOR);
$ISBN = str_replace ('<', '<', $ISBN);
$ISBN = str_replace ('>', '>', $ISBN);
$ISBN = stripslashes ($ISBN);
$PUB_HOUSE = str_replace ('<', '<', $PUB_HOUSE);
$PUB_HOUSE = str_replace ('>', '>', $PUB_HOUSE);
$PUB_HOUSE = stripslashes ($PUB_HOUSE);
$PUB_DATE = str_replace ('<', '<', $PUB_DATE);
$PUB_DATE = str_replace ('>', '>', $PUB_DATE);
$PUB_DATE = stripslashes ($PUB_DATE);
$AREA = str_replace ('<', '<', $AREA);
$AREA = str_replace ('>', '>', $AREA);
$AREA = stripslashes ($AREA);
$AMT = str_replace ('<', '<', $AMT);
$AMT = str_replace ('>', '>', $AMT);
$AMT = stripslashes ($AMT);
$PRICE = str_replace ('<', '<', $PRICE);
$PRICE = str_replace ('>', '>', $PRICE);
$PRICE = stripslashes ($PRICE);
$BRIEF = str_replace ('<', '<', $BRIEF);
$BRIEF = str_replace ('>', '>', $BRIEF);
$BRIEF = stripslashes ($BRIEF);
$BRIEF = str_replace (' ', ' ', $BRIEF);
$BRIEF = str_replace ('
', '<br>', $BRIEF);
$BORR_PERSON = str_replace ('<', '<', $BORR_PERSON);
$BORR_PERSON = str_replace ('>', '>', $BORR_PERSON);
$BORR_PERSON = stripslashes ($BORR_PERSON);
$MEMO = str_replace ('<', '<', $MEMO);
$MEMO = str_replace ('>', '>', $MEMO);
$MEMO = stripslashes ($MEMO);
}
$query = ((''.'SELECT TYPE_NAME from BOOK_INFO A,BOOK_TYPE B where A.TYPE_ID=B.TYPE_ID and A.BOOK_ID=').$BOOK_ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$TYPE_NAME = $ROW['TYPE_NAME'];
}
echo '
<body class="bodycolor" topmargin="5">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle">';
echo '<s';
echo 'pan class="big3"> 图书详细信息</span>
</td>
</tr>
</table>
<table border="0" cellspacing="1" width="450" class="small" bgcolor="#000000" cellpadding="3" align="center">
<form name="form1">
<tr>
<td nowrap class="TableData">部门:</td>
<td nowrap class="TableData">
';
$query = (((''.'SELECT B.DEPT_NAME from BOOK_INFO A,DEPARTMENT B where A.DEPT=B.DEPT_ID and A.DEPT=\'').$DEPT).'\'');
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$DEPT_NAME = $ROW[0];
}
echo ' ';
echo $DEPT_NAME;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">书名:</td>
<td nowrap class="TableData">
';
echo $BOOK_NAME;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">编号:</td>
<td nowrap class="TableData">
';
echo $BOOK_NO;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData">图书类别:</td>
<td nowrap class="TableData">
';
echo $TYPE_NAME;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">作者:</td>
<td nowrap class="TableData">
';
echo $AUTHOR;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">ISBN号:</td>
<td nowrap class="TableData">
';
echo $ISBN;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">出版社:</td>
<td nowrap class="TableData">
';
echo $PUB_HOUSE;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">出版日期:</td>
<td nowrap class="TableData">
';
echo $PUB_DATE;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">存放地点:</td>
<td nowrap class="TableData">
';
echo $AREA;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">数量:</td>
<td nowrap class="TableData">
';
echo $AMT;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">未还记录:</td>
<td class="TableData">
';
$query = (((''.'SELECT * from BOOK_MANAGE where BOOK_NO=\'').$BOOK_NO).'\' and BOOK_STATUS=\'0\'');
$cursor = exequery ($connection, $query);
$LEND_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
++$LEND_COUNT;
$BUSER_ID = $ROW['BUSER_ID'];
$BORROW_DATE = $ROW['BORROW_DATE'];
$RETURN_DATE = $ROW['RETURN_DATE'];
$query1 = (((''.'SELECT * from USER where USER_ID=\'').$BUSER_ID).'\'');
$cursor1 = exequery ($connection, $query1);
if ($ROW1 = mysql_fetch_array ($cursor1))
{
$USER_NAME = $ROW1['USER_NAME'];
}
if (($LEND_COUNT == 1))
{
echo '<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3" align="center" >
<tr align="center">
<td nowrap class="TableData">借书人</td>
<td nowrap class="TableData">借书日期</td>
<td nowrap class="TableData">归还日期</td>
<td nowrap class="TableData">数量</td>
</tr>
';
}
echo ' <tr align="center">
<td nowrap class="TableData">';
echo $USER_NAME;
echo '</td>
<td nowrap class="TableData">';
echo $BORROW_DATE;
echo '</td>
<td nowrap class="TableData">';
echo $RETURN_DATE;
echo '</td>
<td nowrap class="TableData">1</td>
</tr>
';
}
if ((0 < $LEND_COUNT))
{
echo '</table>';
}
else
{
echo '无记录';
}
echo ' </td>
</tr>
<tr>
<td nowrap class="TableData" width="120">价格:</td>
<td nowrap class="TableData">
';
echo $PRICE;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">内容简介:</td>
<td nowrap class="TableData">
';
echo $BRIEF;
echo ' </td>
</tr>
<tr>
<td nowrap class="TableData" width="120">借阅范围:</td>
<td nowrap class="TableData">
';
if (($OPEN == '1'))
{
echo ' 全体
';
}
else
{
echo ' 本部门
';
}
echo ' </td>
</tr>
<tr>
<td nowrap class="TableData" width="120">借阅状态:</td>
<td nowrap class="TableData">
';
if (($LEND == '1'))
{
echo '已借出
';
}
else
{
echo '未借出
';
}
echo ' </td>
</tr>
<tr>
<td nowrap class="TableData" width="120">新建人:</td>
<td nowrap class="TableData">
';
echo $BORR_PERSON;
echo '
</td>
</tr>
<tr>
<td nowrap class="TableData" width="120">备注:</td>
<td nowrap class="TableData">
';
echo $MEMO;
echo '
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2">
<input type="button" value="关闭" class="BigButton" onClick="javascript:window.close();">
</td>
</tr>
</form>
</table>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?