Changeset 255
- Timestamp:
- Jul 24, 2009, 11:39:21 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/download.php
r183 r255 76 76 } else 77 77 { 78 79 80 if (Licence(LICENCE_USER)) { 81 $ID = $Database->SQLCommand('SELECT * FROM tasks WHERE User = '.$_SESSION['UserID']); 82 if (mysql_num_rows($ID) > 0) 83 { 84 echo ('<table class="BaseTable"><tr><th>Datum</th><th>Vygenerováno</th><th>Staženo</th><th>Soubor</th></tr>'); 85 while($Line = mysql_fetch_assoc($ID)) 86 { 87 if ($Line['Active'] == 0) 88 { 89 $Active = 'Hotovo'; 90 $Download = '<a href="'.$Config['Web']['TempFolder'].$_SESSION['User'].'/dbc/CzWoW_DBC.zip">Stáhnout - CzWoW_DBC.zip</a>'; 91 } else { 92 $Active = 'Čeká na zpracování'; 93 $Download = 'CzWoW_DBC.zip'; 94 } 95 if ($Line['Downloaded'] == 1) $Downloaded = 'Staženo'; else $Downloaded = 'Nestaženo'; 96 echo('<tr>'. 97 '<td><strong>'.$Line['Date'].'</strong></td>'. 98 '<td>'.$Active.'</td>'. 99 '<td>'.$Downloaded.'</td>'. 100 '<td>'.$Download.'</td>'); 101 echo('</tr>'); 102 } 103 echo('</table>'); 104 } 105 } 106 78 107 echo(' 79 108 <br /> -
trunk/export/export.php
r234 r255 281 281 { 282 282 echo($Group['Name'].'... '); 283 $DBCFile = new DBCFile(); 284 $DBCFile->OpenFile('../source/'.$Setting['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName'])); 283 // $DBCFile = new DBCFile(); 284 // $DBCFile->OpenFile('../source/'.$Setting['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName'])); 285 if (copy('../source/'.$Setting['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc',$TempDir.$Group['DBCFileName'].'.dbc') == false) 286 die('Nepodařilo se zkopírovat'); 285 287 $DBCFile2 = new DBCFile(); 286 $DBCFile2-> CreateFile($TempDir.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName']));287 $Count = $DBCFile ->GetRecordCount();288 $DBCFile2->OpenFile($TempDir.$Group['DBCFileName'].'.dbc', GetDBCColumns($Setting['Version'],$Group['DBCFileName'])); 289 $Count = $DBCFile2->GetRecordCount(); 288 290 //if($Group['DBCFileName'] == 'Spell') $Count = 1000; 289 $Line = $DBCFile ->GetLine(0);291 $Line = $DBCFile2->GetLine(0); 290 292 $DBCFile2->SetRecordCount($Count); 291 293 for($I = 0; $I < $Count; $I++) 292 294 { 293 $Line = $DBCFile ->GetLine($I);295 $Line = $DBCFile2->GetLine($I); 294 296 $Query = 'SELECT * FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' AND (entry='.$Line[0].') AND VersionStart <= '.GetBuildNumber($Setting['Version']).' AND VersionEnd >= '.GetBuildNumber($Setting['Version']).' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T GROUP BY T.entry'; 295 297 $DbResult = $Database->SQLCommand($Query); -
trunk/export/index.php
r253 r255 404 404 break; 405 405 case 'DBC': 406 407 echo('<br /><br /><br />U dbc souborů export textů funguje jinak, protože generování je náročné na výpočet provádí se přes noc kdy je server nejmíň vytížen. Nyní jste zadali úlohu, která se provede v noci. Zítra si můžete stáhnout vygenerovaný soubor.<br /><br />Dbc soubory je nutné zabalit do souboru data-5.MPQ uvnitř složky ... a hru spouštět přes wowme.exe'); 408 409 $Database->SQLCommand('INSERT INTO `wowpreklad`.`tasks` (`User` ,`ExportSetting` ,`Date` ) VALUES ("'.$_SESSION['User'].'", "'.addslashes(serialize($ExportSetting)).'", NOW( ))'); 410 411 412 WriteLog('Zadání úlohy pro vygenerování dbc souboru', 2); 413 414 415 /* 406 416 if(function_exists('gzcompress')) 407 417 { … … 424 434 '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.'); 425 435 echo('<br /><br /><strong>Použití ve hře</strong><br />Ze souborů vytvořte MPQ archív a nahrajte ho do hry do podsložky Data/enUS jako patch-enUS-5.MPQ. Hru spusťte pomocí programu WoWMe.exe (WoW Model Editor Fix).'); 436 */ 437 426 438 break; 427 439 case 'Lua': -
trunk/includes/global_function.php
r245 r255 323 323 function GetDBCColumns($Version,$DBCFileName) 324 324 { 325 global $Database; 326 $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"'; 327 $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql)); 328 return($DbRow['DBCColumns']); 325 global $Database,$DBCColumns; 326 if (isset($DBCColumns[$Version][$DBCFileName]) == false) 327 { 328 $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"'; 329 $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql)); 330 $DBCColumns[$Version][$DBCFileName] = $DbRow['DBCColumns']; 331 } 332 return($DBCColumns[$Version][$DBCFileName]); 329 333 } 330 334 331 335 function GetDBCColumnIndex($Version,$DBCFileName,$Column) 332 336 { 333 global $Database; 334 335 $sql = 'SELECT '.$DBCFileName.'_'.$Column.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"'; 336 $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql)); 337 return($DbRow['DBCColumns']); 337 global $Database,$DBCColumnIndex; 338 if (isset($DBCColumnIndex[$Version][$DBCFileName][$Column]) == false) 339 { 340 $sql = 'SELECT '.$DBCFileName.'_'.$Column.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"'; 341 $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql)); 342 $DBCColumnIndex[$Version][$DBCFileName][$Column] = $DbRow['DBCColumns']; 343 } 344 return($DBCColumnIndex[$Version][$DBCFileName][$Column]); 338 345 } 339 346
Note:
See TracChangeset
for help on using the changeset viewer.