Changeset 307
- Timestamp:
- Jan 31, 2010, 1:50:45 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r306 r307 107 107 else if($address <> 'notran') $TableColumns[] = array('Name' => 'User', 'Title' => 'Překladatel'); 108 108 109 $Order = GetOrderTableHeader($TableColumns, ' ID');109 $Order = GetOrderTableHeader($TableColumns, 'VersionStart', 1); 110 110 echo('<table class="BaseTable">'); 111 111 echo($Order['Output']); -
trunk/includes/global.php
r303 r307 264 264 } 265 265 266 // záznam o aktivitě266 // Záznam o aktivitě 267 267 if(Licence(0) and array_key_exists('REMOTE_ADDR', $_SERVER)) 268 268 $Database->SQLCommand('UPDATE user SET LastIP = "'.$_SERVER['REMOTE_ADDR'].'", LastLogin = NOW() WHERE ID = '.$_SESSION['UserID']); … … 273 273 ShowMainMenu(); 274 274 275 // echo('<br />');275 // echo('<br />'); 276 276 //ShowLoginBox(); 277 277 //echo('<br />'); -
trunk/includes/global_function.php
r304 r307 245 245 246 246 $Result = array(); 247 $DbResult = $Database->SQLCommand('SELECT * FROM `group` ');247 $DbResult = $Database->SQLCommand('SELECT * FROM `group` ORDER BY `name`'); 248 248 while($DbRow = mysql_fetch_assoc($DbResult)) 249 249 { -
trunk/registrace.php
r303 r307 23 23 { 24 24 $Address = $_SERVER['REMOTE_ADDR']; 25 $Database->SQLCommand('INSERT INTO `user` (`user` , `pass` , `LastIP` , `LastLogin` , `Email` , `Language` , `team` , `NeedUpdate` )26 VALUES ("'.$User.'", sha1("'.$Pass.'"), "'.$Address.'", NOW(), "'.$Email.'", '.$Language.', '.$Team.', 1 )');25 $Database->SQLCommand('INSERT INTO `user` (`user` , `pass` , `LastIP` , `LastLogin` , `Email` , `Language` , `team` , `NeedUpdate`, `RegistrationTime` ) 26 VALUES ("'.$User.'", sha1("'.$Pass.'"), "'.$Address.'", NOW(), "'.$Email.'", '.$Language.', '.$Team.', 1, NOW())'); 27 27 // $Database->SQLCommand("INSERT INTO user () VALUES('$User','$Pass','0','$Addres',now(),'0','$Email')"); 28 28 echo('Registrace proběhla úspěšně.<br />'); -
trunk/sql/updates/306.sql
r306 r307 1 UPDATE Team SET Leader=(SELECT Id FROM `user` WHERE user.Team=Team.Id LIMIT 1) WHERE Leader =0;1 UPDATE Team SET Leader=(SELECT Id FROM `user` WHERE user.Team=Team.Id LIMIT 1) WHERE Leader NOT IN (SELECT ID FROM user WHERE user.Team=Team.Id); -
trunk/team.php
r303 r307 82 82 83 83 // Delete all teams without users 84 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 84 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 85 86 // Set new leader for teams where old leader went to other team 87 $Database->SQLCommand('UPDATE Team SET Leader=(SELECT Id FROM `user` WHERE user.Team=Team.Id ORDER BY user.RegistrationTime LIMIT 1) WHERE Leader NOT IN (SELECT ID FROM user WHERE user.Team=Team.Id);'); 85 88 86 89 ShowTeamList();
Note:
See TracChangeset
for help on using the changeset viewer.