Changeset 712 for trunk/inc/server.php
- Timestamp:
- Jul 30, 2013, 11:34:19 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 5 5 minimanager 6 6 mmfpm 7 .settings 8 .buildpath 9 .project
-
- Property svn:ignore
-
trunk/inc/server.php
r697 r712 14 14 $this->Id = $Id; 15 15 $DbResult = $this->Database->query('SELECT * FROM Logon WHERE Id='.$Id.' AND Enabled=1' ); 16 $this->Data = $DbResult->fetch_assoc(); 17 $this->ServerDatabase = new Database($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseRealmd']); 18 $this->ServerDatabase->select_db($this->Data['DatabaseRealmd']); 19 if($this->ServerDatabase->connect_error) 16 if($DbResult->num_rows == 1) 20 17 { 21 die('Přihlášení k databázi serveru '.$this->Id.' selhalo: '.$this->ServerDatabase->connect_error); 22 } 23 $this->ServerDatabase->charset($this->Config['Database']['Charset']); 18 $this->Data = $DbResult->fetch_assoc(); 19 $this->ServerDatabase = new Database(); 20 $this->ServerDatabase->Connect($this->Data['DatabaseHost'], $this->Data['DatabaseUser'], $this->Data['DatabasePassword'], $this->Data['DatabaseRealmd']); 21 $this->ServerDatabase->select_db($this->Data['DatabaseRealmd']); 22 //if($this->ServerDatabase->connect_error) 23 //{ 24 // die('Přihlášení k databázi serveru '.$this->Id.' selhalo: '.$this->ServerDatabase->connect_error); 25 //} 26 $this->ServerDatabase->charset($this->Config['Database']['Charset']); 27 } else throw new Exception('Záznam pro přihlašovací server id '.$Id.' nenalezen!'); 24 28 } 25 29
Note:
See TracChangeset
for help on using the changeset viewer.