Changeset 180 for trunk/export/index.php


Ignore:
Timestamp:
Apr 15, 2009, 8:30:13 PM (15 years ago)
Author:
maron
Message:

Generování addonu pro 2.x.x a 3.x.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/export/index.php

    r178 r180  
    5454if(!isset($ExportSetting['language-other'])) $ExportSetting['language-other'] = 1;
    5555if(!isset($ExportSetting['users-order'])) $ExportSetting['users-order'] = '';
    56 if(!isset($ExportSetting['Export'])) $ExportSetting['Export'] = 'Addon';
     56if(!isset($ExportSetting['Export'])) $ExportSetting['Export'] = 'Addon-3.x.x';
    5757if(!isset($ExportSetting['groups'])) $ExportSetting['groups'] = array();
    5858
     
    201201                } else echo('Nemáte oprávnění.');
    202202            break;*/
    203           case 'Addon':
    204         if(function_exists('gzcompress'))
    205         {
    206           $TempDir = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW/';
    207               echo('Generování addonu...<br />');
     203          case 'Addon-2.x.x':
     204        if(function_exists('gzcompress'))
     205        {
     206          $TempDir = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW-2.x.x/';
     207              echo('Generování addonu...'.$ExportSetting['Export'].'<br />');
    208208          MakeAddon($ExportSetting);
    209           $SaveFilename = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW_Addon.zip';         
     209          $SaveFilename = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW_Addon-2.x.x.zip';         
    210210          $Zip = new zipfile();
    211211                  CreateZipFromDir($Zip, $TempDir, 'CzWoW/');
    212           $Zip->addFile(file_get_contents('CzWoW/OptionsFrame.xml'), 'CzWoW/OptionsFrame.xml');
    213           $Zip->addFile(file_get_contents('CzWoW/CzWoW.xml'), 'CzWoW/CzWoW.xml');       
    214                   $Zip->addFile(file_get_contents('CzWoW/CzWoW.toc'), 'CzWoW/CzWoW.toc');       
    215           //$Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua');       
    216                   $Zip->addFile(file_get_contents('CzWoW/GameMenuFrame.xml'), 'CzWoW/GameMenuFrame.xml');       
    217                   $Zip->addFile(file_get_contents('CzWoW/Localization.lua'), 'CzWoW/Localization.lua');
    218                   $Zip->addFile(file_get_contents('ProffBot/ProffBot.toc'), 'ProffBot/ProffBot.toc');   
    219                   $Zip->addFile(file_get_contents('ProffBot/ProffBot.xml'), 'ProffBot/ProffBot.xml');   
    220                   $Zip->addFile(file_get_contents('ProffBot/ProffBot.lua'), 'ProffBot/ProffBot.lua');   
     212          $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/OptionsFrame.xml'), 'CzWoW/OptionsFrame.xml');     
     213          $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/CzWoW.xml'), 'CzWoW/CzWoW.xml');   
     214                  $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/CzWoW.toc'), 'CzWoW/CzWoW.toc');   
     215          $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua');   
     216                  $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/GameMenuFrame.xml'), 'CzWoW/GameMenuFrame.xml');   
     217                  $Zip->addFile(file_get_contents('files/2.4.3/CzWoW/Localization.lua'), 'CzWoW/Localization.lua');     
     218                 
     219                  $Zip->addFile(file_get_contents('files/2.4.3/ProffBot/ProffBot.toc'), 'ProffBot/ProffBot.toc');       
     220                  $Zip->addFile(file_get_contents('files/2.4.3/ProffBot/ProffBot.xml'), 'ProffBot/ProffBot.xml');       
     221                  $Zip->addFile(file_get_contents('files/2.4.3/ProffBot/ProffBot.lua'), 'ProffBot/ProffBot.lua');       
    221222                  $Buffer = $Zip->file();
    222223          file_put_contents($SaveFilename, $Buffer);
     
    228229     
    229230        echo('Pokud nezačalo stahování, soubor by mělo jít stáhnout pomocí tohoto odkazu: '.
    230           '<a href="'.$SaveFilename.'">CzWoW_Addon.zip</a><br />'.
     231          '<a href="'.$SaveFilename.'">CzWoW_Addon-2.x.x.zip</a><br />'.
     232          '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.');
     233                echo('<br /><strong>Použití ve hře</strong><br />Menu addonu ve hře vyvoláte povelem /czwow.');
     234            break;
     235          case 'Addon-3.x.x':
     236        if(function_exists('gzcompress'))
     237        {
     238          $TempDir = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW-3.x.x/';
     239              echo('Generování addonu...'.$ExportSetting['Export'].'<br />');
     240          MakeAddon($ExportSetting);
     241          $SaveFilename = $Config['Web']['TempFolder'].$_SESSION['User'].'/CzWoW_Addon-3.x.x.zip';         
     242          $Zip = new zipfile();
     243                  CreateZipFromDir($Zip, $TempDir, 'CzWoW/');
     244          $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/OptionsFrame.xml'), 'CzWoW/OptionsFrame.xml');     
     245          $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/CzWoW.xml'), 'CzWoW/CzWoW.xml');   
     246                  $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/CzWoW.toc'), 'CzWoW/CzWoW.toc');   
     247          $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua');   
     248                  $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/GameMenuFrame.xml'), 'CzWoW/GameMenuFrame.xml');   
     249                  $Zip->addFile(file_get_contents('files/3.0.9/CzWoW/Localization.lua'), 'CzWoW/Localization.lua');     
     250                  $Buffer = $Zip->file();
     251          file_put_contents($SaveFilename, $Buffer);
     252                  echo('Hotovo<br /><br />');
     253        } else echo('Funkce pro tvorbu Zip souboru není podporována!');
     254        echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.
     255          'setTimeout("parent.location.href=\''.$SaveFilename.'\'", 1000)'.
     256          '</script>');
     257     
     258        echo('Pokud nezačalo stahování, soubor by mělo jít stáhnout pomocí tohoto odkazu: '.
     259          '<a href="'.$SaveFilename.'">CzWoW_Addon-3.x.x.zip</a><br />'.
    231260          '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.');
    232261                echo('<br /><strong>Použití ve hře</strong><br />Menu addonu ve hře vyvoláte povelem /czwow.');
     
    337366      RadioButton('Export', 'XMLDirect', $ExportSetting['Export'] == 'XMLDirect').'XML - přímo zobrazit<br />'.
    338367          RadioButton('Export', 'XMLCompressed', $ExportSetting['Export'] == 'XMLCompressed').'XML - komprimovaný soubor<br />'.
    339           RadioButton('Export', 'Addon', $ExportSetting['Export'] == 'Addon').'Addon - komprimovaný soubor<br />'.
     368          RadioButton('Export', 'Addon-2.x.x', $ExportSetting['Export'] == 'Addon-2.x.x').'Addon pro verzi 2.x.x - komprimovaný soubor<br />'.
     369          RadioButton('Export', 'Addon-3.x.x', $ExportSetting['Export'] == 'Addon-3.x.x').'Addon pro verzi 3.x.x (beta) - komprimovaný soubor<br />'.
    340370          RadioButton('Export', 'Lua', $ExportSetting['Export'] == 'Lua').'Lua skripty - komprimovaný soubor<br />');
    341371    if(Licence(LICENCE_ADMIN)) {
Note: See TracChangeset for help on using the changeset viewer.