Changeset 155
- Timestamp:
- Mar 12, 2009, 1:27:34 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/action.php
r154 r155 8 8 $Table = $TranslationTree[$GroupId]['TablePrefix']; 9 9 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; else $Action = ''; 10 11 if(($Action == 'search')) 12 { 13 if(array_key_exists('search', $_GET)) $Search = $_GET['search']; 14 else $Search = $_POST['search']; 15 16 echo('<table class="BaseTable"><tr><th>Skupina</th><th>Výsledků</th></tr>'); 17 foreach($TranslationTree as $Group) { 18 $Table = $Group['TablePrefix']; 19 20 $sql = 'SELECT count(*) FROM `'.$Table.'` WHERE `ID` LIKE "%'.$Search.'%" 21 OR `entry` LIKE "%'.$Search.'%" 22 OR `User` LIKE "%'.$Search.'%" 23 OR `Complete` LIKE "%'.$Search.'%"'; 24 foreach($Group['Items'] as $Item) { 25 if($Item['Column'] != '') $sql .= ' OR `'.$Item['Column'].'` LIKE "%'.$Search.'%"'; 26 } 27 $Line = mysql_fetch_row($Database->SQLCommand($sql)); 28 echo('<tr><td><a href="TranslationList?group='.$Group['Id'].'&action=search&search='.$Search.'">'.$Group['Name'].'</a></td><td>'.$Line[0].'</td></tr>'); 29 } 30 31 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `user` WHERE `user` LIKE "%'.$Search.'%"')); 32 echo('<tr><td><a href="userlist?search='.$Search.'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>'); 33 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `team` WHERE `name` LIKE "%'.$Search.'%" OR `description` LIKE "%'.$Search.'%"')); 34 echo('<tr><td><a href="team?search='.$Search.'">Týmy</a></td><td>'.$Line[0].'</td></tr>'); 35 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `verseclient` WHERE `text` LIKE "%'.$Search.'%"')); 36 echo('<tr><td><a href="download.php?addon">Čeština pro klienta</a></td><td>'.$Line[0].'</td></tr>'); 37 38 echo('</table>'); 39 } 10 40 11 41 -
trunk/includes/global.php
r152 r155 66 66 </form>'); 67 67 } 68 } 69 70 function ShowSearchBox() 71 { 72 echo('<strong>Hledání:</strong> 73 <form action="action.php" method="get"><input type="hidden" name="action" value="search" /> 74 <table> 75 <tr> 76 <td><input type="text" name="search" size="13" /></td> 77 </tr> 78 <tr> 79 <th><input type="submit" value="Hledat" /></th> 80 </tr> 81 </table> 82 </form>'); 68 83 } 69 84 … … 220 235 ShowMainMenu(); 221 236 222 echo('<br />');237 // echo('<br />'); 223 238 ShowLoginBox(); 224 239 echo('<br />'); 225 240 ShowOnlineUserList(); 241 echo('<br />'); 242 ShowSearchBox(); 226 243 echo('</td><td id="border-left"></td><td class="content">'); 227 244 } -
trunk/team.php
r142 r155 75 75 echo('<table class="BaseTable">'); 76 76 77 if(array_key_exists('search', $_GET)) $_SESSION['Where'] = ' WHERE `name` LIKE "%'.$_GET['search'].'%" OR `description` LIKE "%'.$_GET['search'].'%"'; 78 if(array_key_exists('Where', $_GET)) { 79 $_SESSION['Where'] = ' WHERE '.$_GET['Where']; 80 if($_GET['Where'] == '') $_SESSION['Where'] = ''; 81 } 82 else if(!array_key_exists('Where', $_SESSION)) $_SESSION['Where'] = ''; 83 84 if ($_SESSION['Where'] <> '') echo (' <a href="?Where">Zrušit filtr týmů</a><br />'); 85 86 77 87 $desc = $_SESSION['Desc']; 78 88 if($desc == '') $desc = 'DESC'; else $desc = ''; … … 91 101 echo ('</tr>'); 92 102 93 $ID = $Database->SQLCommand('SELECT *,(SELECT count(*) FROM user WHERE team = team.ID) as numberuser FROM team ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']);103 $ID = $Database->SQLCommand('SELECT *,(SELECT count(*) FROM user WHERE team = team.ID) as numberuser FROM team '.$_SESSION['Where'].' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']); 94 104 while($Line = mysql_fetch_assoc($ID)) 95 105 { -
trunk/userlist.php
r149 r155 15 15 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = 'DESC'; 16 16 17 if(array_key_exists('search', $_GET)) { 18 $_SESSION['Where'] = ' WHERE `user`.`user` LIKE "%'.$_GET['search'].'%"'; 19 } 17 20 if(array_key_exists('Where', $_GET)) { 18 21 $_SESSION['Where'] = ' WHERE '.$_GET['Where']; 19 if($_GET['Where'] == '') $_SESSION['Where'] = ''; 22 if($_GET['Where'] == '') $_SESSION['Where'] = ''; 20 23 } 21 24 else if(!array_key_exists('Where', $_SESSION)) $_SESSION['Where'] = '';
Note:
See TracChangeset
for help on using the changeset viewer.