📄 meneymanage.php
字号:
<?
require_once('include/connection.php');
?>
<?
if(isset($_POST['s1']))
{
$tempstr="";
if(!empty($_POST['year']))
$tempstr.=$_POST['year'];
if(!empty($_POST['month']))
$tempstr.="-".$_POST['month'];
$sql="select sum(total_prise) as tp,sum(room_prise) as tr,sum(dieing_prise) as td from charge where time like '".$tempstr."%'";
$rs2=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>
<link href="css/hotel.css" rel="stylesheet" type="text/css" />
</head>
<script>
function fun1()
{
if(document.all.year.value=="")
{
alert("请选择年份");
return false;
}
else
return true;
}
</script>
<body>
<p class="greenclore">账户管理</p>
<form action="" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form1" onsubmit="return fun1()">
<table width="715" border="0">
<tr>
<td width="209"><span class="STYLE3">日期:
<label>
<select name="year" id="year">
<option value="" >请选择</option>
<?
$year=date(Y);
echo "<option value='$year'>$year</option>";
$year-=1;
echo "<option value='$year'>$year</option>";
?>
</select>
</label>
<select name="month" id="month">
<option value="" >请选择</option>
<?
$m=1;
while($m<=12)
{
echo "<option value='$m'>$m".'月'."</option>";
$m++;
}
?>
</select>
</span></td>
<td width="10"> </td>
<td width="482"><span class="STYLE3" align="right">
<input name="s1" type="submit" id="s1" value="查询" />
<input name="s22" type="reset" id="s22" value="重置" />
</span></td>
</tr>
</table>
</form>
<? if(isset($_POST['s1'])) {
echo '<p class="greenclore">';
echo $tempstr;
echo '</p>';
?>
<form action="" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form2" >
<? if(odbc_fetch_row($rs2)) { ?>
<table width="500" border="1">
<tr>
<td width="140">房间收取费用:</td>
<td width="267"> <span class="redclore">¥</span> <?
echo odbc_result($rs2,'tr');?></td>
</tr>
<tr>
<td>餐饮收取费用:</td>
<td> <span class="redclore">¥</span> <?
echo odbc_result($rs2,'td');?></td>
</tr>
<tr>
<td>共:</td>
<td colspan="2"> <span class="redclore">¥</span><? echo odbc_result($rs2,'tp');?></td>
</tr>
</table>
<? }?>
<table width="100" border="0" align="center">
<tr>
<td> <a href="moneydetail.php?key=<? echo $tempstr;?>" target="_blank">详细信息</a></td>
</tr>
</table>
</form>
<? }
odbc_close($conn);
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -