Changeset 281 for quests/export.php
- Timestamp:
- Jan 27, 2008, 6:07:07 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/export.php
r277 r281 1 1 <?php 2 3 include('includes/global.php');4 5 include 'includes/zip.lib.php';6 2 7 3 function WithOutDiacritical($teststring){ … … 11 7 } 12 8 13 if (array_key_exists('Type', $_POST)) {14 9 $Diacritical = @$_POST['Diacritical']; 15 10 if (array_key_exists('CZ', $_POST)) $CZ = $_POST['CZ']; … … 35 30 Poèet nutných hlasù: '.$NumberVote.' 36 31 Známka vy¾¹í jak: '.$Vote.' 37 Tabluky: Quests: '.@$_POST['Quests'].' , NPC_text: '.@$_POST['NPC_texts'].' */ 32 Tabluky: 33 Quests: '.@$_POST['Quests'].' 34 NPC_text: '.@$_POST['NPC_texts'].' 35 page_text: '.@$_POST['page_texts'].' */ 38 36 39 37 '; … … 166 164 } 167 165 } 166 167 //export page_textù 168 $x = 0; 169 if (array_key_exists('page_texts', $_POST)) { 170 171 $sql = "SELECT * FROM page_text WHERE Complete = '1' AND CountVote >= '$NumberVote' AND Vote >= '$Vote'"; 172 173 if ($WhereLang <> '') $sql .= " AND ($WhereLang)"; 174 if ($WhereUsers <> '') $sql .= "AND ($WhereUsers)"; 175 176 $ID = $Database->SQLCommand($sql." ORDER BY vote"); 177 while ($Line = mysql_fetch_array($ID)) { 178 179 $sql = "UPDATE page_text SET "; 180 for ($i=0; $i<count($page_text); ++$i) { 181 if ($Line[$page_text[$i]] <> '') 182 $sql .= " ".$page_text[$i]." = '".mysql_escape_string($Line[$page_text[$i]])."' , "; 183 } 184 $sql .= " ID = '".$Line['entry']."' WHERE ID = ".$Line['entry'].";"; 185 186 if ($Diacritical == False) $sql=WithOutDiacritical($sql); 187 188 $Bufferpage[$x] = $sql; 189 ++$x; 190 } 191 } 168 192 169 193 //vypisování … … 179 203 '; 180 204 } 205 for ($i=0; $i<count(@$Bufferpage); ++$i) { 206 echo $Bufferpage[$i].' 207 '; 208 } 181 209 echo '</textarea>'; 182 210 } … … 189 217 for ($i=0; $i<count(@$BufferNPC); ++$i) { 190 218 $Database->SQLCommand($BufferNPC[$i]); 219 } 220 for ($i=0; $i<count(@$Bufferpage); ++$i) { 221 $Database->SQLCommand($Bufferpage[$i]); 191 222 } 192 223 echo 'Hotovo!'; … … 207 238 '; 208 239 } 240 for ($i=0; $i<count(@$Bufferpage); ++$i) { 241 $BufferZip .= $Bufferpage[$i].' 242 '; 243 } 209 244 210 245 // echo $BufferZip.'<br><br><br>'; … … 225 260 <script type="text/javascript" language="JavaScript" charset="iso-8859-2"> 226 261 setTimeout("parent.location.href=\''.$save_filename.'\'",1000) 227 </script> 228 262 </script>'; 263 264 echo ' 229 265 Pokud nezaèalo stahování soubor by mìlo jít stáhnout z tohoto odkazu: 230 266 <a href="'.$save_filename.'">'.$save_filename.'</a><br /> … … 234 270 WriteLog('Sta¾ení SQL souboru: Typ Exportu: <b>'.$Export.'</b> Diakritika: <b>'.$Diacritical.'</b> 235 271 Poèet nutných hlasù: <b>'.$NumberVote.'</b> Známka vy¾¹í jak: <b>'.$Vote.'</b>', 2); 236 237 238 } else { 272 239 273 ?> 240 <div style=" border: 2px dotted black; padding: 0px 5px 5px 5px;">241 <big><b><i>Pro server:</i></b></big><br>242 <b>Export Pøekladu:</b><br />243 <form action="export.php" method="POST">244 <table border="1" cellpadding="1" cellspacing="0">245 <tr><th>Sql</th><th>Filtr</th><th>Jazyk</th><th>Texty</th></tr>246 <tr><td>247 <input type="radio" name="Export" value="Zip" checked="true"> Exportovat do zip<br>248 <input type="radio" name="Export" value="Display"> Export zobrazit<br>249 <?php250 if (Licence(2)) {251 echo '<input type="radio" name="Export" value="Mangos"> Import na server (Admin only)<br>';252 }253 ?>254 <br />255 <input type="radio" name="Type" value="Insert"> Insert (zatím nefunguje)<br>256 <input type="radio" name="Type" value="Update" checked="true"> Update <br>257 <br />258 <input type="checkbox" name="Use" checked="true"> Pøidat Use mangos <br>259 <br />260 <input type="checkbox" name="Quests" checked="true"> Questy <br>261 <input type="checkbox" name="NPC_texts" checked="true"> NPC_texts <br>262 </td><td>263 <input type="text" name="NumberVote" value="3" size="1"> Poèet nutných hlasù <br>264 <input type="text" name="Vote" value="4" size="1"> Známka lep¹í nebo stejná jak <br>265 <br />266 <select name="users[]" size="10" multiple>267 268 <?php269 // multiple="multiple"270 $ID = $Database->SQLCommand("SELECT user,ID FROM `user` WHERE271 EXISTS(SELECT 1 FROM quests WHERE user = user.ID) OR272 EXISTS(SELECT 1 FROM npc_text WHERE user = user.ID) ORDER BY user");273 while ($Line = mysql_fetch_array($ID))274 echo '<option value="'.$Line['ID'].'">'.$Line['user'].'</option>';275 276 ?>277 278 </select><br> Exportovat pouze od tìchto u¾ivatalù<br>279 Vybrat více u¾ivatelù mù¾ete pomocí CTRL+click280 281 282 </td><td>283 <input type="checkbox" name="Diacritical" checked="true"> Vèetnì diakritiky <br>284 <br />285 <input type="checkbox" name="CZ" checked="true"> Èeský pøeklad <br>286 <input type="checkbox" name="SK" checked="true"> Slovenský pøeklad <br>287 <input type="checkbox" name="OtherLanguage"> Jiné jazyky <br>288 </td><td>289 <b>Title questu:</b><br>290 <input type="radio" name="AddTitle" value="Translate" checked="true"> Pøelo¾ený název <br>291 <input type="radio" name="AddTitle" value="EN"> Pùvodní název <br>292 <input type="radio" name="AddTitle" value="Both"> Pøelo¾ený název (Anglický název) <br>293 <br>294 <?php295 foreach($Texts as $Index => $TextItem)296 echo '<input type="checkbox" name="Add'.$TextItem[0].'" checked="true"> '.$TextItem[0].'<br>';297 ?>298 </td></tr>299 </table>300 <br><input type="submit" value="Generovat SQL soubor pøekladu (Sta¾ení)">301 </form>302 <b>Èeský pøeklad MaNGOS Minimanageru:</b><br />303 - Stránky projektu: <a href="http://sourceforge.net/projects/mmfpm/">http://sourceforge.net/projects/mmfpm/</a><br>304 - Pøeklad: <a href="http://wow.zdechov.net/minimanager/lang/csCZ.zip">Èe¹tina do minimanageru</a><br>305 - Diskusní forum pro pøípadné pøipomínky k pøekladu: <a href="http://wow.zdechov.net/forum/viewtopic.php?p=5533">Forum</a>306 307 </div>308 <br>309 <div style=" border: 2px dotted black; padding: 0px 5px 5px 5px;">310 <big><b><i>Pro klinta:</i></b></big><br>311 <b>Diakritika ve høe</b><br />312 - 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 />313 <br />314 <b>Zvukové hlá¹ky ve høe</b><br />315 - zvukové soubory pøevzaté z èeské verze Warcraftu III <a href="http://www.wowresource.eu/index.php?showtopic=4260&hl=hl%C3%A1%C5%A1ky" title="http://www.wowresource.eu/index.php?showtopic=4260&hl=hl%C3%A1%C5%A1ky">Èeské hlá¹ky z Warcraftu III</a>316 </div>317 <?php318 }319 320 321 ShowFooter();322 ?>
Note:
See TracChangeset
for help on using the changeset viewer.