Changeset 281


Ignore:
Timestamp:
Jan 27, 2008, 6:07:07 PM (17 years ago)
Author:
maron
Message:

export page_text

Location:
quests
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • quests/export.php

    r277 r281  
    11<?php
    2 
    3   include('includes/global.php');
    4 
    5   include 'includes/zip.lib.php';
    62
    73        function WithOutDiacritical($teststring){
     
    117        }
    128
    13   if (array_key_exists('Type', $_POST)) {
    149    $Diacritical = @$_POST['Diacritical'];
    1510    if (array_key_exists('CZ', $_POST)) $CZ = $_POST['CZ'];   
     
    3530    Poèet nutných hlasù: '.$NumberVote.'
    3631    Známka vy¾¹í jak: '.$Vote.'
    37     Tabluky: Quests: '.@$_POST['Quests'].' , NPC_text: '.@$_POST['NPC_texts'].'   */
     32    Tabluky:
     33      Quests: '.@$_POST['Quests'].'
     34      NPC_text: '.@$_POST['NPC_texts'].'
     35      page_text: '.@$_POST['page_texts'].'   */
    3836   
    3937    ';
     
    166164    }
    167165  } 
     166
     167  //export page_textù
     168  $x = 0;
     169  if (array_key_exists('page_texts', $_POST)) {
     170   
     171    $sql = "SELECT * FROM page_text WHERE Complete = '1' AND CountVote >= '$NumberVote' AND Vote >= '$Vote'";
     172   
     173    if ($WhereLang <> '') $sql .= " AND ($WhereLang)";
     174    if ($WhereUsers <> '') $sql .=  "AND ($WhereUsers)";
     175
     176    $ID = $Database->SQLCommand($sql." ORDER BY vote");
     177    while ($Line = mysql_fetch_array($ID)) {
     178   
     179      $sql = "UPDATE page_text SET ";
     180      for ($i=0; $i<count($page_text); ++$i) {
     181        if ($Line[$page_text[$i]] <> '')
     182          $sql .= " ".$page_text[$i]." = '".mysql_escape_string($Line[$page_text[$i]])."' , ";
     183      }
     184      $sql .= " ID = '".$Line['entry']."' WHERE ID = ".$Line['entry'].";";
     185     
     186      if ($Diacritical == False) $sql=WithOutDiacritical($sql);
     187     
     188    $Bufferpage[$x] = $sql;
     189    ++$x;
     190    }
     191  } 
    168192 
    169193  //vypisování
     
    179203        ';
    180204      }
     205      for ($i=0; $i<count(@$Bufferpage); ++$i) {
     206        echo $Bufferpage[$i].'
     207        ';
     208      }
    181209    echo '</textarea>';
    182210  }
     
    189217      for ($i=0; $i<count(@$BufferNPC); ++$i) {
    190218        $Database->SQLCommand($BufferNPC[$i]);
     219      }
     220      for ($i=0; $i<count(@$Bufferpage); ++$i) {
     221        $Database->SQLCommand($Bufferpage[$i]);
    191222      }
    192223      echo 'Hotovo!';
     
    207238          ';
    208239        }
     240        for ($i=0; $i<count(@$Bufferpage); ++$i) {
     241          $BufferZip .= $Bufferpage[$i].'
     242          ';
     243        }
    209244
    210245   //     echo $BufferZip.'<br><br><br>';
     
    225260        <script type="text/javascript" language="JavaScript" charset="iso-8859-2">
    226261            setTimeout("parent.location.href=\''.$save_filename.'\'",1000)
    227         </script>
    228      
     262        </script>';
     263     
     264      echo '
    229265      Pokud nezaèalo stahování soubor by mìlo jít stáhnout z tohoto odkazu:
    230266      <a href="'.$save_filename.'">'.$save_filename.'</a><br />
     
    234270      WriteLog('Sta¾ení SQL souboru: Typ Exportu: <b>'.$Export.'</b> Diakritika: <b>'.$Diacritical.'</b>
    235271       Poèet nutných hlasù: <b>'.$NumberVote.'</b> Známka vy¾¹í jak: <b>'.$Vote.'</b>', 2);
    236    
    237    
    238 } else {
     272     
    239273?>
    240 <div style="    border: 2px dotted black;       padding: 0px 5px 5px 5px;">
    241   <big><b><i>Pro server:</i></b></big><br>
    242   <b>Export Pøekladu:</b><br />
    243   <form action="export.php" method="POST">
    244     <table border="1" cellpadding="1" cellspacing="0">
    245       <tr><th>Sql</th><th>Filtr</th><th>Jazyk</th><th>Texty</th></tr>
    246       <tr><td>
    247         <input type="radio" name="Export" value="Zip" checked="true"> Exportovat do zip<br>
    248         <input type="radio" name="Export" value="Display"> Export zobrazit<br>
    249 <?php
    250       if (Licence(2)) {
    251           echo '<input type="radio" name="Export" value="Mangos"> Import na server (Admin only)<br>';
    252       }
    253 ?>
    254         <br />
    255         <input type="radio" name="Type" value="Insert"> Insert (zatím nefunguje)<br>
    256         <input type="radio" name="Type" value="Update" checked="true"> Update <br>
    257         <br />
    258         <input type="checkbox" name="Use" checked="true"> Pøidat Use mangos <br>
    259         <br />
    260         <input type="checkbox" name="Quests" checked="true"> Questy <br>
    261         <input type="checkbox" name="NPC_texts" checked="true"> NPC_texts <br>
    262       </td><td>
    263         &nbsp; <input type="text" name="NumberVote" value="3" size="1"> Poèet nutných hlasù <br>                                                               
    264         &nbsp; <input type="text" name="Vote" value="4" size="1"> Známka lep¹í nebo stejná jak  <br>                                                             
    265             <br />
    266         &nbsp; <select name="users[]" size="10" multiple>
    267          
    268 <?php
    269 // multiple="multiple"
    270     $ID = $Database->SQLCommand("SELECT user,ID FROM `user` WHERE
    271           EXISTS(SELECT 1 FROM quests WHERE user = user.ID) OR
    272           EXISTS(SELECT 1 FROM npc_text WHERE user = user.ID) ORDER BY user");
    273       while ($Line = mysql_fetch_array($ID))
    274         echo '<option value="'.$Line['ID'].'">'.$Line['user'].'</option>';
    275    
    276 ?>         
    277          
    278         </select><br> &nbsp; Exportovat pouze od tìchto u¾ivatalù<br>
    279         &nbsp; Vybrat více u¾ivatelù mù¾ete pomocí CTRL+click
    280        
    281 
    282       </td><td>
    283         <input type="checkbox" name="Diacritical" checked="true"> Vèetnì diakritiky <br> 
    284         <br />                                                               
    285         <input type="checkbox" name="CZ" checked="true"> Èeský pøeklad <br>                                                                 
    286         <input type="checkbox" name="SK" checked="true"> Slovenský pøeklad <br>                                                                 
    287         <input type="checkbox" name="OtherLanguage"> Jiné jazyky <br>
    288       </td><td>
    289         <b>Title questu:</b><br>
    290         <input type="radio" name="AddTitle" value="Translate" checked="true"> Pøelo¾ený název <br>
    291         <input type="radio" name="AddTitle" value="EN"> Pùvodní název <br>
    292         <input type="radio" name="AddTitle" value="Both"> Pøelo¾ený název (Anglický název) <br>
    293     <br>                                                                 
    294 <?php   
    295   foreach($Texts as $Index => $TextItem)
    296     echo '<input type="checkbox" name="Add'.$TextItem[0].'" checked="true"> '.$TextItem[0].'<br>';
    297 ?>
    298       </td></tr>
    299     </table>
    300     <br><input type="submit" value="Generovat SQL soubor pøekladu  (Sta¾ení)">
    301   </form> 
    302   <b>Èeský pøeklad MaNGOS Minimanageru:</b><br />
    303   - Stránky projektu: <a href="http://sourceforge.net/projects/mmfpm/">http://sourceforge.net/projects/mmfpm/</a><br>
    304   - Pøeklad: <a href="http://wow.zdechov.net/minimanager/lang/csCZ.zip">Èe¹tina do minimanageru</a><br>
    305   - Diskusní forum pro pøípadné pøipomínky k pøekladu: <a href="http://wow.zdechov.net/forum/viewtopic.php?p=5533">Forum</a>
    306 
    307 </div>
    308 <br>
    309 <div style="    border: 2px dotted black;       padding: 0px 5px 5px 5px;">
    310   <big><b><i>Pro klinta:</i></b></big><br>
    311   <b>Diakritika ve høe</b><br />
    312    - Pro správné zobrazování diakrity ve høe si stáhnìte <a href="http://wow.zdechov.net/download_soubory/ceske_fonty_do_wow.zip">Èeské fonty do hry</a><br />
    313    <br />
    314   <b>Zvukové hlá¹ky ve høe</b><br />
    315    - zvukové soubory pøevzaté z èeské verze Warcraftu III <a href="http://www.wowresource.eu/index.php?showtopic=4260&amp;hl=hl%C3%A1%C5%A1ky" title="http://www.wowresource.eu/index.php?showtopic=4260&amp;hl=hl%C3%A1%C5%A1ky">Èeské hlá¹ky z Warcraftu III</a>
    316 </div>
    317 <?php
    318 }
    319  
    320          
    321   ShowFooter();     
    322 ?>
  • quests/includes/global.php

    r280 r281  
    7575      <a Title="Slovník wow výrazù" onclick="javascript:window.open(\'dictionary.php\',\'Slovník\',\'width=400,height=412\'); return false;" href="dictionary.php">Slovníèek</a><br />
    7676      <a Title="Statistika pøekládání" href="statistic.php">Statistika</a><br />
    77       <a href="export.php" Title="Zde si mù¾ete stáhnout pøelo¾ené texty">Stahování</a><br />';
     77      <a href="download.php" Title="Zde si mù¾ete stáhnout pøelo¾ené texty">Stahování</a><br />';
    7878     
    7979      if (Licence(0))
Note: See TracChangeset for help on using the changeset viewer.