Changeset 24
- Timestamp:
- Jun 12, 2009, 11:40:00 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Readme.txt
r8 r24 18 18 3) Práva pro zápis 19 19 20 Nastavit práva pro zápis pro web server pro složky server, emulator, database a backup.20 Nastavit práva pro zápis pro web server pro složky server, emulator, database, client a backup. 21 21 22 22 … … 24 24 25 25 Z důvodu ochrany bezpečí vytvořte v systému uživatele mangos. 26 27 28 5) Požadované systémové balíky 29 30 Instalace pro distribuci fedora: 31 yum install wine gdb openssl cpp gcc gcc-c++ openssl-devel libgcrypt-devel zlib-devel make libtool subversion automake autoconf git mysql-devel mysql-server mysql mysql-libs screen -
trunk/www/emulator.php
r23 r24 14 14 $DbResult = $this->Database->query('SELECT * FROM `Emulator` WHERE `Id`='.$Id); 15 15 $this->Emulator = $DbResult->fetch_assoc(); 16 $DbResult = $this->Database->query('SELECT * FROM `Client Version` WHERE `Id`='.$this->Emulator['ClientVersion']);17 $this->Emulator['Client Version'] = $DbResult->fetch_assoc();16 $DbResult = $this->Database->query('SELECT * FROM `Client` WHERE `Id`='.$this->Emulator['Client']); 17 $this->Emulator['Client'] = $DbResult->fetch_assoc(); 18 18 } 19 19 … … 24 24 25 25 //$this->AddTask('Vytvoření nového emulátoru', array( 26 // 'ln -s wowclient/'.$this->Emulator['Client Version']['Version'].'/maps emulator/'.$this->Emulator['Id'].'/mangos/maps',27 // 'ln -s wowclient/'.$this->Emulator['Client Version']['Version'].'/dbc emulator/'.$this->Emulator['Id'].'/mangos/dbc',26 // 'ln -s wowclient/'.$this->Emulator['Client']['Version'].'/maps emulator/'.$this->Emulator['Id'].'/mangos/maps', 27 // 'ln -s wowclient/'.$this->Emulator['Client']['Version'].'/dbc emulator/'.$this->Emulator['Id'].'/mangos/dbc', 28 28 //)); 29 29 $this->Download(); … … 66 66 { 67 67 $this->Task->Add('Vygenerování souborů map', array( 68 'cd wowclient/'.$this->Emulator['Client Version']['Version'].'/client',68 'cd wowclient/'.$this->Emulator['Client']['Version'].'/client', 69 69 'wine emulator/'.$this->Id.'/source/contrib/extractor/ad.exe', 70 'mv wowclient/'.$this->Emulator['Client Version']['Version'].'/client/dbc wowclient/'.$this->Emulator['ClientVersion']['Version'].'/',71 'mv wowclient/'.$this->Emulator['Client Version']['Version'].'/client/maps wowclient/'.$this->Emulator['ClientVersion']['Version'].'/',70 'mv wowclient/'.$this->Emulator['Client']['Version'].'/client/dbc wowclient/'.$this->Emulator['Client']['Version'].'/', 71 'mv wowclient/'.$this->Emulator['Client']['Version'].'/client/maps wowclient/'.$this->Emulator['Client']['Version'].'/', 72 72 )); 73 73 return('Požadavek na vygenerování map zařazen.'); -
trunk/www/form.php
r21 r24 82 82 83 83 $DbResult = $Database->query('SELECT T.* FROM '.$this->Definition['Table'].' AS T WHERE T.Id='.$Id); 84 $DbRow = $DbResult->fetch_assoc();84 if($DbResult->num_rows > 0) $DbRow = $DbResult->fetch_assoc(); 85 85 foreach($this->Definition['Items'] as $Index => $Item) 86 86 { 87 87 if($Item['Type'] != 'Hidden') 88 $this->Values[$Index] = $DbRow[$Index]; 88 if($DbResult->num_rows > 0) $this->Values[$Index] = $DbRow[$Index]; 89 else $this->Values[$Index] = ''; 89 90 } 91 return($DbResult->num_rows > 0); 90 92 } 91 93 -
trunk/www/form_classes.php
r22 r24 77 77 'ServerList' => array( 78 78 'Title' => 'Server', 79 'Table' => '(SELECT `Client Version`.`Version`, `Server`.`Name`, `Server`.`Id`, `Server`.`NetworkPortRealmd`, `User`.`Name` AS `UserName`, Server.Online, Server.CharacterOnlineCount, Server.CharacterCount, Server.AccountCount FROM `Server` JOIN `User` ON `User`.`Id` = `Server`.`User` JOIN `Database` ON `Database`.`Id` = `Server`.`Database` JOIN `Emulator` ON `Emulator`.`Id` = `Database`.`Emulator` JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Emulator`.`ClientVersion`) AS T',79 'Table' => '(SELECT `Client`.`Version`, `Server`.`Name`, `Server`.`Id`, `Server`.`NetworkPortRealmd`, `User`.`Name` AS `UserName`, Server.Online, Server.CharacterOnlineCount, Server.CharacterCount, Server.AccountCount FROM `Server` JOIN `User` ON `User`.`Id` = `Server`.`User` JOIN `Database` ON `Database`.`Id` = `Server`.`Database` JOIN `Emulator` ON `Emulator`.`Id` = `Database`.`Emulator` JOIN `Client` ON `Client`.`Id` = `Emulator`.`Client`)', 80 80 'Items' => array( 81 81 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), … … 90 90 ), 91 91 'EmulatorList' => array( 92 'Title' => 'Emulátor ',93 'Table' => '(SELECT `Emulator`.`Name`, `Emulator`.`Id`, `Client Version`.`Version` AS `ClientVersion`, `Emulator`.`Revision`, `Emulator`.`ScriptDev2Revision`, `Emulator`.`ScriptDev2PatchFileName`, `Emulator`.`CommitHash` FROM `Emulator` JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Emulator`.`ClientVersion`) AS T',92 'Title' => 'Emulátory', 93 'Table' => '(SELECT `Emulator`.`Name`, `Emulator`.`Id`, `Client`.`Version` AS `ClientVersion`, `Emulator`.`Revision`, `Emulator`.`ScriptDev2Revision`, `Emulator`.`ScriptDev2PatchFileName`, `Emulator`.`CommitHash` FROM `Emulator` JOIN `Client` ON `Client`.`Id` = `Emulator`.`Client`)', 94 94 'Items' => array( 95 95 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), … … 107 107 'Name' => array('Type' => 'String', 'Caption' => 'Název', 'Default' => ''), 108 108 'Revision' => array('Type' => 'Integer', 'Caption' => 'Revize', 'Default' => 0), 109 //'Client Version' => array('Type' => 'PointerOneToOne', 'Caption' => 'Verze klienta', 'Default' => 0),109 //'Client' => array('Type' => 'PointerOneToOne', 'Caption' => 'Verze klienta', 'Default' => 0), 110 110 'ScriptDev2Revision' => array('Type' => 'Integer', 'Caption' => 'Verze SD2', 'Default' => 0), 111 111 'ScriptDev2PatchFileName' => array('Type' => 'String', 'Caption' => 'SD2 záplata', 'Default' => ''), 112 112 'CommitHash' => array('Type' => 'String', 'Caption' => 'Commit HASH', 'Default' => ''), 113 ), 114 ), 115 'BackupList' => array( 116 'Title' => 'Zálohy', 117 'Table' => '(SELECT * FROM `Backup`)', 118 'Items' => array( 119 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''), 120 'Description' => array('Type' => 'String', 'Caption' => 'Popis', 'Default' => ''), 121 ), 122 ), 123 'ClientList' => array( 124 'Title' => 'Verze klienta', 125 'Table' => 'Client', 126 'Items' => array( 127 'Version' => array('Type' => 'String', 'Caption' => 'Verze', 'Default' => ''), 128 'BuildNumber' => array('Type' => 'Integer', 'Caption' => 'Čislo sestavení', 'Default' => ''), 129 'ReleaseDate' => array('Type' => 'Date', 'Caption' => 'Datum vydání', 'Default' => ''), 130 ), 131 ), 132 'DebugList' => array( 133 'Title' => 'Restarty', 134 'Table' => 'Debug', 135 'Items' => array( 136 'Time' => array('Type' => 'String', 'Caption' => 'Čas', 'Default' => ''), 137 'MangosVersion' => array('Type' => 'String', 'Caption' => 'Verze emulátoru', 'Default' => ''), 138 'DbVersion' => array('Type' => 'String', 'Caption' => 'Verze databáze', 'Default' => ''), 139 'MaxPlayerCount' => array('Type' => 'Integer', 'Caption' => 'Max. online hráčů', 'Default' => ''), 140 'Uptime' => array('Type' => 'String', 'Caption' => 'Doba běhu', 'Default' => ''), 141 ), 142 ), 143 'DebugItem' => array( 144 'Title' => 'Záznam restartu', 145 'Table' => 'Debug', 146 'Items' => array( 147 'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''), 148 'MangosVersion' => array('Type' => 'String', 'Caption' => 'Verze emulátoru', 'Default' => ''), 149 'DbVersion' => array('Type' => 'String', 'Caption' => 'Verze databáze', 'Default' => ''), 150 'MaxPlayerCount' => array('Type' => 'Integer', 'Caption' => 'Max. online hráčů', 'Default' => ''), 151 'Uptime' => array('Type' => 'String', 'Caption' => 'Doba běhu', 'Default' => ''), 113 152 ), 114 153 ), -
trunk/www/global.php
r21 r24 260 260 function TimeToHumanTime($Value) 261 261 { 262 return(floor($Value / 3600 / 24).' d ays, '.date('H:i:s', $Value - 3600));262 return(floor($Value / 3600 / 24).' dnů, '.date('H:i:s', $Value - 3600)); 263 263 } 264 264 -
trunk/www/index.php
r23 r24 102 102 } 103 103 104 function ShowBackupListOnRow($Row) 105 { 106 //$Row['Name'] = '<a href="?Action=EmulatorShow&Id='.$Row['Id'].'">'.$Row['Name'].'</a>'; 107 return($Row); 108 } 109 110 function ShowBackupList() 111 { 112 global $Config; 113 114 $Output = '<h4>Dostupné zálohy</h4>'; 115 $Table = new Table('BackupList'); 116 $Table->OnRow = array($this, 'ShowBackupListOnRow'); 117 $Table->LoadValuesFromDatabase($this->Database); 118 $Output .= $Table->Show(); 119 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 120 { 121 $Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 122 } 123 return($Output); 124 } 125 126 function ShowClientListOnRow($Row) 127 { 128 //$Row['Name'] = '<a href="?Action=EmulatorShow&Id='.$Row['Id'].'">'.$Row['Name'].'</a>'; 129 return($Row); 130 } 131 132 function ShowClientList() 133 { 134 global $Config; 135 136 $Output = '<h4>Verze herního klienta</h4>'; 137 $Table = new Table('ClientList'); 138 $Table->OnRow = array($this, 'ShowClientListOnRow'); 139 $Table->LoadValuesFromDatabase($this->Database); 140 $Output .= $Table->Show(); 141 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 142 { 143 //$Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 144 } 145 return($Output); 146 } 147 148 function ShowDebugListOnRow($Row) 149 { 150 $Row['Time'] = '<a href="?Action=ServerDebug&Id='.$Row['Id'].'&Show=Backtrace">'.str_replace(' ', ' ', $Row['Time']).'</a>'; 151 $Row['Uptime'] = TimeToHumanTime($Row['Uptime']); 152 return($Row); 153 } 154 155 function ShowDebugList() 156 { 157 global $Config; 158 159 $Output = '<h4>Záznamy restartů</h4>'; 160 $Table = new Table('DebugList'); 161 $Table->OnRow = array($this, 'ShowDebugListOnRow'); 162 $Table->LoadValuesFromDatabase($this->Database); 163 $Output .= $Table->Show(); 164 if($this->System->Modules['User']->User['Role'] >= USER_ROLE_ADMINISTRATOR) 165 { 166 //$Output .= '<br /><div style="text-align: center;"><a href="?Action=BackupAdd">Zálohovat</a></dev>'; 167 } 168 return($Output); 169 } 170 104 171 function UserMenu() 105 172 { … … 114 181 $Server = $DbResult->fetch_assoc(); 115 182 $Output .= '<div><a href="?Action=ServerShow&Id='.$Server['Id'].'">Můj server</a></div>'; 116 $Output .= '<div><a href="?Action=ServerDebug&Id='.$Server['Id'].'">Ladící záznamy</a></div>'; 183 $Output .= '<div><a href="?Action=DebugList&Id='.$Server['Id'].'">Ladící záznamy</a></div>'; 184 $Output .= '<div><a href="?Action=BackupList&Id='.$Server['Id'].'">Zálohy</a></div>'; 117 185 } else $Output .= '<div><a href="?Action=ServerAdd">Vytvořit vlastní server</a></div>'; 118 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení účtu</a></div>';119 186 if($this->System->Modules['User']->User['Role'] == USER_ROLE_ADMINISTRATOR) 120 187 { 121 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=EmulatorList">Emulátory</a></div>'; 188 $Output .= '<div><a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=EmulatorList">Emulátory</a></div>'; 122 189 } 123 190 } … … 373 440 $Output .= $MangosDebug->Show($Server['Id']); 374 441 } else $Output .= USER_BAD_ROLE; 375 } else 442 } else 443 if($_GET['Action'] == 'ClientList') 444 { 445 $Output .= $this->ShowClientList(); 446 } else 447 if($_GET['Action'] == 'BackupList') 448 { 449 $Output .= $this->ShowBackupList($_GET['Id']); 450 } else 451 if($_GET['Action'] == 'DebugList') 452 { 453 $Output .= $this->ShowDebugList($_GET['Id']); 454 } else 376 455 if($_GET['Action'] == 'Test') 377 456 { -
trunk/www/mangos_debug.php
r21 r24 13 13 function Show($ServerId) 14 14 { 15 $Output = '<table width="100%"><tr><td width="10%" valign="top" style="">'. 16 '<strong>Restart history:</strong><br />'; 17 18 if(array_key_exists('Id', $_GET)) $Id = addslashes($_GET['Id']); 19 else $Id = 0; 20 if(array_key_exists('Page', $_GET)) $Page = addslashes($_GET['Page']); 21 else $Page = 0; 22 23 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Debug WHERE Server='.$ServerId); 24 $DbRow = $DbResult->fetch_array(); 25 $Total = $DbRow[0]; 26 27 $DbResult = $this->Database->query('SELECT Id, Time FROM Debug WHERE Server='.$ServerId.' ORDER BY Time DESC LIMIT '.($Page * $this->ItemPerPage).','.$this->ItemPerPage); 28 while($DbRow = $DbResult->fetch_array()) 15 global $System; 16 17 $Output = ''; 18 $Form = new Form('DebugItem'); 19 if($Form->LoadValuesFromDatabase($_GET['Id'])) 29 20 { 30 if($DbRow['Id'] == $Id) $Output .= '<strong>'; 31 $Output .= '<a href="?Action=ServerDebug&Id='.$DbRow['Id'].'&Page='.$Page.'&Show=Backtrace">'.str_replace(' ', ' ', $DbRow['Time']).'</a>'; 32 if($DbRow['Id'] == $Id) $Output .= '</strong>'; 33 $Output .= '<br />'; 34 } 35 $Output .= PageList('Page', $Page, $Total, $this->ItemPerPage, 2); 36 37 $Output .= '</td><td valign="top" width="90%">'; 38 39 if($Id > 0) 40 { 41 $DbResult = $this->Database->query('SELECT * FROM Debug WHERE Id="'.$Id.'" ORDER BY Time'); 42 if($DbResult->num_rows > 0) 43 { 44 $DbRow = $DbResult->fetch_array(); 45 $Output .= '<strong>Čas záznamu:</strong> '.$DbRow['Time'].'<br />'; 46 $Output .= '<strong>Verze MaNGOSu:</strong> '.$DbRow['MangosVersion'].'<br />'; 47 $Output .= '<strong>Verze databáze:</strong> '.$DbRow['DbVersion'].'<br />'; 48 $Output .= '<strong>Doba běhu:</strong> '.TimeToHumanTime($DbRow['Uptime']).'<br />'; 49 $Output .= '<strong>Maximum hráčů:</strong> '.$DbRow['MaxPlayerCount'].'<br /><br />'; 50 $Output .= '<a href="?Action=ServerDebug&Id='.$Id.'&Page='.$Page.'&Show=Backtrace">Backtrace</a>'. 51 ' <a href="?Action=ServerDebug&Id='.$Id.'&Page='.$Page.'&Show=Log">Mangos log</a>'. 52 ' <a href="?Action=ServerDebug&Id='.$Id.'&Page='.$Page.'&Show=Error">Console error log</a>'. 53 ' <a href="?Action=ServerDebug&Id='.$Id.'&Page='.$Page.'&Show=DbErrors">Database error log</a>'. 54 ' <a href="?Action=ServerDebug&Id='.$Id.'&Page='.$Page.'&Show=Configuration">Mangos configuration</a>'. 21 $Form->Values['Uptime'] = TimeToHumanTime($Form->Values['Uptime']); 22 $Output .= $Form->ShowTable(); 23 24 $Output .= '<a href="?Action=ServerDebug&Id='.$_GET['Id'].'&Show=Backtrace">Backtrace</a>'. 25 ' <a href="?Action=ServerDebug&Id='.$_GET['Id'].'&Show=Log">Mangos log</a>'. 26 ' <a href="?Action=ServerDebug&Id='.$_GET['Id'].'&Show=Error">Console error log</a>'. 27 ' <a href="?Action=ServerDebug&Id='.$_GET['Id'].'&Show=DbErrors">Database error log</a>'. 28 ' <a href="?Action=ServerDebug&Id='.$_GET['Id'].'&Show=Configuration">Mangos configuration</a>'. 55 29 '<hr>'; 56 30 if(array_key_exists('Show', $_GET)) … … 60 34 { 61 35 case 'Backtrace': 36 $DbResult = $this->Database->select('Debug', 'Backtrace', 'Id='.$_GET['Id']); 37 $DbRow = $DbResult->fetch_assoc(); 62 38 $Content = htmlspecialchars($DbRow['Backtrace']); 63 39 for($I = 1; $I < $this->MaxMangosThreadCount; $I++) … … 69 45 break; 70 46 case 'Log': 47 $DbResult = $this->Database->select('Debug', 'Log', 'Id='.$_GET['Id']); 48 $DbRow = $DbResult->fetch_assoc(); 71 49 $Output .= '<strong>Console standard output log:</strong> <br><pre>'.htmlspecialchars($DbRow['Log']).'</pre>'; 72 50 break; 73 51 case 'Error': 52 $DbResult = $this->Database->select('Debug', 'ErrorLog', 'Id='.$_GET['Id']); 53 $DbRow = $DbResult->fetch_assoc(); 74 54 $Output .= '<strong>Console error log:</strong> <br><pre>'.htmlspecialchars($DbRow['ErrorLog']).'</pre>'; 75 55 break; 76 56 case 'DbErrors': 57 $DbResult = $this->Database->select('Debug', 'DbErrors', 'Id='.$_GET['Id']); 58 $DbRow = $DbResult->fetch_assoc(); 77 59 $Output .= '<strong>Database error log:</strong> <br><pre>'.htmlspecialchars($DbRow['DbErrors']).'</pre>'; 78 60 break; 79 61 case 'Configuration': 62 $DbResult = $this->Database->select('Debug', 'Configuration', 'Id='.$_GET['Id']); 63 $DbRow = $DbResult->fetch_assoc(); 80 64 $Output .= '<strong>Mangos configuration:</strong> <br><pre>'.htmlspecialchars($DbRow['Configuration']).'</pre>'; 81 65 break; 82 66 } 83 67 } 84 } 85 } 86 $Output .= '</td></tr></table>'; 68 } else $Output = 'Položka nenalezena'; 87 69 return($Output); 88 70 } -
trunk/www/page.php
r23 r24 31 31 if($this->System->Modules['User']->User['Id'] == $this->System->Modules['User']->AnonymousUserId) 32 32 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=LoginForm">Přihlášení</a> <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserRegister">Registrace</a>'; 33 else $Output .= $this->System->Modules['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>'; 33 else $Output .= $this->System->Modules['User']->User['Name'].' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=Logout">Odhlásit</a>'. 34 ' <a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Nastavení</a>'; 34 35 $Output .= '</div></div>'; 35 36 return($Output); -
trunk/www/server.php
r23 r24 25 25 $DbResult = $this->Database->query('SELECT * FROM `Emulator` WHERE `Id`='.$this->Server['Database']['Emulator']); 26 26 if($DbResult->num_rows > 0) $this->Server['Database']['Emulator'] = $DbResult->fetch_assoc(); 27 else $this->Server['Database']['Emulator'] = array('Client Version' => 0);28 $DbResult = $this->Database->query('SELECT * FROM `Client Version` WHERE `Id`='.$this->Server['Database']['Emulator']['ClientVersion']);29 if($DbResult->num_rows > 0) $this->Server['Database']['Emulator']['Client Version'] = $DbResult->fetch_assoc();30 else $this->Server['Database']['Emulator']['Client Version'] = array();27 else $this->Server['Database']['Emulator'] = array('Client' => 0); 28 $DbResult = $this->Database->query('SELECT * FROM `Client` WHERE `Id`='.$this->Server['Database']['Emulator']['Client']); 29 if($DbResult->num_rows > 0) $this->Server['Database']['Emulator']['Client'] = $DbResult->fetch_assoc(); 30 else $this->Server['Database']['Emulator']['Client'] = array(); 31 31 } 32 32 } … … 214 214 $Config->ParameterList['WorldServerPort'] = $this->Server['NetworkPortWorldd']; 215 215 $Config->ParameterList['Motd'] = $this->Server['Motd']; 216 $Config->ParameterList['DataDir'] = 'wowclient/'.$this->Server['Database']['Emulator']['ClientV ersion']['Version'];216 $Config->ParameterList['DataDir'] = 'wowclient/'.$this->Server['Database']['Emulator']['ClientV']['Version']; 217 217 $Config->ParameterList['LogsDir'] = 'server/'.$this->Id.'/log'; 218 218 $Config->ParameterList['LogLevel'] = 1; -
trunk/www/style.css
r23 r24 345 345 .UserMenu 346 346 { 347 width: 20%;347 width: 15%; 348 348 } 349 349 … … 351 351 { 352 352 } 353 354 h4 355 { 356 text-align: center; 357 margin-bottom: 3px; 358 } -
trunk/www/table.php
r21 r24 65 65 foreach($this->QueryParameters as $Index => $Item) 66 66 $Table = str_replace('%'.$Index, $Item, $Table); 67 $DbResult = $Database->query('SELECT COUNT(*) FROM '.$Table.' ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']]);67 $DbResult = $Database->query('SELECT COUNT(*) FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']]); 68 68 $DbRow = $DbResult->fetch_row(); 69 69 $this->TotalRowCount = $DbRow[0]; 70 70 if(array_key_exists('Page', $_GET)) $this->Page = $_GET['Page']; else $this->Page = 0; 71 71 if($this->Page > ($this->TotalRowCount / $Config['Web']['TableRowPerPage'])) $this->Page = 0; 72 $DbResult = $Database->query('SELECT * FROM '.$Table.' ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $Config['Web']['TableRowPerPage']).', '.$Config['Web']['TableRowPerPage']);72 $DbResult = $Database->query('SELECT * FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $Config['Web']['TableRowPerPage']).', '.$Config['Web']['TableRowPerPage']); 73 73 while($DbRow = $DbResult->fetch_assoc()) 74 74 { -
trunk/www/types/DateTime.php
r11 r24 8 8 { 9 9 global $MonthNames; 10 11 if($Item['Value'] != '') 12 { 13 $ValueParts = explode(' ', $Item['Value']); 14 $DateParts = explode('-', $ValueParts[0]); 15 $TimeParts = explode(':', $ValueParts[1]); 10 16 11 $ValueParts = explode(' ', $Item['Value']); 12 $DateParts = explode('-', $ValueParts[0]); 13 $TimeParts = explode(':', $ValueParts[1]); 14 15 $Output = $TimeParts[0].':'.$TimeParts[1].':'.$TimeParts[2].' '.($DateParts[2] * 1).'. '.$MonthNames[$DateParts[1] * 1].' '.$DateParts[0]; 17 $Output = $TimeParts[0].':'.$TimeParts[1].':'.$TimeParts[2].' '.($DateParts[2] * 1).'. '.$MonthNames[$DateParts[1] * 1].' '.$DateParts[0]; 18 } else $Output = ''; 16 19 return($Output); 17 20 }
Note:
See TracChangeset
for help on using the changeset viewer.