Changeset 225


Ignore:
Timestamp:
Jan 14, 2008, 7:51:30 PM (17 years ago)
Author:
maron
Message:
 
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • index.php

    r200 r225  
    8888
    8989echo('<div>
     90Projekt pøekládání WoW: <a href="http://wow.zdechov.net/quests/">
     91<img src="http://wow.zdechov.net/quests/banners/baner_88_31.jpg" alt="baner_http://wow.zdechov.net/quests/" border="0" height="31" width="88"></a><br>
    9092RSS kanál diskusního fóra: <a href="forum/smartfeed_url.php"><img src="forum/templates/subSilver/images/rss20.png" alt="RSS"></a><br />
    9193Teamspeek server: <a href="teamspeak://game.zdechov.net">game.zdechov.net</a><br />
    92 Projekt pøekládání questù: <a href="quests/">Questy</a><br>
    9394Projekt Client HoF: <a href="client/">Client</a><br>
    9495Informace pro zájemce o GM: <a href="http://wow.zdechov.net/forum/viewtopic.php?p=5443">zde</a><br>
  • quests/ListQuests.php

    r219 r225  
    22include('includes/global.php');
    33
    4   if(array_key_exists('Translate', $_GET)) {
    5       $ID = $Database->SQLCommand("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User FROM
    6       quests WHERE quests.Language = '1' AND quests.Complete = '1' order by 2");
    7       echo '<table border="1" cellpadding="2" cellspacing="0">
    8             <tr><th>Poøadové èíslo</th><th>ID questu</th><th>Název Questu</th><th>U¾ivatel</th><th>Známka</th><th>Poèet hlasování</th></tr>';
    9       while ($Line = mysql_fetch_array($ID)) {
    10         echo '<tr><td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
    11         <td>'.$Line['entry'].'</td>
    12         <td>'.$Line['Title'].'</td>
    13         <td>'.$Line['User'].'</td>
    14         <td>'.$Line['Vote'].'</td>
    15         <td>'.$Line['CountVote'].'</td></tr>';
    16        }
    17       echo '</table>';
     4  if(array_key_exists('order', $_GET)) {
     5    $order = $_GET['order'];
     6    $desc = $_GET['desc'];
    187  } else {
     8    $order = '';
     9    $desc = 'desc';
     10  }
    1911
    20     if(array_key_exists('limitx', $_GET)) {
    21       $limitx = mysql_escape_string($_GET['limitx']); 
    22       $limity = mysql_escape_string($_GET['limity']); 
     12  function WriteQuests($sql, $limit, $address)
     13  { // BEGIN function WriteQuests
     14    global $Database, $order, $desc;
     15   
     16    if ($limit <> '') $limit = 'LIMIT '.$limit;
    2317
    24       $ID = $Database->SQLCommand("SELECT * FROM quests WHERE Language = '0' LIMIT $limitx,$limity");
    25   //    $ID = $Database->SQLCommand("SELECT quests.entry FROM quests WHERE Language = '0' AND quests.entry NOT IN
    26    //   (SELECT quests.entry FROM quests WHERE quests.Language = '1' AND state = '2') LIMIT $limitx,$limity");
    27       while ($Line = mysql_fetch_array($ID)) {
    28         $LineTranslate = mysql_fetch_array($Database->SQLCommand("SELECT * FROM quests WHERE Language <> 0 AND entry = '".$Line['entry']."'"));
    29         if (!$LineTranslate)
    30         echo '<a href="form.php?ID='.$Line['ID'].'">['.$Line['entry'].']</a> - '.$Line['Title'].'<br />';  //.$Line['Title']
    31       }
     18    if ($address <> 'selection') {
     19      if ($order <> '') $order = 'ORDER BY '.$order;
     20      if ($desc <> 'desc') $desc = 'desc'; else $desc = '';
     21    } else {
     22      $order = '';
     23      $desc = '';
     24    }
     25       
     26        echo '<table border="1" cellpadding="2" cellspacing="0">
     27              <tr>
     28              <th><a href="ListQuests.php?'.$address.'&amp;order=ID&amp;desc='.$desc.'">Poøadové èíslo</a></th>
     29              <th><a href="ListQuests.php?'.$address.'&amp;order=entry&amp;desc='.$desc.'">ID questu</a></th>
     30              <th><a href="ListQuests.php?'.$address.'&amp;order=Title&amp;desc='.$desc.'">Název Questu</a></th>';
     31              if ($address == 'selection') echo '<th><a href="ListQuests.php?'.$address.'&amp;order=CountQuests&amp;desc='.$desc.'">Výskyd</a></th>'; else
     32              if ($address <> 'limitx') echo '<th><a href="ListQuests.php?'.$address.'&amp;order=user&amp;desc='.$desc.'">User</a></th>
     33              <th><a href="ListQuests.php?'.$address.'&amp;order=vote&amp;desc='.$desc.'">Známka</a></th>
     34              <th><a href="ListQuests.php?'.$address.'&amp;order=CountVote&amp;desc='.$desc.'">Poèet hlasování</a></th>';
     35              echo '</tr>';
     36             
     37         echo "$sql $order $desc $limit";     
     38        $ID = $Database->SQLCommand("$sql $order $desc $limit");
     39          while ($Line = mysql_fetch_array($ID)) {
     40            echo '<tr>
     41            <td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
     42            <td>'.$Line['entry'].'</td>
     43            <td>'.$Line['Title'].'</td>';
     44            if ($address == 'selection') echo '<td>'.$Line['CountQuest'].'</td>'; else
     45            if ($address <> 'limitx') echo '<td>'.@$Line['User'].'</td>
     46            <td>'.$Line['Vote'].'</td>
     47            <td>'.$Line['CountVote'].'</td>';
     48            echo '</tr>';
     49          }
     50        echo '</table>';       
     51  } // END function WriteQuests
    3252 
    33     } else {
    34       if(array_key_exists('mydevelop', $_GET) and Licence(0)) {
    35      
    36       echo '<table border="1" cellpadding="2" cellspacing="0">
    37             <tr><th>Poøadové èíslo</th><th>ID questu</th><th>Název Questu</th></tr>';
    38       $ID = $Database->SQLCommand("SELECT * FROM quests Where User='".$_SESSION['UserID']."' AND complete = '0' order by 1 ");
    39         while ($Line = mysql_fetch_array($ID)) {
    40           echo '<tr><td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
    41           <td>'.$Line['entry'].'</td>
    42           <td>'.$Line['Title'].'</td></tr>';
    43         }
    44       echo '</table>'; 
    45       } else {
    46         if(array_key_exists('my', $_GET) and Licence(0)) {
    47        
    48         echo '<table border="1" cellpadding="2" cellspacing="0">
    49               <tr><th>Poøadové èíslo</th><th>ID questu</th><th>Název Questu</th><th>Známka</th></tr>';
    50         $ID = $Database->SQLCommand("SELECT * FROM quests Where User='".$_SESSION['UserID']."' order by 1 ");
    51           while ($Line = mysql_fetch_array($ID)) {
    52             echo '<tr><td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
    53             <td>'.$Line['entry'].'</td>
    54             <td>'.$Line['Title'].'</td>
    55             <td>'.$Line['Vote'].'</td></tr>';
    56           }
    57         echo '</table>'; 
    58         } else {
    59         }
    60       }
    61     }
    6253
    6354        if(array_key_exists('selection', $_GET)) {             
    6455               
    65                 echo '<br /><b>Prioritnì by jste mìli pøekládat tyto questy:</b><br />';
     56                echo '<table border="0" cellpadding="10"><tr><td>
     57          <br /><b>Prioritnì by jste mìli pøekládat tyto questy:</b><br /><br />';
    6658               
    67           $ID = $Database->SQLCommand("SELECT * FROM `quests_status` ORDER BY CountQuest DESC LIMIT 10");
    68           echo '<table border="1" cellpadding="2" cellspacing="0">
    69               <tr><th>Poøadové èíslo</th><th>ID questu</th><th>Název Questu</th><th>Poèet splnìní na serveru</th></tr>';
    70           while ($Line = mysql_fetch_array($ID)) {
    71               $LineAJQuest = mysql_fetch_array($Database->SQLCommand("SELECT * FROM quests WHERE Language = 0 AND entry = '".$Line['QuestEntry']."'"));
    72               echo '<tr><td><a href="form.php?ID='.$Line['ID'].'">'.$Line['ID'].'</a></td>
    73               <td>'.$LineAJQuest['entry'].'</td>
    74               <td>'.$LineAJQuest['Title'].'</td>
    75               <td>'.$Line['CountQuest'].'</td></tr>';
    76           }
    77                
    78           echo '</table><br />';
     59                WriteQuests("SELECT * FROM quests, quests_status
     60          WHERE quests.language = 0 AND quests.entry = quests_status.questentry ORDER BY quests_status.CountQuest DESC", 18, 'selection');
    7961         
    80           echo '<b>Ostatní:</b><br /><br />';
     62          echo '</td><td>
     63          <b>Ostatní:</b><br /><br />';
    8164
    82           for ($i=0; $i<30; ++$i) {
     65          for ($i=0; $i<24; ++$i) {
    8366            $limity = 200;
    8467            $limitx = $i*$limity;
     
    8770          }
    8871                echo '<a href="ListQuests.php?limitx='.$limitx.'&amp;limity=6000">Zbytek</a><br />';
     72          echo '</td></tr></table>';
     73        }
    8974
    9075
    91     //  echo '<a href="ListQuests.php?limitx=3500&amp;limity=4000">3500-4000</a><br />';
     76      if(array_key_exists('limitx', $_GET)) {
     77        if(array_key_exists('limity', $_GET)) {
     78          $_SESSION['limitx'] = mysql_escape_string($_GET['limitx']);
     79          $_SESSION['limity'] = mysql_escape_string($_GET['limity']);
    9280        }
     81        WriteQuests("SELECT * FROM quests items WHERE items.Language = '0' AND
     82        NOT EXISTS(SELECT 1 FROM quests sub WHERE sub.Language <> 0 AND sub.entry = items.entry) ", $_SESSION['limitx'].','.$_SESSION['limity'],'limitx');
     83      }
    9384
    94   }
     85      if(array_key_exists('Translate', $_GET)) {
     86        WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User FROM
     87        quests WHERE quests.Language = '1' AND quests.Complete = '1'", '', 'Translate');
     88      }
     89     
     90      if(array_key_exists('my', $_GET) and Licence(0)) {
     91        WriteQuests("SELECT * FROM quests Where user = ".$_SESSION['UserID'], '', 'my');
     92      }
     93
     94      if(array_key_exists('mydevelop', $_GET) and Licence(0)) {
     95        WriteQuests("SELECT * FROM quests Where user = ".$_SESSION['UserID']." AND complete = '0'", '', 'mydevelop');
     96      }
    9597 
    9698  ShowFooter();
  • quests/dictionary.php

    r217 r225  
    7070          </form>
    7171          ';   
     72    $WinWidth = 230;
    7273  } else  {
     74    $WinWidth = 345;
    7375    if (array_key_exists('AJWord', $_POST)) {
    7476      $AJWord = $_POST['AJWord'];
     
    7981                              VALUES ('$AJWord', '$CZWord', '$description', '$user');");
    8082      echo 'Záznam byl ulo¾en!';
     83      $WinWidth = 325;
    8184    }   
    8285  }
     
    100103    echo '</form></td></tr>';
    101104    echo '<tr><td>
    102     <p style="  overflow: auto;  width: 100%; height: 345px;">';
     105    <p style="  overflow: auto;  width: 100%; height: '.$WinWidth.'px;">';
    103106    //todo select   
    104107    if ($Search <> '') {
    105108      $sql = "SELECT * FROM `dictionary` WHERE LOWER(AJWord) LIKE LOWER('%$Search%') OR LOWER(CZWord) LIKE LOWER('%$Search%') OR LOWER(description) LIKE LOWER('%$Search%')";
    106109    } else {
    107       $sql = "SELECT * FROM `dictionary` Limit 50";
     110      $sql = "SELECT * FROM `dictionary`";
    108111    }
    109112        echo '<table border="1" cellpadding="2" cellspacing="0" width="100%">';
  • quests/export.php

    r224 r225  
    149149} else {
    150150?>
     151<div style="    border: 2px dotted black;       padding: 0px 5px 5px 5px;">
     152  <big><b><i>Pro server:</b></i></big><br>
    151153  <form action="export.php" method="get">
    152154    <table border="1">
     
    188190    <br><input type="submit" value="Generovat">
    189191  </form> 
     192</div>
     193<br>
     194<div style="    border: 2px dotted black;       padding: 0px 5px 5px 5px;">
     195  <big><b><i>Pro klinta:</b></i></big><br>
     196  <b>Diakritika ve World of Warcraft</b><br />
     197   - 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 />
     198</div>
    190199<?php
    191200}
  • quests/includes/global.php

    r220 r225  
    9898      <a href="Options.php" Title="Nastavení u¾ivatele">Nastavení</a><br />
    9999      <a href="statistic.php">Statistika</a><br />
    100       <a Title="Slovník wow výrazù" href="javascript: window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=400\'); blur()">Slovníèek</a><br />
    101       <a href="export.php" Title="Zdes i mù¾ete stáhnout pøelo¾ené texty">Export</a><br />
     100      <a Title="Slovník wow výrazù" href="javascript: window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=412\'); blur()">Slovníèek</a><br />
     101      <a href="export.php" Title="Zdes i mù¾ete stáhnout pøelo¾ené texty">Download</a><br />
    102102      <br />
    103103      <a href="ListQuests.php?selection">Nepøelo¾ené questy</a><br />
     
    111111      if (Licence(1)) {
    112112     //   echo 'Administrace:';
    113         echo '<br /><a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br /><br />';
     113        echo '<br /><a href="priorite.php" Title="Naètení priority questù (Moderator only)">Priorita</a><br />';
    114114      }
    115115     
    116       echo '<form action="action.php" method="get">
     116      echo '<br /><form action="action.php" method="get">
    117117<input type="text" name="search" size="13"><br>
    118118<input type="submit" value="Hledat">
Note: See TracChangeset for help on using the changeset viewer.