Changeset 586 for trunk/Modules/Search/Search.php
- Timestamp:
- Oct 7, 2013, 11:52:11 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Search/Search.php
r577 r586 41 41 else if(array_key_exists('text', $_POST)) $Search = $_POST['text']; 42 42 else $Search = ''; 43 $SearchHTML = htmlentities($Search); 43 44 44 45 $Output = '<table class="BaseTable"><tr><th>Skupina</th><th>Výsledků</th></tr>'; … … 52 53 foreach($Group['Items'] as $Item) 53 54 { 54 if($Item['Column'] != '') $sql .= ' OR `'.$Item['Column'].'` LIKE "%'.$Search.'%"';55 if($Item['Column'] != '') $sql .= ' OR (`'.$Item['Column'].'` LIKE "%'.$Search.'%")'; 55 56 } 56 57 $DbResult = $this->Database->query($sql); 57 58 $Line = $DbResult->fetch_row(); 58 $Output .= '<tr><td><a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&user=0&state=0&text='.$Search.'&entry=').'">'.$Group['Name'].'</a></td><td>'.$Line[0].'</td></tr>'; 59 $Output .= '<tr><td><a href="'.$this->System->Link('/TranslationList.php?group='. 60 $Group['Id'].'&user=0&state=0&text='.$SearchHTML.'&entry=').'">'. 61 $Group['Name'].'</a></td><td>'.$Line[0].'</td></tr>'; 59 62 } 60 63 61 64 $DbResult = $this->Database->query('SELECT count(*) FROM `User` WHERE `Name` LIKE "%'.$Search.'%"'); 62 65 $Line = $DbResult->fetch_row(); 63 $Output .= '<tr><td><a href="'.$this->System->Link('/userlist.php?search='.$Search ).'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>';66 $Output .= '<tr><td><a href="'.$this->System->Link('/userlist.php?search='.$SearchHTML).'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>'; 64 67 65 68 $DbResult = $this->Database->query('SELECT count(*) FROM `Team` WHERE `Name` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%"'); 66 69 $Line = $DbResult->fetch_row(); 67 $Output .= '<tr><td><a href="'.$this->System->Link('/team/?search='.$Search ).'">Týmy</a></td><td>'.$Line[0].'</td></tr>';70 $Output .= '<tr><td><a href="'.$this->System->Link('/team/?search='.$SearchHTML).'">Týmy</a></td><td>'.$Line[0].'</td></tr>'; 68 71 69 72 $DbResult = $this->Database->query('SELECT count(*) FROM `CzWoWPackageVersion` WHERE `Text` LIKE "%'.$Search.'%"'); 70 73 $Line = $DbResult->fetch_row(); 71 74 $Output .= '<tr><td><a href="'.$this->System->Link('/download.php?addon').'">Čeština pro klienta</a></td><td>'.$Line[0].'</td></tr>'; 72 $Output .= '<tr><td><a href="'.$this->System->Link('/aowow/?search='.$Search ).'">Vyhledávací databáze AoWoW</a></td></tr>';75 $Output .= '<tr><td><a href="'.$this->System->Link('/aowow/?search='.$SearchHTML).'">Vyhledávací databáze AoWoW</a></td></tr>'; 73 76 74 77 $DbResult = $this->Database->query('SELECT count(*) FROM `Dictionary` WHERE '. 75 78 '(`Text` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%") AND `Language` = '.$this->System->Config['OriginalLanguage']); 76 79 $Line = $DbResult->fetch_row(); 77 $Output .= '<tr><td><a href="'.$this->System->Link('/dictionary/?search='.$Search).'">Slovníček</a></td><td>'.$Line[0].'</td></tr>'; 80 $Output .= '<tr><td><a href="'.$this->System->Link('/dictionary/?search='.$SearchHTML). 81 '">Slovníček</a></td><td>'.$Line[0].'</td></tr>'; 78 82 79 83 $Output .= '</table>';
Note:
See TracChangeset
for help on using the changeset viewer.