Changeset 61


Ignore:
Timestamp:
Feb 4, 2009, 9:51:34 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Export překladů do českého WoW Addonu.
  • Upraveno: Export souborů se nyní ukládá samostatně do složek dle jmen uživatelů.
  • Přidáno: Zobrazování chyb dle konfigurace.
Location:
trunk
Files:
19 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/client_files/Generate/create_language_file.php

    r40 r61  
    11<?php
    2   session_start();
    3   include('../../includes/config.php');
    4   include('../../includes/databaseconection.php');
    5   include('../../includes/global_function.php');
    62
    7   //připojení do databáze
    8   $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password']);
    9   $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']);
    10   $Database->SelectDatabase($Config['Database']['Database']);   
     3session_start();
     4include('../../includes/config.php');
     5include('../../includes/databaseconection.php');
     6include('../../includes/global_function.php');
     7
     8//připojení do databáze
     9$Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password']);
     10$Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']);
     11$Database->SelectDatabase($Config['Database']['Database']);   
    1112 
    12   if (Licence(2)) {  // echo 'Přístup povolen';
    13   } else { die('Přístup zamítnut!'); }
     13if(Licence(LICENCE_ADMIN))
     14{  // echo 'Přístup povolen';
     15} else die('Přístup zamítnut!');
    1416
    15   include ('define.php');
     17include ('define.php');
    1618
    17   function ReplaceVarInText($string)
    18   { // BEGIN function ReplaceVarInText
    19         $string = str_replace('$N', '"..strlower(UnitName("player")).."', $string);
    20         $string = str_replace('$n', '"..strlower(UnitName("player")).."', $string);
    21         $string = str_replace('$c', '"..strlower(UnitClass("player")).."', $string);
    22         $string = str_replace('$C', '"..strlower(UnitClass("player")).."', $string);
    23         $string = str_replace('$R', '"..strlower(UnitRace("player")).."', $string);
    24         $string = str_replace('$r', '"..strlower(UnitRace("player")).."', $string);
     19function ReplaceVarInText($string)
     20{
     21  $string = str_replace('$N', '"..strlower(UnitName("player")).."', $string);
     22  $string = str_replace('$n', '"..strlower(UnitName("player")).."', $string);
     23  $string = str_replace('$c', '"..strlower(UnitClass("player")).."', $string);
     24  $string = str_replace('$C', '"..strlower(UnitClass("player")).."', $string);
     25  $string = str_replace('$R', '"..strlower(UnitRace("player")).."', $string);
     26  $string = str_replace('$r', '"..strlower(UnitRace("player")).."', $string);
    2527
    26         $string = str_replace('$', '', $string);
    27         $string = str_replace(chr(13), '', $string);
    28         $string = str_replace(chr(10), '', $string);
    29     return $string;     
    30   } // END function ReplaceVarInText
     28  $string = str_replace('$', '', $string);
     29  $string = str_replace(chr(13), '', $string);
     30  $string = str_replace(chr(10), '', $string);
     31  return($string);     
     32}
    3133
    32   //funkce na přepsání zlých znaků
     34// Funkce na přepsání zlých znaků
    3335
    34   function ReplaceEnText($string)
    35   { // BEGIN function ReplaceBadChar
     36function ReplaceEnText($string)
     37{
    3638  //    $string = mysql_escape_string($string);
    37     $string = strtolower($string);
    38         $string = str_replace('$gman:woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string);
    39         $string = str_replace('$g man : woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string);
    40         $string = str_replace('$ghis:her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string);
    41         $string = str_replace('$g his : her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string);
    42         $string = str_replace('$glad:lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string);
    43         $string = str_replace('$g lad : lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string);
     39  $string = strtolower($string);
     40  $string = str_replace('$gman:woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string);
     41  $string = str_replace('$g man : woman;', '"..gsub(gsub(UnitSex("player"), "^2$", "man"), "^3$", "woman").."', $string);
     42  $string = str_replace('$ghis:her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string);
     43  $string = str_replace('$g his : her;', '"..gsub(gsub(UnitSex("player"), "^2$", "his"), "^3$", "her").."', $string);
     44  $string = str_replace('$glad:lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string);
     45  $string = str_replace('$g lad : lass;', '"..gsub(gsub(UnitSex("lad"), "^2$", "his"), "^3$", "lass").."', $string);
    4446
    45         $string = str_replace('"', '\"', $string);
    46         $string = str_replace('$b$b', ' ', $string);   
    47         $string = str_replace('$b $b', ' ', $string);   
    48         $string = str_replace('$b', ' ', $string);     
    49         $string = str_replace('  ', ' ', $string);
    50         $string = ReplaceVarInText($string);   
    51         return $string;
    52   } // END function ReplaceBadChar
     47  $string = str_replace('"', '\"', $string);
     48  $string = str_replace('$b$b', ' ', $string); 
     49  $string = str_replace('$b $b', ' ', $string);         
     50  $string = str_replace('$b', ' ', $string);   
     51  $string = str_replace('  ', ' ', $string);
     52  $string = ReplaceVarInText($string); 
     53  return($string);
     54}
    5355
    54   function ReplaceCzText($string)
    55   { // BEGIN function ReplaceBadChar
    56         $string = mysql_escape_string($string);
    57         $string = str_replace('$B', '\r\n', $string);
    58         $string = str_replace('$b', '\r\n', $string);   
    59         $string = ReplaceVarInText($string);
    60         return $string;
    61   } // END function ReplaceBadChar
     56function ReplaceCzText($string)
     57{
     58  $string = mysql_escape_string($string);
     59  $string = str_replace('$B', '\r\n', $string);
     60  $string = str_replace('$b', '\r\n', $string);
     61  $string = ReplaceVarInText($string);
     62  return($string);
     63}
    6264
    63   for ($j=0; $j<count($ListFile); ++$j) {  //hlavní ciklus souborů
     65for($j = 0; $j < count($ListFile); $j++)
     66{  //hlavní cyklus souborů
    6467       
    65     echo $dir_out.$ListFile[$j]['File'].': ';
    66     $i = 0;
     68  echo $dir_out.$ListFile[$j]['File'].': ';
     69  $i = 0;
    6770
    68     $buffer = $ListFile[$j]['Header'];  //hlavička souboru
     71  $buffer = $ListFile[$j]['Header'];  //hlavička souboru
    6972   
    70     $sql = $ListFile[$j]['sql'];
    71     $ID = $Database->SQLCommand($sql);
    72     while ($Line = mysql_fetch_array($ID)) {
    73       $en = ReplaceEnText($Line['en']); 
    74       $cz = ReplaceCzText($Line['cz']);
    75       if ($en <> '' and $cz <> '') {
    76         $buffer = $buffer.'
     73  $sql = $ListFile[$j]['sql'];
     74  $ID = $Database->SQLCommand($sql);
     75  while ($Line = mysql_fetch_array($ID))
     76  {
     77    $en = ReplaceEnText($Line['en']); 
     78    $cz = ReplaceCzText($Line['cz']);
     79    if($en <> '' and $cz <> '')
     80        {
     81      $buffer = $buffer.'
    7782["'.$en.'"]="'.$cz.'",';
    7883      $i = $i + 1;
    79       }
    8084    }
     85  }
    8186   
    82     $buffer = $buffer.'
     87  $buffer = $buffer.'
    8388'.$ListFile[0]['Footer'].'+'.$i.';
    8489';  //patička souboru
    8590
    86     if ($i > 0) {
    87 
    88         $file_handle = fopen($dir_out.$ListFile[$j]['File'], 'w');
    89         $write_result = fwrite($file_handle, $buffer);
    90         fclose($file_handle);
    91         
    92         echo '<b>HOTOVO</b><br />';
    93     } else  {echo '<b>ŽÁDNÝ TEXT</b><br />';}
    94   }
     91  if($i > 0)
     92  {
     93    $file_handle = fopen($dir_out.$ListFile[$j]['File'], 'w');
     94    $write_result = fwrite($file_handle, $buffer);
     95    fclose($file_handle);
     96       
     97    echo('<b>HOTOVO</b><br />');
     98  } else echo('<b>ŽÁDNÝ TEXT</b><br />');
     99}
    95100
    96101?>
  • trunk/client_files/Generate/define.php

    r40 r61  
    6161     "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
    6262     "sql" => "SELECT DISTINCT entry, (
    63  SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
    64  ORDER BY vote DESC LIMIT 1
    65 ) as cz, (
    66  SELECT Text FROM page_text as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
    67 ) as en FROM page_text as page_text_distric
     63 SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
     64 ORDER BY vote DESC LIMIT 1
     65) as cz, (
     66 SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
     67) as en FROM page as page_text_distric
    6868WHERE $where_sk $limit",
    6969   );
     
    7373     for ($j=0;$j<2 ;++$j ) {
    7474            $sql = $sql."SELECT DISTINCT entry, (
    75  SELECT text".$i."_$j FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
    76  ORDER BY vote DESC LIMIT 1
    77 ) as cz, (
    78  SELECT text".$i."_$j FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
    79 ) as en FROM npc_text as npc_text_distric
     75 SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
     76 ORDER BY vote DESC LIMIT 1
     77) as cz, (
     78 SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
     79) as en FROM npc as npc_text_distric
    8080WHERE $where $limit   UNION ";
    8181     }
     
    145145     "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
    146146     "sql" => "SELECT DISTINCT entry, (
    147  SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
    148  ORDER BY vote DESC LIMIT 1
    149 ) as cz, (
    150  SELECT Text FROM page_text as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
    151 ) as en FROM page_text as page_text_distric
     147 SELECT Text FROM page as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
     148 ORDER BY vote DESC LIMIT 1
     149) as cz, (
     150 SELECT Text FROM page as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
     151) as en FROM page as page_text_distric
    152152WHERE $where $limit",
    153153   );
     
    158158     for ($j=0;$j<2 ;++$j ) {
    159159            $sql = $sql."SELECT DISTINCT entry, (
    160  SELECT text".$i."_$j FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
    161  ORDER BY vote DESC LIMIT 1
    162 ) as cz, (
    163  SELECT text".$i."_$j FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
    164 ) as en FROM npc_text as npc_text_distric
     160 SELECT text".$i."_$j FROM npc as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
     161 ORDER BY vote DESC LIMIT 1
     162) as cz, (
     163 SELECT text".$i."_$j FROM npc as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
     164) as en FROM npc as npc_text_distric
    165165WHERE $where $limit   UNION ";
    166166     }
  • trunk/client_files/Generate/search_var.php

    r40 r61  
    1414
    1515  function set_name($text)
    16   { // BEGIN function get_name
     16  {
    1717    global $buffer;
    1818      $text = substr($text, strpos($text, '$g')+2, strlen($text)-strpos($text, '$g'));
     
    2020      $men = substr($text, 0, strpos($text, ':'));
    2121      $women = substr($text, strpos($text, ':')+1, strlen($text)-strpos($text, ':')+1);
    22       if (isset($buffer[$men]) == false and ($men <> '') and ($women <> '') and (strlen($men) < 10) and (strlen($women) < 10)) {
     22      if (isset($buffer[$men]) == false and ($men <> '') and ($women <> '') and (strlen($men) < 10) and (strlen($women) < 10))
     23          {
    2324        $buffer[$men] = $women;
    2425       // echo $men.' '.$women.'<br />';
    2526      }
    26   } // END function get_name
     27  }
    2728
    2829   
     
    3132  //    echo $sql.'<br /><br />';
    3233    $ID = $Database->SQLCommand($sql);
    33     while ($Line = mysql_fetch_array($ID)) {
     34    while ($Line = mysql_fetch_array($ID))
     35        {
    3436   //   $language = $Line['Language'];
    3537      $text = strtolower($Line['Details']);
     
    4749   
    4850   $sql = 'SELECT ';
    49    for ($i=0;$i<8 ;++$i ) {
    50      for ($j=0;$j<2 ;++$j ) {
     51   for ($i=0;$i<8 ;++$i )
     52   {
     53     for ($j=0;$j<2 ;++$j )
     54         {
    5155            $sql = $sql."text".$i."_$j,";
    5256     }
    5357   }
    5458  $sql = substr($sql, 0, strlen($sql)-1);
    55   $sql = $sql." FROM npc_text WHERE ";
    56    for ($i=0;$i<8 ;++$i ) {
    57      for ($j=0;$j<2 ;++$j ) {
     59  $sql = $sql." FROM npc WHERE ";
     60   for ($i=0;$i<8 ;++$i )
     61   {
     62     for ($j=0;$j<2 ;++$j )
     63         {
    5864            $sql = $sql."text".$i."_$j  LIKE '%\$G%' OR ";
    5965     }
    6066   }
    61    for ($i=0;$i<8 ;++$i ) {
    62      for ($j=0;$j<2 ;++$j ) {
     67   for ($i=0;$i<8 ;++$i )
     68   {
     69     for ($j=0;$j<2 ;++$j )
     70         {
    6371            $sql = $sql."text".$i."_$j  LIKE '%\$g%' OR ";
    6472     }
    6573   }
    66   $sql = substr($sql, 0, strlen($sql)-3);
     74  $sql = substr($sql, 0, strlen($sql) - 3);
    6775
    6876
    6977    $ID = $Database->SQLCommand($sql);
    70     while ($Line = mysql_fetch_array($ID)) {
     78    while ($Line = mysql_fetch_array($ID))
     79        {
    7180     // $language = $Line['Language'];
    7281
    73        for ($i=0;$i<8 ;++$i ) {
    74          for ($j=0;$j<2 ;++$j ) {
     82       for ($i = 0; $i < 8 ;++$i )
     83           {
     84         for ($j = 0; $j < 2 ;++$j )
     85                 {
    7586           $text = strtolower($Line["text".$i."_$j"]);
    7687           set_name($text);
     
    8091 
    8192  echo '$var_g = array(<br />';
    82     foreach ($buffer as $key=>$value) {
     93    foreach ($buffer as $key => $value)
     94        {
    8395    //  echo $key.'-'.$value.'<br />';
    8496        echo " array('$key','$value'),<br />";
  • trunk/client_files/_czwow/návod na sestavení CZWOW.txt

    r24 r61  
    1  1. v souboru "Generate\define.php" se nastaví vhodný sql pøíkaz na generování a èíslo verze
    2  2. Pomocí souboru "Generate\search_var.php" se vygenerují všechny promìné $g, vygenerovaný text vložte na konec souboru "Generate\define.php"
    3  3. pomocí souboru "Generate\create_language_file.php" se vygenerují pøekladové soubory soubory
    4  4. vygenerované soubory pøekladu se pøevedou na znakovou sadu UTF-8
     1 1. v souboru "Generate\define.php" se nastaví vhodný sql příkaz na generování a číslo verze
     2 2. Pomocí souboru "Generate\search_var.php" se vygenerují všechny proměné $g, vygenerovaný text vložte na konec souboru "Generate\define.php"
     3 3. pomocí souboru "Generate\create_language_file.php" se vygenerují překladové soubory soubory
     4 4. vygenerované soubory překladu se převedou na znakovou sadu UTF-8
    55 5. pomocí souboru "Generate\img_statistic.php" se vygenerují obrázky pro changelog
    6  6. na stránce generující obrázky se vygeneruje popis verze, tu zkopíruj do souboru "_czwow\CzWoW\CzWoW.html" v tomto souboru se musí také upravit verze v hlavièce
    7  7. soubory ze složky "Generate\compile\" pøekopíruj do složky "_czwow\CZ" a SK soubory s 2 na konci jsou èeské soubory a patøí do složky CZ
    8  8. obrázky ze složky "Generate\compile_png" pøekopíruj do složky "_czwow\CZWOW"
     6 6. na stránce generující obrázky se vygeneruje popis verze, tu zkopíruj do souboru "_czwow\CzWoW\CzWoW.html" v tomto souboru se musí také upravit verze v hlavičce
     7 7. soubory ze složky "Generate\compile\" překopíruj do složky "_czwow\CZ" a SK soubory s 2 na konci jsou české soubory a patří do složky CZ
     8 8. obrázky ze složky "Generate\compile_png" překopíruj do složky "_czwow\CZWOW"
    99 9. v souboru "_czwow\CzWoW.nsi" nastav verzi a pak zkopmpiluj
    1010 10. soubory taky nakopíruj do zipu "_czwow\CzWoW-verze.zip"
    11  11. commitni na SVN, vlož do torrentu a uprav web na stahování "wowpreklad\download-addon.php"
     11 11. commitni na SVN, vlož do torrentu a uprav web na stahování "wowpreklad\download-addon.php"
  • trunk/download.php

    r60 r61  
    1010include('includes/zip.lib.php');
    1111include('export.php');   
    12 
     12include('addon/make.php');
    1313
    1414function CheckBox($Name, $Checked = false)
     
    4242}
    4343
    44 switch(@$_GET['action'])
     44function CreateZipFromDir(&$Zip, $Path, $ZipPath)
     45{
     46  //echo($Path.'<br />');
     47  $FileList = scandir($Path);
     48  foreach($FileList as $FileName)
     49  {
     50        if(file_exists($Path.$FileName) and ($FileName != '.') and ($FileName != '..'))
     51        {
     52      //echo($Path.$FileName.'<br />');
     53          if(is_dir($Path.$FileName)) CreateZipFromDir($Zip, $Path.$FileName.'/', $ZipPath.$FileName.'/');
     54      else $Zip->addFile(file_get_contents($Path.$FileName), $ZipPath.$FileName);       
     55        }         
     56  }
     57}
     58
     59if(!array_key_exists('action', $_GET)) $_GET['action'] = '';
     60switch($_GET['action'])
    4561{
    4662  case 'result':
     
    5167        if(function_exists('gzcompress'))
    5268        {
    53           $SaveFilename = 'tmp/SqlTranslate.zip';
    54           $SQLFilename = 'tmp/SqlTranslate.sql';       
     69                  $TempDir = 'tmp/'.$_SESSION['User'].'/';
     70                  if(!file_exists($TempDir)) mkdir($TempDir, 0777, true);
     71          $SaveFilename = $TempDir.'CzWoW_SQL.zip';
     72          $SQLFilename = $TempDir.'CzWoW_SQL.sql';       
    5573          $BufferZip = Export($ExportSetting);
    5674          $ZipFile = new zipfile();
    5775          $ZipFile->addFile($BufferZip, $SQLFilename);
    5876          $Buffer = $ZipFile->file();
    59 
    60           //  echo $Buffer.'<br><br><br>';
    61           $FileHandle = fopen($SaveFilename, 'w');
    62           $WriteResult = fwrite($FileHandle, $Buffer);
    63           fclose($FileHandle);
    64           //  header("Location: ".$save_filename);
     77          file_put_contents($SaveFilename, $Buffer);
    6578        } else echo('Funkce pro tvorbu Zip souboru není podporována!');
    6679        echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.
     
    92105                } else echo('Nemáte oprávnění.');
    93106            break;
     107          case 'Addon':
     108        if(function_exists('gzcompress'))
     109        {
     110          $TempDir = 'tmp/'.$_SESSION['User'].'/CzWoW/';
     111              echo('Generování addonu...<br />');
     112          MakeAddon($ExportSetting);
     113          $SaveFilename = 'tmp/'.$_SESSION['User'].'/CzWoW_Addon.zip';         
     114          $Zip = new zipfile();
     115                  CreateZipFromDir($Zip, $TempDir, 'CzWoW/');
     116          $Zip->addFile(file_get_contents('addon/CzWoW/OptionsFrame.xml'), 'CzWoW/OptionsFrame.xml');   
     117          $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.xml'), 'CzWoW/CzWoW.xml');
     118                  $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.toc'), 'CzWoW/CzWoW.toc');
     119          $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua');
     120                  $Zip->addFile(file_get_contents('addon/CzWoW/GameMenuFrame.xml'), 'CzWoW/GameMenuFrame.xml');
     121                  $Zip->addFile(file_get_contents('addon/CzWoW/Localization.lua'), 'CzWoW/Localization.lua');   
     122                  $Zip->addFile(file_get_contents('addon/ProffBot/ProffBot.toc'), 'ProffBot/ProffBot.toc');     
     123                  $Zip->addFile(file_get_contents('addon/ProffBot/ProffBot.xml'), 'ProffBot/ProffBot.xml');     
     124                  $Zip->addFile(file_get_contents('addon/ProffBot/ProffBot.lua'), 'ProffBot/ProffBot.lua');     
     125                  $Buffer = $Zip->file();
     126          file_put_contents($SaveFilename, $Buffer);
     127                  echo('Hotovo<br /><br />');
     128        } else echo('Funkce pro tvorbu Zip souboru není podporována!');
     129        echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.
     130          'setTimeout("parent.location.href=\''.$SaveFilename.'\'", 1000)'.
     131          '</script>');
     132     
     133        echo('Pokud nezačalo stahování, soubor by mělo jít stáhnout pomocí tohoto odkazu:'.
     134          '<a href="'.$SaveFilename.'">CzWoW_Addon.zip</a><br />'.
     135          '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.');
     136            break;
    94137        }
    95138    WriteLog('Generování SQL výstupu: Typ exportu: <b>'.$ExportSetting['Export'].'</b>, Diakritika: <b>'.$ExportSetting['Diacritics'].'</b>', 2);
     
    103146    echo('<strong>Krok 3. - Typ výstupu</strong><br /><br />');
    104147    echo('<form action="?action=result" method="post">'.
    105           '<table width="100%"><tr><td>'.
     148          '<table width="100%"><tr><td width="50%">'.
    106149      '<fieldset><legend>Forma výstupu</legend>'.
    107150          RadioButton('Export', 'Zip', $ExportSetting['Export'] == 'Zip').'ZIP soubor<br />'.
    108           //RadioButton('Export', 'Addon', $ExportSetting['Export'] == 'Addon').'WoW klient addon<br />'.
     151          RadioButton('Export', 'Addon', $ExportSetting['Export'] == 'Addon').'WoW klient překládací addon<br />'.
    109152      RadioButton('Export', 'Display', $ExportSetting['Export'] == 'Display').'Přímo zobrazit<br />');
    110153    if(Licence(LICENCE_ADMIN))
  • trunk/export.php

    r59 r61  
    11<?php
    2 
    3 function utf2ascii($text)
    4 {
    5   $return = Str_Replace(
    6     Array("á","č","ď","é","ě","í","ľ","ň","ó","ř","š","ť","ú","ů","ý","ž","Á","Č","Ď","É","Ě","Í","Ľ","Ň","Ó","Ř","Š","Ť","Ú","Ů","Ý","Ž") ,
    7     Array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z") ,
    8     $text);
    9   //$return = Str_Replace(Array(" ", "_"), "-", $return); //nahradí mezery a podtržítka pomlčkami
    10   //$return = Str_Replace(Array("(",")",".","!",",","\"","'"), "", $return); //odstraní ().!,"'
    11   //$return = StrToLower($return); // velká písmena nahradí malými.
    12   return($return);
    13 }
    142
    153function Export($Setting)
  • trunk/includes/config.sample.php

    r50 r61  
    1818        'AdminEmail' => 'admin@localhost',
    1919        'ShowSQLError' => false,
     20        'ShowPHPError' => false,
    2021  ),
    2122);
  • trunk/includes/global.php

    r60 r61  
    1313
    1414include('config.php');
     15include_once('error.php');
    1516include('databaseconection.php');
    1617include('global_function.php');
     
    149150
    150151if(!array_key_exists('UserID', $_SESSION)) $_SESSION['UserID'] = '';
     152if(!array_key_exists('User', $_SESSION)) $_SESSION['User'] = 'NotRegistred';
     153
    151154// Přihlášení
    152155if(array_key_exists('LoginUser', $_POST))
  • trunk/includes/global_function.php

    r59 r61  
    55define('LICENCE_MODERATOR', 1);
    66define('LICENCE_ADMIN', 2);
     7
     8function utf2ascii($text)
     9{
     10  $return = Str_Replace(
     11    Array("á","č","ď","é","ě","í","ľ","ň","ó","ř","š","ť","ú","ů","ý","ž","Á","Č","Ď","É","Ě","Í","Ľ","Ň","Ó","Ř","Š","Ť","Ú","Ů","Ý","Ž") ,
     12    Array("a","c","d","e","e","i","l","n","o","r","s","t","u","u","y","z","A","C","D","E","E","I","L","N","O","R","S","T","U","U","Y","Z") ,
     13    $text);
     14  //$return = Str_Replace(Array(" ", "_"), "-", $return); //nahradí mezery a podtržítka pomlčkami
     15  //$return = Str_Replace(Array("(",")",".","!",",","\"","'"), "", $return); //odstraní ().!,"'
     16  //$return = StrToLower($return); // velká písmena nahradí malými.
     17  return($return);
     18}
    719
    820function FormatOutput($s)
Note: See TracChangeset for help on using the changeset viewer.