Changeset 178 for trunk/export/index.php
- Timestamp:
- Apr 11, 2009, 12:34:37 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r177 r178 97 97 98 98 echo('Pokud nezačalo stahování, soubor by mělo jít stáhnout pomocí tohoto odkazu: '. 99 '<a href="'.$SaveFilename.'"> CzWoW_SQL.zip</a><br />'.99 '<a href="'.$SaveFilename.'">'.$SQLFilename.'</a><br />'. 100 100 'Pokud se vám zdá, že filtr na export nefunguje, vymažte si vyrovnávací paměť prohlížeče a zkuste stáhnout soubor znovu.'); 101 101 break; … … 105 105 echo('</pre>'); 106 106 break; 107 case 'AoWoWSQL': 107 case 'AoWoWSQLCompressed': 108 if(function_exists('gzcompress')) 109 { 110 $TempDir = $Config['Web']['TempFolder'].$_SESSION['User'].'/'; 111 if(!file_exists($TempDir)) mkdir($TempDir, 0777, true); 112 $SaveFilename = $TempDir.'CzAoWoW_SQL.zip'; 113 $SQLFilename = 'CzAoWoW_SQL.sql'; 114 $BufferZip = ExportToAoWoWSQL($ExportSetting); 115 $ZipFile = new zipfile(); 116 $ZipFile->addFile($BufferZip, $SQLFilename); 117 $Buffer = $ZipFile->file(); 118 file_put_contents($SaveFilename, $Buffer); 119 } else echo('Funkce pro tvorbu Zip souboru není podporována!'); 120 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 121 'setTimeout("parent.location.href=\''.$SaveFilename.'\'", 1000)'. 122 '</script>'); 123 124 echo('Pokud nezačalo stahování, soubor by mělo jít stáhnout pomocí tohoto odkazu: '. 125 '<a href="'.$SaveFilename.'">'.$SQLFilename.'</a><br />'. 126 'Pokud se vám zdá, že filtr na export nefunguje, vymažte si vyrovnávací paměť prohlížeče a zkuste stáhnout soubor znovu.'); 127 break; 128 case 'AoWoWSQLDirect': 129 echo('Vygenerovaný SQL kód: <br /><pre class="SQLCode">'); 130 echo(htmlspecialchars(ExportToAoWoWSQL($ExportSetting))); 131 echo('</pre>'); 132 break; 133 case 'AoWoWImport': 108 134 require_once('../aowow/configs/config.php'); 109 135 echo('Gewneruji SQL kód '); 110 $AoWoWSQL = ExportTo MangosSQL($ExportSetting);136 $AoWoWSQL = ExportToAoWoWSQL($ExportSetting); 111 137 echo ('<strong>Hotovo</strong><br />'); 112 138 113 echo('Importuji do Mangos a spell');139 echo('Importuji do AoWoW '); 114 140 $Database->SelectDatabase($AoWoWconf['mangos']['db']); 115 141 $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']); … … 120 146 echo('. '); 121 147 } 122 echo ('<strong>Hotovo</strong><br />');123 124 echo('Importuji do AoWoW ');125 $Query = 'SELECT name FROM aowow_resistances';126 $ID = $Database->SQLCommand($Query);127 while($Line = mysql_fetch_assoc($ID)) {128 $Tran = mysql_fetch_assoc($Database->SQLCommand('SELECT text as en,129 (SELECT text FROM '.$Config['Database']['Database'].'.global_strings as tabletran130 WHERE tableen.entry = tabletran.entry AND Language <> 0 LIMIT 1) as tran131 FROM '.$Config['Database']['Database'].'.global_strings as tableen WHERE text = "'.$Line['name'].'" LIMIT 1'));132 //echo ($Line['name'].'='.$Tran['tran']);133 if ($Tran['tran'] <> '')134 $Database->SQLCommand('UPDATE aowow_resistances SET name = "'.$Tran['tran'].'" WHERE name = "'.$Line['name'].'"');135 echo('. ');136 }137 138 $Query = 'SELECT name FROM aowow_skill';139 $ID = $Database->SQLCommand($Query);140 while($Line = mysql_fetch_assoc($ID)) {141 $Tran = mysql_fetch_assoc($Database->SQLCommand('SELECT text as en,142 (SELECT text FROM '.$Config['Database']['Database'].'.global_strings as tabletran143 WHERE tableen.entry = tabletran.entry AND Language <> 0 LIMIT 1) as tran144 FROM '.$Config['Database']['Database'].'.global_strings as tableen WHERE text = "'.$Line['name'].'" LIMIT 1'));145 //echo ($Line['name'].'='.$Tran['tran']);146 if ($Tran['tran'] <> '')147 $Database->SQLCommand('UPDATE aowow_skill SET name = "'.$Tran['tran'].'" WHERE name = "'.$Line['name'].'"');148 echo('. ');149 }150 151 $Query = 'SELECT name FROM aowow_spelldispeltype';152 $ID = $Database->SQLCommand($Query);153 while($Line = mysql_fetch_assoc($ID)) {154 $Tran = mysql_fetch_assoc($Database->SQLCommand('SELECT text as en,155 (SELECT text FROM '.$Config['Database']['Database'].'.global_strings as tabletran156 WHERE tableen.entry = tabletran.entry AND Language <> 0 LIMIT 1) as tran157 FROM '.$Config['Database']['Database'].'.global_strings as tableen WHERE text = "'.$Line['name'].'" LIMIT 1'));158 //echo ($Line['name'].'='.$Tran['tran']);159 if ($Tran['tran'] <> '')160 $Database->SQLCommand('UPDATE aowow_spelldispeltype SET name = "'.$Tran['tran'].'" WHERE name = "'.$Line['name'].'"');161 echo('. ');162 }163 148 echo ('<strong>Hotovo</strong><br />'); 164 149 … … 348 333 RadioButton('Export', 'MangosSQLDirect', $ExportSetting['Export'] == 'MangosSQLDirect').'MaNGOS SQL - přímo zobrazit<br />'. 349 334 RadioButton('Export', 'MangosSQLCompressed', $ExportSetting['Export'] == 'MangosSQLCompressed').'MaNGOS SQL - komprimovaný soubor<br />'. 335 RadioButton('Export', 'AoWoWSQLDirect', $ExportSetting['Export'] == 'AoWoWSQLDirect').'AoWoW SQL - přímo zobrazit<br />'. 336 RadioButton('Export', 'AoWoWSQLCompressed', $ExportSetting['Export'] == 'AoWoWSQLCompressed').'AoWoW SQL - komprimovaný soubor<br />'. 350 337 RadioButton('Export', 'XMLDirect', $ExportSetting['Export'] == 'XMLDirect').'XML - přímo zobrazit<br />'. 351 338 RadioButton('Export', 'XMLCompressed', $ExportSetting['Export'] == 'XMLCompressed').'XML - komprimovaný soubor<br />'. … … 354 341 if(Licence(LICENCE_ADMIN)) { 355 342 echo (RadioButton('Export', 'DBC', $ExportSetting['Export'] == 'DBC').'DBC - komprimovaný soubor (pouze admin)<br />'); 356 echo(RadioButton('Export', 'AoWoW SQL', $ExportSetting['Export'] == 'AoWoWSQL').'Importovat do AoWoW (pouze admin)<br />');343 echo(RadioButton('Export', 'AoWoWImport', $ExportSetting['Export'] == 'AoWoWImport').'Importovat do AoWoW (pouze admin)<br />'); 357 344 echo(RadioButton('Export', 'VerseCZ', $ExportSetting['Export'] == 'VerseCZ').'Vytvoření verze češtiny <a href="../download.php?createverse" Title="Před konečným exportováním napište popis k verzi" Target="_NEW">Popis k verzi</a> (pouze admin)<br />'); 358 345 }
Note:
See TracChangeset
for help on using the changeset viewer.