<%@ page language="C#" autoeventwireup="true" inherits="admin_search_sekeys, localhost_deploy" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html style="height:100%;" xmlns="http://www.w3.org/1999/xhtml" >
<head >
<title>网站入口页</title>
<link href="/admin/common/client.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/common/client.js" charset="utf-8"></script>
<script language='javascript' src="/common/popcalendar.js"></script>

</head>
<body	scroll="no" style="height:100%;">
	<div style="width:99%;height:15%;"	 id="tabsearch">
		<div style="padding:10px;" >
<form method="get"	onsubmit="return CheckData()" action="sekeyslist.aspx" target="list" id="frmsearch" >
<input type="hidden" name="ord"  id="ord"  value="V_Date desc" />
<div style="height:20px;width:500px;">
显示：<select name="rang"  id="seldate" style="width:125px;">
<option selected="selected" value="0">当天</option>
<option value="1">昨天</option>
<option value="2">过去7天</option>
<option value="3">本月</option>
<option value="4">上月</option>
<option value="5">某一天</option>
<option value="6">某一段时间</option>
<option value="10">所有时间</option>
</select>

<span id="spnday" style="display:none;">日期：<input type="text" size="12" class="inputbox"  name="date" value="<%=WebCode.function.GetDate(Now())%>" readonly="readonly" onclick='popUpCalendar(this, $("frmsearch").date, "yyyy-mm-dd",-1,-1,"")' /></span>
<span id="spnperiod" style="display:none;">从：<input type="text" size="12" class="inputbox" name="from" id="from" readonly="readonly" onclick='popUpCalendar(this, $("frmsearch").from, "yyyy-mm-dd",-1,-1,"")'  value="<%=WebCode.function.GetDate(Now())%>"  /> 到 <input  value="<%=WebCode.function.GetDate(Now())%>"  type="text" size="12" class="inputbox" name="to" id="to" readonly="readonly" onclick='popUpCalendar(this, $("frmsearch").to, "yyyy-mm-dd",-1,-1,"")' /></span>
</div>
类型：<select name="type" id="type" style="width:125px;margin-top:3px;">
<option selected="selected" value="0">详细记录</option>
<option value="2">入口记录</option>
<option value="1">组记录</option>
</select>

<br />
<input type="submit"  value="提交" class="button" style="margin:5px 0px 0px 120px;" />
</form>
<div id="divcol" style="display:none;position:absolute;margin:-70px 0px 0px 180px;">
<table border="0" >
<tr ><td valign="top" style="padding-top:5px;" >
关键词收集器：<br />
<input type="button" class="button" value="复制" onclick="CopyKeys()" />
</td>
<td>
<textarea class="inputbox" rows="4" cols="50" id="txtcol">
</textarea>
</td>
</tr>
</table>
</div>
</div>

<script language='javascript' >
var o_key=new Array();

function CopyKeys()
{
	window.clipboardData.setData('text',$('txtcol').value);
	alert('复制完毕');
}

function CheckData()
{
	if($('seldate').value=="6")
	{
		var d_from=new Date($('from').value);
		var d_to=new Date($('to').value);
		if(d_from>d_to)
		{
			alert("起始日期不能大于结束日期。");
			return false;
		}
	}
	
	if($('detail').checked==true)
	{
		$('ord').value="K_Time desc";
	}
	else
	{
		$('ord').value="count(k_name) desc";
	}
	
	return true;
}

$('type').onchange=function ()
{
	$('divcol').style.display='none'
	if($('type').value=="1")
	{
		$('divcol').style.display='';
	}
}

$('seldate').onchange=function ()
{
	$('spnday').style.display="none";
	$('spnperiod').style.display="none";
	switch($('seldate').value)
	{
		 case "5": //某一天
		 {
		 		$('spnday').style.display="";
		 		break;
		 }
		 case "6": //某一段时间
		 {
		 		$('spnperiod').style.display="";
		 		break;
		 }
	}
}
</script>
	</div>
	<hr size="1" />
	<div style="width:99%;height:100%;">
		<iframe name="list" src="sekeyslist.aspx?ord=V_Date desc" frameborder="0" width="100%" height="100%"></iframe>
	</div>
</body>
</html>   
