Changeset 124 for trunk/userlist.php


Ignore:
Timestamp:
Feb 22, 2009, 9:41:58 PM (16 years ago)
Author:
maron
Message:

Překladatelské týmy (změna struktury)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/userlist.php

    r115 r124  
    55ShowPage();
    66
    7 include('img_level.php');
     7//include('img_level.php');
    88
    99echo('<strong>Seznam uživatelů:</strong><br />');
     
    1414if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc'];
    1515else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = '';
    16 ListPaging('?Page=', 'user', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
    1716
     17if(array_key_exists('Where', $_GET)) {
     18         $_SESSION['Where'] = ' WHERE '.$_GET['Where'];
     19     if($_GET['Where'] == '') $_SESSION['Where'] = '';
     20 }
     21else if(!array_key_exists('Where', $_SESSION)) $_SESSION['Where'] = '';
     22
     23if ($_SESSION['Where'] <> '') echo (' <a href="?Where">Zrušit filtr uživatelů</a><br />');
     24
     25ListPaging('?Page=', 'user', $_SESSION['Where'], $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
    1826echo('<table class="BaseTable">');
    1927
    2028$desc = $_SESSION['Desc'];
    2129if($desc == '') $desc = 'DESC'; else $desc = '';
     30
     31//ochrana proti špatným údajům v session z jiných tabulek
     32if (($_SESSION['Order'] <> 'user') and ($_SESSION['Order'] <> 'XP') and ($_SESSION['Order'] <> 'NumberTranslate') and ($_SESSION['Order'] <> 'GM') and ($_SESSION['Order'] <> 'LastLogin'))
     33$_SESSION['Order'] = 'NumberTranslate';
    2234
    2335echo('<tr><th><a href="?Order=user&amp;Desc='.$desc.'">Jméno</a></th>
     
    3648  }
    3749
    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'];
    3951
    4052$ID = $Database->SQLCommand($Query);
     
    5264}
    5365echo('</table>');
    54 ListPaging('?Page=', 'user', '', $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
     66ListPaging('?Page=', 'user', $_SESSION['Where'], $Config['Web']['ItemsPerPage'], $_SESSION['Page']);
    5567         
    5668ShowFooter();     
Note: See TracChangeset for help on using the changeset viewer.