📄 managecharge_3.php
字号:
<?
require_once('include/connection.php');
include('include/admin_or_user.php');
?>
<?
$y=date("Y");
$sql="select room_number,total_prise from charge where time like '".$y."%'";
$rs=odbc_exec($conn,$sql);
$sql="select sum(total_prise) as t from charge where time like '".$y."%'";
$rs1=odbc_exec($conn,$sql);
?>
<!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>
<style type="text/css">
<!--
.STYLE1 {
color: #009900;
font-size: 18px;
}
.STYLE2 {color: #FF0000}
-->
</style>
<link href="css/hotel.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p align="center" class="STYLE1">今年度结账</p>
<table width="30%" border="1">
<tr>
<td width="52%"><div align="center">共计:</div></td>
<td width="48%"> <span class="STYLE2">¥</span><? echo odbc_result($rs1,'t');?></td>
</tr>
</table>
<br />
<table width="100%" border="1">
<tr>
<td width="15%"><div align="center">房间号</div></td>
<td width="85%">收取费用</td>
</tr>
<? while(odbc_fetch_row($rs)) { ?>
<tr>
<td>
<div align="center"><? echo odbc_result($rs,'room_number');?></div></td>
<td> <span class="STYLE2">¥</span><?
if(odbc_result($rs1,'t'))
echo odbc_result($rs1,'t');
else
echo "0";?></td>
</tr>
<? }?>
</table>
<br />
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -