Changeset 816 for trunk/Modules/Download/Download.php
- Timestamp:
- Feb 22, 2015, 11:20:50 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Download/Download.php
r800 r816 3 3 class ModuleDownload extends AppModule 4 4 { 5 6 7 8 9 10 11 12 13 14 5 function __construct($System) 6 { 7 parent::__construct($System); 8 $this->Name = 'Download'; 9 $this->Version = '1.0'; 10 $this->Creator = 'Maron'; 11 $this->License = 'GNU/GPL'; 12 $this->Description = 'Show list of selected export and link to static files'; 13 $this->Dependencies = array(); 14 } 15 15 16 17 18 19 16 function Start() 17 { 18 $this->System->RegisterPage('download', 'PageDownload'); 19 $this->System->RegisterMenuItem(array( 20 20 'Title' => T('Download'), 21 21 'Hint' => T('List of czech to download'), … … 24 24 'Icon' => '', 25 25 ), 1); 26 26 } 27 27 } 28 28 29 29 class PageDownload extends Page 30 30 { 31 32 31 function ShowFiles() 32 { 33 33 $fileslink = $this->System->Link('/files'); 34 34 $Output = '<h3>'.T('Accessories for client').'</h3>'. … … 75 75 '<a href="'.$fileslink.'/ClientDBExtractor.exe">ClientDBExtractor.exe</a> - '.T('tool for exporting dbc files from game client').'<br />'; 76 76 return($Output); 77 77 } 78 78 79 80 79 function ShowDownload() 80 { 81 81 $Output = '<h3>'.T('Download czech').'</h3><br />'; 82 82 … … 101 101 $Output .= '<table class="BaseTable">'. 102 102 $Order['Output']; 103 103 $DbRows = $this->Database->query('SELECT `ClientVersion`.`Version` AS `Version`, '. 104 104 '`Export`.`Id`, `Export`.`ClientVersion`, `Export`.`OutputType`, `Export`.`Title`, '. 105 105 '`Export`.`Description` FROM `Export` '. … … 110 110 $ExportId = $DbExport['Id']; 111 111 112 113 114 115 112 if ($DbExport['OutputType'] == 10) 113 $filename = $this->System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'Instalace_CzechWoW_'.$DbExport['Version'].'.exe'; 114 if ($DbExport['OutputType'] == 7) 115 $filename = $this->System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'CzWoW_Addon-'.$DbExport['Version'].'.zip'; 116 116 117 117 if ($DbExport['OutputType'] == 10) 118 118 $Output .= '<tr><td><a href="'.$this->System->Link('/'.$filename). 119 119 '">CzechWoW_'.$DbExport['Version'].'.exe</a><br /> <a href="'. 120 120 $this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'; 121 121 else 122 122 if ($DbExport['OutputType'] == 7) 123 123 $Output .= '<tr><td><a href="'.$this->System->Link('/'.$filename). 124 124 '">CzWoW_Addon-'.$DbExport['Version'].'.zip</a><br /> <a href="'. … … 131 131 $Output .= '<td>'.$DbExport['Title'].'</td>'; //.'<td>'.$DbExport['ClientVersion'].'</td>'; 132 132 133 133 if ((($DbExport['OutputType'] == 10) or ($DbExport['OutputType'] == 7)) and (file_exists($filename))) 134 134 $Output .= '<td>'.date('d.m.y H:i',filemtime($filename)).'</td>'; 135 135 else 136 136 $Output .= '<td> </td>'; 137 137 138 139 138 $Output .= 139 '<td>'.str_replace("\n", '<br />',$DbExport['Description']).'</td>'. 140 140 '</tr>'; 141 141 } … … 146 146 } 147 147 148 149 150 151 148 function Show() 149 { 150 $this->Title = T('Download'); 151 $Output = ''; 152 152 if (isset($_GET['Files'])) $Output .= $this->ShowFiles(); 153 153 else $Output .= $this->ShowDownload();
Note:
See TracChangeset
for help on using the changeset viewer.