source: trunk/download.php@ 150

Last change on this file since 150 was 150, checked in by maron, 16 years ago

MPQ do češtiny pro klienta

File size: 4.2 KB
Line 
1<?php
2
3include('includes/global.php');
4
5ShowPage();
6
7function GetPercentOfTable($TableID,$Users)
8{
9
10 global $Database;
11
12 $TranslationTree = GetTranslationTree();
13 $Group = $TranslationTree[$TableID];
14
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
18 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM '.$Group['TablePrefix'].' WHERE (Language = 0)'));
19 $NumberAJ = $ID[0];
20
21 if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100; else $Percent = 0;
22 $Percent = substr($Percent, 0, 5);
23
24 $result = false;
25 foreach($Group['Items'] as $Column) if($Column['AddonFileName'] != '') $result = true;
26
27 if (($TableID == 14) or ($TableID == 15)) $result = true;
28
29 if ($result)
30 return ($Group['Name'].': '.$NumberTranslate.'/'.$NumberAJ.' '.$Percent.'%
31 ');
32 else return ('');
33}
34
35 if (array_key_exists('createverse', $_GET) and Licence(LICENCE_ADMIN)) {
36 if (array_key_exists('verse', $_POST)) { //ukládání
37 $Database->SQLCommand('INSERT INTO `verseclient` (`verse` ,`date` ,`text` ,`user`)
38 VALUES ( "'.$_POST['verse'].'", NOW( ) , "'.$_POST['text'].'", "'.$_SESSION['UserID'].'");');
39 WriteLog('Nová verze ('.$_POST['verse'].') češitny pro clienta uložena.',4);
40 } else { //formulář
41 echo ('<form action"" method="post">'.
42 'Verze: <input type="text" name="verse" /> <input type="submit" value="Uložit" /><br />'.
43 'Popis: <textarea rows="20" cols="60" name="text">');
44 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT ExportSetting FROM user Where ID = '.$_SESSION['UserID']));
45 $ExportSetting = unserialize($Line['ExportSetting']);
46
47 $Tables = 'Texty obsažené v addonu: Přeložené/nepřeložené ProcentaPřeložených%
48 ';
49 foreach($ExportSetting['groups'] as $Index) $Tables .= GetPercentOfTable($Index,implode(',', $ExportSetting['users-selection']));
50
51 $ID = $Database->SQLCommand('SELECT user FROM user WHERE ID IN('.implode(',', $ExportSetting['users-selection']).')');
52 $Users = 'Vyexportovány překlady od uživatelů: ( ';
53 while($Line = mysql_fetch_assoc($ID)) $Users .= $Line['user'].', '; $Users .= ' )';
54 //Výpis
55 echo ('
56 '.$Users.'
57 '.$Tables);
58
59 echo ('</textarea></form>');
60 }
61 }
62
63if(array_key_exists('addon', $_GET))
64{
65 echo('<br />Stažený soubor pouze rozbalte a zkopírujte do kořenové složky wow (C:\Program Files\World Of Warcraft\). Hru spouštějte přes soubor WoWME.exe <br /><br />'.
66 '<table class="BaseTable"><tr><th>Verze/datum</th><th>Popis</th></tr>');
67 $ID = $Database->SQLCommand('SELECT * FROM verseclient ORDER BY DATE DESC');
68 while($Line = mysql_fetch_assoc($ID))
69 {
70 echo('<tr>'.
71 '<td><strong>'.$Line['verse'].'</strong> <a href="tmp/Addon/CzWoW_'.$Line['verse'].'.zip">Stáhnout</a> <br />'.$Line['date'].'</td>'.
72 '<td>'.str_replace(chr(13),'<br />',$Line['text']).'</td>');
73 echo('</tr>');
74 }
75 echo('</table>');
76} else
77{
78 echo('
79 <br />
80 <h3><a href="export/">Export textů</a> - Export podle vlastního výběru do SQL, XML, LUA nebo Addonu</h3>
81 <br />
82 <h3>Doplňky pro klienta</h3>
83 <a href="?addon">Čeština pro klienta</a> - jednoduché stáhnutí češtiny pro klienta (zatím obsahuje fonty, Addon).<br />
84 <a href="download/ceske_fonty_do_wow.zip">České písma do hry</a> - původní fonty ze hry doplněné o české znaky.<br />
85 <a href="http://jenicko.savana.cz/wow/forum/viewtopic.php?id=218&amp;action=all">České hlášky z W3</a> - zvukové soubory převzaté z česky přeložené hry Warcraft 3 napasované na WoW.<br />
86 <br />
87 <h3>Doplňky pro server:</h3>
88
89 <a href="http://mangos.cjb.net/forums/index.php?showforum=15">Čeština do Minimanageru</a><br />
90 <a href="http://mangos.cjb.net/forums/index.php?showtopic=359">Čeština pro AoWoW</a> - Webový prohlížeč databáze pro emulátor MaNGOS podle wowhead.com<br />
91 <br />');
92
93 echo('<h3>Pomocné programy:</h3>
94
95 <a href="download/mpqediten32.zip">Ladik\'s MPQ Editor</a><br />
96 ');
97
98}
99
100ShowFooter();
101
102?>
Note: See TracBrowser for help on using the repository browser.