Changeset 383
- Timestamp:
- Jan 23, 2012, 10:37:31 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 26 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.htaccess
r373 r383 5 5 6 6 RewriteEngine On 7 #RewriteBase /7 RewriteBase / 8 8 9 9 # Pretty urls on localhost with alias … … 11 11 RewriteCond %{REQUEST_FILENAME} !-f 12 12 RewriteCond %{REQUEST_FILENAME} !-d 13 #RewriteRule ^(.*)$ centrala/index.php?$114 RewriteRule ^(.*)$ index.php?$113 RewriteRule ^(.*)$ centrala/index.php?$1 14 #RewriteRule ^(.*)$ index.php?$1 15 15 16 16 # Pretty urls -
trunk/Common/Global.php
r379 r383 18 18 include_once('HTML.php'); 19 19 include_once('XHTML.php'); 20 include_once('URL.php'); 20 21 include_once('PageList.php'); 21 22 include_once('TableHeader.php'); … … 23 24 include_once('ViewList.php'); 24 25 include_once('ViewForm.php'); 26 include_once('Types/Type.php'); 25 27 26 28 … … 28 30 { 29 31 var $Pages = array(); 32 var $Type; 33 34 function __construct($Database) 35 { 36 parent::__construct($Database); 37 $this->Type = new Type($this); 38 } 30 39 31 40 function HumanDate($Time) … … 39 48 40 49 return($Config['Web']['RootFolder'].$Target); 41 } 50 } 42 51 } 43 52 -
trunk/Common/Module.php
r379 r383 77 77 var $Modules = array(); 78 78 var $Models = array(); 79 var $Menu = array(); 79 80 80 81 function __construct($Database) … … 92 93 //DebugLog('Loading modules...'); 93 94 $this->Modules = array(); 94 $Query = 'SELECT `Id`, `Name` FROM `SystemModule`';95 $Query = 'SELECT `Id`, `Name`,`Installed` FROM `SystemModule`'; 95 96 if($Installed) $Query .= ' WHERE `Installed`=1'; 96 else $Query .= ' WHERE `Installed`=0';97 else $Query .= ''; // WHERE `Installed`=0'; 97 98 $DbResult = $this->Database->query($Query); 98 99 while($Module = $DbResult->fetch_array()) … … 103 104 $NewModule = new $ModuleClassName($this->Database, $this); 104 105 $NewModule->Id = $Module['Id']; 106 $NewModule->Installed = $Module['Installed']; 105 107 $this->Modules[$Module['Name']] = $NewModule; 106 108 } … … 146 148 $this->LoadModules(false); 147 149 foreach($this->Modules as $Index => $Module) 148 { 150 { 149 151 $this->Modules[$Index]->Install(); 150 152 } -
trunk/Common/PageList.php
r373 r383 72 72 } 73 73 } 74 if($PagesMax < ($PageCount - 1)) $ Result .= ' ... ';74 if($PagesMax < ($PageCount - 1)) $this->Output .= ' ... '; 75 75 if($this->Page < ($PageCount - 1)) 76 76 { -
trunk/Common/TableHeader.php
r373 r383 13 13 var $Columns; 14 14 var $QueryString; 15 var $System; 15 16 16 17 function __construct($System) 17 18 { 18 parent::__construct($System); 19 //parent::__construct($System); 20 $this->System = &$System; 21 $this->Order = array(); 19 22 $this->OrderDirSQL = array('ASC', 'DESC'); 20 23 $this->OrderArrowImage = array('sort_asc.png', 'sort_desc.png'); … … 99 102 if(!array_key_exists('Title', $Column)) $Title = $ColumnName; 100 103 else $Title = $Column['Title']; 101 if(strpos($Title, '<') === false) $Title = $this->System->Localization->Translate($Title);104 //if(strpos($Title, '<') === false) $Title = $this->System->Localization->Translate($Title); 102 105 103 106 // Create hyperlink -
trunk/Common/View.php
r373 r383 23 23 class View 24 24 { 25 var $System; 25 26 var $Database; 26 27 var $Name; … … 29 30 var $ModelName; 30 31 31 function __construct($ Database)32 function __construct($System) 32 33 { 33 $this->Database = &$Database; 34 $this->System = &$System; 35 $this->Database = &$System->Database; 34 36 } 35 37 -
trunk/Common/ViewForm.php
r373 r383 7 7 var $OnSubmit = ''; 8 8 9 function __construct($ Database)10 { 11 $this->Database = &$Database;9 function __construct($System) 10 { 11 parent::__construct($System); 12 12 } 13 13 -
trunk/Common/ViewList.php
r373 r383 3 3 class ViewList extends View 4 4 { 5 function __construct($Database) 5 var $DefaultOrder; 6 var $Columns; 7 var $SQL; 8 var $SQLJoin; 9 var $Rows; 10 var $Actions; 11 var $PageList; 12 var $TableHeader; 13 var $FilterColumn; 14 var $Module; 15 var $PanelAction; 16 17 function __construct($System) 6 18 { 7 $this->Database = &$Database; 19 parent::__construct($System); 20 $this->FilterColumn = ''; 21 $this->FilterId = 0; 22 $this->PageList = new PageList($this->System); 23 $this->TableHeader = new TableHeader($this->System); 24 $this->Rows = array(); 25 $this->PanelAction = 'ListPanel'; 26 $this->DefaultOrder = array(); 8 27 } 9 28 29 function Show() 30 { 31 $Output = $this->PageList->Output; 32 $Output .= '<table class="WideTable">'; 33 $Output .= $this->TableHeader->Output; 34 foreach($this->Rows as $Row2) 35 { 36 $Row = array(); 37 foreach($Row2 as $Index => $Item) 38 $Row[$Index]['Value'] = $Item; 39 $Row = $this->ProcessRow($Row); 40 41 $Output .= '<tr>'; 42 foreach($this->Columns as $ColumnName => $Column) 43 if($Column['Type'] != 'Hidden') 44 { 45 if(array_key_exists('Class', $Row[$ColumnName]) and ($Row[$ColumnName]['Class'] != '')) 46 $Style = ' class="'.$Row[$ColumnName]['Class'].'"'; else $Style =''; 47 $Output .= '<td'.$Style.'>'; 48 $Output .= $this->System->Type->ExecuteTypeEvent($Column['Type'], 49 'OnView', array('Name' => $ColumnName, 'Value' => $Row[$ColumnName]['Value'], 'Type' => $Column['Type'])); 50 $Output .= '</td>'; 51 } 52 if(is_array($this->Actions)) 53 { 54 $Output .= '<td>'; 55 foreach($this->Actions as $Action) 56 { 57 if(array_key_exists('Confirm', $Action)) $Confirm = ' onclick="return confirmAction(\''.$this->System->Localization->Translate($Action['Confirm']).'\');"'; 58 else $Confirm = ''; 59 if(strpos($Action['Name'], '<') !== false) $ActionName = $Action['Name']; 60 else $ActionName = $this->System->Localization->Translate($Action['Name']); 61 $Output .= '<a'.$Confirm.' href="'.$this->System->Navigation->MakeLink($Action['Module'], $Action['Action'], array('Id' => $Row['Id']['Value'])).'">'. 62 $ActionName.'</a> '; 63 } 64 $Output .= '</td>'; 65 } 66 $Output .= '</tr>'; 67 } 68 $Output .= '</table>'; 69 $Output .= $this->PageList->Output; 70 return($Output); 71 } 72 73 function LoadFromDatabase() 74 { 75 // Get total item count 76 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM '.$this->Name. 77 ' '.$this->SQLJoin); 78 $DbRow = $DbResult->fetch_row(); 79 $this->PageList->TotalCount = $DbRow[0]; 80 $this->PageList->HTMLId = $this->Module; 81 $this->PageList->QueryItems->Data['M'] = $this->Module; 82 $this->PageList->QueryItems->Data['A'] = $this->PanelAction; 83 $this->PageList->QueryItems->Data['FilterColumn'] = $this->FilterColumn; 84 $this->PageList->Process(); 85 86 // Build table header and ordering 87 $this->TableHeader->QueryItems = $this->PageList->QueryItems; 88 $this->TableHeader->HTMLId = $this->Module; 89 $this->TableHeader->Columns = array(); 90 foreach($this->Columns as $Item) 91 { 92 $this->TableHeader->Columns[$Item['Name']] = array('Title' => $Item['Title'], 93 'Type' => $Item['Type'], 'SQL' => $Item['SQL']); 94 } 95 if(is_array($this->Actions)) 96 $this->TableHeader->Columns['Actions'] = array('Type' => 'String', 'SQL' => ''); 97 $this->TableHeader->DefaultOrder = $this->DefaultOrder; 98 $this->TableHeader->Process(); 99 100 //$this->System->Navigation->UnsetParameter('Panel'); 101 102 // Build column list 103 $Columns = $this->Name.'.Id'; 104 foreach($this->Columns as $ColumnName => $Column) 105 $Columns .= ', '.$Column['SQL'].' AS `'.$ColumnName.'`'; 106 107 $this->DbRows = array(); 108 $DbResult = $this->System->Database->query('SELECT '.$Columns.' FROM '.$this->Name. 109 ' '.$this->SQLJoin.$this->TableHeader->SQL.$this->PageList->SQLLimit); 110 while($DbRow = $DbResult->fetch_assoc()) 111 { 112 $this->Rows[] = $DbRow; 113 } 114 } 115 116 function ProcessRow($Row) 117 { 118 return($Row); 119 } 120 10 121 function AddItemString($Name, $Title) 11 122 { 12 $this->Items[$Name] = array('Name' => $Name, 'Title' => $Title, 13 'Type' => ViewItemTypeString); 14 } 15 123 $this->Columns[$Name] = array('Name' => $Name, 'Title' => $Title, 124 'Type' => ViewItemTypeString, 'SQL' => $Name); 125 } 16 126 } 17 127 -
trunk/Modules/FrontPage/FrontPage.php
r378 r383 15 15 if($HyperLink['IconFile'] == '') $HyperLink['IconFile'] = 'clear.png'; 16 16 if(substr($HyperLink['URL'], 0, 4) != 'http') $HyperLink['URL'] = $this->System->Config['Web']['RootFolder'].$HyperLink['URL']; 17 if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System->Mod els['User']->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation'])))17 if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System->Modules['User']->Models['User']->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation']))) 18 18 $Output .= '<img alt="'.$HyperLink['Name'].'" src="images/favicons/'.$HyperLink['IconFile'].'" width="16" height="16" /> <a href="'.$HyperLink['URL'].'">'.$HyperLink['Name'].'</a><br />'; 19 19 } … … 54 54 //$Output .= 'Server běží: '.$this->GetServerUptime().' '; 55 55 56 if($this->System->Mod els['User']->CheckPermission('Finance', 'DisplaySubjectState'))57 { 58 $DbResult = $this->Database->select('Subject', 'Money', 'Id=(SELECT Subject FROM Member WHERE Id=(SELECT Member FROM User WHERE Id='.$this->System->Mod els['User']->User['Id'].'))');56 if($this->System->Modules['User']->Models['User']->CheckPermission('Finance', 'DisplaySubjectState')) 57 { 58 $DbResult = $this->Database->select('Subject', 'Money', 'Id=(SELECT Subject FROM Member WHERE Id=(SELECT Member FROM User WHERE Id='.$this->System->Modules['User']->Models['User']->User['Id'].'))'); 59 59 if($DbResult->num_rows > 0) 60 60 { … … 71 71 { 72 72 $Output = '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Profil</a><br />'; 73 if($this->System->Mod els['User']->CheckPermission('Finance', 'MemberOptions'))73 if($this->System->Modules['User']->Models['User']->CheckPermission('Finance', 'MemberOptions')) 74 74 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'?Action=MemberOptions">Domácnost</a><br />'; 75 if($this->System->Mod els['User']->CheckPermission('Finance', 'DisplaySubjectState'))75 if($this->System->Modules['User']->Models['User']->CheckPermission('Finance', 'DisplaySubjectState')) 76 76 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/uzivatel/">Finance</a><br />'; 77 if($this->System->Mod els['User']->CheckPermission('Network', 'RegistredHostList'))77 if($this->System->Modules['User']->Models['User']->CheckPermission('Network', 'RegistredHostList')) 78 78 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/sit/registrovane-pocitace/">Počítače</a><br />'; 79 if($this->System->Mod els['User']->CheckPermission('News', 'Insert'))79 if($this->System->Modules['User']->Models['User']->CheckPermission('News', 'Insert')) 80 80 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />'; 81 if($this->System->Mod els['User']->CheckPermission('EatingPlace', 'Edit'))81 if($this->System->Modules['User']->Models['User']->CheckPermission('EatingPlace', 'Edit')) 82 82 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/edit/">Editace jídelníčků</a><br />'; 83 if($this->System->Mod els['User']->CheckPermission('Finance', 'Manage'))83 if($this->System->Modules['User']->Models['User']->CheckPermission('Finance', 'Manage')) 84 84 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/sprava/">Správa financí</a><br />'; 85 if($this->System->Mod els['User']->CheckPermission('Network', 'Administration'))85 if($this->System->Modules['User']->Models['User']->CheckPermission('Network', 'Administration')) 86 86 $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/sit/sprava/">Správa sítě</a><br />'; 87 87 return($Output); … … 149 149 $Form = new UserLoginView($this->Database); 150 150 $Form->OnSubmit = '?Action=Login'; 151 $Result = $this->System->Mod els['User']->Login($_POST['Username'], $_POST['Password']);151 $Result = $this->System->Modules['User']->Models['User']->Login($_POST['Username'], $_POST['Password']); 152 152 $Output .= $this->SystemMessage('Přihlášení', $Result); 153 153 if($Result <> USER_LOGGED_IN) … … 162 162 if($_GET['Action'] == 'Logout') 163 163 { 164 $Output .= $this->SystemMessage('Odhlášení', $this->System->Mod els['User']->Logout());164 $Output .= $this->SystemMessage('Odhlášení', $this->System->Modules['User']->Models['User']->Logout()); 165 165 } else 166 166 if($_GET['Action'] == 'UserOptions') 167 167 { 168 168 $UserOptions = new UserOptionsView($this->Database); 169 $UserOptions->LoadValuesFromDatabase($this->System->Mod els['User']->User['Id']);169 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->Models['User']->User['Id']); 170 170 $UserOptions->OnSubmit = '?Action=UserOptionsSave'; 171 171 $Output .= $UserOptions->ShowEditForm(); … … 175 175 $UserOptions = new UserOptionsView($this->Dstabase, array()); 176 176 $UserOptions->LoadValuesFromForm(); 177 $UserOptions->SaveValuesToDatabase($this->System->Mod els['User']->User['Id']);177 $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->Models['User']->User['Id']); 178 178 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); 179 179 $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']); 180 $UserOptions->LoadValuesFromDatabase($this->System->Mod els['User']->User['Id']);180 $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->Models['User']->User['Id']); 181 181 $UserOptions->OnSubmit = '?Action=UserOptionsSave'; 182 182 $Output .= $UserOptions->ShowEditForm(); … … 191 191 if($_GET['Action'] == 'UserRegisterConfirm') 192 192 { 193 $Output .= $this->SystemMessage('Potvrzení registrace', $this->System->Mod els['User']->RegisterConfirm($_GET['User'], $_GET['H']));193 $Output .= $this->SystemMessage('Potvrzení registrace', $this->System->Modules['User']->Models['User']->RegisterConfirm($_GET['User'], $_GET['H'])); 194 194 } else 195 195 if($_GET['Action'] == 'PasswordRecovery') … … 203 203 $Form = new PasswordRecoveryView($this->Database); 204 204 $Form->LoadValuesFromForm(); 205 $Result = $this->System->Mod els['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);205 $Result = $this->System->Modules['User']->Models['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']); 206 206 $Output .= $this->SystemMessage('Obnova hesla', $Result); 207 207 if($Result <> USER_PASSWORD_RECOVERY_SUCCESS) … … 212 212 if($_GET['Action'] == 'PasswordRecoveryConfirm') 213 213 { 214 $Output .= $this->SystemMessage('Obnova hesla', $this->System->Mod els['User']->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P']));214 $Output .= $this->SystemMessage('Obnova hesla', $this->System->Modules['User']->Models['User']->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P'])); 215 215 } else 216 216 if($_GET['Action'] == 'UserRegisterSave') … … 218 218 $Form = new UserRegisterView($this->Database, array()); 219 219 $Form->LoadValuesFromForm(); 220 $Result = $this->System->Mod els['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']);220 $Result = $this->System->Modules['User']->Models['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']); 221 221 $Output .= $this->SystemMessage('Registrace nového účtu', $Result); 222 222 if($Result <> USER_REGISTRATED) … … 229 229 { 230 230 $UserOptions = new MemberOptionsView($this->Database); 231 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Mod els['User']->User['Member']);231 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->Models['User']->User['Member']); 232 232 $DbRow = $DbResult->fetch_array(); 233 233 foreach($UserOptions->Items as $Index => $Item) … … 247 247 $UserOptions->Values['BillingPeriodNext'] = 2; 248 248 249 $DbResult = $this->Database->update('Member', 'Id='.$this->System->Mod els['User']->User['Member'], array('InternetTariffNextMonth' => $UserOptions->Values['InternetTariffNextMonth'], 'FamilyMemberCount' => $UserOptions->Values['FamilyMemberCount'], 'BillingPeriodNext' => $UserOptions->Values['BillingPeriodNext']));250 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Mod els['User']->User['Member']);249 $DbResult = $this->Database->update('Member', 'Id='.$this->System->Modules['User']->Models['User']->User['Member'], array('InternetTariffNextMonth' => $UserOptions->Values['InternetTariffNextMonth'], 'FamilyMemberCount' => $UserOptions->Values['FamilyMemberCount'], 'BillingPeriodNext' => $UserOptions->Values['BillingPeriodNext'])); 250 $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Modules['User']->Models['User']->User['Member']); 251 251 $Member = $DbResult->fetch_assoc(); 252 252 $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'], array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'], 'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'], 'DIC' => $UserOptions->Values['DIC'])); 253 253 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 254 254 $this->System->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', $UserOptions->Values['Name']); 255 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Mod els['User']->User['Member']);255 $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->Models['User']->User['Member']); 256 256 $DbRow = $DbResult->fetch_array(); 257 257 foreach($UserOptions->Items as $Index => $Item) … … 288 288 else if($Panel['Module'] == 'UserOptions') 289 289 { 290 if($this->System->Mod els['User']->User['Id'] != $this->System->Models['User']->AnonymousUserId)290 if($this->System->Modules['User']->Models['User']->User['Id'] != $this->System->Modules['User']->Models['User']->AnonymousUserId) 291 291 $Output .= $this->Panel('Přihlášený uživatel', $this->UserPanel()); 292 292 } else -
trunk/Modules/Log/Log.php
r378 r383 113 113 { 114 114 $this->Database->insert('Log', array('Time' => 'NOW()', 115 'User' => $this->System->Mod els['User']->User['Id'], 'Module' => $Module,115 'User' => $this->System->Module['User']->Models['User']->User['Id'], 'Module' => $Module, 116 116 'Operation' => $Operation, 'Value' => $Value)); 117 117 //echo($this->Database->LastQuery); -
trunk/Modules/NetworkConfig/NetworkConfig.php
r382 r383 27 27 $this->Creator = 'Chronos'; 28 28 $this->License = 'GNU/GPL'; 29 $this->Description = ' Mikrotik RouterOSconfiguration';29 $this->Description = 'Network device remote configuration'; 30 30 $this->Dependencies = array('Network'); 31 31 $this->SupportedModels = array('NetworkConfiguration'); -
trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php
r382 r383 51 51 $this->Dependencies = array('NetworkConfig'); 52 52 $this->SupportedModels = array('NetworkFirewall', 'NetworkMark', 53 'NetworkMang eSubgroup');53 'NetworkMangleSubgroup'); 54 54 } 55 55 -
trunk/Modules/News/News.php
r378 r383 130 130 $Output = '<div class="NewsPanel"><div class="Title">'.$Row['Caption']; 131 131 $Output .= '<div class="Action"><a href="aktuality/?category='.$Category.'">Zobrazit</a>'; 132 if($this->System->Mod els['User']->CheckPermission('News', 'Insert', 'Group', $Category))132 if($this->System->Modules['User']->Models['User']->CheckPermission('News', 'Insert', 'Group', $Category)) 133 133 $Output .= ' <a href="aktuality/?action=add&category='.$Category.'">Přidat</a>'; 134 134 $Output .= '</div></div><div class="Content">'; -
trunk/Modules/Project/Project.php
r378 r383 1 1 <?php 2 3 class ProjectPage extends Page 4 { 5 var $FullTitle = 'Projekty'; 6 var $ShortTitle = 'Projekty'; 7 8 function Show() 9 { 10 $View = new ProjectView($this->System); 11 $View->LoadFromDatabase(); 12 return($View->Show()); 13 } 14 } 15 16 class ProjectView extends ViewList 17 { 18 function __construct($System) 19 { 20 parent::__construct($System); 21 $this->Name = 'Project'; 22 //$this->AddPropertyDateTime('TimeSchedule'); 23 //$this->AddPropertyOneToMany('UserAssignedTo', 'User'); 24 //$this->AddPropertyText('Description'); 25 $this->AddItemString('Description', 'Description'); 26 } 27 } 2 28 3 29 class Project extends Model … … 50 76 function Init() 51 77 { 78 $this->System->Pages['projekt'] = 'ProjectPage'; 52 79 } 53 80 } -
trunk/Modules/User/User.php
r381 r383 390 390 { 391 391 parent::Install(); 392 $this->Database->insert('User', array('Id' => ANONYMOUS_ID, 'Login' => 'Anonymous', 'Name' => 'Anonymous', 393 'Password' => '')); 392 if(!$this->Installed) 393 { 394 $this->Database->insert('User', array('Id' => ANONYMOUS_ID, 'Login' => 'Anonymous', 'Name' => 'Anonymous', 395 'Password' => '')); 396 } 394 397 } 395 398
Note:
See TracChangeset
for help on using the changeset viewer.