<?php
/*********************************************************      
 程序说明：         
    功能说明：话务统计显示上部页面
              
    调用关系：调用: header.inc    
              被调用:        
 
    变量说明：

    作者：  
      
修改注释：      
NO.1      
姓名：          
时间：
修改说明：
*********************************************************/
require("../../inc/header.inc");
$helpId = "3.5"; 
?>
<script language="javascript">
function selectDate(){
	var url,tmpDate;
	tmpDate=document.selectForm.date.options[document.selectForm.date.selectedIndex].value;
	url="./cstaListDown.php?date="+tmpDate;
	window.parent.main.location.href=url;
}
function selectGraph(){
	var url,tmpDate;
	tmpDate=document.selectForm.date.options[document.selectForm.date.selectedIndex].value;
	url="./cstaShowGraph.php?date="+tmpDate;
	window.parent.main.location.href=url;
}
</script>
<base target="main">
<body topmargin="5" leftmargin="5">
<form method="POST" action="./cstaListDown.php" name="selectForm">
<table border="1" width="100%" bordercolordark="#FFFFFF" bordercolor="#808080" cellspacing="0">
  <tr bgcolor="#E6E6E6">
    <td width="90%">Date:       
    <select size="1" name="date" onChange="javascript:selectDate()">
	<?php
	for($i=50;$i >= 0;$i--){
		$dayStr=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$i,date("Y")));
		if($date == $dayStr){
			echo "<option value=\"$dayStr\" selected>$dayStr</option> ";
		}elseif($i == 0 && !isset($date)){
			echo "<option value=\"$dayStr\" selected>$dayStr</option> ";
			$date=$dayStr;
		}else{
			echo "<option value=\"$dayStr\">$dayStr</option> ";
		}
	}
	echo "</select>";
	echo "&nbsp;&nbsp;&nbsp;";
	
//	echo "<input type=\"submit\" name=\"sbmTable\" value=\"Records\">"; 
//	echo "&nbsp;&nbsp;&nbsp;";
//	echo "<input type=\"button\" name=\"sbmGraph\" value=\"Graph\" onClick=\"javascript:selectGraph()\">";
	echo "</td></tr>";
?>     
</table>
</form> 
</body>    
</html>