Changeset 45
- Timestamp:
- Jun 19, 2009, 8:31:51 AM (15 years ago)
- Location:
- trunk/www
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/emulator.php
r35 r45 46 46 'svn checkout -r '.$this->Emulator['ScriptDev2Revision'].' https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/ src/bindings/ScriptDev2', 47 47 'git apply src/bindings/ScriptDev2/patches/'.$this->Emulator['ScriptDev2PatchFileName'], 48 'cd ../../..', 48 49 'php www/shell.php EmulatorUnLock '.$this->Id, 49 50 )); … … 61 62 'mkdir objdir', 62 63 'cd objdir', 63 'export CFLAGS="-g -ggdb '.$Config['CompilerParameters'] ,64 'export CXXFLAGS="-g -ggdb '.$Config['CompilerParameters'] ,64 'export CFLAGS="-g -ggdb '.$Config['CompilerParameters'].'"', 65 'export CXXFLAGS="-g -ggdb '.$Config['CompilerParameters'].'"', 65 66 '../configure --prefix='.$Config['BaseDir'].'emulator/'.$this->Id.'/ --enable-cli --enable-ra', 66 67 'make', 67 68 'make install', 69 'cd ../../../..', 68 70 'php www/shell.php EmulatorUnLock '.$this->Id, 69 71 )); … … 79 81 'mv wowclient/'.$this->Emulator['Client']['Version'].'/client/dbc wowclient/'.$this->Emulator['Client']['Version'].'/', 80 82 'mv wowclient/'.$this->Emulator['Client']['Version'].'/client/maps wowclient/'.$this->Emulator['Client']['Version'].'/', 83 'cd ../../..', 81 84 'php www/shell.php EmulatorUnLock '.$this->Id, 82 85 )); -
trunk/www/form_classes.php
r44 r45 107 107 'EmulatorList' => array( 108 108 'Title' => 'Emulátory', 109 'Table' => '(SELECT `Emulator`.`Name`, `Emulator`.`Id`, `Client`.`Version` AS `ClientVersion`, `Emulator`.`Revision`, `Emulator`.`ScriptDev2Revision`, `Emulator`.`ScriptDev2PatchFileName`, `Emulator`.`Version`, `Emulator`.`CommitHash` FROM `Emulator` JOIN `Client` ON `Client`.`Id` = `Emulator`.`Client` )',109 'Table' => '(SELECT `Emulator`.`Name`, `Emulator`.`Id`, `Client`.`Version` AS `ClientVersion`, `Emulator`.`Revision`, `Emulator`.`ScriptDev2Revision`, `Emulator`.`ScriptDev2PatchFileName`, `Emulator`.`Version`, `Emulator`.`CommitHash` FROM `Emulator` JOIN `Client` ON `Client`.`Id` = `Emulator`.`Client` WHERE `Emulator`.`Enable` = 1)', 110 110 'DefaultOrderColumn' => 'Revision', 111 111 'DefaultOrderDirection' => 1, -
trunk/www/index.php
r44 r45 126 126 $Output .= 'Před provedením aktualizace bude server zastaven a provedena záloha databáze.'; 127 127 $Table = new Table('EmulatorList'); 128 $Table->Definition['Table'] = substr($Table->Definition['Table'], 0, -1).' WHERE Revision > '.$Server->Server['Database']['Emulator']['Revision'].' ORDER BY Revision)';128 $Table->Definition['Table'] = substr($Table->Definition['Table'], 0, -1).' WHERE `Revision` > '.$Server->Server['Database']['Emulator']['Revision'].' AND `Enable`=1 ORDER BY `Revision`)'; 129 129 $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => ''); 130 130 $Table->LoadValuesFromDatabase($this->Database); … … 679 679 if($_GET['Action'] == 'GameAccountRegister') 680 680 { 681 $Form = new Form('GameAccountNew' , $_GET['Id']);681 $Form = new Form('GameAccountNew'); 682 682 $Form->LoadValuesFromForm(); 683 683 $Form->Values['ServerId'] = $_GET['Id']; … … 692 692 $Output .= $this->SystemMessage('Vytvoření herního účtu', $Server->NewAccount($Form->Values['Name'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Expansion'])); 693 693 $Output .= '<a href="?Action=GameAccountRegister&Id='.$Form->Values['ServerId'].'">Zpět k zadání údajů</a>'; 694 } else 695 if($_GET['Action'] == 'EmulatorAdd') 696 { 697 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 698 { 699 $Form = new Form('EmulatorItem'); 700 $Form->LoadValuesFromForm(); 701 $Form->OnSubmit = '?Action=EmulatorAdd2'; 702 $Output .= $Form->ShowEditForm(); 703 } else $Output .= USER_BAD_ROLE; 704 } else 705 if($_GET['Action'] == 'EmulatorAdd2') 706 { 707 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 708 { 709 $Form = new Form('EmulatorItem'); 710 $Form->LoadValuesFromForm(); 711 $Form->SaveValuesToDatabase(0); 712 $Output .= $this->SystemMessage('Přidání nového emulátoru', 'Emulátor přidán.'); 713 } else $Output .= USER_BAD_ROLE; 694 714 } else 695 715 if($_GET['Action'] == 'Info') -
trunk/www/server.php
r44 r45 318 318 $DbRow = $DbResult->fetch_assoc(); 319 319 $DatabaseRevisionEnd = $DbRow['Revision']; 320 $DbResult = $this->Database->query('SELECT * FROM `Database Update` WHERE (`Revision` > '.$DatabaseRevisionStart.') AND (`Revision` <= '.$DatabaseRevisionEnd.') ORDER BY `Revision`');320 $DbResult = $this->Database->query('SELECT * FROM `Database` WHERE (`Revision` > '.$DatabaseRevisionStart.') AND (`Revision` <= '.$DatabaseRevisionEnd.') ORDER BY `Revision`'); 321 321 while($DbRow = $DbResult->fetch_assoc()) 322 322 { 323 $Updates = explode("\n", $DbRow['Update s']);323 $Updates = explode("\n", $DbRow['Update']); 324 324 foreach($Updates as $Update) 325 325 if($Update != '') -
trunk/www/user.php
r29 r45 44 44 { 45 45 $SID = session_id(); 46 47 // Remove nonactive users 48 $DbResult = $this->Database->select('UserOnline', 'Id, User', 'ActivityTime < DATE_SUB(NOW(), INTERVAL '.$this->OnlineStateTimeout.' SECOND)'); 49 while($DbRow = $DbResult->fetch_array()) 50 { 51 if($DbRow['User'] != $this->AnonymousUserId) $this->System->Modules['Log']->NewRecord('User', 'Logout'); 52 $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']); 53 } 54 46 55 // Lookup user record 47 56 $Query = $this->Database->select('UserOnline', '*', 'SessionId="'.$SID.'"'); … … 68 77 } 69 78 70 // Remove nonactive users71 $DbResult = $this->Database->select('UserOnline', 'Id, User', 'ActivityTime < DATE_SUB(NOW(), INTERVAL '.$this->OnlineStateTimeout.' SECOND)');72 while($DbRow = $DbResult->fetch_array())73 {74 $this->Database->delete('UserOnline', 'Id='.$DbRow['Id']);75 if($DbRow['User'] != $this->AnonymousUserId) $this->System->Modules['Log']->NewRecord('User', 'Logout');76 }77 79 //$this->LoadPermission($this->User['Role']); 78 80
Note:
See TracChangeset
for help on using the changeset viewer.