- Timestamp:
- Jan 18, 2008, 8:34:12 PM (17 years ago)
- Location:
- quests
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/ListQuests.php
r245 r246 20 20 } 21 21 22 if(array_key_exists('limitx', $_GET)) { 23 $_SESSION['limitx'] = mysql_escape_string($_GET['limitx']); 24 $_SESSION['limity'] = mysql_escape_string($_GET['limity']); 25 } else { 26 if (isset($_SESSION['limitx']) == false) { 27 $_SESSION['limitx'] = '0'; 28 $_SESSION['limity'] = $NumberQuests; 29 } 30 } 31 32 function WritePages($Addres, $Where) 33 { // BEGIN function WritePages 34 global $Database, $NumberQuests; 35 36 $Line = mysql_fetch_row($Database->SQLCommand("SELECT count(*) FROM quests $Where")); 37 $CountLists = $Line[0]/$NumberQuests; 38 39 echo 'Poèet questù: <b>'.$Line[0].'</b><br /> 40 Zobrazit stránku: '; 41 42 for ($i=0; $i< $CountLists; ++$i) { 43 $limity = $NumberQuests; 44 $limitx = $i*$limity; 45 $Page = $i+1; 46 if ($_SESSION['limitx'] == $limitx) 47 echo '<b>'.$Page.'</b> '; 48 else 49 echo '<a href="'.$Addres.'&limitx='.$limitx.'&limity='.$limity.'">'.$Page.'</a> '; 50 } 51 52 if (@$_SESSION['limitx'] > $limitx) $_SESSION['limitx'] = 0; 53 54 } // END function WritePages 55 22 56 function WriteQuests($sql, $limit, $address) 23 57 { // BEGIN function WriteQuests … … 40 74 <th><a href="ListQuests.php?'.$address.'&order=Title&desc='.$desc.'">Název Questu</a></th>'; 41 75 if ($address == 'selection') echo '<th><a href="ListQuests.php?'.$address.'&order=CountQuests&desc='.$desc.'">Výskyd</a></th>'; else 42 if ($address <> ' limitx') echo '<th><a href="ListQuests.php?'.$address.'&order=user&desc='.$desc.'">User</a></th>76 if ($address <> 'notran') echo '<th><a href="ListQuests.php?'.$address.'&order=user&desc='.$desc.'">User</a></th> 43 77 <th><a href="ListQuests.php?'.$address.'&order=vote&desc='.$desc.'">Známka</a></th> 44 78 <th><a href="ListQuests.php?'.$address.'&order=CountVote&desc='.$desc.'">Poèet hlasování</a></th>'; … … 53 87 <td>'.htmlspecialchars($Line['Title']).'</td>'; 54 88 if ($address == 'selection') echo '<td>'.$Line['CountQuest'].'</td>'; else 55 if ($address <> ' limitx') echo '<td>'.@$Line['User'].'</td>89 if ($address <> 'nottran') echo '<td>'.@$Line['User'].'</td> 56 90 <td>'.substr($Line['Vote'], 0, 4).'</td> 57 91 <td>'.$Line['CountVote'].'</td>'; … … 63 97 64 98 if(array_key_exists('selection', $_GET)) { 99 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 100 <a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a><br><br>'; 65 101 66 102 echo '<table border="1" cellspacing="0" cellpadding="10"><tr><td> … … 73 109 <b>Ostatní:</b><br /><br />'; 74 110 75 for ($i=0; $i<24; ++$i) { 76 $limity = $NumberQuests; 77 $limitx = $i*$limity; 78 $Under = $limitx+$limity; 79 echo '<a href="ListQuests.php?limitx='.$limitx.'&limity='.$limity.'">'.$limitx.' - '.$Under.'</a><br />'; 80 } 81 echo '<a href="ListQuests.php?limitx='.$limitx.'&limity=6000">Zbytek</a><br />'; 111 WritePages('ListQuests.php?notran',"items WHERE items.Language = '0' AND 112 NOT EXISTS(SELECT 1 FROM quests sub WHERE sub.Language <> 0 AND sub.entry = items.entry)"); 113 82 114 echo '</td></tr></table>'; 83 115 } 84 116 85 117 86 if(array_key_exists('limitx', $_GET)) { 87 if(array_key_exists('limity', $_GET)) { 88 $_SESSION['limitx'] = mysql_escape_string($_GET['limitx']); 89 $_SESSION['limity'] = mysql_escape_string($_GET['limity']); 90 } 118 if(array_key_exists('notran', $_GET)) { 119 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 120 <a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a> - > 121 <b>Vypsání nepøelo¾ených questù s limitem na stránku</b><br><br>'; 122 123 WritePages('ListQuests.php?notran',"items WHERE items.Language = '0' AND 124 NOT EXISTS(SELECT 1 FROM quests sub WHERE sub.Language <> 0 AND sub.entry = items.entry)"); 125 91 126 WriteQuests("SELECT * FROM quests items WHERE items.Language = '0' AND 92 NOT EXISTS(SELECT 1 FROM quests sub WHERE sub.Language <> 0 AND sub.entry = items.entry) ", $_SESSION['limitx'].','.$_SESSION['limity'],' limitx');127 NOT EXISTS(SELECT 1 FROM quests sub WHERE sub.Language <> 0 AND sub.entry = items.entry) ", $_SESSION['limitx'].','.$_SESSION['limity'],'notran'); 93 128 } 94 129 95 130 if(array_key_exists('Translate', $_GET)) { 96 if(array_key_exists('trans_limitx', $_GET)) { 97 $_SESSION['limitx'] = mysql_escape_string($_GET['trans_limitx']); 98 $_SESSION['limity'] = mysql_escape_string($_GET['trans_limity']); 99 } else { 100 if (isset($_SESSION['limitx']) == false) { 101 $_SESSION['limitx'] = '0'; 102 $_SESSION['limity'] = $NumberQuests; 103 } 104 } 105 106 $Line = mysql_fetch_row($Database->SQLCommand("SELECT count(*) FROM quests WHERE quests.Language = '1' AND quests.Complete = '1'")); 107 $CountLists = $Line[0]/$NumberQuests; 108 109 echo 'Poèet questù: <b>'.$Line[0].'</b> Zobrazit stránku: '; 110 for ($i=0; $i< $CountLists; ++$i) { 111 $limity = $NumberQuests; 112 $limitx = $i*$limity; 113 $Page = $i+1; 114 if ($_SESSION['limitx'] == $limitx) $color = 'style="color: red"'; 115 else $color = ''; 116 echo '<a '.$color.' href="ListQuests.php?Translate&trans_limitx='.$limitx.'&trans_limity='.$limity.'">'.$Page.'</a> '; 117 } 118 131 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 132 <a Title="Pøelo¾ené questy, mù¾ete zde hlasovat, nebo opravovat Quest" href="ListQuests.php?Translate">Pøelo¾ené questy</a><br><br>'; 133 134 WritePages('ListQuests.php?Translate', "WHERE quests.Language = '1' AND quests.Complete = '1'"); 135 119 136 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User FROM 120 137 quests WHERE quests.Language = '1' AND quests.Complete = '1'", $_SESSION['limitx'].','.$_SESSION['limity'], 'Translate'); … … 122 139 123 140 if(array_key_exists('my', $_GET) and Licence(0)) { 141 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 142 <a Title="Pøelo¾ené questy pøilá¹eného u¾ivatele" href="ListQuests.php?my">Moje questy</a><br><br>'; 124 143 WriteQuests("SELECT * FROM quests Where user = ".$_SESSION['UserID'], '', 'my'); 125 144 } 126 145 127 146 if(array_key_exists('mydevelop', $_GET) and Licence(0)) { 147 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 148 <a Title="Nedokonèené questy" href="ListQuests.php?mydevelop">Rozepsané questy</a><br><br>'; 128 149 WriteQuests("SELECT * FROM quests Where user = ".$_SESSION['UserID']." AND complete = '0'", '', 'mydevelop'); 129 150 } 130 151 152 if(array_key_exists('filter', $_GET)) { 153 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a><br><br><br>'; 154 echo '<table border="1" cellpadding="3" cellspacing="0"> 155 <tr><th>Odkaz</th><th>Popis</th></tr>'; 156 157 echo '<tr><td><a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a></td> 158 <td>Nikým nepøelo¾ené questy, zde mù¾ete zaèít pøekládat</td></tr> 159 <tr><td><a Title="Pøelo¾ené questy, mù¾ete zde hlasovat, nebo opravovat Quest" href="ListQuests.php?Translate">Pøelo¾ené questy</a></td> 160 <td>Pøelo¾ené questy, mù¾ete zde hlasovat, nebo opravovat Quest</td></tr> 161 '; 162 163 if (Licence(0)) { 164 echo '<tr><td><a Title="Nedokonèené questy" href="ListQuests.php?mydevelop">Rozepsané questy</a></td> 165 <td>Nedokonèené questy pøilá¹eného u¾ivatele</td></tr> 166 <tr><td><a Title="Pøelo¾ené questy pøilá¹eného u¾ivatele" href="ListQuests.php?my">Moje questy</a></td> 167 <td>Pøelo¾ené questy pøilá¹eného u¾ivatele</td></tr>'; 168 } 169 170 echo '<tr><td><form action="ListQuests.php?users" method="post"> 171 <select name="users[]" size="10" multiple>'; 172 173 $ID = $Database->SQLCommand("SELECT user,ID FROM `user`"); 174 while ($Line = mysql_fetch_array($ID)) 175 echo '<option value="'.$Line['ID'].'">'.$Line['user'].'</option>'; 176 177 echo '</select><br> 178 <input type="submit" value="Vypsat"></form></td> 179 <td>Vypsat pouze od tìchto u¾ivatalù<br> 180 Vybrat více u¾ivatelù mù¾ete pomocí CTRL+click</td></tr>'; 181 182 echo '<tr><td> 183 <form action="ListQuests.php?byvote" method="post"> 184 Poèet hlasù: <br /> 185 <input type="radio" name="SingNumberVote" value="=" checked="true" title="Rovná se "=""> 186 <input type="radio" name="SingNumberVote" value=">" checked="true" title="Je vìt¹í ne¾ ">""> 187 <input type="radio" name="SingNumberVote" value="<" checked="true" title="Je men¹í ne¾ "<""> 188 <input type="text" name="NumberVote" value="3" size="1"><br> 189 Známka: <br /> 190 <input type="radio" name="SingVote" value="=" checked="true" title="Rovná se "=""> 191 <input type="radio" name="SingVote" value=">" checked="true" title="Je vìt¹í ne¾ ">""> 192 <input type="radio" name="SingVote" value="<" checked="true" title="Je men¹í ne¾ "<""> 193 <input type="text" name="Vote" value="3" size="1"><br> 194 <input type="submit" value="Vypsat"></form> 195 </td><td>Zobrazit podle známky</td></tr>'; 196 197 echo '<tr><td><form action="action.php" method="get"> 198 <input type="text" name="search" size="8"> 199 <input type="submit" value="Hledat"> 200 </form> 201 </td><td>Vyhledat pomocí textu</td></tr> 202 '; 203 204 205 206 echo '</table>'; 207 // WriteQuests("SELECT * FROM quests Where user = ".$_SESSION['UserID']." AND complete = '0'", '', 'mydevelop'); 208 } 209 210 if(array_key_exists('users', $_GET)) { 211 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 212 <b>Vypsání questù od urèitých u¾ivatelù</b><br><br>'; 213 $users = @$_POST['users']; 214 215 $WhereUsers = ''; 216 217 for ($i=0; $i<Count($users); $i++): 218 if ($WhereUsers <> '') 219 $WhereUsers .= " OR User = ".$users[$i]; 220 else 221 $WhereUsers .= " User = ".$users[$i]; 222 endfor; 223 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User FROM quests Where $WhereUsers", '', 'users'); 224 225 } 226 227 if(array_key_exists('byvote', $_GET)) { 228 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 229 <b>Vypsání podle známky</b><br><br>'; 230 231 $SingVote = $_POST['SingVote']; 232 $SingNumberVote = $_POST['SingNumberVote']; 233 $Vote = $_POST['Vote']; 234 $NumberVote = $_POST['NumberVote']; 235 236 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 237 FROM quests WHERE Vote $SingVote $Vote AND CountVote $SingNumberVote $NumberVote", '', 'users'); 238 239 } 240 131 241 ShowFooter(); 132 242 ?> 243 -
quests/TODO.txt
r245 r246 18 18 - va statistice moderátory hotovo 19 19 - struktura tabulek do souboru hotovo 20 - mono zobrazit pouze od uivatelù hotovo 21 - u slovníku pouze ruit odkaz, ne na pozadí hotovo 20 22 - Rozdìlení pomocí ras 21 23 - import 22 - u slovníku pouze ruit odkaz, ne na pozadí23 24 - jiné texty ne questy - hlavní texty 24 25 - search mono order by -
quests/export.php
r245 r246 168 168 ?> 169 169 <div style=" border: 2px dotted black; padding: 0px 5px 5px 5px;"> 170 <big><b><i>Pro server:</ b></i></big><br>170 <big><b><i>Pro server:</i></b></big><br> 171 171 <b>Export Questù:</b><br /> 172 172 <form action="export.php" method="POST"> … … 188 188 <br /> 189 189 </td><td> 190 <input type="text" name="NumberVote" value="3" size="1"> Poèet nutných hlasù <br>191 <input type="text" name="Vote" value="4" size="1"> Známka lep¹í nebo stejná jak <br>190 <input type="text" name="NumberVote" value="3" size="1"> Poèet nutných hlasù <br> 191 <input type="text" name="Vote" value="4" size="1"> Známka lep¹í nebo stejná jak <br> 192 192 <br /> 193 <select name="users[]" size="10" multiple>193 <select name="users[]" size="10" multiple> 194 194 195 195 <?php … … 201 201 ?> 202 202 203 </select><br> Exportovat pouze od tìchto u¾ivatalù<br>204 Vybrat více u¾ivatelù mù¾ete pomocí CTRL+click203 </select><br> Exportovat pouze od tìchto u¾ivatalù<br> 204 Vybrat více u¾ivatelù mù¾ete pomocí CTRL+click 205 205 206 206 … … 233 233 <br> 234 234 <div style=" border: 2px dotted black; padding: 0px 5px 5px 5px;"> 235 <big><b><i>Pro klinta:</ b></i></big><br>235 <big><b><i>Pro klinta:</i></b></big><br> 236 236 <b>Diakritika ve World of Warcraft</b><br /> 237 237 - 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 /> -
quests/form.php
r245 r246 15 15 16 16 17 if ($Line['Language'] <> '0' and $LineUser['user'] <> '') echo 'Pøelo¾il: <b>'.$LineUser['user'].'</b> ';17 if ($Line['Language'] <> '0' and $LineUser['user'] <> '') echo 'Pøelo¾il: <b>'.$LineUser['user'].'</b> <br />'; 18 18 if ($Line['Take'] <> '0' and $Line['Take'] <> $Line['ID']) { 19 19 $Language = mysql_fetch_array($Database->SQLCommand("SELECT Language FROM quests Where ID = '".$Line['Take']."'")); … … 24 24 if ($Line['Language'] <> '0') { 25 25 echo 'Quest je: '; 26 if ($Line['complete'] == 1) echo ' <b>Hotov</b> ';27 else echo ' <b> Ulo¾en v rozepsaných</b> ';26 if ($Line['complete'] == 1) echo ' <b>Hotov</b><br />'; 27 else echo ' <b> Ulo¾en v rozepsaných</b><br />'; 28 28 } 29 30 if (Licence(0) and ($LineUser['ID'] <> $_SESSION['UserID']) and ($Line['Language'] <> 0)) { 31 echo ' Hodnotit Quest: '; 32 for ($i=1; $i<6; ++$i) 33 echo '<a href="action.php?vote='.$i.'&ID='.$QuestID.'">'.$i.'</a> '; 34 echo ' bodù (5 nejlep¹í)'; 35 } 36 29 37 // Speciální znaky: $B - Odøádkování, $N - Jméno, $C - povolání 30 38 ?> … … 50 58 '; 51 59 } 52 if (Licence(0) and ($LineUser['ID'] <> $_SESSION['UserID']) and ($Line['Language'] <> 0)) {53 echo ' Hodnotit Quest: ';54 for ($i=1; $i<6; ++$i)55 echo '<a href="action.php?vote='.$i.'&ID='.$QuestID.'">'.$i.'</a> ';56 echo ' bodù (5 nejlep¹í)';57 }58 59 60 ?> 60 61 <input type="hidden" name="entry" value="<?php echo $LineAJ['entry']?>"> -
quests/includes/global.php
r244 r246 59 59 <a Title="Diskuze na téma pøeklárání" href="http://wow.zdechov.net/forum/viewforum.php?f=22">Forum projektu</a><br /> 60 60 <a Title="Domácí server" href="http://wow.zdechov.net/">Web serveru</a><br /> 61 <a Title="Slovník wow výrazù" href="javascript: window.open(\'dictionary.php\', \'Slovník\', \'width=400, height=412\'); blur()">Slovníèek</a><br />61 <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 /> 62 62 <a Title="Statistika pøekládání" href="statistic.php">Statistika</a><br /> 63 63 <a href="export.php" Title="Zde si mù¾ete stáhnout pøelo¾ené texty">Download</a><br />'; 64 64 65 65 if (Licence(0)) 66 echo '<a Title="Nastavení u¾ivatele" href="Options.php" Title="Nastavení u¾ivatele">Nastavení</a><br />';66 echo '<a Title="Nastavení u¾ivatele" href="Options.php">Nastavení</a><br />'; 67 67 else 68 68 echo '<a Title="Registrace u¾ivatele pro pøekládání" href="registrace.php" style="color: red">Registrace</a><br />'; 69 69 70 70 echo '<br /> 71 <a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a><br /> 72 <a Title="Pøelo¾ené quest, mù¾ete zde hlasovat, nebo opravovat Quest" href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />'; 71 <a Title="Zde mù¾ete zaèít pøekládat" href="ListQuests.php?selection">Nepøelo¾ené questy</a><br />'; 72 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a><br /><br />'; 73 74 /* echo '<a Title="Pøelo¾ené quest, mù¾ete zde hlasovat, nebo opravovat Quest" href="ListQuests.php?Translate">Pøelo¾ené questy</a><br />'; 73 75 74 76 if (Licence(0)) { … … 77 79 <br />'; 78 80 } 79 81 */ 80 82 if (Licence(2)) { 81 83 // echo 'Administrace:'; … … 121 123 echo '<tr><td><small><b>'.$Line['user'].'</b>: '.$Line['text'].'</small></td></tr>'; 122 124 echo '</table> 123 </p>125 124 126 '; 125 127 126 echo '<form action="action.php" method="get">127 <input type="text" name="search" size="8">128 <input type="submit" value="Hledat">129 </form>130 ';131 128 132 129 echo '</td> 133 130 <td width="10"></td> 134 <td >131 <td valign="top"> 135 132 '; 136 133
Note:
See TracChangeset
for help on using the changeset viewer.