Changeset 506
- Timestamp:
- Apr 1, 2013, 10:17:42 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 6 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r505 r506 22 22 include_once(dirname(__FILE__).'/Page.php'); 23 23 include_once(dirname(__FILE__).'/Form/Form.php'); 24 include_once(dirname(__FILE__).'/../aktuality/news.php');25 24 include_once(dirname(__FILE__).'/../finance/bills.php'); 26 25 include_once(dirname(__FILE__).'/../finance/finance.php'); … … 43 42 include_once(dirname(__FILE__).'/../Modules/FinanceBankAPI/FinanceBankAPI.php'); 44 43 include_once(dirname(__FILE__).'/../Modules/NetworkShare/NetworkShare.php'); 44 include_once(dirname(__FILE__).'/../Modules/News/News.php'); 45 45 46 46 class System extends Module … … 194 194 $System->AddModule(new User()); 195 195 if(isset($_SERVER['REMOTE_ADDR'])) $System->Modules['User']->Check(); 196 $System->AddModule(new News());197 196 $System->AddModule(new Bill()); 198 197 $System->AddModule(new Finance()); … … 215 214 $System->ModuleManager->RegisterModule(new ModuleFinanceBankAPI($System)); 216 215 $System->ModuleManager->RegisterModule(new ModuleNetworkShare($System)); 216 $System->ModuleManager->RegisterModule(new ModuleNews($System)); 217 217 $System->ModuleManager->StartAll(); 218 218 } -
trunk/Modules/File/File.php
r505 r506 13 13 function Delete($Id) 14 14 { 15 global $Config;16 17 15 $DbResult = $this->Database->select('File', 'Name', 'Id='.$Id); 18 16 if($DbResult->num_rows > 0) … … 26 24 function CreateFromUpload($Name) 27 25 { 28 global $Config;29 30 26 // Submited form with file input have to be enctype="multipart/form-data" 31 27 $Result = 0; … … 37 33 $this->Database->query('INSERT INTO File (`Name`, `Size`) VALUES ("'.$FileName.'", '.filesize($_FILES[$Name]['tmp_name']).')'); 38 34 $InsertId = $this->Database->insert_id; 39 if(move_uploaded_file($_FILES[$Name]['tmp_name'], $ Config['Web']['UploadFileFolder'].'/'.$InsertId.'_'.$FileName)) $Result = $InsertId;35 if(move_uploaded_file($_FILES[$Name]['tmp_name'], $this->FilesDir.'/'.$InsertId.'_'.$FileName)) $Result = $InsertId; 40 36 } 41 37 } … … 54 50 function Download($Id) 55 51 { 56 global $Config;57 58 52 $DbResult = $this->Database->select('File', '*', 'Id='.addslashes($Id)); 59 53 if($DbResult->num_rows > 0) 60 54 { 61 55 $DbRow = $DbResult->fetch_assoc(); 62 //Header('Content-Type: '.$this->DetectMimeType($this->FilesDir.'/'.$DbRow['Name'])); 63 //Header('Content-Disposition: attachment; filename="'.$DbRow['Name'].'"'); 64 print_r($this); 65 echo(file_get_contents($this->FilesDir.'/'.$DbRow['Name'])); 56 if(file_exists($this->FilesDir.'/'.$DbRow['Name'])) 57 { 58 Header('Content-Type: '.$this->DetectMimeType($this->FilesDir.'/'.$DbRow['Name'])); 59 Header('Content-Disposition: attachment; filename="'.$DbRow['Name'].'"'); 60 echo(file_get_contents($this->FilesDir.'/'.$DbRow['Name'])); 61 } else echo('Soubor nenalezen!'); 66 62 } else echo('Soubor nenalezen!'); 67 63 } -
trunk/Modules/FinanceBankAPI/FioDemo.php
r505 r506 4 4 5 5 $Fio = new FioAPI(); 6 $Fio->Token = ' YEEd9LlZ5SJ5VcxFcdbAwCji6UTtxve2ns5sClfCbii8Taq63uP7JNsa7OeN1Oum';6 $Fio->Token = ''; 7 7 $Records = $Fio->Import(time() - 3600 * 24 * 31 * 2, time()); 8 8 //print_r($Records); -
trunk/Modules/Portal/Portal.php
r501 r506 5 5 class PagePortal extends Page 6 6 { 7 var $Dependencies = array('News');8 7 var $FullTitle = 'Zděchovský rozcestník'; 9 8 var $ShortTitle = ''; … … 141 140 if($_GET['Action'] == 'CustomizeNewsSave') 142 141 { 143 $Output .= $this->System->Module s['News']->CustomizeSave();142 $Output .= $this->System->ModuleManager->Modules['News']->CustomizeSave(); 144 143 } else 145 144 if($_GET['Action'] == 'LoginForm') … … 334 333 } else 335 334 if($Panel['Module'] == 'Webcam') $Output .= $this->Panel('Kamery', $this->WebcamPanel()); 336 else if($Panel['Module'] == 'NewsGroupList') $Output .= $this->Panel('Aktuality', $this->System->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>')); 335 else if($Panel['Module'] == 'NewsGroupList') 336 $Output .= $this->Panel('Aktuality', $this->System->ModuleManager->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>')); 337 337 } 338 338 $Output .= '</td>'; … … 353 353 $this->License = 'GNU/GPLv3'; 354 354 $this->Description = 'Community portal.'; 355 $this->Dependencies = array( );355 $this->Dependencies = array('News'); 356 356 } 357 357
Note:
See TracChangeset
for help on using the changeset viewer.