日期:2014-05-17 浏览次数:20560 次
<?php
function dzdate($sql,$date1,$date2)
{
if( !empty($date1) && !empty($date2) ){
$sql = $sql." and `dzdate` >= '$date1' and `dzdate` <= '$date2' ";
}
if( !empty($date1) && empty($date2) ){
$sql = $sql." and `dzdate` = '$date1'";
}
if( empty($date1) && !empty($date2) ){
$sql = $sql." and `dzdate` <= '$date2'";
}
return $sql;
}
<?php
require_once('inc/function.inc.php');
header("Content-Type: text/html; charset=utf-8");
require_once('inc/mysql.inc.php');
$weekname=array('星期日','星期一','星期二','星期三','星期四','星期五','星期六');
?>
<script language=javascript src="images/date.js"></script>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
.STYLE2 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<H1><SPAN class=action-span1>(<a href="tongji.php" style="color:#FF0000">到诊病人图表</a>) (<a href="tongji_yy.php" style="color:#9cacaf">预约病人图表</a>) (<a href="tongji_dj.php" style="color:#9cacaf">登记病人图表</a>)</SPAN>
<DIV style="CLEAR: both"></DIV></H1>
<div class="form-div">
<form name="searchForm" action="" id="Form" method="get">
<img height="22" alt="SEARCH" src="images/start/icon_search.gif" width="26" border="0" /> 到诊日期<span class="add2">
<input name="date1" type="text" id="date1" onfocus="setday(this)" size="15" />
- </span><span class="add2">
<input name="date2" type="text" id="date2" onfocus="setday(this)" size="15" />
</span>
<input name="submit2" type="submit" class="button" value=" 搜索 " />
</form>
</div>
<table width="99%" align="center" cellpadding="3" cellspacing="1">
<tbody>
<tr>
<th width="20%" height="24" bgcolor="#569EAB"><span class="STYLE1">到诊日期</span></th>
<th width="20%" bgcolor="#569EAB"><span class="STYLE1">星期</span></th>
<th width="20%" bgcolor="#569EAB"><span class="STYLE1">预约数量</span></th>
<th width="20%" bgcolor="#569EAB"><span class="STYLE1">到诊数量</span></th>
<th width="20%" bgcolor="#569EAB"><span class=&q