Changeset 212
- Timestamp:
- Jan 12, 2008, 1:45:45 AM (17 years ago)
- Location:
- quests
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/action.php
r211 r212 21 21 22 22 if (($vote > 5) OR ($vote < 1)) die ('Spadná známka'); 23 24 // if (Licence(0)) die('Hlasovat mùou jenom registrovaní!');23 24 //TODO: if (Licence(0)) die('Hlasovat mùou jenom registrovaní!'); 25 25 26 26 -
quests/export.php
r210 r212 2 2 3 3 include('includes/global.php'); 4 5 include 'includes/zip.lib.php'; 4 6 5 7 function WithOutDiacritical($teststring){ … … 16 18 if (array_key_exists('Use', $_GET)) $Use = $_GET['Use']; 17 19 $Type = $_GET['Type']; 20 $Export = $_GET['Export']; 18 21 $AddTitle = $_GET['AddTitle']; 19 22 $NumberVote = $_GET['NumberVote']; … … 31 34 32 35 33 echo '<textarea rows="30" cols="100">'; 34 echo ' 36 $Buffer = ' 35 37 /* File made by maron web aplikacion 36 38 ================================= … … 42 44 '; 43 45 44 if (isset($Use)) echo'USE `mangos`;46 if (isset($Use)) $Buffer .= 'USE `mangos`; 45 47 46 48 '; … … 106 108 $sql = "UPDATE quest_template SET $Details $Objectives $OfferRewardText $RequestItemsText $Title WHERE entry = '$entry';"; 107 109 if ($Diacritical == False) $sql=WithOutDiacritical($sql); 108 echo $sql." 110 111 $Buffer .= $sql." 109 112 "; 113 110 114 } 111 echo '</textarea>'; 115 116 if ($Export == 'Display') { 117 echo '<textarea rows="30" cols="100">'; 118 echo $Buffer; 119 echo '</textarea>'; 120 } 121 122 if ($Export == 'Zip') { 123 if (@function_exists('gzcompress')) { 124 $save_filename = 'SqlTranslate.zip'; 125 $SQL_filename = 'SqlTranslate.sql'; 126 127 $zipfile = new zipfile(); 128 $zipfile -> addFile($Buffer, $SQL_filename); 129 $Buffer = $zipfile -> file(); 130 131 $file_handle = @fopen($save_filename, 'w'); 132 $write_result = @fwrite($file_handle, $Buffer); 133 fclose($file_handle); 134 header("Location: ".$save_filename); 135 136 } 137 } 138 139 112 140 } else { 113 141 ?> … … 116 144 <tr><th>Sql</th><th>Jazyk</th><th>Texty</th></tr> 117 145 <tr><td> 146 <input type="radio" name="Export" value="Zip" checked="true"> Exportovat do zip<br> 147 <input type="radio" name="Export" value="Display"> Export zobrazit<br> 148 <br /> 118 149 <input type="radio" name="Type" value="Insert"> Insert (zatím nefunguje)<br> 119 150 <input type="radio" name="Type" value="Update" checked="true"> Update <br> 120 <input type="checkbox" name="Use" checked="true"> Pøidat Use mangos <br> 151 <input type="checkbox" name="Use" checked="true"> Pøidat Use mangos <br> 152 <br /> 153 <b>Filtr:</b><br /> 121 154 <input type="text" name="NumberVote" value="4" size="1"> Poèet nutných hlasù <br> 122 155 <input type="text" name="Vote" value="3" size="1"> Známka lep¹í jak
Note:
See TracChangeset
for help on using the changeset viewer.