| 以下为引用的内容: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 中国站长_站,为中文网站提供动力 <?php $page=$_GET['page']; $allpage=$_GET['allpage']; $cnt=$_GET['cnt']; $yesno_1=0; if($_GET['writekeywords']=="yes") { require("php_admin/admin_conn_1.php"); $query =" SELECT * FROM nan_keyword WHERE word='".$keyword."'"; require("php_admin/admin_conn_2.php"); while($row = mysql_fetch_array($result)) { $yesno_1=$row[3]; } if(!$yesno_1)//if count(*) is NULL { require("php_admin/admin_conn_1.php"); $query="INSERT INTO nan_keyword(id,word,num,date) VALUES (NULL,'".$keyword."',1,'".date("Y-m-d",time())."')"; require("php_admin/admin_conn_2.php"); if(!$query) { //echo "插入新搜索关键词失败!"; } else { //echo "插入新搜索关键词成功!"; } $yesno_1=0; } else//count(*)is not NULL { $num=$yesno_1+1; Www^ require("php_admin/admin_conn_1.php"); $query ="UPDATE nan_keyword SET num=".$num.",date='".date("Y-m-d",time())."'WHERE word='".$keyword."'"; require("php_admin/admin_conn_2.php"); if(!$query) { //echo "更新搜索关键词失败!"; } else { //echo "更新搜索关键词成功!"; } } require("php_admin/admin_conn_1.php"); $query =" SELECT count(*) FROM nan_article WHERE title LIKE '%".$keyword."%' OR about LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%'"; require("php_admin/admin_conn_2.php"); if($row = mysql_fetch_array($result))/*取得数据表的所有符合项*/ $cnt=$row[0]; if($cnt!=0) { $allpage=ceil($cnt/10); } else { $allpage=0; } }?> <td align="right" nowrap style="FONT-SIZE:9pt;LINE-HEIGHT:18px;">搜索一下,找到相关网页<?php echo $cnt; ?>篇 </td> 中国.站长站 </tr> </table> <?PHP if($allpage==0) {?> <div style="margin:0 0 0 15px;font-size:14px;line-height:20px;"> 抱歉,没有找到与“<?PHP echo $keyword; ?>”相关的网页。 <br /> <br /> 本站建议您: <div style="margin-top:0px;margin-left:15px;"> <li>看看输入的文字是否有误 </li> <li>去掉可能不必要的字词,如“的”、“什么”等 </li> <li>阅读<a href="/search/noresult.html" target="_blank">帮助</a> </li> </div> </div><?PHP } else { require("php_admin/admin_conn_1.php"); $query =" SELECT * FROM nan_article WHERE title LIKE '%".$keyword."%' OR about LIKE '%".$keyword."%' OR content LIKE '%".$keyword."%' order by id DESC LIMIT ".(10*($page-1)).",".(10*$page); require("php_admin/admin_conn_2.php"); Chinaz_com while($row = mysql_fetch_array($result)) { ?> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td class=f style="FONT-SIZE:9pt;LINE-HEIGHT:18px;"> <font color=#C60A00></font> <a href="/html/php<?PHP echo $row[0];?>.html" target="_self" title="<?PHP echo $row[2];?>"> <font size="3" color="#261cdc"> <?php $r11=strip_tags($row[1]); if(strlen($r11)>69) { $sc_t=substr($r11,0,69); echo $sc_t."..."; } else { echo $r11; } ?></font></a><br><font size=-1> <? $r31=strip_tags($row[3]); if(strlen($r31)>291) { $b=substr($r31,0,291); echo $b."..."."<br>"; } else { echo $r31."<br>"; } ?></font> Www_Chinaz_com <font color=#008000> www.webjx.com/html/php<?PHP echo $row[0];?>.html <?PHP echo $sc_fl=substr($row[6],0,17);?> </font> <?php switch ($row[5]) { case "新手入门": ?><a href="/newer.html" target="_blank" class="m">新手入门常见问题</a> <?PHP break; case "PHP基础":?> <a href="/base.html" target="_blank" class="m">PHP基础</a> <?PHP break; case "PHP进阶": ?><a href="/newer.html" target="_blank" class="m">PHP进阶</a> <?PHP break; case "数据库":?> <a href="/base.html" target="_blank" class="m">数据库操作</a> <?PHP break; case "PHP源码": ?><a href="/newer.html" target="_blank" class="m">PHP源码</a> [中国站长站] <?PHP break; } ?> </font></td> </tr> </table><br> <?PHP }//搜索正文结束 if($allpage!=1) {?><div class="p"><?PHP if($page!=1) echo"<a href="search.php?page=".($page-1)."&cnt=".$cnt."&allpage=".$allpage."&keyword=".$keyword."" target="_self">上一页</a>"; for($i=0;$i<$allpage;$i++) { if(($i+1)!=$page) echo " <a href="search.php?page=".($i+1)."&cnt=".$cnt."&allpage=".$allpage."&keyword=".$keyword."" target="_self">[".($i+1)."]</a> "; else echo " [".($i+1)."] "; } if($allpage!=$page) echo"<a href="search.php?page=".($page+1)."&cnt=".$cnt."&allpage=".$allpage."&keyword=".$keyword."" target="_self">下一页</a>"; 站.长站 }?></div> <?PHP } ?> <table cellpadding="0" cellspacing="0" style="margin-left:18px;height:60px;"> <form action="/search.php" method="get" target="_self"><tr valign="middle"> <td nowrap style="FONT-SIZE:9pt;LINE-HEIGHT:18px;"> <input name="keyword" type="text" size="35" value="<?PHP echo $keyword;?>"maxlength="20" /> <input type="hidden" name="writekeywords" value="yes" /> <input name="submit" type="submit" style="padding-top:2px;" value="搜索本站"/> <input type="hidden" name="page" value="1" /> </td></tr> </form> </table> <div id="ft">©2007 网页教学网 <span>此内容系网页教学网根据您的指令自动搜索的结果</span></div> 中国 </body> </html> 中.国. |