Changeset 124 for trunk/userlist.php
- Timestamp:
- Feb 22, 2009, 9:41:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/userlist.php
r115 r124 5 5 ShowPage(); 6 6 7 include('img_level.php');7 //include('img_level.php'); 8 8 9 9 echo('<strong>Seznam uživatelů:</strong><br />'); … … 14 14 if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc']; 15 15 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = ''; 16 ListPaging('?Page=', 'user', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);17 16 17 if(array_key_exists('Where', $_GET)) { 18 $_SESSION['Where'] = ' WHERE '.$_GET['Where']; 19 if($_GET['Where'] == '') $_SESSION['Where'] = ''; 20 } 21 else if(!array_key_exists('Where', $_SESSION)) $_SESSION['Where'] = ''; 22 23 if ($_SESSION['Where'] <> '') echo (' <a href="?Where">Zrušit filtr uživatelů</a><br />'); 24 25 ListPaging('?Page=', 'user', $_SESSION['Where'], $Config['Web']['ItemsPerPage'], $_SESSION['Page']); 18 26 echo('<table class="BaseTable">'); 19 27 20 28 $desc = $_SESSION['Desc']; 21 29 if($desc == '') $desc = 'DESC'; else $desc = ''; 30 31 //ochrana proti špatným údajům v session z jiných tabulek 32 if (($_SESSION['Order'] <> 'user') and ($_SESSION['Order'] <> 'XP') and ($_SESSION['Order'] <> 'NumberTranslate') and ($_SESSION['Order'] <> 'GM') and ($_SESSION['Order'] <> 'LastLogin')) 33 $_SESSION['Order'] = 'NumberTranslate'; 22 34 23 35 echo('<tr><th><a href="?Order=user&Desc='.$desc.'">Jméno</a></th> … … 36 48 } 37 49 38 $Query = 'SELECT ID, user.user, LastLogin, GM, ('.substr($Columns, 0, -3).') as NumberTranslate FROM `user`'.$Joins.' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage'];50 $Query = 'SELECT ID, user.user, LastLogin, GM, ('.substr($Columns, 0, -3).') as NumberTranslate FROM `user`'.$Joins.' '.$_SESSION['Where'].' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' LIMIT '.($_SESSION['Page'] - 1) * $Config['Web']['ItemsPerPage'].','.$Config['Web']['ItemsPerPage']; 39 51 40 52 $ID = $Database->SQLCommand($Query); … … 52 64 } 53 65 echo('</table>'); 54 ListPaging('?Page=', 'user', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);66 ListPaging('?Page=', 'user', $_SESSION['Where'], $Config['Web']['ItemsPerPage'], $_SESSION['Page']); 55 67 56 68 ShowFooter();
Note:
See TracChangeset
for help on using the changeset viewer.