- Timestamp:
- Jun 19, 2012, 8:56:06 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/Database.php
r8 r10 19 19 { 20 20 $this->Config = new Config(); 21 $this-> Database->HostName = $this->Config->Database['Host'];22 $this-> Database->UserName = $this->Config->Database['User'];23 $this-> Database->Password = $this->Config->Database['Password'];24 $this-> Database->Schema = $this->Config->Database['Database'];25 $this-> Database->Charset = $this->Config->Database['Charset'];26 $this-> Database->ShowSQLQuery = $this->Config->Web['ShowSQLQuery'];27 $this-> Database->ShowSQLError = $this->Config->Web['ShowSQLError'];21 $this->HostName = $this->Config->Database['Host']; 22 $this->UserName = $this->Config->Database['User']; 23 $this->Password = $this->Config->Database['Password']; 24 $this->Schema = $this->Config->Database['Database']; 25 $this->Charset = $this->Config->Database['Charset']; 26 $this->ShowSQLQuery = $this->Config->Web['ShowSQLQuery']; 27 $this->ShowSQLError = $this->Config->Web['ShowSQLError']; 28 28 $this->open(); 29 29 … … 38 38 function query($Query) 39 39 { 40 41 40 if($this->ShowSQLQuery) 42 41 { 42 echo $this->ShowSQLQuery; 43 43 if(isset($_SERVER['REMOTE_ADDR'])) echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'); 44 44 else echo($Query."\n"); -
trunk/index.php
r6 r10 16 16 } 17 17 18 //creating objects 18 19 $Database = new Database(); 20 $User = new User($Database); 21 22 23 //main body 19 24 $Gui = new Gui(); 25 26 $User->Login('maron','test'); 20 27 21 28 $Gui->ShowPage(); 22 29 23 30 31 //destroing objects 32 $User->__Destroy(); 33 24 34 ?>
Note:
See TracChangeset
for help on using the changeset viewer.