{template 'phpcms','header'}
  <div class="search">
    <h1>{$channelname}搜索</h1>
	<table width="100%"  cellspacing="0" cellpadding="0" align="center">
      <form name="myform" action="{$channelurl}search.php" method="get">
        <tr>
          <td width="20%" class="search_l">搜索范围</td>
          <td class="search_r"><input type="radio" class="radio" name="searchtype" value="title" {if $searchtype=='title'}checked{/if}>
            标题
			<input type="radio" class="radio" name="searchtype" value="keywords" {if $searchtype=='keywords'}checked{/if}>
            关键字
            <input type="radio" class="radio" name="searchtype" value="introduce" {if $searchtype=='introduce'}checked{/if} />
            内容摘要
            <input type="radio" class="radio" name="searchtype" value="content" {$searchtype['content']} {if !$PHPCMS['searchcontent']}disabled{/if} />
            内容
            <input type="radio" class="radio" name="searchtype" value="username" {if $searchtype=='username'}checked{/if}>
            会员
            <input type="radio" class="radio" name="searchtype" value="author" {if $searchtype=='author'}checked{/if}>
            作者 </td>
        </tr>
        <tr>
          <td class="search_l">包含的关键字</td>
          <td class="search_r"><input name="keywords" type="text" size="30" value="{$keywords}" /> <font color="red">*多个关键词之间用空格隔开</font></td>
        </tr>
        <tr>
          <td class="search_l">所属栏目</td>
          <td class="search_r">{$category_select}</td>
		</tr>
		<tr>
          <td class="search_l">附属分类</td>
          <td class="search_r">{$type_select('typeid', '请选择', $typeid)}</td>
        </tr>
        <tr>
          <td class="search_l">添加日期</td>
          <td class="search_r">从 {$date_select('fromdate', $fromdate)} 至 {$date_select('todate', $todate)} 格式：yyyy-mm-dd</td>
        </tr>

        <tr>
          <td class="search_l">排序方式</td>
          <td colspan="3" class="search_r"><select name="ordertype">
		<option value="0" {if $ordertype==0}selected{/if}>文章排序排序</option>
		<option value="1" {if $ordertype==1}selected{/if}>更新时间降序</option>
		<option value="2" {if $ordertype==2}selected{/if}>更新时间升序</option>
		<option value="3" {if $ordertype==3}selected{/if}>浏览次数降序</option>
		<option value="4" {if $ordertype==4}selected{/if}>浏览次数升序</option>
		<option value="5" {if $ordertype==5}selected{/if}>评论次数降序</option>
		<option value="6" {if $ordertype==6}selected{/if}>评论次数升序</option>
		</select>
          </td>
        </tr>
        <tr>
          <td height="30" >&nbsp;</td>
          <td colspan="3" class="search_r"><input type="hidden" name="search" value="1">
		<input type="submit" value="立即搜索" class="btn" />
		<input type="button" onClick="window.location='search.php'" value="重新搜索" class="btn" />
          </td>
        </tr>
      </form>
    </table>
	{if $search}
   <div class="searchresult">您输入的关键词是<strong><font color=red>{$keywords}</font></strong>，一共从<font color=red>{$CHA[items]}</font>个结果中搜到<font color=red>{$number}</font>个结果</div>
	<table width="100%" cellspacing="1" cellpadding="0">
	{loop $searchs $article}
	<tr>
	<td><h2><a href="{$article[linkurl]}" target="_blank" class="searchtitle">{$article[title]}</a>{$article[type]}</h2><span class="datetime float_right"> [{$article[adddate]}]</span></td>
	</tr>
	{if $article['introduce']}
	<tr>
	<td class="search_txt">{$article[introduce]}</td>
	</tr>
	{/if}
	<tr>
	<td height="1" bgcolor="#eeeeee"> </td>
	</tr>
	{/loop}
	<tr>
	<td class="pages">{$pages}</td>
	</tr>
</table>{/if}
</div>
{template 'phpcms','footer'}