<?php
include('Global.php');    
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
  <META http-equiv="Content-Language" content="cs">
  <META http-equiv="Content-Type" content="text/html; charset=windows-1250">
  <META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
  <link rel="SHORTCUT ICON" href="/images/favicon.ico">
  <TITLE>WoW server Heroes of Fantasy - Projekt překládání Questů do CZ</TITLE>
</HEAD>  
<html>
  <body>

<?php

  include('Panel.php');

  if (array_key_exists('entry', $_GET)) {
    $entry = mysql_escape_string($_GET['entry']);  
    $User = @$_SESSION['User'];
    $LineAJ = mysql_fetch_array($Database->SQLCommand("SELECT * FROM ajquests Where entry = $entry"));


   if (array_key_exists('user', $_GET)) {
    $user = mysql_escape_string($_GET['user']);  
    $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM czquests Where entry = $entry AND User='$user'"));
    Echo 'Uživatel: '.$user;
   } else {
    $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM czquests Where entry = $entry"));
   }
     
    echo '<br>Identifikační číslo: <b>'.$LineAJ['entry'].'</b><br>';  
 //   echo 'Jméno Questu: <b>'.$LineAJ['Title'].'</b> ';  
    
    
  //  $User = $_SESSION['User'];
    $ID = $Database->SQLCommand("SELECT * FROM user Where User='$User'");
    $LineUser = mysql_fetch_array($ID);
    if ($LineUser['gm'] == 1) {
      echo '  <form action="Action.php" method="get">
      <input type="submit" value="Zkontrolováno" name="inspect">
      <input type="hidden" name="entry" value="'.$Line['entry'].'">
      <input type="hidden" name="user" value="'.$Line['User'].'">
      </form>';      
    }

//    <input name="complete" value="1" checked="checked" type="checkbox"> Hotovo

?>    
  <form action="Action.php" method="get">
    <input type="submit" value="Uložit" name="save"> Klikněte na uložit pro pozdější dokončení Q<br>
    <input type="submit" value="Dokončeno" name="End"> Klikněte na Dokončeno jesli jsou všechny texty hotové<br>
    
<?php
      if ($LineUser['gm'] == 1) {
        echo '<input type="submit" value="Opravit Q" name="Repair"> Klikněte Jestli si přejete opravit chyby v Questu<br>';

        echo '<input type="hidden" name="UserRepair" value="'.$Line['User'].'">';
        echo '<a style="color: Red" title="smazat" href="ListQuestsWait.php?delete=1&amp;entry='.$Line['entry'].'&amp;user='.$Line['User'].'">x</a> <a style="color: Red" title="Není hotovo" href="ListQuestsWait.php?NotComplete=1&amp;entry='.$Line['entry'].'&amp;user='.$Line['User'].'"><-</a><br />';
      }

    $User = @$_SESSION['User'];
?>
    
    
    <input type="hidden" name="entry" value="<?php echo $LineAJ['entry']?>">
      <input type="hidden" name="user" value="<?php echo $User ?>">
    Spesiální znaky jeko $B - Mezera, $N - Jméno, $C - povolání, kopírujte z AJ textu. Bez mezery !!!
    <table border="1">
      <tr>
        <th>Nepřeložené - Title</th>
        <th>Přeložené - Title</th>
      </tr>
      <tr>
        <td width="300"><?php echo $LineAJ['Title']?></td>
        <td><input type="text" size="45" name="Title" value="<?php echo $Line['Title']?>"></td>
      </tr>
      <tr>
        <th>Nepřeložené - Details</th>
        <th>Přeložené - Details</th>
      </tr>
      <tr>
        <td width="300"><?php echo $LineAJ['Details']?></td>
        <td><textarea style="width: 300px; height: 100%;" name="Details"><?php echo $Line['Details']?></textarea></td>
      </tr>
      <tr>
        <th>Nepřeložené - Objectives</th>
        <th>Přeložené - Objectives</th>
      </tr>
      <tr>
        <td width="300"><?php echo $LineAJ['Objectives']?></td>
        <td><textarea style="width: 300px; height: 120;" name="Objectives"><?php echo $Line['Objectives']?></textarea></td>
      </tr>
      <tr>
        <th>Nepřeložené - OfferRewardText</th>
        <th>Přeložené - OfferRewardText</th>
      </tr>
      <tr>
        <td width="300"><?php echo $LineAJ['OfferRewardText']?></td>
        <td><textarea style="width: 300px; height: 120;" name="OfferRewardText"><?php echo $Line['OfferRewardText']?></textarea></td>
      </tr>
      <tr>
        <th>Nepřeložené - RequestItemsText</th>
        <th>Přeložené - RequestItemsText</th>
      </tr>
      <tr>
        <td width="300"><?php echo $LineAJ['RequestItemsText']?></td>
        <td><textarea style="width: 300px; height: 120;" cols="25" name="RequestItemsText"><?php echo $Line['RequestItemsText']?></textarea></td>
      </tr>
    </table>
  </form>
<?php    

  } else {
    include 'ListQuests.php';   

  }


  
    $Database->Disconnect();
?>   
  
  </body>
</html>

