| 收藏本站 | 关于我们
首页 免费模板 收费模板 部分案例 分类模板 地方门户 二次修改 服务定制 酷站欣赏 设计学院 特效代码 字体下载
当前位置:首页 >> 二次修改
搜索图片显示方式
发布时间:2014-04-10 11:39:23
标签Tags:搜索 图片显示
原创作者:素之美


修改的一个搜索图片显示方式,查找web/template/default/search.htm文件 复制粘贴全部代码即可。


同时解决了搜索页面点击推荐关键字跳转问题,可能这个问题大家平时没发现。 


代码如下 


<!-- 
<?php 
print <<<EOT 
--> 
<script src='$webdb[www_url]/images/default/setday.js'></script> 
<script type="text/java script"> 
    function lookup(inputString) { 
        if(inputString.length == 0) { 
            // Hide the suggestion box. 
            $('#suggestions').hide(); 
        } else { 
            $.post("s_rpc.php", {queryString: ""+inputString+""}, function(data){ 
                if(data.length >0) { 
                    $('#suggestions').show(); 
                    $('#autoSuggestionsList').html(data); 
                } 
            }); 
        } 
    } // lookup 
     
    function fill(thisValue) { 
        $('#inputString').val(thisValue); 
        setTimeout("$('#suggestions').hide();", 200); 
    } 
</script> 
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="MainTable"> 
  <tr> 
    <td height="393" valign="top" class="Main"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" > 
        <tr> 
          <td bgcolor="#DCE6F0" class=""> 
           
           <h1><Font Color=#39F>高级搜索</font></span></h1> 
          </td> 
        </tr> 
        <tr> 
          <form name="form1" method="post" action="?"> 
            <td class="middle" align="center"> 
              <table width="99%" border="0" cellspacing="1" cellpadding="4"> 
                  <tr align="left"> 
                  <td width="15%" height="45"><h1>                  <Font Color=#006000>搜索时间:</font></td> 
                  <td width="85%">从: 
                    <input type="text" name="starttijd" onclick="setday(this)" value="$starttijd"> 
                     到: 
                    <input type="text" name="eindtijd" onclick="setday(this)" value="$eindtijd"> 
                  </td>     
                </tr> 
                 
                <tr align="left"> 
                  <td width="15%" height="36"> <h1> <Font Color=#006000>搜索类型:</font></td> 
                  <td width="85%">$module_select</td> 
                </tr> 
                <tr align="left"> 
                  <td width="15%" height="35"> <h1>  <Font Color=#006000>搜索栏目:</font></td> 
                  <td width="85%">$fid_select</td> 
                </tr> 
                <tr align="left"> 
                  <td width="15%" height="37"> <h1>  <Font Color=#006000>关键字:</font></td> 
                  <td width="85%"> 
                    <input type="text" size="30" name="keyword" value="$keyword" id="inputString" onkeyup="lookup(this.value);" onblur="" /> 
                    <div class="suggestionsBox" id="suggestions"> 
                <div class="suggestionList" id="autoSuggestionsList"> 
                      
                </div> 
            </div> 
                  </td> 
                </tr> 
                <tr align="left"> 
                  <td width="15%" height="39"><h1> <Font Color=#006000>  查找字段类型:</font></td> 
                  <td width="85%"> 
                    <input type="radio" name="type" value="title" $typedb[title] style="border:0px;"> 
                    标题 
                    <input type="radio" name="type" value="keyword" $typedb[keyword] style="border:0px;"> 
                    标签(关键字) 
                    <input type="radio" name="type" value="username" $typedb[username] style="border:0px;"> 
                    发布者 
                    <input type="radio" name="type" value="content" $typedb[content] style="border:0px;"> 
                  内容 $TempLate1</td> 
                </tr> $TempLate2 
                <tr align="left"> 
                  <td width="15%" height="41"> </td> 
                  <td width="85%" align="left"> 
                    <h1> 
                      <input type="submit" name="Submit" value= "点击搜索" class=""> 
                    <a href="?mid=$mid"><Font Color=#006000> 重新搜索</font></a></h1></td> 
                </tr> 
              </table> 
               
            </td> 
          </form> 
        </tr> 
        <tr> 
          <td bgcolor="#FFFFFF" class="foot"> 
            <h3 class="L"></h3> 
            <h3 class="R"></h3> 
          </td> 
        </tr> 
      </table> 

              <!-- 
EOT; 
if($listdb){ 
print <<<EOT 
--> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable"> 
        <tr> 
          <td bgcolor="#E1E8F2" class=""> 
             
            <h1><Font Color=#39F>搜索结果</font></span></h1></td> 
        </tr> 
        <tr> 
          <td align="center" valign="middle" class="middle"> 
              <!-- 
EOT; 
foreach($listdb AS $key=>$rs){ 
$rs[picurl]=tempdir("$rs[picurl]"); 
$rs[fontweight] =($rs[fonttype]==1)?'font-weight:bold;':''; 
$rs[fontcolor]  =$rs[titlecolor]?"color:$rs[titlecolor];":''; 
print <<<EOT 
--> 
              <div style="width:190px;float:left;padding-left:42px;padding-top:8px;">   
              <p class=img><a style="display:block;width:160px;height:110px;border:solid #fff 1px;" href="$rs[url]" target="_blank"><img style="width:160px;height:110px;border:1px solid #fff;" onerror="this.src='$webdb[www_url]/images/default/nopic.jpg'"src="$rs[picurl]" border="0"style="border:2px solid #fff;"></a></p> 
              <h2 class=title style="text-align:center;"><a href="$rs[url]" target="_blank" title='$rs[full_title]' style="{$rs[fontweight]}{$rs[fontcolor]}"><p style="height:40px;"><a href="bencandy.php?fid=$rs[fid]&id=$rs[aid]" title='$rs[full_title]' style="{$rs[fontweight]}{$rs[fontcolor]}">$rs[title]</p> 
                   
                </div> 
              <!-- 
EOT; 
print <<<EOT 
--> 
      </table> 
            <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
              <tr> 
                <td align="center" class="page"><h1>$showpage</h1></td> 
              </tr> 
            </table> 
    </td> 
  </tr> 
        <tr> 
          <td class="foot"> 
            <h3 class="L"></h3> 
            <h3 class="R"></h3> 
          </td> 
  </tr> 
</table>              <!-- 
EOT; 
print <<<EOT 
--> 
    </td> 
  </tr> 
</table> 
<!-- 
EOT; 
?> 
--> 

点击率:972
相关文章
网页特效代码
 服务流程 | 积分说明 | 使用说明 | 粤ICP备17004399号 电视直播 | QQ头像获取