ں̨Ŀ¼½һsearch_config.php

£
<?php
!function_exists('html') && exit('ERR');

if($job=="config"&&$Apower[search_config])
{
    
    $search_result_tpl[$webdb[search_result_tpl]]=" checked ";
    require(dirname(__FILE__)."/"."head.php");
    require(dirname(__FILE__)."/"."template/search_config/config.htm");
    require(dirname(__FILE__)."/"."foot.php");
}
elseif($action=="config"&&$Apower[search_config])
{
    write_config_cache($webdbs);
    jump("޸ĳɹ",$FROMURL);
}

?>
 


ں̨ģĿ¼½һļsearch_config½һconfig.htm
£
<!--
<?php
print <<<EOT
--> 
<table width='100%' cellspacing='1' cellpadding='3' class="tablewidth">
  <form name="form1" method="post" action="index.php?lfj=$lfj&action=$job">
    <tr  class="head"> 
      <td colspan='3'> 
        <div align='center'><b><font color="#FFFFFF">ҳ</font></b></div>
      </td>
    </tr> 
     <tr>
      <td bgcolor='#FFFFFF'>Ѱʾ:</td> 
<td bgcolor='#FFFFFF'>
         <input type="radio" name="webdbs[search_result_tpl]" value="0" $search_result_tpl[0]>
       +Ŀ++ʱ 
       <input type="radio" name="webdbs[search_result_tpl]" value="1" $search_result_tpl[1]>
        +ͼ</td>
    </tr>
    <tr> 
      <td bgcolor='#FFFFFF'>ظѰѯʱ:</td>
      <td bgcolor='#FFFFFF'> 
        <input type="text" size="4" name="webdbs[Searchtime]" value="$webdb[Searchtime]"> </td>
    </tr>
    <tr> 
      <td bgcolor='#FFFFFF'>ʾٸֽ:</td>
      <td bgcolor='#FFFFFF'> 
        <input type="text" size="4" name="webdbs[SeartitleLeng]" value="$webdb[SeartitleLeng]">
        Ĭ50,һ൱ֽ</td>
    </tr>
    <tr> 
      <td bgcolor='#FFFFFF'>ÿҳʾ:</td>
      <td bgcolor='#FFFFFF'> 
        <input type="text" size="4" name="webdbs[Searchrows]" value="$webdb[Searchrows]"></td>
    </tr>
<tr> 
      <td width='20%' bgcolor='#FFFFFF'><a href="../do/search.php?jobs=show"><b>ɸ±ǩ</b></a></td>
      <td colspan='2' bgcolor='#FFFFFF' width="80%"> 
        <input  class=mmcinb  type='submit' name='w' value=''>     
      </td>
    </tr>
  </form>
</table>
<!--
EOT;
?>
-->
 


޸ǰ̨doĿ¼search.php
ѣ$rows=20;
滻Ϊ
$rows=$webdb[Searchrows];
$chdb[main_tpl]=html("search",$main_tpl);
$ch_fid    = $ch_pagetype = $ch_module = 0;
require(PHP168_PATH."inc/label_module.php");
 



ѣ$listdb[] = $rs;
滻Ϊ
$rs[picurl]=tempdir($rs[picurl]);
        $rs[title]=get_word($rs[title],$webdb[SeartitleLeng],0);
        $listdb[] = $rs;
 




ѣif($_POST[keyword]&&($timestamp-$_COOKIE[searchTime]<3))
    {
        showerr("3,벻Ҫظύѯ");
    }
    setcookie("searchTime",$timestamp,$timestamp+3);
滻Ϊ
if($_POST[keyword]&&($timestamp-$_COOKIE[searchTime]<$webdb[Searchtime]))
    {
        showerr("$webdb[Searchtime],벻Ҫظύѯ");
    }
    setcookie("searchTime",$timestamp,$timestamp+$webdb[Searchtime]);
 



޸ǰ̨ģĿ¼µsearch.htm
Ѱ <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#EFEFEF">
              <!--
EOT;
foreach($listdb AS $key=>$rs){
$rs[fontweight] =($rs[fonttype]==1)?'font-weight:bold;':'';
$rs[fontcolor]  =$rs[titlecolor]?"color:$rs[titlecolor];":'';
print <<<EOT
-->
              <tr bgcolor="#FFFFFF"> 
                <td width="5%" align="center">$rs[aid]</td>
                <td width="51%"><a href="$rs[url]" target="_blank" title='$rs[full_title]' style="{$rs[fontweight]}{$rs[fontcolor]}">$rs[title]</a></td>
                <td width="17%" align="center">[<a href="list.php?fid=$rs[fid]" target="_blank">{$rs[fname]}</a>]</td>
                <td width="10%" align="center">{$rs[username]}</td>
                <td width="17%" align="center">({$rs[posttime]})</td>
              </tr>
              <!--
EOT;
}
print <<<EOT
-->
            </table>
滻Ϊ
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#EFEFEF">
              <!--
EOT;
foreach($listdb AS $key=>$rs)
if($webdb[search_result_tpl]==1){
print <<<EOT
-->
<div style="float:left;width:120px;padding-center:10px;padding-top:5px;"> 
<a href="$rs[url]" style="display:block;width:120px;height:90px;border:1px solid #ccc;"><img width="120" height="90" style="border:2px solid #fff;" onerror="this.src='$webdb[www_url]/images/default/nopic.jpg'" src="$rs[picurl]" border="0"></a>
<a href="$rs[url]" target="_blank" title='$rs[full_title]' style="{$rs[fontweight]}{$rs[fontcolor]}">$rs[title]</a>
                  </div>
              <!--
EOT;
}else{
print <<<EOT
-->
          <tr bgcolor="#FFFFFF"> 
                <td width="56%"><a href="$rs[url]" target="_blank" title='$rs[full_title]' style="{$rs[fontweight]}{$rs[fontcolor]}">$rs[title]</a></td>
                <td width="17%" align="center">[<a href="list.php?fid=$rs[fid]" target="_blank">{$rs[fname]}</a>]</td>
                <td width="10%" align="center">{$rs[username]}</td>
                <td width="17%" align="center">({$rs[posttime]})</td>
              </tr>   
           
           
           
                     <!--
EOT;
}
print <<<EOT
--> </table>  
 


ģҲҸطԼıǩֵ

Ȼ̨ӡҳùܡ˵Ȩ޺ӡ
ϵͳ-ܹģֹ¹ܣ水ͼá

