|
15.02.2006, 02:32
Можно изменить стандартный поиск, для этого откройте modules/Search/index.php
найдите:
PHP код:
} CloseTable(); if (isset($query) AND $query != "") { echo "<br>";
В замен добавьте:
PHP код:
} elseif ($type=="files" OR !$type) { $res_f = $db->sql_query("SELECT lid, title, description FROM ".$prefix."_files WHERE (title LIKE '%$query%' OR description LIKE '%$query%') $queryrlang ORDER BY lid DESC LIMIT $min,$offset"); $nrows = $db->sql_numrows($res_f); $x=0; if ($query != "") { echo "<br><hr noshade size=\"1\"><center><b>"._SEARCHRESULTS."</b></center><br><br>"; echo "<table width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"; if ($nrows>0) { while($rowf = $db->sql_fetchrow($res_f)) { $lid = intval($rowf['lid']); $title = stripslashes(check_html($rowf['title'], "nohtml")); $description = stripslashes($rowf['description']); $furl = "modules.php?name=Files&go=view_file&lid=$lid"; echo "<tr><td><img src=\"images/folders.gif\" border=\"0\" alt=\"\"> <font class=\"option\"><a href=\"$furl\"><b>$title</b></a></font><br>" ."<font class=\"content\">$description</font><br></td></tr>\n"; $x++; } echo "</table>"; } else { echo "<tr><td><center><font class=\"option\"><b>"._NOMATCHES."</b></font></center><br><br>"; echo "</td></tr></table>"; } $prev=$min-$offset; if ($prev>=0) { print "<br><br><center><a href=\"modules.php?name=$module_name&author=$author&topic =$t&min=$prev&query=$query&type=files\">"; print "<b>$min "._PREVMATCHES."</b></a></center>"; } $next=$min+$offset; if ($x>=9) { print "<br><br><center><a href=\"modules.php?name=$module_name&author=$author&topic =$t&min=$max&query=$query&type=files\">"; print "<b>"._NEXTMATCHES."</b></a></center>"; } } } CloseTable(); if (isset($query) AND $query != "") { echo "<br>";
должно работать.
|
|