Changeset 18 for trunk/class
- Timestamp:
- Jun 23, 2012, 12:47:30 PM (13 years ago)
- Location:
- trunk/class
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/class/Form.php
r16 r18 20 20 } 21 21 22 function Show() { 23 if ($this->title != '') echo ('<strong>'.$this->title.'</strong>'); 24 echo(' 22 function GetText() { 23 $return = ''; 24 if ($this->title != '') $return .= '<strong>'.$this->title.'</strong>'; 25 $return .= ' 25 26 <form action="'.$this->action.'" method="'.$this->method.'"> 26 <table>' );27 <table>'; 27 28 28 29 foreach($this->inputs as $input) 29 30 { 30 echo'<tr>';31 $return .= '<tr>'; 31 32 32 if (isset($input['description'])) echo'<td>'.$input['description'].'</td>';33 else echo'<td></td>';33 if (isset($input['description'])) $return .= '<td>'.$input['description'].'</td>'; 34 else $return .= '<td></td>'; 34 35 35 echo'<td><input ';36 $return .= '<td><input '; 36 37 37 if (isset($input['type'])) echo'type="'.$input['type'].'" ';38 if (isset($input['name'])) echo'name="'.$input['name'].'" ';39 if (isset($input['value'])) echo'value="'.$input['value'].'" ';38 if (isset($input['type'])) $return .= 'type="'.$input['type'].'" '; 39 if (isset($input['name'])) $return .= 'name="'.$input['name'].'" '; 40 if (isset($input['value'])) $return .= 'value="'.$input['value'].'" '; 40 41 41 echo'/></td></tr>';42 $return .= '/></td></tr>'; 42 43 } 43 44 44 echo('</table> 45 </form>'); 46 45 $return .= '</table> 46 </form>'; 47 return $return; 48 } 49 50 function Show() 51 { 52 53 echo $this->GetText(); 47 54 } 48 55 -
trunk/class/Gui.php
r14 r18 12 12 private $Pages = array(); 13 13 private $Language; 14 private $User; 14 15 15 16 function __construct($User) … … 21 22 $this->InitLinks(); 22 23 $this->InitPages(); 24 $this->User = $User; 23 25 24 26 //have to be after inicialization of pages … … 29 31 private function InitLinks() { 30 32 $this->Links['SourceCode'] = new Link('Zdrojové kódy','http://svn.zdechov.net/svn/phpvpsadmin/',''); 33 $this->Links['logout'] = new Link('Odhlásit', '?logout' , 'Odhlásit se z webového systému'); 31 34 32 35 } … … 35 38 private function InitPages() { 36 39 $this->Pages['home'] = new PageHome($this->Language); 40 $this->Pages['login'] = new PageLogin($this->Language); 41 $this->Pages['register'] = new PageRegister($this->Language); 37 42 38 43 } … … 71 76 '<link rel="shortcut icon" href="'.$this->Config->Web['Icon'].'" />'); 72 77 echo('<title>'.$this->Config->Web['Title'].'</title></head><body><table><tr><td>'); 78 //left panel 73 79 80 foreach($this->Pages as $Key => $Page ) 81 { 82 echo $Page->Link->Get(); 83 echo '<br />'; 84 } 85 86 if ($this->User->Licence(0)) { 87 echo 'PÅihlášen '; 88 echo $this->Links['logout']->Get(); 89 } 90 // else echo 'notlog'; 91 92 93 echo ('</td><td>'); 94 //right panel 74 95 } 75 96 -
trunk/class/Page.php
r9 r18 6 6 class Page 7 7 { 8 protected $Content = ' ggg';8 protected $Content = ''; 9 9 protected $Language; 10 10 protected $Key; … … 18 18 $Addres = '?'.$Key; 19 19 $this->Key = $Key; 20 $this->Content = $Language->Texts[$Key]['content']; 20 21 $this->Link = new Link($Name,$Addres,$Title); 21 22 } -
trunk/class/PageHome.php
r9 r18 16 16 protected function Generate() { 17 17 //generation of the page 18 parent::Generate($this->Language->Texts['home']['content'].' '.$this->Link->Get()); 18 19 20 parent::Generate($this->Content); 19 21 20 22 } -
trunk/class/Server.php
r17 r18 26 26 27 27 28 class Database28 class Server 29 29 { 30 30 protected $Id = -1; … … 75 75 } 76 76 77 function GetId() 78 { 79 return $this->Id; 80 } 77 81 } 78 82
Note:
See TracChangeset
for help on using the changeset viewer.