Changeset 241 for quests/export.php
- Timestamp:
- Jan 17, 2008, 3:43:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/export.php
r240 r241 11 11 } 12 12 13 if (array_key_exists('Type', $_GET)) { 14 $Diacritical = @$_GET['Diacritical']; 15 if (array_key_exists('CZ', $_GET)) $CZ = $_GET['CZ']; 16 if (array_key_exists('SK', $_GET)) $SK = $_GET['SK']; 17 if (array_key_exists('OtherLanguage', $_GET)) $OtherLanguage = $_GET['OtherLanguage']; 18 if (array_key_exists('Use', $_GET)) $Use = $_GET['Use']; 19 $Type = $_GET['Type']; 20 $Export = $_GET['Export']; 21 $AddTitle = $_GET['AddTitle']; 22 $NumberVote = $_GET['NumberVote']; 23 $Vote = $_GET['Vote']; 24 25 $AddDetails = @$_GET['AddDetails']; 26 $AddObjectives = @$_GET['AddObjectives']; 27 $AddOfferRewardText = @$_GET['AddOfferRewardText']; 28 $AddRequestItemsText = @$_GET['AddRequestItemsText']; 29 $AddEndText = @$_GET['AddEndText']; 30 $AddObjectiveText1 = @$_GET['AddObjectiveText1']; 31 $AddObjectiveText2 = @$_GET['AddObjectiveText2']; 32 $AddObjectiveText3 = @$_GET['AddObjectiveText3']; 33 $AddObjectiveText4 = @$_GET['AddObjectiveText4']; 13 if (array_key_exists('Type', $_POST)) { 14 $Diacritical = @$_POST['Diacritical']; 15 if (array_key_exists('CZ', $_POST)) $CZ = $_POST['CZ']; 16 if (array_key_exists('SK', $_POST)) $SK = $_POST['SK']; 17 if (array_key_exists('OtherLanguage', $_POST)) $OtherLanguage = $_POST['OtherLanguage']; 18 if (array_key_exists('Use', $_POST)) $Use = $_POST['Use']; 19 $Type = $_POST['Type']; 20 $Export = $_POST['Export']; 21 $AddTitle = $_POST['AddTitle']; 22 $NumberVote = $_POST['NumberVote']; 23 $Vote = $_POST['Vote']; 24 $users = @$_POST['users']; 25 26 27 $AddDetails = @$_POST['AddDetails']; 28 $AddObjectives = @$_POST['AddObjectives']; 29 $AddOfferRewardText = @$_POST['AddOfferRewardText']; 30 $AddRequestItemsText = @$_POST['AddRequestItemsText']; 31 $AddEndText = @$_POST['AddEndText']; 32 $AddObjectiveText1 = @$_POST['AddObjectiveText1']; 33 $AddObjectiveText2 = @$_POST['AddObjectiveText2']; 34 $AddObjectiveText3 = @$_POST['AddObjectiveText3']; 35 $AddObjectiveText4 = @$_POST['AddObjectiveText4']; 34 36 35 37 if (($Export == 'Mangos') and (Licence(1) == False)) {die('Nemáte oprávnìní');} … … 51 53 52 54 $sql = "SELECT * FROM quests.quests WHERE Complete = '1' AND CountVote >= '$NumberVote' AND Vote >= '$Vote'"; 53 $Where = '';54 if (isset($CZ)) $Where .= " Language = '1'";55 $WhereLang = ''; 56 if (isset($CZ)) $WhereLang .= " Language = '1'"; 55 57 if (isset($SK)) { 56 if ($Where <> '')57 $Where .= " OR Language = '2'";58 if ($WhereLang <> '') 59 $WhereLang .= " OR Language = '2'"; 58 60 else 59 $Where .= "Language = '2'";61 $WhereLang .= "Language = '2'"; 60 62 } 61 63 if (isset($OtherLanguage)) { 62 if ($Where <> '')63 $Where .= " OR Language = '3'";64 if ($WhereLang <> '') 65 $WhereLang .= " OR Language = '3'"; 64 66 else 65 $Where .= "Language = '3'";67 $WhereLang .= "Language = '3'"; 66 68 } 67 if ($Where <> "") $sql .= " AND ($Where)"; 69 70 $WhereUsers = ''; 71 72 for ($i=0; $i<Count($users); $i++): 73 if ($WhereUsers <> '') 74 $WhereUsers .= " OR User = ".$users[$i]; 75 else 76 $WhereUsers .= " User = ".$users[$i]; 77 endfor; 78 79 if ($WhereLang <> '') $sql .= " AND ($WhereLang)"; 80 if ($WhereUsers <> '') $sql .= "AND ($WhereUsers)"; 81 82 echo $sql; 83 68 84 69 85 $ID = $Database->SQLCommand($sql." ORDER BY vote"); … … 154 170 <big><b><i>Pro server:</b></i></big><br> 155 171 <b>Export Questù:</b><br /> 156 <form action="export.php" method=" get">157 <table border="1" >158 <tr><th>Sql</th><th> Jazyk</th><th>Texty</th></tr>172 <form action="export.php" method="POST"> 173 <table border="1" cellpadding="1" cellspacing="0"> 174 <tr><th>Sql</th><th>Filtr</th><th>Jazyk</th><th>Texty</th></tr> 159 175 <tr><td> 160 176 <input type="radio" name="Export" value="Zip" checked="true"> Exportovat do zip<br> … … 171 187 <input type="checkbox" name="Use" checked="true"> Pøidat Use mangos <br> 172 188 <br /> 173 <b>Filtr:</b><br /> 174 <input type="text" name="NumberVote" value="3" size="1"> Poèet nutných hlasù <br> 175 <input type="text" name="Vote" value="4" size="1"> Známka lep¹í nebo stejná jak 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> 192 193 <select name="users[]" size="7" multiple> 194 195 <?php 196 // multiple="multiple" 197 $ID = $Database->SQLCommand("SELECT user,ID FROM `user`"); 198 while ($Line = mysql_fetch_array($ID)) 199 echo '<option value="'.$Line['ID'].'">'.$Line['user'].'</option>'; 200 201 ?> 202 203 </select><br> Exportovat pouze od tìchto u¾ivatalù 204 205 176 206 </td><td> 177 207 <input type="checkbox" name="Diacritical" checked="true"> Vèetnì diakritiky <br> … … 192 222 </td></tr> 193 223 </table> 194 <br><input type="submit" value="Generovat"> SQL soubor (Sta¾ení)224 <br><input type="submit" value="Generovat"> SQL soubor Questù (Sta¾ení) 195 225 </form> 196 226 <b>Èeský pøeklad MaNGOS Minimanageru:</b><br />
Note:
See TracChangeset
for help on using the changeset viewer.