other_prise.php
来自「SetCursor CWnd LoadCursor DestroyWindow 」· PHP 代码 · 共 59 行
PHP
59 行
<?
require_once('include/connection.php');
include('include/admin_or_user.php');
?>
<?
$sql="select * from dept_2 where room_number='".base64_decode($_GET['room_number'])."' order by id ";
$sql1="select * from coustom where room_number='".base64_decode($_GET['room_number'])."' ";
$detail=odbc_exec($conn,$sql);
$detail1=odbc_exec($conn,$sql1);
?>
<!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>
<table width="600" border="1" align="center">
<tr>
<td><div align="center">编号</div></td>
<td><div align="center">时间</div></td>
<td><div align="center">其它费用</div></td>
<td><div align="center">备注</div></td>
</tr>
<? $total=0;
$sun=0;
while(odbc_fetch_row($detail)) {
$total=$total+1;
$sun=$sun+odbc_result($detail,'other_prise');
?>
<tr>
<td><div align="center">
<? echo $total;?></div></td>
<td><div align="center">
<? echo odbc_result($detail,'time');?></div></td>
<td><div align="center">
<? echo odbc_result($detail,'other_prise');?></div></td>
<td><div align="center">
<? echo odbc_result($detail,'descript');?></div></td>
</tr>
<? } ?>
<tr>
<td colspan="2"><div align="center">房间其它费用</div></td>
<td><div align="center">
<? echo odbc_result($detail1,'other_prise')-$sun;?></div></td>
<td> </td>
</tr>
<?
if($total==0)
echo "无记录";
odbc_close($conn);
?>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?