Changeset 20
- Timestamp:
- Oct 2, 2008, 9:38:57 PM (16 years ago)
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
ListQuests.php
r18 r20 126 126 127 127 if(array_key_exists('nocheck', $_GET)) { 128 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questsù</a> -> 129 <a Title="Zatím nezkontrolované questy" href="ListQuests.php?nocheck">Nezkontrolované questy</a><br><br>'; 130 131 WritePages('ListQuests.php?nocheck'," WHERE Language <> 0 AND quests.Complete = '1' 132 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 1 AND tag.ID_translation = quests.ID)"); 133 134 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 135 FROM quests WHERE Language <> 0 AND quests.Complete = '1' 136 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 1 AND tag.ID_translation = quests.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 137 } 138 139 if(array_key_exists('check', $_GET)) { 140 echo '<a Title="Zobrazit questy podle vlasního filtru" href="ListQuests.php?filter">Filtr questù</a> -> 141 <a Title="Zkontrolované questy" href="ListQuests.php?nocheck">Zkontrolované questy</a><br><br>'; 142 143 /* WritePages('ListQuests.php?nocheck'," WHERE Language <> 0 AND quests.Complete = '1' 144 AND EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 145 tag.type_translation = 1 AND tag.ID_translation = quests.ID)"); 146 */ 147 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 148 FROM quests WHERE Language <> 0 AND quests.Complete = '1' AND 149 EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 150 tag.type_translation = 1 AND tag.ID_translation = quests.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 151 } 152 153 if(array_key_exists('admin_check', $_GET)) { 154 echo '<a Title="Zobrazit questy podle vlasního filtru" href="npc_list.php?filter">Filtr questù</a> -> 155 <a Title="Zkontrolované questy" href="npc_list.php?admin_nocheck">Zkontrolované questy</a><br><br>'; 156 157 WritePages('ListQuests.php?nocheck'," WHERE Language <> 0 AND quests.Complete = '1' AND admin_check = 1"); 158 159 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 160 FROM quests WHERE Language <> 0 AND quests.Complete = '1' AND admin_check = 1", $_SESSION['limitx'].','.$_SESSION['limity'],'admin_check'); 161 } 162 if(array_key_exists('admin_nocheck', $_GET)) { 128 163 echo '<a Title="Zobrazit questy podle vlasního filtru" href="npc_list.php?filter">Filtr questsù</a> -> 129 <a Title="Zatím nezkontrolované questy" href="npc_list.php? nocheck">Nezkontrolované questy</a><br><br>';164 <a Title="Zatím nezkontrolované questy" href="npc_list.php?admin_nocheck">Nezkontrolované questy</a><br><br>'; 130 165 131 166 WritePages('ListQuests.php?nocheck'," WHERE Language <> 0 AND quests.Complete = '1' AND admin_check <> 1"); 132 167 133 168 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 134 FROM quests WHERE Language <> 0 AND quests.Complete = '1' AND admin_check <> 1", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 135 } 136 137 if(array_key_exists('check', $_GET)) { 138 echo '<a Title="Zobrazit questy podle vlasního filtru" href="npc_list.php?filter">Filtr questù</a> -> 139 <a Title="Zkontrolované questy" href="npc_list.php?nocheck">Zkontrolované questy</a><br><br>'; 140 141 WritePages('ListQuests.php?nocheck'," WHERE Language <> 0 AND quests.Complete = '1' AND admin_check = 1"); 142 143 WriteQuests("SELECT *, (SELECT user.user FROM user WHERE user.id = quests.user) as User 144 FROM quests WHERE Language <> 0 AND quests.Complete = '1' AND admin_check = 1", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 145 } 169 FROM quests WHERE Language <> 0 AND quests.Complete = '1' AND admin_check <> 1", $_SESSION['limitx'].','.$_SESSION['limity'],'admin_nocheck'); 170 } 171 146 172 147 173 if(array_key_exists('notvote', $_GET)) { … … 261 287 <tr><td><a Title="Zatím neznámkované questy" href="ListQuests.php?notvote">Neznámkované questy</a></td> 262 288 <td>Zatím neznámkované questy</td></tr>'; 263 if (Licence(2)) {264 289 echo '<tr><td><a Title="Nezkontrolované Questy" href="ListQuests.php?nocheck">Nezkontrolované q.</a></td></tr>'; 265 290 echo '<tr><td><a Title="Zkontrolované Questy" href="ListQuests.php?check">Zkontrolované q.</a></td></tr>'; 266 }267 291 } 268 292 -
action.php
r16 r20 8 8 echo 'Pøeklad byl smazán!'; 9 9 WriteLog('Pøeklad smazán! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 4); 10 } 11 12 if (array_key_exists('type_translation', $_POST) and Licence(1)) { 13 if (array_key_exists('1', $_POST)) 14 $check = 1; 15 else $check = 0; 16 $ID_translation = $_POST['ID_translation']; 17 $type_translation = $_POST['type_translation']; 18 $Database->SQLCommand("DELETE FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND ID_translation = $ID_translation AND type_translation = $type_translation"); 19 $Database->SQLCommand("INSERT INTO `tag` ( `type_translation` , `ID_translation` , `ID_user` , `tag` ) 20 VALUES ('$type_translation', '$ID_translation', '".$_SESSION['UserID']."', '$check')"); 21 echo 'Pøeklad oznaèen!'; 22 if ($type_translation == 1) 23 WriteLog('Pøeklad oznaèen: '.$check.' <a href="form.php?ID='.$ID_translation.'">'.$ID_translation.'</a>', 5); 24 if ($type_translation == 2) 25 WriteLog('Pøeklad oznaèen: '.$check.' <a href="npc_form.php?ID='.$ID_translation.'">'.$ID_translation.'</a>', 5); 26 if ($type_translation == 3) 27 WriteLog('Pøeklad oznaèen: '.$check.' <a href="page_form.php?ID='.$ID_translation.'">'.$ID_translation.'</a>', 5); 10 28 } 11 29 -
form.php
r19 r20 44 44 echo ' bodù (5 nejlep¹í)'; 45 45 } else { echo ' Ji¾ jsi hlasoval: '.$LineVote['vote']; } 46 echo '<br>'; 46 echo '<br> 47 48 '; 49 //kontrolování textù 50 $ID_translation = $QuestID; 51 $type_translation = 1; 52 $check = mysql_fetch_array($Database->SQLCommand("SELECT * FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND ID_translation = $ID_translation AND type_translation = $type_translation")); 53 echo '<form action="action.php" method="post" name="check">'; 54 if ($check['tag'] == 1) 55 echo '<input name="0" type="submit" value="Odebrat z vlastního výbìru">'; 56 else 57 echo '<input name="1" type="submit" value="Pøidat do vlastního výbìru">'; 58 echo ' <input type="hidden" name="ID_translation" value="'.$ID_translation.'"> 59 <input type="hidden" name="type_translation" value="'.$type_translation.'"> 60 61 </form>'; 62 63 64 47 65 } 48 66 … … 51 69 } 52 70 if (Licence(2)) { 53 $ check = mysql_fetch_array($Database->SQLCommand("SELECT ID FROM quests Where entry = ".$Line['entry']." AND admin_check = 1 AND ID <> $QuestID"));54 if (isset($ check['ID']))55 echo 'Ji¾ byla zkontrolována adminem jiná verze questu: <a href="form.php?ID='.$ check['ID'].'">'.$check['ID'].'</a><br />';71 $admin_check = mysql_fetch_array($Database->SQLCommand("SELECT ID FROM quests Where entry = ".$Line['entry']." AND admin_check = 1 AND ID <> $QuestID")); 72 if (isset($admin_check['ID'])) 73 echo 'Ji¾ byla zkontrolována adminem jiná verze questu: <a href="form.php?ID='.$admin_check['ID'].'">'.$admin_check['ID'].'</a><br />'; 56 74 } 57 75 $number_version = mysql_fetch_array($Database->SQLCommand("SELECT count(*) FROM quests Where entry = ".$Line['entry']." AND Language <> 0")); -
npc_form.php
r19 r20 46 46 $number_version = mysql_fetch_array($Database->SQLCommand("SELECT count(*) FROM npc_text Where entry = ".$Line['entry']." AND Language <> 0")); 47 47 echo 'Poèet verzí: <b>'.$number_version['count(*)'].'</b> '; 48 //kontrolování textù 49 $ID_translation = $npc_ID; 50 $type_translation = 2; 51 $check = mysql_fetch_array($Database->SQLCommand("SELECT * FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND ID_translation = $ID_translation AND type_translation = $type_translation")); 52 echo '<form action="action.php" method="post" name="check">'; 53 if ($check['tag'] == 1) 54 echo '<input name="0" type="submit" value="Odebrat z vlastního výbìru">'; 55 else 56 echo '<input name="1" type="submit" value="Pøidat do vlastního výbìru">'; 57 echo ' <input type="hidden" name="ID_translation" value="'.$ID_translation.'"> 58 <input type="hidden" name="type_translation" value="'.$type_translation.'"> 59 60 </form>'; 48 61 echo '<a href="npc_list.php?searchentry='.$Line['entry'].'">Zobrazit v¹echny verze tohoto npc_text</a><br>'; 49 62 -
npc_list.php
r18 r20 105 105 106 106 if(array_key_exists('nocheck', $_GET)) { 107 echo '<a Title="Zobrazit npc_texty podle vlasního filtru" href="npc_list.php?filter">Filtr npc_text ù</a> ->107 echo '<a Title="Zobrazit npc_texty podle vlasního filtru" href="npc_list.php?filter">Filtr npc_textsù</a> -> 108 108 <a Title="Zatím nezkontrolované npc_texty" href="npc_list.php?nocheck">Nezkontrolované npc_texty</a><br><br>'; 109 109 110 WritePages('npc_list.php?nocheck'," WHERE Language <> 0 AND npc_text.Complete = '1' AND admin_check <> 1"); 110 WritePages('npc_list.php?nocheck'," WHERE Language <> 0 AND npc_text.Complete = '1' 111 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 2 AND tag.ID_translation = npc_text.ID)"); 111 112 112 113 Write_npc_text("SELECT *, (SELECT user.user FROM user WHERE user.id = npc_text.user) as User 113 FROM npc_text WHERE Language <> 0 AND npc_text.Complete = '1' AND admin_check <> 1", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 114 FROM npc_text WHERE Language <> 0 AND npc_text.Complete = '1' 115 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 2 AND tag.ID_translation = npc_text.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 114 116 } 115 117 … … 118 120 <a Title="Zkontrolované npc_texty" href="npc_list.php?nocheck">Zkontrolované npc_texty</a><br><br>'; 119 121 120 WritePages('npc_list.php?nocheck'," WHERE Language <> 0 AND npc_text.Complete = '1' AND admin_check = 1"); 121 122 /* Writenpcs('npc_list.php?nocheck'," WHERE Language <> 0 AND npc_text.Complete = '1' 123 AND EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 124 tag.type_translation = 2 AND tag.ID_translation = npc_text.ID)"); 125 */ 122 126 Write_npc_text("SELECT *, (SELECT user.user FROM user WHERE user.id = npc_text.user) as User 123 FROM npc_text WHERE Language <> 0 AND npc_text.Complete = '1' AND admin_check = 1", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 127 FROM npc_text WHERE Language <> 0 AND npc_text.Complete = '1' AND 128 EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 129 tag.type_translation = 2 AND tag.ID_translation = npc_text.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 124 130 } 131 125 132 if(array_key_exists('notvote', $_GET)) { 126 133 echo '<a Title="Zobrazit npc_texty podle vlasního filtru" href="npc_list.php?filter">Filtr npc_textù</a> -> -
npc_save.php
r17 r20 60 60 <a href="npc_form.php?ID='.$npc_ID.'">'.$npc_ID.'</a>', 6); 61 61 $Database->SQLCommand("DELETE FROM `npc_vote` WHERE `npc_vote`.`IDnpc` = ".$npc_ID); 62 $type_translation = 2; 63 $ID_translation = $npc_ID; 64 $Database->SQLCommand("DELETE FROM tag WHERE ID_translation = $ID_translation AND type_translation = $type_translation"); 62 65 } 63 66 //echo $sql; -
page_form.php
r19 r20 46 46 $number_version = mysql_fetch_array($Database->SQLCommand("SELECT count(*) FROM page_text Where entry = ".$Line['entry']." AND Language <> 0")); 47 47 echo 'Poèet verzí: <b>'.$number_version['count(*)'].'</b> '; 48 //kontrolování textù 49 $ID_translation = $page_ID; 50 $type_translation = 3; 51 $check = mysql_fetch_array($Database->SQLCommand("SELECT * FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND ID_translation = $ID_translation AND type_translation = $type_translation")); 52 echo '<form action="action.php" method="post" name="check">'; 53 if ($check['tag'] == 1) 54 echo '<input name="0" type="submit" value="Odebrat z vlastního výbìru">'; 55 else 56 echo '<input name="1" type="submit" value="Pøidat do vlastního výbìru">'; 57 echo ' <input type="hidden" name="ID_translation" value="'.$ID_translation.'"> 58 <input type="hidden" name="type_translation" value="'.$type_translation.'"> 59 60 </form>'; 48 61 echo '<a href="page_list.php?searchentry='.$Line['entry'].'">Zobrazit v¹echny verze tohoto page_text</a>'; 49 62 -
page_list.php
r18 r20 105 105 106 106 if(array_key_exists('nocheck', $_GET)) { 107 echo '<a Title="Zobrazit page_texty podle vlasního filtru" href="page_list.php?filter">Filtr page_text ù</a> ->107 echo '<a Title="Zobrazit page_texty podle vlasního filtru" href="page_list.php?filter">Filtr page_textsù</a> -> 108 108 <a Title="Zatím nezkontrolované page_texty" href="page_list.php?nocheck">Nezkontrolované page_texty</a><br><br>'; 109 109 110 WritePages('page_list.php?nocheck'," WHERE Language <> 0 AND page_text.Complete = '1' AND admin_check <> 1"); 110 WritePages('page_list.php?nocheck'," WHERE Language <> 0 AND page_text.Complete = '1' 111 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 3 AND tag.ID_translation = page_text.ID)"); 111 112 112 113 Write_page_text("SELECT *, (SELECT user.user FROM user WHERE user.id = page_text.user) as User 113 FROM page_text WHERE Language <> 0 AND page_text.Complete = '1' AND admin_check <> 1", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 114 FROM page_text WHERE Language <> 0 AND page_text.Complete = '1' 115 AND NOT EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND tag.type_translation = 3 AND tag.ID_translation = page_text.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'nocheck'); 114 116 } 115 117 … … 118 120 <a Title="Zkontrolované page_texty" href="page_list.php?nocheck">Zkontrolované page_texty</a><br><br>'; 119 121 120 WritePages('page_list.php?nocheck'," WHERE Language <> 0 AND page_text.Complete = '1' AND admin_check = 1"); 121 122 /* WritePages('page_list.php?nocheck'," WHERE Language <> 0 AND page_text.Complete = '1' 123 AND EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 124 tag.type_translation = 3 AND tag.ID_translation = page_text.ID)"); 125 */ 122 126 Write_page_text("SELECT *, (SELECT user.user FROM user WHERE user.id = page_text.user) as User 123 FROM page_text WHERE Language <> 0 AND page_text.Complete = '1' AND admin_check = 1", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 124 } 127 FROM page_text WHERE Language <> 0 AND page_text.Complete = '1' AND 128 EXISTS(SELECT 1 FROM tag WHERE ID_user = ".$_SESSION['UserID']." AND 129 tag.type_translation = 3 AND tag.ID_translation = page_text.ID)", $_SESSION['limitx'].','.$_SESSION['limity'],'check'); 130 } 131 125 132 if(array_key_exists('notvote', $_GET)) { 126 133 echo '<a Title="Zobrazit page_texty podle vlastního filtru" href="page_list.php?filter">Filtr page_textù</a> -> -
page_save.php
r17 r20 60 60 <a href="page_form.php?ID='.$page_ID.'">'.$page_ID.'</a>', 7); 61 61 $Database->SQLCommand("DELETE FROM `page_vote` WHERE `page_vote`.`IDpage` = ".$page_ID); 62 $type_translation = 3; 63 $ID_translation = $page_ID; 64 $Database->SQLCommand("DELETE FROM tag WHERE ID_translation = $ID_translation AND type_translation = $type_translation"); 62 65 } 63 66 //echo $sql; -
save.php
r17 r20 65 65 WriteLog('Zmìny v Questu: '.$entry.' ulo¾eny! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1); 66 66 $Database->SQLCommand("DELETE FROM `quests_vote` WHERE `quests_vote`.`IDquest` = ".$QuestID); 67 $type_translation = 1; 68 $ID_translation = $QuestID; 69 $Database->SQLCommand("DELETE FROM tag WHERE ID_translation = $ID_translation AND type_translation = $type_translation"); 67 70 } 68 71
Note:
See TracChangeset
for help on using the changeset viewer.