DoNotShowPage = true;
$System->Run();
$PageExport = new PageExport($System);
$Output = '';
if (defined('STDIN') == false)
{
$Output = T('Access denied');
exit($Output);
}
foreach ($_SERVER['argv'] as $parameter)
{
if (strpos($parameter, '=') !== false)
{
$index = substr($parameter, 0, strpos($parameter, '='));
$parameter = substr($parameter, strpos($parameter, '=') + 1);
//echo ($index.' ---- '.$parameter);
$_GET[$index] = $parameter;
} else $_GET[$parameter] = '';
}
if (!array_key_exists('ExportId', $_GET) and !array_key_exists('needgeneration', $_GET) and !array_key_exists('version', $_GET) and !array_key_exists('dbc', $_GET) and !array_key_exists('lua', $_GET) and !array_key_exists('addon', $_GET)) {
$Output .= 'Usage type_export=id_export -for export
';
$Output .= 'Usage ExportId=id_export - for write export info
';
$Output .= 'Usage needgeneration=id_export - for write export info
';
$Output .= 'type_export={lua,dbc,addon}
';
$Output = str_replace('
','
',$Output);
}
//37
if (array_key_exists('lua', $_GET)) {
$Export = new Export($System);
$Export->Id = $_GET['lua'];
$Output .= $Export->Init();
$Output .= $Export->ExportToLua();
$Output = str_replace('
','
',$Output);
$Output = str_replace('
','
',$Output);
}
if (array_key_exists('version', $_GET)) {
$Export = new Export($System);
$Export->Id = $_GET['version'];
$Export->LoadFilters();
$Output .= $Export->ClientVersion['Version'];
$Output = str_replace('
','
',$Output);
$Output = str_replace('
','
',$Output);
}
if (array_key_exists('dbc', $_GET)) {
$Export = new Export($System);
$Export->Id = $_GET['dbc'];
$Output .= $Export->Init();
$Output .= $Export->ExportToDbc();
$Output = str_replace('
','
',$Output);
$Output = str_replace('
','
',$Output);
}
if (array_key_exists('addon', $_GET)) {
$Addon = new ExportAddon($System);
$Addon->Id = $_GET['addon'];
$Output .= $Addon->Init();
$Output .= $Output = $Addon->MakeAddon();
$Output = str_replace('
','
',$Output);
$Output = str_replace('
','
',$Output);
}
if (array_key_exists('needgeneration', $_GET)) {
$DbRows = $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');
while ($DbExport = $DbRows->fetch_assoc()) {
$Export = new Export($System);
$Export->Id = $DbExport['Id'];
$Output .= $Export->Init();
if ($Export->NeedGeneration()) {
$DbResult = $System->Database->query('SELECT * FROM `ExportTask` WHERE `Export` = '.$Export->Id);
if ($DbResult->num_rows == 0)
{
$System->Database->query('INSERT INTO `ExportTask` (`Export` ,`TimeStart` ) VALUES ('.$Export->Id.', NOW())');
} else
$System->Database->query('UPDATE `ExportTask` SET `TimeStart` = NOW(), `Progress` = 0, `TimeFinish` = NULL WHERE `Export` = '.$Export->Id);
$System->ModuleManager->Modules['Log']->WriteLog('Zadání úlohy pro vygenerování dbc souboru', LOG_TYPE_DOWNLOAD);
$Output .= 'Export '.$Export->Id.' set to generation
';
} else $Output .= 'Export '.$Export->Id.' do not need generation
';
$Output = str_replace('
','
',$Output);
$Output = str_replace('
','
',$Output);
}
}
if (array_key_exists('ExportId', $_GET)) {
$Export = new Export($System);
$Export->Id = $_GET['ExportId'];
$Export->LoadFilters();
//generation readme
$Output .= ''.
''.
''.
'
'.
' Texty přebírány z projektu wowpreklad.zdechov.net '. ' Vlastnosti'. '
'. ' Nejčastější otázky'. 'Jak mám hru spustit? Mohu použít tuto češtinu na oficiálních serverech? Mám nainstalovánu češtinu a nejde mi spustit Wow.exe. Nedaří se mi provést aktualizaci klienta s nainstalovanou češtinou. | '; $Output .= $PageExport->ExportViewStat(' WHERE `DBCFileName` !=\'\' OR `LuaFileName` !=\'\' OR `Group`.`Id` = 1 OR `Group`.`Id` = 2 OR `Group`.`Id` = 3 OR `Group`.`Id` = 16'); $Output .= ' |