Changeset 288 for trunk/team.php
- Timestamp:
- Dec 22, 2009, 1:10:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/team.php
r284 r288 11 11 echo('<h3>Seznam překladatelských týmů</h3>'); 12 12 13 if(array_key_exists('Order', $_GET)) $_SESSION['Order'] = $_GET['Order'];14 else if(!array_key_exists('Order', $_SESSION)) $_SESSION['Order'] = 'numberuser';15 if(array_key_exists('Desc', $_GET)) $_SESSION['Desc'] = $_GET['Desc'];16 else if(!array_key_exists('Desc', $_SESSION)) $_SESSION['Desc'] = '';17 18 13 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `team`'); 19 14 $DbRow = mysql_fetch_row($DbResult); … … 22 17 echo($PageList['Output']); 23 18 echo('<table class="BaseTable">'); 19 20 $TableColumns = array( 21 array('Name' => 'name', 'Title' => 'Jméno'), 22 array('Name' => 'numberuser', 'Title' => 'Počet členů'), 23 ); 24 if(Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce'); 25 26 $Order = GetOrderTableHeader($TableColumns, 'numberuser'); 27 echo($Order['Output']); 24 28 25 29 if(array_key_exists('search', $_GET)) $_SESSION['search'] = ' WHERE `name` LIKE "%'.$_GET['search'].'%" OR `description` LIKE "%'.$_GET['search'].'%"'; … … 39 43 */ 40 44 41 $desc = $_SESSION['Desc']; 42 if($desc == '') $desc = 'DESC'; else $desc = ''; 43 44 //ochrana proti špatným údajům v session z jiných tabulek 45 if(($_SESSION['Order'] <> 'name') and ($_SESSION['Order'] <> 'numberuser') and ($_SESSION['Order'] <> 'description')) 46 $_SESSION['Order'] = 'numberuser'; 47 /* 48 49 <th><a href="?Order=NumberTranslate&Desc='.$desc.'" title="Počet přeložených textů">Přeložených</a></th> 50 <th><a href="?Order=XP&Desc='.$desc.'">Úroveň</a></th> 51 */ 52 echo('<tr><th><a href="?Order=name&Desc='.$desc.'">Jméno</a></th>'. 53 '<th><a href="?Order=numberuser&Desc='.$desc.'">Počet členů</a></th>'); 54 if(Licence(LICENCE_USER)) echo('<th>Uživatelské akce</th>'); 55 echo('</tr>'); 56 57 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM user WHERE user.team = team.ID) AS numberuser FROM team '.$_SESSION['search'].' ORDER BY '.$_SESSION['Order'].' '.$_SESSION['Desc'].' '.$PageList['SQLLimit']); 45 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM user WHERE user.team = team.ID) AS numberuser FROM team '.$_SESSION['search'].$Order['SQL'].$PageList['SQLLimit']); 58 46 while($Line = mysql_fetch_assoc($ID)) 59 47 {
Note:
See TracChangeset
for help on using the changeset viewer.