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

    调用关系：调用: header.inc     
              被调用:      
 
    变量说明：

     返回值：无

 作者：黄庆森  2002-05-29     
      
修改注释：
NO.1      
姓名：        
时间：  
修改说明：

NO.2      
姓名：            
时间：      
修改说明：      
*********************************************************/
require("../../inc/header.inc");
$helpId = "3.2.1"; 

$device_name=isset($device_name)?$device_name:$DEFAULT_SYS;
$db=$omc_db;
?>

<base target="main">

<script language="javascript">
<!--
function display(){
	if(document.selectform.sel_time.checked){
		document.all["set_time"].style.visibility="visible";
	}else{
		document.all["set_time"].style.visibility="hidden";
	}
}

function select_device(){      
    var base_url,url_add,url; 
    base_url='<?php echo"$PHP_SELF";?>?device_name=';
    url_add=document.selectform.device_list.value;      
    url=base_url+url_add;
    window.location=url;      
}   
//-->
</script>


<body leftmargin=12 topmargin=0>
<?php
echo "<table border=\"0\" width=\"100%\">";
echo "<tr>";
echo "<td width=\"50%\">";
echo "$strAdvanced > $strTitlePerformance > $sysType > $strData";
echo "</td>";
echo "<td width=\"50%\" align=\"right\" title=\"Help\">";
//showHelp($helpId);
echo "</td>";
echo "</tr>";
echo "</table>";
  $day0=date("Y-m-d",mktime(0,0,0,date("m"),date("d"),date("Y")));
  $day1=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y")));
  $day2=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-2,date("Y")));
  $day3=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y")));
  $day4=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-4,date("Y")));
  $day5=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-5,date("Y")));
  $day6=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-6,date("Y")));
?>    
<form method="post" name="selectform"  id="selectform" action="dataDown.php" >  
<table border="0" width="100%" cellpadding="2" cellspacing="0">    
<tr bgcolor="#FFFFFF">
<?php
$sys_num= get_sys_total($device_name);
$subsys_num= get_subsys_total($device_name);
$e1_num= get_e1_total($device_name);
echo "<td width=\"100\">";
echo "<nobr>";
if($sysType == $DEFAULT_SYS){
	echo "<select style=\"font-family: Verdana; font-size: 8pt\" name=\"query_type\" size=\"1\">";           
	echo "<option value=\"0\">All</option>";
	echo "<option value=\"5\">Sub to sub</option>";
	echo "<option value=\"6\">Sub to trunk</option>";
	echo "<option value=\"7\">Trunk to sub</option>";
	echo "<option value=\"8\">Trunk to trunk</option>";
	echo "<option value=\"9\">Interconnection</option>";
	echo "<option value=\"10\">Sub to ip</option>";
	echo "<option value=\"11\">Trunk to ip</option>";
	echo "<option value=\"12\">Mobile originated</option>";
	echo "<option value=\"13\">Mobile terminated</option>";
	echo "<option value=\"14\">In trunk</option>";
	echo "<option value=\"15\">Out trunk</option>";
	echo "<option value=\"16\">Ip terminated</option>";
	echo "</select>";
	echo "&nbsp;";
}
echo "<select style=\"font-family: Verdana; font-size: 8pt\" name=\"sel_date\" size=\"1\">";           
echo "<OPTION selected value=\"0\">$day0</OPTION>";
echo "<OPTION value=\"1\">$day1</OPTION>";
echo "<OPTION value=\"2\">$day2</OPTION>";
echo "<OPTION value=\"3\">$day3</OPTION>";
echo "<OPTION value=\"4\">$day4</OPTION>";
echo "<OPTION value=\"5\">$day5</OPTION>";
echo "<OPTION value=\"6\">$day6</OPTION>";
echo "</SELECT></nobr></td>";
?>
  <td bgcolor="#FFFFFF">        
	<div onClick="javascript:document.selectform.submit();" style="cursor:hand">
		<IMG align=absBottom border=0 src="../../images/search.gif" ><?php echo "$strSearch"; ?>
	<div>
  </td>
  
  <td bgcolor="#FFFFFF" width="30">       
  </td>     
  <td width="100" bgcolor="#FFFFFF">     
	<?php echo "$strSpecifyTime" ?><input style="font-family: Verdana; font-size: 8pt" name=sel_time onClick=display() value="true" type="checkbox" >      
  </td>      
  <td bgcolor="#FFFFFF"> 	     
  <DIV align=left id=set_time style="VISIBILITY: hidden;">         
	  <table width="100%">         
	  <tr>          
	    <td align="center">          
        <?php echo "$strFrom"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" name="hou_1" size="2" value="00" maxLength="2">&nbsp;<?php echo "$strHour"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" name="mid_1" size="2" value="00" maxLength="2">&nbsp;<?php echo "$strMinute"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" name="sec_1" size="2" value="00" maxLength="2">&nbsp;<?php echo "$strSencond"; ?>&nbsp;  
        <?php echo "$strTo"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" maxLength="2" name="hou_2" size="2" value="23">&nbsp;<?php echo "$strHour"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" name="mid_2" size="2" value="59" maxLength="2">&nbsp;<?php echo "$strMinute"; ?>&nbsp;  
        <input style="font-family: Verdana; font-size: 8pt" name="sec_2" size="2" value="59" maxLength="2">&nbsp;<?php echo "$strSencond"; ?>&nbsp;               
	    </td>          
	  </tr>                                        
	  </table>                  
	</DIV>       
  </td>             
</tr>            
</table>
<input type="hidden" name="sysType" value="<?php echo $sysType;?>">
</form>                
</body>               
</html>  
