<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$CONFIG[charset]}" />
<title>{$wd}_搜索结果_{$SYSTEM[sitename]}</title>
<link href="{IMG_URL}templates/{TEMPLATE}/css/style.css" type="text/css" rel="stylesheet" rev="stylesheet" media="screen"  />
<link href="{IMG_URL}templates/{TEMPLATE}/css/content.css" type="text/css" rel="stylesheet" rev="stylesheet" media="screen"  />
<script type="text/javascript" src="{IMG_URL}js/lib/jquery.js"></script>
<script type="text/javascript" src="{IMG_URL}js/datepicker/WdatePicker.js"></script>
<script type="text/javascript">
jQuery(function($) {
	$("#model>a").click(function (){
		$("#model>a.now").removeClass('now');
		$(this).addClass('now');
		$('#type').val($(this).attr('type'));
		if($('#wd').val()) {
			$("#submit").click();
		}
	}).focus(function (){
		$(this).blur();
	});
	
	$("#submit").click(function(){
		if($("#wd").val() =='') {
			$("#wd").focus();
			return false;
		}
		return true;
	});
	$('input.input_calendar').focus(function(){
		WdatePicker({dateFmt:'yyyy-MM-dd'});
	});
	$("#advanced").click(function(){
		if($(this).attr("checked") == true){
			$("#advanced_div").show();
		} else{
			$("#advanced_div").hide();
		}
	});
	
	//保持状态
	if("{$_GET['advanced']}") {
		$("#advanced").attr('checked', 1);
		$('#advanced_div').show();
	}
	var type = "{$_GET['type']}";
	$('#model a[type='+type+']').addClass('now');
	if("{$_GET['catid']}") {
		$("#catid").val({$_GET['catid']});
	}
	if("{$_GET['content']}") {
		$("#content").attr('checked', 1);
	}
	var order = "{$_GET['order']}";
	$('#order').val(order);
});
</script>
<style type="text/css">
.f_r {
	float: left;
}
#search {
	position: relative;
}
#advanced_div {
	top:52px;left:32px;width:430px;display:none;
}
dl em {
	color: #c00;
}
</style>
</head>
<body>
<div id="top">
	<div id="mode_list"><!--{template 'system/header.html'}--></div>
</div>
<div style="margin:10px 20px 0 20px;">
	<div class="f_l searbox" style="width:494px;">
		<div id="model" class="mar_t_10">
			<a href="javascript:;" type="all">全站</a>
			<a href="javascript:;" type="article">新闻</a>
			<a href="javascript:;" type="picture">图片</a>
			<a href="javascript:;" type="video">视频</a>
			<a href="javascript:;" type="activity">活动</a>
			<div class="clear"></div>
		</div>
		<form method="GET" action="" name="search" id="search" >
			<div id="search_box">
				<input type="hidden" value="search" name="app"/>
				<input type="hidden" value="index" name="controller"/>
				<input type="hidden" value="search" name="action"/>
				<input type="hidden" value="{$type}" name="type" id="type"/>
				<input type="text" name="wd" id="wd" value="{$wd}" size="40" class="search_txt_1"/>
				<input type="submit" id="submit" value="搜索" class="search_btn_1"/>
				<input name="advanced" type="checkbox" id="advanced" value="1" class="high_search"/>
				<span class="red">高级</span>
			</div>
			<div id="advanced_div">
				<select id="catid" name="catid">
					<option value="">频道</option>
					{loop $channel $v}
					<option value="{$v['catid']}">{$v['name']}</option>
					{/loop}
				</select>
				<select id="order" name="order">
					<option value="">排序</option>
					<option value="published">时间</option>
					<option value="pv">点击</option>
					<option value="comments">评论</option>
				</select>
				时间：
				<input type="text" value="{$_GET['before']}" name="before" id="before" size="9"  class="input_calendar"/>
				至
				<input type="text" value="{$_GET['after']}" name="after" id="after" size="9"  class="input_calendar"/>
				<input type="checkbox" value="1" id="content" name="content"/> 搜内容
			</div>
		</form>
	</div>
	<div class="clear"></div>
</div>
<div id="search_result" class="layout"><span class="f-r">找到相关网页约<strong class="keyword"> {$data[total]} </strong>篇，用时<strong class="keyword"> <?php echo round(microtime(true)-CMSTOP_START_TIME,5);?> </strong>秒</span></div>
<!--搜索列表-->
<div id="search_list" class="search_txt" style="margin-left: 20px;">
{loop $data[data] $v}
<dl>
	<dt><a href="{$v[url]}" target="_blank">{$v[title]}</a></dt>
	<dd class="info">{$v[content]}</dd>
	<dd>
		<a href="{$v['caturl']}" target="_blank">[{$v['catname']}]</a>
		发布时间：<span class="green">{date('Y-m-d H:i', $v['published'])} </span>
		点击：<span class="green">{$v['pv']}</span>
		评论：<span class="green"><a href="{APP_URL}{url('comment/comment/index', 'contentid='.$v['contentid'])}">{$v['comments']}</a></span>
	</dd>
</dl>
{/loop}
</div>
<!--分页-->
<div class="page mar_t_8 mar_l_20">
	<ul class="inline">{$multipage}</ul>
	<div class="clear"></div>
</div>
<div id="search_foot">Copyright &copy; 2009-2010 cmstop.com</div>
</body>
</html>