- Timestamp:
- Mar 1, 2010, 9:12:44 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Base/User.php
r16 r22 33 33 { 34 34 $DbResult = $this->System->Database->select('User', 'Id', 'Name="'.$Name. 35 '" AND Password=SHA1(CONCAT( "'.$Password.'", Salt))');35 '" AND Password=SHA1(CONCAT(SHA1("'.$Password.'"), Salt))'); 36 36 if($DbResult->num_rows > 0) 37 37 { … … 46 46 $Salt = GetPasswordSalt(); 47 47 $this->System->Database->insert('User', array('Name' => '"'.$Name.'"', 48 'Salt' => '"'.$Salt.'"', 'Password' => 'SHA1(CONCAT( "'.$Password.'", "'.$Salt.'"))',48 'Salt' => '"'.$Salt.'"', 'Password' => 'SHA1(CONCAT(SHA1("'.$Password.'"), "'.$Salt.'"))', 49 49 'Email' => '"'.$Email.'"', 'RegistrationTime' => 'NOW()')); 50 50 } -
trunk/Base/UserOnline.php
r16 r22 7 7 var $Id; 8 8 var $User; 9 var $AnonymousUserId; 9 10 10 11 function __construct($System) … … 12 13 parent::__construct($System); 13 14 $this->Id = 0; 14 $this->User = 1; 15 $this->AnonymousUserId = 98; 16 $this->User = $this->AnonymousUserId; 15 17 } 16 18 … … 29 31 { 30 32 // Create new record 31 $this->System->Database->insert('UserOnline', array('User' => 1,33 $this->System->Database->insert('UserOnline', array('User' => $this->AnonymousUserId, 32 34 'ActivityTime' => 'NOW()', 'SessionId' => '"'.session_id().'"', 33 35 'IpAddress' => '"'.$this->System->GetRemoteAddress().'"', … … 52 54 { 53 55 $this->System->Database->update('UserOnline', 'SessionId="'.session_id().'"', 54 array('User' => 1));55 $this->User = 1;56 array('User' => $this->AnonymousUserId)); 57 $this->User = $this->AnonymousUserId; 56 58 } 57 59 } -
trunk/CustomOutput.php
r20 r22 34 34 { 35 35 $Output = '<div class="Navigation">'; 36 if($this->System->UserOnline->User == 1)37 {38 36 // Visitor 39 37 $Output .= '<ul class="MenuItem">'; … … 46 44 $Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Localization->Translate('Links'), $this->System->Navigation->MakeLink('Main', 'Links')).'</li>'; 47 45 $Output .= '<li>'.$this->System->HTML->MakeLink($this->System->Localization->Translate('Contact'), $this->System->Navigation->MakeLink('Main', 'Contact')).'</li>'; 46 if($this->System->UserOnline->User == $this->System->UserOnline->AnonymousUserId) 47 { 48 48 $Output .= '</ul>'; 49 49 $Output .= '<ul class="MenuItem2">'; … … 52 52 } else 53 53 { 54 $Output .= '<ul class="MenuItem">';55 $Output .= '<li><a href="'.$this->System->Navigation->MakeLink('Lift', 'List').'">'.$this->System->Localization->Translate('Lifts').'</a></li>';56 $Output .= '<li><a href="'.$this->System->Navigation->MakeLink('LiftGroup', 'List').'">'.$this->System->Localization->Translate('LiftGroups').'</a></li>';57 $Output .= '<li><a href="'.$this->System->Navigation->MakeLink('LiftServiceCheck', 'List').'">'.$this->System->Localization->Translate('LiftServiceChecks').'</a></li>';58 54 $Output .= '</ul>'; 59 55 $Output .= '<ul class="MenuItem2">'; … … 131 127 $this->Document->HeadTag->SubElements[] = $Keywords; 132 128 133 $this->Document->BodyTag->SubElements = array('<div class="Title ">'.$Title.'</div>',129 $this->Document->BodyTag->SubElements = array('<div class="TitlePanel">'.$Title.'</div>', 134 130 $this->TopMenu(), $this->PageMenu(), $Content, $this->Footer()); 135 echo($this->Document->GetOutput());131 return($this->Document->GetOutput()); 136 132 } 137 133 -
trunk/Locale/csCZ.php
r20 r22 11 11 'Links' => 'Odkazy', 12 12 'Contact' => 'Kontakt', 13 'UserName' => 'Jméno', 14 'Password' => 'Heslo', 15 'UserNotFound' => 'Uživatel nenalezen', 16 'UserLoggedOut' => 'Uživatel odhlášen', 17 'UserLogout' => 'Odhlášení', 18 'UserView' => 'Profil', 19 'Email' => 'E-mail', 20 'Member' => 'Člen', 21 'UserDetails' => 'Podrobnosti', 22 'FullName' => 'Celé jméno', 23 'Edit' => 'Upravit', 24 'UserEdit' => 'Üprava účtu', 25 'Save' => 'Uložit', 13 26 ); 14 27 -
trunk/Module/Main/Controller.php
r21 r22 113 113 function Hosting() 114 114 { 115 $this->System->Output->Title = $this->System->Localization->Translate(' Internet');115 $this->System->Output->Title = $this->System->Localization->Translate('Hosting'); 116 116 117 117 $Output = 'V nabídce je provoz virtualizovaných Linuxových serverů dle dohodnutých parameterů.<br/><br/>'; -
trunk/Module/User/Controller.php
r19 r22 204 204 $this->System->User->Id = $this->System->UserOnline->User; 205 205 $this->System->User->LoadData(); 206 $_GET['M'] = 'Lift'; 207 $_GET['A'] = 'List'; 208 $LiftController = new LiftController($this->System); 209 $Output .= $LiftController->Show(); 206 207 $_GET['M'] = $this->System->DefaultModule; 208 unset($_GET['A']); 209 $_GET['Panel'] = 1; 210 $Output = $this->System->GetModuleOutput(); 210 211 } catch (UserNotFoundException $E) 211 212 { -
trunk/Style/Basic/Style.css
r20 r22 439 439 } 440 440 441 .Title 441 .TitlePanel 442 442 { 443 443 background-color: #5050FF; -
trunk/index.php
r19 r22 14 14 include_once(dirname(__FILE__).'/CustomOutput.php'); 15 15 16 include_once(dirname(__FILE__).'/Module/User/Controller.php'); 16 17 include_once(dirname(__FILE__).'/Module/Main/Controller.php'); 17 18 include_once(dirname(__FILE__).'/Module/Network/Controller.php'); … … 27 28 var $BaseURL; 28 29 var $Type; 30 var $DefaultModule; 29 31 30 32 function __construct() … … 40 42 $this->BaseURL = new URL(); 41 43 44 $this->DefaultModule = 'Main'; 42 45 $this->BaseURL->Scheme = 'http'; 43 46 $this->BaseURL->Host = $_SERVER['SERVER_NAME']; … … 59 62 } 60 63 64 function GetModuleOutput() 65 { 66 if(!array_key_exists('M', $_GET)) $_GET['M'] = $this->DefaultModule; 67 $ModuleName = $_GET['M']; 68 $ModuleName .= 'Controller'; 69 if(class_exists($ModuleName)) 70 { 71 $Module = new $ModuleName($this); 72 if(array_key_exists('Panel', $_GET)) $Output = $Module->Show(); 73 else $Output = $this->Output->Show($Module->Show()); 74 } else 75 throw new Exception('Module not found'); 76 return($Output); 77 } 78 61 79 function Run() 62 80 { … … 65 83 $this->User->Id = $this->UserOnline->User; 66 84 $this->User->LoadData(); 67 if(!array_key_exists('M', $_GET)) $_GET['M'] = 'Main'; 68 $ModuleName = $_GET['M']; 69 $ModuleName .= 'Controller'; 70 if(class_exists($ModuleName)) 71 { 72 $Module = new $ModuleName($this); 73 if(array_key_exists('Panel', $_GET)) echo($Module->Show()); 74 else $this->Output->Show($Module->Show()); 75 } else 76 throw new Exception('Module not found'); 85 echo($this->GetModuleOutput()); 77 86 } 78 87 }
Note:
See TracChangeset
for help on using the changeset viewer.