Changeset 282 for trunk/download.php
- Timestamp:
- Sep 4, 2009, 1:27:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/download.php
r266 r282 8 8 { 9 9 10 10 global $Database; 11 11 12 13 12 $TranslationTree = GetTranslationTree(); 13 $Group = $TranslationTree[$TableID]; 14 14 15 16 15 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(distinct(entry)) FROM '.$Group['TablePrefix'].' WHERE (Language <> 0) AND (Complete = 1) AND User IN('.$Users.')')); 16 $NumberTranslate = $ID[0]; 17 17 18 19 18 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM '.$Group['TablePrefix'].' WHERE (Language = 0)')); 19 $NumberAJ = $ID[0]; 20 20 21 22 23 24 if (($TableID == 14) or ($TableID == 15)) $result = true; 25 26 27 21 if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100; else $Percent = 0; 22 $Percent = substr($Percent, 0, 5); 23 24 if (($TableID == 14) or ($TableID == 15)) $result = true; 25 26 return ($Group['Name'].': '.$NumberTranslate.'/'.$NumberAJ.' '.$Percent.'% 27 '); 28 28 } 29 29 30 31 32 33 34 35 36 37 38 'Popis: <textarea rows="20" cols="60"name="text">');39 40 $ExportSetting = unserialize($Line['ExportSetting']); 41 42 30 if (array_key_exists('createverse', $_GET) and Licence(LICENCE_ADMIN)) { 31 if (array_key_exists('verse', $_POST)) { //ukládání 32 $Database->SQLCommand('INSERT INTO `verseclient` (`verse` ,`date` ,`text` ,`user`) 33 VALUES ( "'.$_POST['verse'].'", NOW( ) , "'.$_POST['text'].'", "'.$_SESSION['UserID'].'");'); 34 WriteLog('Nová verze ('.$_POST['verse'].') češitny pro clienta uložena.',4); 35 } else { //formulář 36 echo ('<form action"" method="post">'. 37 'Verze: <input type="text" name="verse" /> <input type="submit" value="Uložit" /><br />'. 38 'Popis: <textarea rows="20" cols="60" name="text">'); 39 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT ExportSetting FROM user Where ID = '.$_SESSION['UserID'])); 40 $ExportSetting = unserialize($Line['ExportSetting']); 41 42 $Tables = 'Texty obsažené v addonu: Přeložené/nepřeložené ProcentaPřeložených% 43 43 '; 44 45 46 47 48 49 50 44 foreach($ExportSetting['groups'] as $Index) $Tables .= GetPercentOfTable($Index,implode(',', $ExportSetting['users-selection'])); 45 46 $ID = $Database->SQLCommand('SELECT user FROM user WHERE ID IN('.implode(',', $ExportSetting['users-selection']).')'); 47 $Users = 'Vyexportovány překlady od uživatelů: ( '; 48 while($Line = mysql_fetch_assoc($ID)) $Users .= $Line['user'].', '; $Users .= ' )'; 49 //Výpis 50 echo (' 51 51 '.$Users.' 52 52 '.$Tables); 53 54 55 56 53 54 echo ('</textarea></form>'); 55 } 56 } 57 57 58 58 if(array_key_exists('addon', $_GET)) … … 63 63 while($Line = mysql_fetch_assoc($ID)) 64 64 { 65 65 echo('<tr>'. 66 66 '<td><strong>'.$Line['verse'].'</strong> <a href="tmp/Addon/CzWoW_'.$Line['verse'].'.zip">Stáhnout</a> <br />'.$Line['date'].'</td>'. 67 67 '<td>'.str_replace(chr(13),'<br />',$Line['text']).'</td>'); 68 68 echo('</tr>'); 69 69 } 70 70 echo('</table>'); 71 71 } else 72 72 { 73 74 73 echo('<br /><h3><a href="export/">Export textů</a> - Export podle vlastního výběru do SQL, XML, LUA nebo Addonu</h3>'. 74 '<br />Exportovat podle zálohovaného nastavení:<form action="export" method="get"><div>'. 75 '<input name="action" value="output" type="hidden" />'. 76 '<textarea name="ExportSetting" rows="10" cols="40"></textarea>'. 77 '<input type="submit" value="Exportovat" /></div></form><br /><br />'); 75 78 76 echo(' 77 <br /> 78 <h3><a href="export/">Export textů</a> - Export podle vlastního výběru do SQL, XML, LUA nebo Addonu</h3> 79 <br />Exportovat podle zálohovaného nastavení:<form action="export" method="get"> 80 <input name="action" value="output" type="hidden"> 81 <textarea name="ExportSetting" rows="10" cols="40"></textarea><input type="submit" value="Exportovat" /></form><br /> 82 <br />'); 83 84 if (Licence(LICENCE_USER)) { 79 if (Licence(LICENCE_USER)) 80 { 85 81 $ID = $Database->SQLCommand('SELECT * FROM tasks WHERE User = '.$_SESSION['UserID'].' ORDER BY Date DESC LIMIT 10'); 86 82 if (mysql_num_rows($ID) > 0) … … 90 86 while($Line = mysql_fetch_assoc($ID)) 91 87 { 92 if ($Line['Active'] == 0) 93 { 94 $Active = 'Hotovo'; 95 $Download = '<a href="'.$Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW_DBC.zip">Stáhnout - CzWoW_DBC.zip</a>'; 96 } else { 97 $Active = 'Čeká na zpracování'; 98 $Download = 'CzWoW_DBC.zip'; 99 } 100 if ($Line['Downloaded'] == 1) $Downloaded = 'Staženo'; else $Downloaded = 'Nestaženo'; 101 echo('<tr>'. 88 if ($Line['Active'] == 0) 89 { 90 $Active = 'Hotovo'; 91 $Download = '<a href="'.$Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW_DBC.zip">Stáhnout - CzWoW_DBC.zip</a>'; 92 } else 93 { 94 $Active = 'Čeká na zpracování'; 95 $Download = 'CzWoW_DBC.zip'; 96 } 97 if ($Line['Downloaded'] == 1) $Downloaded = 'Staženo'; else $Downloaded = 'Nestaženo'; 98 echo('<tr>'. 102 99 '<td><strong>'.HumanDate($Line['Date']).'</strong></td>'. 103 100 '<td>'.$Active.'</td>'. … … 105 102 '<td>'.$Download.'</td>'. 106 103 '<td><textarea>'.$Line['ExportSetting'].'</textarea></td>'); 107 104 echo('</tr>'); 108 105 } 109 echo('</table><br />'); 106 echo('</table><br />'); 110 107 } 111 108 } … … 123 120 <br />'); 124 121 125 echo('<h3>Pomocné programy:</h3> 126 127 <a href="download/mpqediten32.zip">Ladik\'s MPQ Editor</a><br /> 128 '); 129 122 echo('<h3>Pomocné programy:</h3>'. 123 '<a href="download/mpqediten32.zip">Ladik\'s MPQ Editor</a><br />'); 130 124 } 131 125
Note:
See TracChangeset
for help on using the changeset viewer.