📄 meneymanage.php
字号:
<?
require_once('../include/connectionadmin.php');
?>
<?
if(isset($_POST['s1']))
{
$tempstr="";
if(!empty($_POST['year']))
$tempstr.=$_POST['year'];
if(!empty($_POST['month']))
$tempstr.="-".$_POST['month'];
$sql="select sum(dieing_prise) as dp ,sum(other_prise) as op from dept_2 where time like '".$tempstr."%'";
$rs=odbc_exec($conn,$sql);
$sql="select sum(total_prise) as tp from dept_3 where time like '".$tempstr."%'";
$rs1=odbc_exec($conn,$sql);
$sql="select sum(total_prise) as tp,sum(other_prise) as to 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>';
if(odbc_fetch_row($rs))
$p1=odbc_result($rs,'dp');
?>
<form action="" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form2" >
<table width="500" border="1">
<tr>
<td width="140">房间收取费用:</td>
<td width="267"> <span class="redclore">¥</span> <? if(odbc_fetch_row($rs2))
echo $p0=odbc_result($rs2,'tp'); $p3=odbc_result($rs2,'to');?></td>
</tr>
<tr>
<td>餐饮收取费用:</td>
<td> <span class="redclore">¥</span> <?
if(isset($p1))
echo $p1;?></td>
</tr>
<tr>
<td>其它收取费用:</td>
<td> <span class="redclore">¥</span> <?
echo $p3;?></td>
</tr>
<tr>
<td>采取部支出:</td>
<td> <span class="redclore">¥</span> <?
if(odbc_fetch_row($rs1))
echo ($p2=odbc_result($rs1,'tp'));?></td>
</tr>
<tr>
<td>结余:</td>
<td colspan="2"> <span class="redclore">¥</span><? echo $p0+$p1+$p3-$p2;?></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>
<? }?>
<p \>
<p \>
<script src="../copyright.inc">
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -