<!--
<?php
print <<<EOT
-->
<script src='$webdb[www_url]/images/default/setday.js'></script>
<link rel="stylesheet" type="text/css" href="$webdb[www_url]/images/search/search.css">
<div class="SearchForm">
	<div class="head"><span>高级搜索</span></div>
	<form name="form1" method="post" action="?" onsubmit="return cksearch();">
	<dl>
		<dt>搜索时间:</dt>
		<dd>
			从：<input type="text" name="starttijd" onclick="setday(this)" value="$starttijd" style="width:150px;" placeholder='请输入开始时间'/>
            到：<input type="text" name="eindtijd" onclick="setday(this)" value="$eindtijd" style="width:150px;" placeholder='请输入结束时间'/>
		</dd>
	</dl>
	<dl>
		<dt>搜索模型:</dt>
		<dd>
			$module_select
		</dd>
	</dl>
	<dl>
		<dt>搜索栏目:</dt>
		<dd class="this_sorts">
			$fid_select
		</dd>
	</dl>
	<dl>
		<dt>关键字:</dt>
		<dd class="KeywordBox">
			<input type="text" name="keyword" value="$keyword" id="inputKeyword" autocomplete="off" style="width:400px;" placeholder='请输入关键字'/>
			<div class="ListKeyword"></div>
		</dd>
	</dl>
	<dl>
		<dt>查找字段类型:</dt>
		<dd>
			<input type="radio" name="type" value="title" $typedb[title] /> 标题 
            <input type="radio" name="type" value="keyword" $typedb[keyword] /> 标签(关键字) 
            <input type="radio" name="type" value="username" $typedb[username] /> 发布者 
            <input type="radio" name="type" value="content" $typedb[content] /> 内容
		</dd>
	</dl>
	<div class="butter">
		<input type="submit" value="搜索"/>
		<input type="reset" value="重新搜索"/>
	</div>
	</form>
</div>
<script type="text/javascript">
function changemid(mid){
	$.get("?job=getsorts&mid="+mid+"&"+Math.random(),function(d){
		$('.this_sorts').html(d);	
	});
}
function cksearch(){
	if ($('#inputKeyword').val()==''){
		layer.alert("关键字不能为空");
		return false;
	}
}
$('#inputKeyword').bind('input propertychange',function(){
    var keyword=$(this).val();
	$.get("?job=getkeyword&oldkeyword="+keyword+"&"+Math.random(),function(d){
		if(d!=''){
			$('.ListKeyword').fadeIn();
			$('.ListKeyword').html(d);
		}else{
			$('.ListKeyword').fadeOut();
		}	
	});
});
function selectthis(word){
	$('#inputKeyword').val(word);	
	$('.ListKeyword').fadeOut();
}
</script>
<!--
EOT;
foreach($listdb AS $key=>$rs){
$rs[content]=@preg_replace('/<([^<]*)>/is',"",$rs[content]);	//把HTML代码过滤掉
$rs[content]=get_word($rs[content],300);
$rs[picurl]&&$rs[picurl]=tempdir($rs[picurl]);
$thisimg=$rs[picurl]?"<div class='img'><a href='$rs[url]' target=\"_blank\"><img src='$rs[picurl]' onError=\"this.src='$webdb[www_url]/images/default/nopic.jpg'\"/></a></div>":"";
$rs[title]=str_replace($keyword,"<span>".$keyword."</span>",$rs[title]);
print <<<EOT
-->
<div class="Listinfo">
	<div class="title"><a href="$rs[url]" target="_blank" title='$rs[full_title]'>$rs[title]</a></div>	
	<div class="info">
		$thisimg		
		<p><span>$rs[posttime]</span>$rs[content]</p>
	</div>
</div>
<!--
EOT;
}
$showpage=$showpage?"<div class='ShowPage'>".$showpage."</div>":"";
$noInfos=$listdb?"":"<div class='noInfos'>暂时没有相关结果</div>";
print <<<EOT
-->
$showpage
$noInfos
<!--
EOT;
?>
-->