<!--<?php print <<<EOT
-->
<table width='$tablewidth' cellspacing=0 cellpadding=0 align=center><tr><td align=left>
<img src='$imgpath/$stylepath/index/home.gif' align=absbottom> 
<b><a href='$db_bfn'>$db_bbsname </a> {#search_guide}</b></td></tr></table><br>
<!--
EOT;
if(!$step){print <<<EOT
-->
$db_searchinfo
<form action='search.php?' method=post onSubmit="this.submit.disabled=true;">
<input type="hidden" name="step" value="2">
<table width='$tablewidth' cellspacing=1 cellpadding=5 align=center $i_table>
<tr><td class='head' colspan=2>{#search_title}</td></tr>
<tr><td class='f_one' width='50%'>{#search_keyword}
<br><input type=text name='keyword' size=30>
<br><input type=radio name='method' value='OR' checked>{#search_part}
<input type=radio name='method' value='AND'>{#search_all}</td>
<td class='f_one'>{#search_username}<br>
<input type=text name="pwuser" size=15><br>{#search_match}
</td></tr>
<tr><td class='head' colspan=2>{#search_range}</td></tr>
<tr><td class='f_one' colspan=2><br>
<input type=radio name='sch_area' value='0' checked>{#search_thread}
<input type=radio name='sch_area' value='1' $disable>{#search_tmsgs}
<input type=radio name='sch_area' value='2' $disable>{#search_post}
<input type=checkbox name=digest value=1>{#search_digest}<br><br>
</td>
</td></tr>
<tr><td class='head' colspan=2>{#search_option}</td></tr>
<tr><td class='f_one'>
<input type=radio name='s_type' value='all' checked>{#search_allforum}<br>
<input type=radio name='s_type' value='forum'>{#search_forums}
<select name='f_fid' onclick="this.form.s_type[1].checked=true">$forumcache
<!--
EOT;
if($forumadd){
print <<<EOT
-->
<option value=''>{#mawhole_hidden}</option>
$forumadd
<!--
EOT;
}print <<<EOT
-->
</select>
<!--
EOT;
if(trim($cmscache)){print <<<EOT
-->
<br><br>
<input type=radio name='s_type' value='cms'>{#search_cms}
<select name='c_fid' onclick="this.form.s_type[2].checked=true">$cmscache</select>
<!--
EOT;
}print <<<EOT
-->
</td>
<td class='f_one' valign='top'>{#search_posttime}<br>
<select name=sch_time>
<OPTION value='all'>{#all_subject}</OPTION>
<OPTION value='86400'>{#time_1}</OPTION>
<OPTION value='172800'>{#time_2}</OPTION>
<OPTION value='604800'>{#time_7}</OPTION>
<OPTION value='2592000'>{#time_30}</OPTION>
<OPTION value='5184000'>{#time_60}</OPTION>
<OPTION value='7776000'>{#time_90}</OPTION>
<OPTION value='15552000'>{#time_180}</OPTION>
<OPTION value='31536000'>{#time_360}</OPTION>
</select>
</td></tr>
<tr><td class='f_one'>{#search_order}<br>
<select name=orderway>
<OPTION value='lastpost'>{#search_lasttime}</OPTION>
<OPTION value='replies'>{#replies}</OPTION>
<OPTION value='hits'>{#hits}</OPTION>
</select>
<input type=radio name='asc' value='ASC' checked>{#_asc}
<input type=radio name='asc' value='DESC' checked>{#_desc}
</td>
<td class='f_one'>
</td></tr>
</table>
<center><br><input type='submit' name="submit" value='{#submit}'>
<input type='reset' value='{#reset}'></center></form>
<!--
EOT;
}else{print <<<EOT
-->
<table cellspacing=2 cellpadding=0 width='$tablewidth' align=center>
<tr><td align=left>$pages</td></tr></table>
<!--
EOT;
if($admincheck){print <<<EOT
-->
<form action="mawhole.php" method="post">
<input type="hidden" name="fid" value="$seekfid">
<!--
EOT;
}print <<<EOT
-->
<table width='$tablewidth' cellspacing=1 cellpadding=3 align=center $i_table>
<tr align=center height=25><td width=5% class='head'><b>{#search_state}</b></td> 
<td width=* class='head'><b>{#title}</b></td>
<td width=15% class='head'><b>{#forum}</b></td>
<td width=13% class='head'><b>{#author}</b></td>
<td width=5% class='head'><b>{#replies}</b></td>
<td width=5% class='head'><b>{#hits}</b></td>
<td width=20% class='head'><b>{#lastpost}</b></td>
</tr>
<!--
EOT;
foreach($schdb as $sch){print <<<EOT
-->
<tr align=center class='f_one'><td>$sch[status]</td> 
<td width=* align=left>
<!--
EOT;
if($admincheck){
print <<<EOT
-->
<input type='checkbox' name="tidarray[]" value="$sch[tid]">
<!--
EOT;
}if($sch['topped']){
print <<<EOT
-->
<img src='$imgpath/$stylepath/file/headtopic_$sch[topped].gif' alt='{#search_top}'> 
<!--
EOT;
}
print <<<EOT
-->
 &nbsp;
<a href='read.php?tid=$sch[tid]&keyword=$rawkeyword' target=_blank>$sch[subject]</a>
<!--
EOT;
if($sch[digest]){
print <<<EOT
-->
<img src='$imgpath/$stylepath/file/digest_$sch[digest].gif' alt='{#search_digest}'>
<!--
EOT;
}
print <<<EOT
-->
</td>
<td>
<a href='thread.php?fid=$sch[fid]'>$sch[forumname]</a></td>
<td class=smalltxt><a href='profile.php?action=show&uid=$sch[authorid]'>$sch[author]</a><br>$sch[postdate]</td>
<td>$sch[replies]</td>
<td>$sch[hits]</td>
<td>
<table class='f_one'>
<tr><td align=center class=smalltxt>
<a href='read.php?&tid=$sch[tid]&page=e#a' target=_blank>
$sch[lastpost]</a>
<br>by: $sch[lastposter]
</td>
</tr></table></td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
if($admincheck){print <<<EOT
-->
<table cellpadding=1 cellspacing=1 align=center width='$tablewidth'>
<tr align=center><td>
{#thread_admin}
<input name=action type=radio value='headtopic'>{#topped}
<input name=action type=radio value='digest'>{#digests}
<input name=action type=radio value='lock'>{#lock_1}
<input name=action type=radio value='edit'>{#read_edit}
<input name=action type=radio value='pushtopic'>{#read_push}
<input name=action type=radio value='type'>{#thread_type}
<input name=action type=radio value='move'>{#thread_move}
<input name=action type=radio value='copy'>{#thread_copy}
<input name=action type=radio value='del' checked>{#thread_del}
<br><br>
<input type='button' name='chkall' value='{#sel_all}' onclick='CheckAll(this.form)'>
<input type='reset' name='Reset' value='{#reset}'>
<input type='submit' name='hello' value='{#submit}'>
</td></tr></table></form>
<!--
EOT;
}print <<<EOT
-->
<br>
<table cellspacing=2 cellpadding=0 width='$tablewidth' align=center>
<tr><td align=left>{#search_page}</td></tr></table>
<script language=JavaScript>
function CheckAll(form){
	for (var i=0;i<form.elements.length-12;i++){
		var e = form.elements[i];
		e.checked == true ? e.checked = false : e.checked = true;
	}
}
</script>
<!--
EOT;
}
?>-->
