- Timestamp:
- Feb 22, 2009, 9:41:58 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Options.php
r67 r124 16 16 $Language = $_POST['Language']; 17 17 18 $Line = mysql_fetch_a rray($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));18 $Line = mysql_fetch_assoc($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 19 19 if(($Line['pass'] == $OldPass) and ($NewPass == $NewPass2)) 20 20 { … … 27 27 } else 28 28 { 29 $Line = mysql_fetch_a rray($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));29 $Line = mysql_fetch_assoc($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 30 30 echo('<form action="Options.php" method="post"> 31 31 <fieldset><legend>Nastavení uživatele</legend> … … 58 58 </table></fieldset> 59 59 </form>'); 60 61 echo (' <fieldset><legend>Překladatelský tým</legend>'); 62 $ID = $Database->SQLCommand("SELECT * FROM team"); 63 echo('<a href="?create">Vytvořit překladatelský tým</a><br /><br /> 64 <form action="team.php" method="get"><select name="gointeam">'); 65 While($LineTeam = mysql_fetch_assoc($ID)) { 66 echo('<option value="'.$LineTeam['ID'].'"'); 67 if ($LineTeam['ID'] == $Line['team']) echo(' selected="selected"'); 68 echo('>'.$LineTeam['name'].'</option>'); 69 } 70 echo('</select> <input type="submit" value="Vstoupit" /> 71 </form>'); 72 echo ('</fieldset> '); 73 60 74 } 61 75 } else echo 'Nejste přihlášený!'; -
trunk/includes/global.php
r120 r124 80 80 'statistic.php' => array(LICENCE_ANONYMOUS, 'Stav dokončení překládů', 'Stav dokončení'), 81 81 'userlist.php' => array(LICENCE_ANONYMOUS, 'Seznam registrovaných uživatelů', 'Seznam uživatelů'), 82 'team.php' => array(LICENCE_ANONYMOUS, 'Seznam překladatelských týmů', 'Seznam týmů'), 82 83 'export/' => array(LICENCE_ANONYMOUS, 'Zde si můžete stáhnout přeložené texty', 'Stahování'), 83 84 'registrace.php' => array(LICENCE_ANONYMOUS, 'Registrace uživatele pro překládání', 'Registrace'), -
trunk/sql/structure.sql
r118 r124 498 498 PRIMARY KEY (`ID`) 499 499 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=551 ; 500 501 ALTER TABLE `user` ADD `team` INT NOT NULL ; 502 503 ALTER TABLE `user` ADD INDEX ( `team` ) ; 504 505 506 -- -------------------------------------------------------- 507 508 -- 509 -- Struktura tabulky `team` 510 -- 511 512 CREATE TABLE IF NOT EXISTS `team` ( 513 `ID` int(11) NOT NULL auto_increment, 514 `name` text NOT NULL, 515 `description` text NOT NULL, 516 PRIMARY KEY (`ID`) 517 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; 518 519 -
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.