Changeset 766 for trunk/Modules/Download
- Timestamp:
- Jan 27, 2014, 10:28:05 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Download/Download.php
r742 r766 32 32 function ShowFiles() 33 33 { 34 $this->Title = T('Download');35 34 $fileslink = $this->System->Link('/files'); 36 35 $Output = '<h3>Doplňky pro klienta</h3>'. … … 79 78 } 80 79 81 function ShowDownload() {82 global $System;80 function ShowDownload() 81 { 83 82 $Output = '<h3>Stažení češtiny</h3><br />'; 84 83 … … 89 88 $Output .= '<br /><br />'; 90 89 91 $Output .= '<table class="BaseTable">'; 92 $Output .= '<tr><th>Stáhnout</th><th>Název</th><th>Datum vytvoření</th><th>Popis</th></tr>'; 93 $DbRows = $this->System->Database->query('SELECT `ClientVersion`.`Version` as Version, `Export`.`Id`,`Export`.`ClientVersion`,`Export`.`OutputType`,`Export`.`Title`,`Export`.`Description` FROM `Export` JOIN `ClientVersion` as `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` WHERE `Featured`=1 ORDER BY `ClientVersion`.`BuildNumber` DESC'); 94 while ($DbExport = $DbRows->fetch_assoc()) { 95 // echo $DbExport['BuildNumber'].'<br />'; 90 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `Featured`=1'); 91 $DbRow = $DbResult->fetch_row(); 92 $PageList = GetPageList($DbRow[0]); 93 94 $Output .= $PageList['Output']; 95 $TableColumns = array( 96 array('Name' => 'Id', 'Title' => T('Download')), 97 array('Name' => 'Title', 'Title' => T('Name2')), 98 array('Name' => 'TimeCreate', 'Title' => T('Creation date')), 99 array('Name' => 'Description', 'Title' => T('Description')), 100 ); 101 $Order = GetOrderTableHeader($TableColumns, 'Id', 1); 102 $Output .= '<table class="BaseTable">'. 103 $Order['Output']; 104 $DbRows = $this->Database->query('SELECT `ClientVersion`.`Version` AS `Version`, '. 105 '`Export`.`Id`, `Export`.`ClientVersion`, `Export`.`OutputType`, `Export`.`Title`, '. 106 '`Export`.`Description` FROM `Export` '. 107 'JOIN `ClientVersion` as `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` '. 108 'WHERE `Featured`=1 '.$Order['SQL'].$PageList['SQLLimit']); 109 while ($DbExport = $DbRows->fetch_assoc()) 110 { 96 111 $ExportId = $DbExport['Id']; 97 112 98 $filename = $ System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'Instalace_CzechWoW_'.$DbExport['Version'].'.exe';113 $filename = $this->System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'Instalace_CzechWoW_'.$DbExport['Version'].'.exe'; 99 114 100 115 if ($DbExport['OutputType'] == 10) 101 $Output .= '<tr><td><a href="'.$System->Link('/'.$filename).'">CzechWoW_'.$DbExport['Version'].'.exe</a><br /> <a href="'.$System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'; 116 $Output .= '<tr><td><a href="'.$this->System->Link('/'.$filename). 117 '">CzechWoW_'.$DbExport['Version'].'.exe</a><br /> <a href="'. 118 $this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'; 102 119 else 103 $Output .= '<tr><td><a href="'.$System->Link('/export/?Action=View&ExportId='.$ExportId.'&Tab=7').'">Exportovat</a><br /> <a href="'.$this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'; 120 $Output .= '<tr><td><a href="'.$this->System->Link('/export/?Action=View&ExportId='. 121 $ExportId.'&Tab=7').'">Exportovat</a><br /> <a href="'. 122 $this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'; 104 123 105 124 $Output .= '<td>'.$DbExport['Title'].'</td>'; //.'<td>'.$DbExport['ClientVersion'].'</td>'; … … 108 127 $Output .= '<td>'.date('d.m.y H:i',filemtime($filename)).'</td>'; 109 128 else 110 $Output .= '<td> </td>';129 $Output .= '<td> </td>'; 111 130 112 // '<td>'.$Export['OutputType'].'</td>'.113 131 $Output .= 114 132 '<td>'.str_replace("\n", '<br />',$DbExport['Description']).'</td>'. 115 // '<td><a href="'.$this->System->Link('/export/?Action=View&ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'.116 133 '</tr>'; 117 118 $Output .= '</table>';119 120 134 } 135 $Output .= '</table>'. 136 $PageList['Output']; 137 121 138 return($Output); 122 139 } 123 140 124 function Show() { 141 function Show() 142 { 143 $this->Title = T('Download'); 125 144 $Output = ''; 126 145 if (isset($_GET['Files'])) $Output .= $this->ShowFiles(); … … 128 147 129 148 return($Output); 130 } 131 149 } 132 150 } 133 151
Note:
See TracChangeset
for help on using the changeset viewer.