Changeset 93 for trunk/www/Application/Model
- Timestamp:
- Aug 15, 2013, 11:17:26 PM (11 years ago)
- Location:
- trunk/www/Application/Model
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/Model/Backup.php
r80 r93 8 8 var $Task; 9 9 10 function __construct($ Database, $Id)10 function __construct($System, $Id) 11 11 { 12 $this->Database = $Database;13 $this->Task = new Task($ Database);12 parent::__construct($System); 13 $this->Task = new Task($System); 14 14 $this->Id = $Id; 15 15 $DbResult = $this->Database->query('SELECT * FROM `Backup` WHERE `Id`='.$Id); … … 42 42 function Create($ServerId) 43 43 { 44 $Server = new Server($this-> Database, $ServerId);44 $Server = new Server($this->System, $ServerId); 45 45 $Description = 'MaNGOS r'.$Server->Server['Database']['Emulator']['Revision'].', UDB r'.$Server->Server['Database']['Revision'].', SD2 r'.$Server->Server['Database']['ScriptDev2Revision'].', Client '.$Server->Server['Database']['Emulator']['Client']['Version']; 46 46 $this->Database->insert('Backup', array('Server' => $ServerId, 'Time' => 'NOW()', 'Description' => $Description, 'Lock' => 1, 'Database' => $Server->Server['Database']['Id'])); … … 73 73 } 74 74 } 75 76 ?> -
trunk/www/Application/Model/Cluster.php
r78 r93 7 7 function __construct($System, $Id) 8 8 { 9 $this->System = $System; 10 $this->Config = $System->Config; 11 $this->Database = $System->Database; 9 parent::__construct($System); 12 10 13 11 $DbResult = $this->Database->query('SELECT * FROM `ClusterNode` WHERE `Id`='.$Id); … … 31 29 } 32 30 } 33 34 ?> -
trunk/www/Application/Model/ClusterList.php
r78 r93 13 13 } 14 14 } 15 16 ?> -
trunk/www/Application/Model/Emulator.php
r78 r93 9 9 var $Task; 10 10 11 function __construct($ Database, $Id)11 function __construct($System, $Id) 12 12 { 13 $this->Database = $Database;14 $this->Task = new Task($ Database);13 parent::__construct($System); 14 $this->Task = new Task($System); 15 15 $this->Id = $Id; 16 16 $DbResult = $this->Database->query('SELECT * FROM `Emulator` WHERE `Id`='.$Id); … … 35 35 function Download() 36 36 { 37 global $Config;38 39 37 $this->Lock(); 40 38 $this->Task->Add('Stažení emulátoru', array( 41 39 'php www/shell.php EmulatorLock '.$this->Id, 42 'mkdir '.$ Config['BaseDir'].'emulator/'.$this->Id.'/',43 'cd '.$ Config['BaseDir'].'emulator/'.$this->Id.'/',40 'mkdir '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/', 41 'cd '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/', 44 42 'git clone git://github.com/mangos/mangos.git source', 45 43 'cd source', … … 55 53 function Compile() 56 54 { 57 global $Config;58 59 55 $this->Lock(); 60 56 $this->Task->Add('Překlad emulátoru', array( 61 57 'php www/shell.php EmulatorLock '.$this->Id, 62 'cd '.$ Config['BaseDir'].'emulator/'.$this->Id.'/source',58 'cd '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/source', 63 59 'autoreconf -ifv', 64 60 'mkdir objdir', 65 61 'cd objdir', 66 'export CFLAGS="-g -ggdb '.$ Config['CompilerParameters'].'"',67 'export CXXFLAGS="-g -ggdb '.$ Config['CompilerParameters'].'"',68 '../configure --prefix='.$ Config['BaseDir'].'emulator/'.$this->Id.'/ --enable-cli --enable-ra',62 'export CFLAGS="-g -ggdb '.$this->Config['CompilerParameters'].'"', 63 'export CXXFLAGS="-g -ggdb '.$this->Config['CompilerParameters'].'"', 64 '../configure --prefix='.$this->Config['BaseDir'].'emulator/'.$this->Id.'/ --enable-cli --enable-ra', 69 65 'make', 70 66 'make install', … … 99 95 } 100 96 } 101 102 ?> -
trunk/www/Application/Model/History.php
r78 r93 11 11 var $Resolution = 1000; 12 12 13 function __construct($ Database, $ServerId, $MeasureId)13 function __construct($System, $ServerId, $MeasureId) 14 14 { 15 $this->Database = $Database;15 parent::__construct($System); 16 16 $this->ServerId = $ServerId; 17 17 $this->MeasureId = $MeasureId; … … 59 59 } 60 60 } 61 62 ?> -
trunk/www/Application/Model/MangosConfigurationFile.php
r78 r93 7 7 var $ParameterList; 8 8 9 function __construct($ Database)9 function __construct($System) 10 10 { 11 $this->Database = $Database;11 parent::__construct($System); 12 12 $this->Parameters = array(); 13 13 } … … 41 41 } 42 42 } 43 44 ?> -
trunk/www/Application/Model/MangosDebug.php
r78 r93 8 8 var $MaxMangosThreadCount = 12; 9 9 10 function __construct($ Database)10 function __construct($System) 11 11 { 12 $this->Database = $Database;12 parent::__construct($System); 13 13 } 14 14 15 15 function ProcessLog($RealmId) 16 16 { 17 global $Config;18 19 17 $Output = ''; 20 18 // Read server Id from first parameter 21 $Realm = new Realm($this-> Database, $RealmId);19 $Realm = new Realm($this->System, $RealmId); 22 20 23 21 $LogDir = '../realm/'.$RealmId.'/log/'; … … 104 102 } 105 103 } 106 107 ?> -
trunk/www/Application/Model/Permission.php
r78 r93 46 46 } 47 47 } 48 49 ?> -
trunk/www/Application/Model/Platform.php
r78 r93 7 7 var $Id; 8 8 9 function __construct($ Database)9 function __construct($System) 10 10 { 11 $this->Database = $Database;11 parent::__construct($System); 12 12 } 13 13 … … 46 46 function State() 47 47 { 48 global $Config;49 50 48 $State = array(); 51 49 $State['MemoryUsed'] = $this->MemoryUsage(); … … 76 74 $DbRow = $DbResult->fetch_row(); 77 75 $State['TaskQueued'] = $DbRow[0]; 78 $State['ServerMaxCount'] = $ Config['MaxServerCount'];76 $State['ServerMaxCount'] = $this->Config['MaxServerCount']; 79 77 return($State); 80 78 } 81 79 } 82 83 ?> -
trunk/www/Application/Model/Realm.php
r78 r93 9 9 var $Task; 10 10 11 function __construct($ Database, $Id)12 { 13 $this->Database = $Database;14 $this->Task = new Task($ Database);11 function __construct($System, $Id) 12 { 13 parent::__construct($System); 14 $this->Task = new Task($System); 15 15 $this->Id = $Id; 16 16 $DbResult = $this->Database->query('SELECT * FROM `Realm` WHERE `Id`='.$Id); … … 31 31 32 32 function GetState() 33 { 34 global $System; 35 33 { 36 34 $State = array(); 37 $State['WorlddPortState'] = $ System->NetworkPortState('localhost', $this->Data['NetworkPortWorldd']);35 $State['WorlddPortState'] = $this->System->NetworkPortState('localhost', $this->Data['NetworkPortWorldd']); 38 36 $State['Online'] = $State['WorlddPortState']; 39 37 $State['Uptime'] = $this->Uptime(); … … 140 138 function UpdateRealmlist() 141 139 { 142 $Server = new Server($this-> Database, $this->Data['Server']);140 $Server = new Server($this->System, $this->Data['Server']); 143 141 $Server->UpdateRealmList(); 144 142 } … … 153 151 function UpdateScripts() 154 152 { 155 global $Config;156 157 153 $RealmBinDir = '../realm/'.$this->Id.'/bin/'; 158 154 if(!file_exists($RealmBinDir)) mkdir($RealmBinDir, 0777, true); … … 165 161 'info thread', 166 162 ); 167 for($I = 1; $I < $ Config['MangosWorlddThreadCountMax']; $I++)163 for($I = 1; $I < $this->Config['MangosWorlddThreadCountMax']; $I++) 168 164 $Content[] = 'thread apply '.$I.' bt full'; 169 165 file_put_contents($ScriptFileName, implode("\n", $Content)); … … 209 205 function SetupConfigurationFiles() 210 206 { 211 global $Config;212 213 207 $EmulatorEtcDir = '../emulator/'.$this->Data['Database']['Emulator']['Id'].'/etc/'; 214 208 $RealmEtcDir = '../realm/'.$this->Id.'/etc/'; … … 220 214 if(!file_exists($RealmEtcDir.'mangosd.conf')) 221 215 file_put_contents($RealmEtcDir.'mangosd.conf', file_get_contents($EmulatorEtcDir.'mangosd.conf.dist')); 222 $EmulatorConfig = new MangosConfigurationFile($this-> Database);216 $EmulatorConfig = new MangosConfigurationFile($this->System); 223 217 $EmulatorConfig->Load($RealmEtcDir.'mangosd.conf'); 224 218 $EmulatorConfig->ParameterList['RealmID'] = $this->Data['Id']; … … 235 229 236 230 // scriptdev2.conf 237 $EmulatorConfig = new MangosConfigurationFile($this-> Database);231 $EmulatorConfig = new MangosConfigurationFile($this->System); 238 232 $EmulatorConfig->Load($EmulatorEtcDir.'scriptdev2.conf'); 239 233 $EmulatorConfig->ParameterList['ScriptDev2DatabaseInfo'] = 'localhost;3306;server'.$this->Data['Server'].';server'.$this->Data['Server'].';realm'.$this->Id.'_scriptdev2'; … … 255 249 if($DoBackup) 256 250 { 257 $Backup = new Backup($this-> Database, 0);251 $Backup = new Backup($this->System, 0); 258 252 $Output .= '<br />'.$Backup->Create($this->Id); 259 253 } … … 364 358 while($DbRow = $DbResult->fetch_assoc()) 365 359 { 366 $Realm = new Realm($this-> Database, $DbRow['Id']);360 $Realm = new Realm($this->System, $DbRow['Id']); 367 361 $Realm->UpdateState(); 368 362 } … … 380 374 } 381 375 } 382 383 ?> -
trunk/www/Application/Model/RealmList.php
r78 r93 12 12 while($DbRow = $DbResult->fetch_assoc()) 13 13 { 14 $Server = new Server($this-> Database, $DbRow['Id']);14 $Server = new Server($this->System, $DbRow['Id']); 15 15 $Total += $Server->RealmCount(); 16 16 } … … 18 18 } 19 19 } 20 21 ?> -
trunk/www/Application/Model/RemoteConsole.php
r79 r93 49 49 } 50 50 } 51 52 ?> -
trunk/www/Application/Model/Server.php
r78 r93 9 9 var $Task; 10 10 11 function __construct($ Database, $Id)12 { 13 $this->Database = $Database;14 $this->Task = new Task($ Database);11 function __construct($System, $Id) 12 { 13 parent::__construct($System); 14 $this->Task = new Task($System); 15 15 $this->Id = $Id; 16 16 $DbResult = $this->Database->query('SELECT * FROM `Server` WHERE `Id`='.$Id); … … 68 68 function GetState() 69 69 { 70 global $System;71 72 70 $State = array(); 73 $State['RealmdPortState'] = $ System->NetworkPortState('localhost', $this->Server['NetworkPortRealmd']);71 $State['RealmdPortState'] = $this->System->NetworkPortState('localhost', $this->Server['NetworkPortRealmd']); 74 72 $State['Online'] = $State['RealmdPortState']; 75 73 $DbResult = $this->Database->query('SELECT COUNT(*) FROM information_schema.TABLES WHERE TABLE_SCHEMA = "server'.$this->Id.'_realmd"'); … … 97 95 function UpdateRealmlist() 98 96 { 99 global $Config;100 101 97 $this->Database->query('TRUNCATE TABLE server'.$this->Id.'_realmd.realmlist'); 102 98 $DbResult = $this->Database->select('Realm', '*', 'Server = '.$this->Id); 103 99 while($Realm = $DbResult->fetch_assoc()) 104 100 { 105 $this->Database->insert('server'.$this->Id.'_realmd`.`realmlist', array('id' => $Realm['Id'], 'name' => addslashes($Realm['Name']), 'address' => $Config['Web']['Host'], 'port' => $Realm['NetworkPortWorldd'], 'icon' => 0, 'timezone' => 1, 'color' => 0)); 101 $this->Database->insert('server'.$this->Id.'_realmd`.`realmlist', 102 array('id' => $Realm['Id'], 'name' => addslashes($Realm['Name']), 103 'address' => $this->Config['Web']['Host'], 'port' => $Realm['NetworkPortWorldd'], 104 'icon' => 0, 'timezone' => 1, 'color' => 0)); 106 105 } 107 106 } … … 116 115 function UpdateScripts() 117 116 { 118 global $Config;119 120 117 $ServerBinDir = '../server/'.$this->Id.'/bin/'; 121 118 if(!file_exists($ServerBinDir)) mkdir($ServerBinDir, 0777, true); … … 147 144 function SetupConfigurationFiles() 148 145 { 149 global $Config;150 151 146 $EmulatorEtcDir = '../emulator/'.$this->Server['Database']['Emulator']['Id'].'/etc/'; 152 147 $ServerEtcDir = '../server/'.$this->Id.'/etc/'; … … 156 151 157 152 // realmd.conf 158 $EmulatorConfig = new MangosConfigurationFile($this-> Database);153 $EmulatorConfig = new MangosConfigurationFile($this->System); 159 154 $EmulatorConfig->Load($EmulatorEtcDir.'realmd.conf.dist'); 160 155 $EmulatorConfig->ParameterList['LoginDatabaseInfo'] = 'localhost;3306;server'.$this->Id.';server'.$this->Id.';server'.$this->Id.'_realmd'; … … 178 173 while($DbRow = $DbResult->fetch_assoc()) 179 174 { 180 $Server = new Server($this-> Database, $DbRow['Id']);175 $Server = new Server($this->System, $DbRow['Id']); 181 176 $Server->UpdateState(); 182 177 } … … 249 244 if($DoBackup) 250 245 { 251 $Backup = new Backup($this-> Database, 0);246 $Backup = new Backup($this->System, 0); 252 247 $Output .= '<br />'.$Backup->Create($this->Id); 253 248 } … … 308 303 while($DbRow = $DbResult->fetch_assoc()) 309 304 { 310 $Realm = new Realm($this-> Database, $DbRow['Id']);305 $Realm = new Realm($this->System, $DbRow['Id']); 311 306 $UsedMemory += $Realm->GetUsedMemory(); 312 307 } … … 335 330 function UpdateRealmlistAccountCount() 336 331 { 337 global $Config;338 339 332 $this->Database->query('TRUNCATE TABLE server'.$this->Id.'_realmd.realmcharacters'); 340 333 $DbResult = $this->Database->select('Realm', '*', 'Server = '.$this->Id); … … 345 338 } 346 339 } 347 348 ?> -
trunk/www/Application/Model/ServerList.php
r78 r93 13 13 14 14 } 15 16 ?> -
trunk/www/Application/Model/Shell.php
r78 r93 7 7 var $Database; 8 8 9 function __construct($ Database)9 function __construct($System) 10 10 { 11 $this->Database = $Database;11 parent::__construct($System); 12 12 } 13 13 … … 17 17 while($Server = $DbResult->fetch_assoc()) 18 18 { 19 $History = new History($this-> Database, $Server['Id'], 1);20 $Server = new Server($this-> Database, $Server['Id']);19 $History = new History($this->System, $Server['Id'], 1); 20 $Server = new Server($this->System, $Server['Id']); 21 21 $History->AddValue($Server->GetUsedMemory()); 22 22 } 23 23 } 24 24 25 function Show() 26 { 27 $Output = ''; 28 if(count($_SERVER['argv']) > 1) 29 { 30 $Command = $_SERVER['argv'][1]; 31 if($Command == 'ServerProcessLog') 32 { 33 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 34 { 35 $MangosDebug = new MangosDebug($this->System); 36 $Output = $MangosDebug->ProcessLog($_SERVER['argv'][2]); 37 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; 38 } else 39 if($Command == 'ServerLock') 40 { 41 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 42 { 43 $Server = new Server($this->System, $_SERVER['argv'][2]); 44 $Server->Lock(); 45 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; 46 } else 25 47 if($Command == 'ServerUnLock') 26 48 { 27 49 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 28 50 { 29 $Server = new Server($this-> Database, $_SERVER['argv'][2]);51 $Server = new Server($this->System, $_SERVER['argv'][2]); 30 52 $Server->UnLock(); 31 53 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; … … 35 57 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 36 58 { 37 $Realm = new Realm($this-> Database, $_SERVER['argv'][2]);59 $Realm = new Realm($this->System, $_SERVER['argv'][2]); 38 60 $Realm->Lock(); 39 61 } else $Output = 'Jako druhý parameter je nutno zadat Id světa.'; … … 43 65 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 44 66 { 45 $Realm = new Realm($this-> Database, $_SERVER['argv'][2]);67 $Realm = new Realm($this->System, $_SERVER['argv'][2]); 46 68 $Realm->UnLock(); 47 69 } else $Output = 'Jako druhý parameter je nutno zadat Id světa.'; … … 51 73 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 52 74 { 53 $Emulator = new Emulator($this-> Database, $_SERVER['argv'][2]);75 $Emulator = new Emulator($this->System, $_SERVER['argv'][2]); 54 76 $Emulator->Lock(); 55 77 } else $Output = 'Jako druhý parameter je nutno zadat Id emulátoru.'; … … 59 81 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 60 82 { 61 $Emulator = new Emulator($this-> Database, $_SERVER['argv'][2]);83 $Emulator = new Emulator($this->System, $_SERVER['argv'][2]); 62 84 $Emulator->UnLock(); 63 85 } else $Output = 'Jako druhý parameter je nutno zadat Id emulátoru.'; … … 67 89 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 68 90 { 69 $Backup = new Backup($this-> Database, $_SERVER['argv'][2]);91 $Backup = new Backup($this->System, $_SERVER['argv'][2]); 70 92 $Backup->Lock(); 71 93 } else $Output = 'Jako druhý parameter je nutno zadat Id zálohy.'; … … 75 97 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 76 98 { 77 $Backup = new Backup($this-> Database, $_SERVER['argv'][2]);99 $Backup = new Backup($this->System, $_SERVER['argv'][2]); 78 100 $Backup->UnLock(); 79 101 } else $Output = 'Jako druhý parameter je nutno zadat Id zálohy.'; … … 81 103 if($Command == 'TaskProcess') 82 104 { 83 $Task = new Task($this-> Database);105 $Task = new Task($this->System); 84 106 $Task->ProcessAllCycle(); 85 107 } else … … 90 112 while($DbRow = $DbResult->fetch_assoc()) 91 113 { 92 $Server = new Server($this-> Database, $DbRow['Id']);93 $ System->Modules['User']->User['Id'] = $Server->Server['User'];114 $Server = new Server($this->System, $DbRow['Id']); 115 $this->System->Modules['User']->User['Id'] = $Server->Server['User']; 94 116 $Server->Start(); 95 117 } … … 98 120 while($DbRow = $DbResult->fetch_assoc()) 99 121 { 100 $Realm = new Realm($this-> Database, $DbRow['Id']);101 $ System->Modules['User']->User['Id'] = $Realm->Data['User'];122 $Realm = new Realm($this->System, $DbRow['Id']); 123 $this->System->Modules['User']->User['Id'] = $Realm->Data['User']; 102 124 $Realm->Start(); 103 125 } … … 106 128 { 107 129 // Servers 108 $Backup = new Backup($this-> Database, 0);130 $Backup = new Backup($this->System, 0); 109 131 $DbResult = $this->Database->select('Server', 'Id, User'); 110 132 while($DbRow = $DbResult->fetch_assoc()) 111 133 { 112 $ System->Modules['User']->User['Id'] = $DbRow['User'];134 $this->System->Modules['User']->User['Id'] = $DbRow['User']; 113 135 $Backup->Create($DbRow['Id']); 114 136 } … … 118 140 if((count($_SERVER['argv']) > 2) and is_numeric($_SERVER['argv'][2])) 119 141 { 120 $Server = new Server($this-> Database, $_SERVER['argv'][2]);142 $Server = new Server($this->System, $_SERVER['argv'][2]); 121 143 $Server->ProcessLog(); 122 144 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru.'; … … 128 150 if($Command == 'UpdateState') 129 151 { 130 $Realm = new Realm($this-> Database, 0);152 $Realm = new Realm($this->System, 0); 131 153 $Realm->UpdateStateAll(); 132 $Server = new Server($this-> Database, 0);154 $Server = new Server($this->System, 0); 133 155 $Server->UpdateStateAll(); 134 156 } else … … 137 159 if((count($_SERVER['argv']) > 3) and is_numeric($_SERVER['argv'][2]) and is_numeric($_SERVER['argv'][3])) 138 160 { 139 $Server = new Server($this-> Database, $_SERVER['argv'][2]);161 $Server = new Server($this->System, $_SERVER['argv'][2]); 140 162 $Server->ChangeDatabaseId($_SERVER['argv'][3]); 141 163 } else $Output = 'Jako druhý parameter je nutno zadat Id serveru, jako třetí Id databáze.'; … … 145 167 if((count($_SERVER['argv']) > 3) and is_numeric($_SERVER['argv'][2]) and is_numeric($_SERVER['argv'][3])) 146 168 { 147 $Realm = new Realm($this-> Database, $_SERVER['argv'][2]);169 $Realm = new Realm($this->System, $_SERVER['argv'][2]); 148 170 $Realm->ChangeDatabaseId($_SERVER['argv'][3]); 149 171 } else $Output = 'Jako druhý parameter je nutno zadat Id světa, jako třetí Id databáze.'; … … 154 176 } 155 177 } 156 157 ?> -
trunk/www/Application/Model/TableRelations.php
r69 r93 63 63 64 64 ); 65 66 ?> -
trunk/www/Application/Model/Task.php
r78 r93 7 7 var $TempScript = 'temp/wowhosting_script.sh'; 8 8 9 function __construct($ Database)9 function __construct($System) 10 10 { 11 $this->Database = $Database;11 parent::__construct($System); 12 12 } 13 13 14 14 function Add($Title, $Task) 15 15 { 16 global $System;17 18 16 $CommandList = implode("\n", $Task)."\n"; 19 $this->Database->insert('Task', array('User' => $ System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList));17 $this->Database->insert('Task', array('User' => $this->System->Modules['User']->User['Id'], 'Title' => $Title, 'TimeCreate' => 'NOW()', 'CommandList' => $CommandList)); 20 18 } 21 19 22 20 function ProcessAll() 23 21 { 24 global $Config; 25 26 chdir($Config['BaseDir']); 22 chdir($this->Config['BaseDir']); 27 23 $DbResult = $this->Database->query('SELECT * FROM Task WHERE State = 0 ORDER BY Id,TimeCreate ASC'); 28 24 while($Task = $DbResult->fetch_assoc()) … … 59 55 } 60 56 } 61 62 ?> -
trunk/www/Application/Model/User.php
r80 r93 57 57 function Register($Login, $Password, $Password2, $Email, $Name) 58 58 { 59 global $Options, $Config;60 61 59 if(($Email == '') || ($Login == '') || ($Password == '') || ($Password2 == '') || ($Name == '')) $Result = $this->System->Translate('MissingData'); 62 60 else if($Password != $Password2) $Result = $this->System->Translate('PasswordsUnmatched'); … … 154 152 $Mail = new Mail(); 155 153 $Mail->Subject = 'Obnova hesla'; 156 $Mail->Content = 'Požádali jste o zaslání nového hesla na serveru <a href="http://'.$this->Config['Web']['Host'].$this->Config['Web']['RootFolder'].'">http://'.$this->Config['Web']['Host'].$this->Config['Web']['RootFolder']."</a>.<br />\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br /><br />\n\nVaše nové heslo k účtu ".$Row['Login']." je: ".$NewPassword."\n<br>Pro aktivaci tohoto hesla klikněte na ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=PasswordRecoveryConfirm&User='.$Row['Id'].'&H='.$Row['Password'].'&P='.$NewPassword.'">tento odkaz</a>.'."\n<br /> Po přihlášení si prosím změňte heslo na nové.\n\n<br><br>Na tento email neodpovídejte."; 154 $Mail->Content = 'Požádali jste o zaslání nového hesla na serveru <a href="http://'. 155 $this->Config['Web']['Host'].$this->Config['Web']['RootFolder'].'">http://'. 156 $this->Config['Web']['Host'].$this->Config['Web']['RootFolder']."</a>.<br />\n". 157 "Pokud jste tak neučinili, měli by jste tento email ignorovat.<br /><br />\n\nVaše nové heslo k účtu ". 158 $Row['Login']." je: ".$NewPassword."\n<br>Pro aktivaci tohoto hesla klikněte na ". 159 '<a href="http://'.$this->Config['Web']['Host'].$this->Config['Web']['RootFolder']. 160 '/?Action=PasswordRecoveryConfirm&User='.$Row['Id'].'&H='.$Row['Password'].'&P='. 161 $NewPassword.'">tento odkaz</a>.'."\n<br /> Po přihlášení si prosím změňte heslo na nové.\n\n". 162 "<br><br>Na tento email neodpovídejte."; 157 163 $Mail->RecipientName = $Row['Name']; 158 164 $Mail->RecipientAddress = $Row['Email']; … … 184 190 } 185 191 } 186 187 ?>
Note:
See TracChangeset
for help on using the changeset viewer.