<?php
/*********************************************************      
 程序说明：         
    功能说明：话务查询条件选择

    调用关系：调用:header.inc     
              被调用:      
 
    变量说明：
     返回值：无

 作者：
      
修改注释：      
NO.1      
姓名：            
时间：      
修改说明：      
*********************************************************/  
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<form method="post" name="selectform"  id="selectform" action="dataQueryDown.php" >  

<?php
adjust_head_frame("up");
adjust_title_head_frame("up");

$sysTypeNo=390;

switch($sysTypeNo){
	case '390':
		$helpId = "3.5";
		$callTypeDefArr=array('ISUP','VMS APP');//,'VPS APP','Invalid Calls');
		break;
	default:
		echo "Can not support this sysTypeNo($sysTypeNo)";
		exit();
}

?>

<base target="main">

<script language="javascript">
function showReportPage(){
	var url,sel_date,call_type,key_sys_id;
	sel_date=document.selectform.sel_date.value;
	call_type=document.selectform.call_type.value;
	key_sys_id=document.selectform.key_sys_id.value;
	url="./dailyReportDown.php?sel_date="+sel_date+"&call_type="+call_type+"&key_sys_id="+key_sys_id;
	window.parent.main.location.href=url;
}
</script>


<?php
//page title and help
echo "<table id=\"table_up\" border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"75%\" align=\"left\">";
echo "Performance > VSS > Query";
echo "</td>";
echo "<td align=\"right\" title=\"Help\">";
//showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "<td align=\"left\">";

//select options
/*
$pubDb='OMC_PUB';
$sqlStr="SELECT sysTypeName,maxSysNum,maxSubSysNum FROM sysConf WHERE sysTypeNo='390'";
$result=mysqli_query($pubConn,$sqlStr);
$rows=mysqli_fetch_array($result);
echo "System&nbsp;";
//echo "{$rows[maxSysNum]},{$rows[maxSubSysNum]}";
echo "<select name=\"sysId\" size=1>";	
for($i=0;$i<$rows[maxSysNum];$i++){
	for($j=0;$j<$rows[maxSubSysNum];$j++){
		$tmpSysId=$sysTypeNo.'_'.$i.'_'.$j;
		$tmpSysName=$rows[sysTypeName].'_'.$i.'_'.$j;
		echo "<option value=\"$tmpSysId\">$tmpSysName</option> ";
	}
}
echo "</select>";
echo "&nbsp;&nbsp;";
*/
echo "$strSystemID:";
echo "<select name=\"key_sys_id\" size=1>";    
	echo "<OPTION value=\"0\">0</OPTION>";
	echo "<OPTION value=\"1\">1</OPTION>";
	echo "<OPTION value=\"2\">2</OPTION>";
	echo "<OPTION value=\"3\">3</OPTION>";
	echo "<OPTION value=\"4\">4</OPTION>";
	echo "<OPTION value=\"5\">5</OPTION>";
	echo "<OPTION value=\"6\">6</OPTION>";
	echo "<OPTION value=\"7\">7</OPTION>";
	echo "<OPTION value=\"8\">8</OPTION>";
	echo "<OPTION value=\"9\">9</OPTION>";
	echo "<OPTION value=\"10\">All</OPTION>";
echo "</SELECT>";
echo "Call Type&nbsp;";
echo "<select name=\"call_type\" size=1>";	
for($i=0;$i<sizeof($callTypeDefArr);$i++){
	$k=$i+1;
	echo "<option value=\"$k\">$callTypeDefArr[$i]</option> ";
}
echo "</select>";
echo "&nbsp;&nbsp;&nbsp;Date&nbsp;";
echo "<select name=\"sel_date\" size=1>";	
for($i=7;$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=\"data\" value=\"Records list\">";
//echo "&nbsp;&nbsp;&nbsp;";
//echo "<input type=\"button\" name=\"graph\" value=\"Daily report\" onClick=\"javascript:showReportPage()\">";

echo "</td>";
echo "<td align=\"right\">";

echo "</td>";
echo "</tr>";
echo "</table>";

adjust_title_tail_frame("up");
adjust_content_head_frame("up");
adjust_content_tail_frame("up");
?>
</form>                
</body>               
</html>  
