Changeset 533
- Timestamp:
- Apr 24, 2013, 10:10:33 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r532 r533 14 14 include_once(dirname(__FILE__).'/AppModule.php'); 15 15 include_once(dirname(__FILE__).'/Database.php'); 16 include_once(dirname(__FILE__).'/ Code.php');16 include_once(dirname(__FILE__).'/UTF8.php'); 17 17 include_once(dirname(__FILE__).'/System.php'); 18 18 include_once(dirname(__FILE__).'/Mail.php'); 19 19 include_once(dirname(__FILE__).'/Page.php'); 20 20 include_once(dirname(__FILE__).'/Form/Form.php'); 21 include_once(dirname(__FILE__).'/../ form_classes.php');21 include_once(dirname(__FILE__).'/../FormClasses.php'); 22 22 23 23 // Application modules -
trunk/Common/Page.php
r532 r533 99 99 function GetOutput() 100 100 { 101 try {101 //try { 102 102 $Output = $this->Show(); 103 } catch (Exception $E) {104 $Output = 'Chyba: '.$E->getMessage();105 }103 //} catch (Exception $E) { 104 // $Output = 'Chyba: '.$E->getMessage(); 105 //} 106 106 if($this->ClearPage == false) 107 107 { -
trunk/Common/Version.php
r532 r533 1 1 <?php 2 2 3 $Revision = 53 2; // Subversion revision3 $Revision = 533; // Subversion revision 4 4 $DatabaseRevision = 527; // SQL structure revision 5 5 $ReleaseTime = '2013-04-24'; -
trunk/Modules/IS/IS.php
r531 r533 85 85 $Form->SetClass($Table); 86 86 $Form->LoadValuesFromDatabase($Id); 87 $Form->OnSubmit = '?a=edit&t='.$Table.'& o=save';87 $Form->OnSubmit = '?a=edit&t='.$Table.'&i='.$_GET['i'].'&o=save'; 88 88 $Output .= $Form->ShowEditForm(); 89 89 $Output .= '<ul class="ActionMenu">'; -
trunk/Modules/News/ImportKinoVatra.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.dkvsetin.cz/rss/kino/8'; -
trunk/Modules/News/ImportObecHovezi.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.obec-hovezi.cz/web/rss.xml'; -
trunk/Modules/News/ImportTvBeskyd.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://dviproduction.cz/video/playlist.xml'; -
trunk/Modules/News/ImportZdechovCzNews.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.zdechov.cz/'; -
trunk/Modules/News/ImportZdechovCzRecords.php
r531 r533 1 1 <?php 2 2 3 include_once( '../Common/Global.php');3 include_once(dirname(__FILE__).'/../../Common/Global.php'); 4 4 5 5 $SourceURL = 'http://www.zdechov.cz/?page=uredni_deska'; -
trunk/Modules/News/News.php
r532 r533 98 98 while($NewsCategory = $DbResult->fetch_array()) 99 99 { 100 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 100 $this->NewsSetting[] = array('CategoryId' => $NewsCategory['Id'], 'Index' => $I, 'Enabled' => 1, 101 'ItemCount' => $this->System->Config['Web']['News']['Count'], 'DaysAgo' => $this->System->Config['Web']['News']['DaysAgo'], 'Group' => $NewsCategory['Group']); 101 102 $I++; 102 103 } -
trunk/Modules/News/NewsPage.php
r532 r533 36 36 else $Author = $Row['Name']; 37 37 $Output .= '<div class="Panel"><div class="Title">'.$Row['Title'].' ('.HumanDate($Row['Date']).', '.$Author.')'; 38 if( $this->System->User->User['Id'] == $Row['User'])38 if(($this->System->User->User['Id'] == $Row['User']) and ($this->System->User->CheckPermission('News', 'Insert', 'Group', $Category['Id']))) 39 39 { 40 40 $Output .= '<div class="Action">'; … … 63 63 function ShowAdd() 64 64 { 65 $Output = ''; 65 66 $Category = $this->GetCategory(); 66 67 if($this->System->User->CheckPermission('News', 'Insert', 'Group', $Category['Id'])) … … 148 149 'Nadpis:<br /><input type="text" size="54" name="title" value="'.$Row['Title'].'"><br />'. 149 150 'Obsah:<br /><textarea name="content" rows="20" cols="40">'.$Row['Content'].'</textarea><br />'. 150 'Odkaz:<br /><input type="text" size="54" name="link" ><br />'.151 'Odkaz:<br /><input type="text" size="54" name="link" value="'.$Row['Link'].'"><br />'. 151 152 '<input type="hidden" name="category" value="'.$Category['Id'].'"><br />'. 152 153 '<input type="submit" value="Uložit">'. … … 258 259 function GetCategory() 259 260 { 260 $Category = 1; // Default category261 if(array_key_exists('category', $_GET)) $Category = $_GET['category'] * 1;262 if(array_key_exists('category', $_POST)) $Category = $_POST['category'] * 1;263 if(is_null($Category)) throw new Exception('Kategorie neurčena');261 $Category = array('Id' => 1); // Default category 262 if(array_key_exists('category', $_GET)) $Category['Id'] = $_GET['category'] * 1; 263 if(array_key_exists('category', $_POST)) $Category['Id'] = $_POST['category'] * 1; 264 //if(is_null($Category)) throw new Exception('Kategorie neurčena'); 264 265 else 265 266 { 266 $DbResult = $this->Database->select('NewsCategory', '*', '`Id`='.$Category .' ORDER BY `Sequence`');267 $DbResult = $this->Database->select('NewsCategory', '*', '`Id`='.$Category['Id'].' ORDER BY `Sequence`'); 267 268 if($DbResult->num_rows > 0) $Category = $DbResult->fetch_array(); 268 else throw new Exception('Kategorie nenalezena');269 else $Category = array('Id' => 0); //throw new Exception('Kategorie nenalezena'); 269 270 } 270 271 return($Category); -
trunk/Modules/Portal/Portal.php
r526 r533 25 25 function InfoBar() 26 26 { 27 global $Config;28 29 27 $Output2 = ''; 30 28 … … 132 130 function Show() 133 131 { 134 global $Config, $User;135 136 132 $Output = ''; 137 133 if(array_key_exists('Action', $_GET)) … … 180 176 if($this->System->User->User['Id'] != null) 181 177 { 182 $ UserOptions= new Form($this->System->FormManager);183 $ UserOptions->SetClass('UserOptions');184 $ UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']);185 $ UserOptions->OnSubmit = '?Action=UserOptionsSave';186 $Output .= $ UserOptions->ShowEditForm();178 $Form = new Form($this->System->FormManager); 179 $Form->SetClass('UserOptions'); 180 $Form->LoadValuesFromDatabase($this->System->User->User['Id']); 181 $Form->OnSubmit = '?Action=UserOptionsSave'; 182 $Output .= $Form->ShowEditForm(); 187 183 } else $Output .= $this->SystemMessage('Nastavení uživatele', 'Nejste přihlášen'); 188 184 } else 189 185 if($_GET['Action'] == 'UserOptionsSave') 190 186 { 191 $ UserOptions= new Form($this->System->FormManager);192 $ UserOptions->SetClass('UserOptions');193 $ UserOptions->LoadValuesFromForm();194 $ UserOptions->SaveValuesToDatabase($this->System->User->User['Id']);187 $Form = new Form($this->System->FormManager); 188 $Form->SetClass('UserOptions'); 189 $Form->LoadValuesFromForm(); 190 $Form->SaveValuesToDatabase($this->System->User->User['Id']); 195 191 $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.'); 196 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $ UserOptions->Values['Name']);197 $ UserOptions->LoadValuesFromDatabase($this->System->User->User['Id']);198 $ UserOptions->OnSubmit = '?Action=UserOptionsSave';199 $Output .= $ UserOptions->ShowEditForm();192 $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $Form->Values['Name']); 193 $Form->LoadValuesFromDatabase($this->System->User->User['Id']); 194 $Form->OnSubmit = '?Action=UserOptionsSave'; 195 $Output .= $Form->ShowEditForm(); 200 196 } 201 197 if($_GET['Action'] == 'UserRegister') … … 288 284 'AddressTown' => $Form->Values['AddressTown'], 'AddressCountry' => $Form->Values['AddressCountry'], 289 285 'AddressPSC' => $Form->Values['AddressPSC'], 'IC' => $Form->Values['IC'], 290 'DIC' => $ UserOptions->Values['DIC']));286 'DIC' => $Form->Values['DIC'])); 291 287 $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.'); 292 288 $this->System->ModuleManager->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', -
trunk/Modules/User/User.php
r524 r533 108 108 function Register($Login, $Password, $Password2, $Email, $Name, $PhoneNumber, $ICQ) 109 109 { 110 global $Config;111 112 110 if(($Email == '') || ($Login == '') || ($Password == '') || ($Password2 == '') || ($Name == '')) $Result = DATA_MISSING; 113 111 else if($Password != $Password2) $Result = PASSWORDS_UNMATCHED; … … 333 331 function PasswordRecoveryRequest($Login, $Email) 334 332 { 335 global $Config;336 337 333 $DbResult = $this->Database->select('User', 'Login, Name, Id, Email, Password', '`Login`="'.$Login.'" AND `Email`="'.$Email.'"'); 338 334 if($DbResult->num_rows > 0) -
trunk/Modules/User/UserList.php
r523 r533 36 36 else $User['PhoneNumber'] = ' '; 37 37 38 $DbResult2 = $this->Database->query('SELECT Name, Id FROM NetworkDevice WHERE Member = (SELECT Id FROM Member WHERE Member.ResponsibleUser = '.$User['Id'].') AND Used=1 ORDER BY Name');39 38 $Devices = array(); 40 while($Device = $DbResult2->fetch_assoc()) 39 $DbResult2 = $this->Database->query('SELECT `Id` FROM `Member` WHERE `Member`.`ResponsibleUser` = '.$User['Id']); 40 while($Member = $DbResult2->fetch_assoc()) 41 41 { 42 $Devices[] = $Device['Name']; 42 $DbResult3 = $this->Database->query('SELECT `Name`, `Id` FROM `NetworkDevice` '. 43 'WHERE `Member` = '.$Member['Id'].' AND `Used`=1 ORDER BY `Name`'); 44 while($Device = $DbResult3->fetch_assoc()) 45 { 46 $Devices[] = $Device['Name']; 47 } 43 48 } 44 49 $User['Devices'] = implode(', ', $Devices); -
trunk/ToDo.txt
r526 r533 11 11 - Podpora pro inventůru 12 12 - Podpora IPv6 13 - Evidovat IP adresy v samostatné tabulce. 13 14 - Fulltextové vyhledávání v obsahu 14 15 - Automatické zálohování nastavení z routerů … … 22 23 * API pro napojení jiných systémů 23 24 * Oblíbené položky nabídky uživatelů 24 * Ruční filtrování a vyhledávání v tabulkách25 25 * Předvolené sestavy filtrů, řazení, pořadí sloupců 26 * Inicializace a aktualizace struktury databáze přímo z modulů27 26 - Udělat fond IP adres, zobrazit jejich užití, umožnit automatické přiřazení volných 28 27 - Vytvořit třídy pro práci s Mikrotik RouterOS API … … 35 34 ====== 36 35 36 - Ruční filtrování a vyhledávání v tabulkách 37 37 - Zprovoznit obsluhu stránek přes virtuální URL 38 38 - IS modul pro obecné datové manipulace s tabulkami
Note:
See TracChangeset
for help on using the changeset viewer.