| [ Index ] |
|
Code source de PHP NUKE 7.9 |
1 <?php 2 3 /************************************************************************/ 4 /* PHP-NUKE: Web Portal System */ 5 /* =========================== */ 6 /* */ 7 /* Copyright (c) 2005 by Francisco Burzi */ 8 /* http://phpnuke.org */ 9 /* */ 10 /* This program is free software. You can redistribute it and/or modify */ 11 /* it under the terms of the GNU General Public License as published by */ 12 /* the Free Software Foundation; either version 2 of the License. */ 13 /************************************************************************/ 14 15 if (!defined('MODULE_FILE')) { 16 die ("You can't access this file directly..."); 17 } 18 19 require_once ("mainfile.php"); 20 $module_name = basename(dirname(__FILE__)); 21 get_lang($module_name); 22 include ("header.php"); 23 global $db, $prefix; 24 $query = filter($query); 25 if ((isset($query) AND !isset($eid)) AND ($query != "")) { 26 $query1 = filter($query, "nohtml", 1); 27 $result = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE title LIKE '%".addslashes($query1)."%'"); 28 $row = $db->sql_fetchrow($result); 29 $ency_title = filter($row['title'], "nohtml"); 30 title("$ency_title: "._SEARCHRESULTS.""); 31 OpenTable(); 32 echo "<center><b>"._SEARCHRESULTSFOR." <i>$query</i></b></center><br><br><br>" 33 ."<i><b>"._RESULTSINTERMTITLE."</b></i><br><br>"; 34 if ($numrows = $db->sql_numrows($result) == 0) { 35 echo _NORESULTSTITLE; 36 } else { 37 while ($row = $db->sql_fetchrow($result)) { 38 $tid = intval($row['tid']); 39 $title = filter($row['title'], "nohtml"); 40 echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&op=content&tid=$tid\">$title</a><br>"; 41 } 42 } 43 $query2 = filter($query); 44 $result2 = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE text LIKE '%".addslashes($query2)."%'"); 45 $numrows = $db->sql_numrows($result2); 46 echo "<br><br><i><b>"._RESULTSINTERMTEXT."</b></i><br><br>"; 47 if ($numrows == 0) { 48 echo _NORESULTSTEXT; 49 } else { 50 while ($row2 = $db->sql_fetchrow($result2)) { 51 $tid = intval($row2['tid']); 52 $title = filter($row2['title'], "nohtml"); 53 echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&op=content&tid=$tid&query=$query\">$title</a><br>"; 54 } 55 } 56 echo "<br><br>" 57 ."<center><form action=\"modules.php?name=$module_name&file=search\" method=\"post\">" 58 ."<input type=\"text\" size=\"20\" name=\"query\"> " 59 ."<input type=\"hidden\" name=\"eid\" value=\"$eid\">" 60 ."<input type=\"submit\" value=\""._SEARCH."\">" 61 ."</form><br><br>" 62 ."[ <a href=\"modules.php?name=$module_name\">"._RETURNTO." $module_name</a> ]<br><br>" 63 .""._GOBACK."</center>"; 64 CloseTable(); 65 } elseif ((isset($query) AND isset($eid)) AND (!empty($query))) { 66 $query1 = filter($query, "nohtml", 1); 67 $result3 = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE eid='$eid' AND title LIKE '%".addslashes($query1)."%'"); 68 $row4 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_encyclopedia WHERE eid='$eid'")); 69 $ency_title = filter($row4['title'], "nohtml"); 70 title("$ency_title: "._SEARCHRESULTS.""); 71 OpenTable(); 72 echo "<center><b>"._SEARCHRESULTSFOR." <i>$query</i></b></center><br><br><br>" 73 ."<i><b>"._RESULTSINTERMTITLE."</b></i><br><br>"; 74 if ($numrows = $db->sql_numrows($result3) == 0) { 75 echo _NORESULTSTITLE; 76 } else { 77 while ($row3 = $db->sql_fetchrow($result3)) { 78 $tid = intval($row3['tid']); 79 $title = filter($row3['title'], "nohtml"); 80 echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&op=content&tid=$tid\">$title</a><br>"; 81 } 82 } 83 $query2 = filter($query, "", 1); 84 $result5 = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE eid='$eid' AND text LIKE '%".addslashes($query2)."%'"); 85 $numrows = $db->sql_numrows($result5); 86 echo "<br><br><i><b>"._RESULTSINTERMTEXT."</b></i><br><br>"; 87 if ($numrows == 0) { 88 echo _NORESULTSTEXT; 89 } else { 90 while ($row5 = $db->sql_fetchrow($result5)) { 91 $tid = intval($row5['tid']); 92 $title = filter($row5['title'], "nohtml"); 93 echo "<strong><big>·</big></strong> <a href=\"modules.php?name=$module_name&op=content&tid=$tid&query=$query\">$title</a><br>"; 94 } 95 } 96 echo "<br><br>" 97 ."<center><form action=\"modules.php?name=$module_name&file=search\" method=\"post\">" 98 ."<input type=\"text\" size=\"20\" name=\"query\"> " 99 ."<input type=\"hidden\" name=\"eid\" value=\"$eid\">" 100 ."<input type=\"submit\" value=\""._SEARCH."\">" 101 ."</form><br><br>" 102 ."[ <a href=\"modules.php?name=$module_name&op=list_content&eid=$eid\">"._RETURNTO." $ency_title</a> ]<br><br>" 103 .""._GOBACK."</center>"; 104 CloseTable(); 105 } else { 106 OpenTable(); 107 echo "<center>"._SEARCHNOTCOMPLETE."<br><br><br>" 108 ."<center><form action=\"modules.php?name=$module_name&file=search\" method=\"post\">" 109 ."<input type=\"text\" size=\"20\" name=\"query\"> " 110 ."<input type=\"hidden\" name=\"eid\" value=\"$eid\">" 111 ."<input type=\"submit\" value=\""._SEARCH."\">" 112 ."</form><br><br>" 113 .""._GOBACK."</center>"; 114 CloseTable(); 115 } 116 117 include ("footer.php"); 118 119 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Apr 1 11:11:59 2007 | par Balluche grâce à PHPXref 0.7 |