Changeset 251 for quests/save.php
- Timestamp:
- Jan 20, 2008, 8:44:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quests/save.php
r247 r251 2 2 3 3 include('includes/global.php'); 4 5 // SQL injection hack protection 6 foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item); 7 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 4 8 5 9 if (array_key_exists('entry', $_POST)) { … … 39 43 if (!$Line) { 40 44 41 $Database->SQLCommand("INSERT INTO `quests` (`entry` , `Title` , `Details` , `Objectives` , `OfferRewardText` , `RequestItemsText` , `EndText` , `ObjectiveText1` , `ObjectiveText2` , `ObjectiveText3` , `ObjectiveText4` , `Language` , `User` , `complete` , `Take` ) 42 VALUES('$entry','$Title','$Details','$Objectives','$OfferRewardText','$RequestItemsText','$EndText','$ObjectiveText1','$ObjectiveText2','$ObjectiveText3','$ObjectiveText4','$Language','$UserID','$complete','$QuestID')"); 45 $Database->SQLCommand("INSERT INTO `quests` (`entry` , `Title` , `Details` , `Objectives` , `OfferRewardText` , `RequestItemsText` , 46 `EndText` , `ObjectiveText1` , `ObjectiveText2` , `ObjectiveText3` , `ObjectiveText4` , `Language` , `User` , `complete` , `Take` , `Vote` , `CountVote` ) 47 VALUES('$entry','$Title','$Details','$Objectives','$OfferRewardText','$RequestItemsText','$EndText','$ObjectiveText1', 48 '$ObjectiveText2','$ObjectiveText3','$ObjectiveText4','$Language','$UserID','$complete','$QuestID','3','1')"); 43 49 echo 'Quest: '.$entry.' ulo¾en!<br />'; 44 WriteLog('Quest: '.$entry.' ulo ¾en! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1);50 WriteLog('Quest: '.$entry.' uloµen! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1); 45 51 } else { 46 52 $sql = "UPDATE quests SET complete = '$complete', Title = '$Title', … … 54 60 // echo $sql.'<br />'; 55 61 echo 'Zmìny v Questu: '.$entry.' ulo¾eny!<br />'; 56 WriteLog('Zmìny v Questu: '.$entry.' ulo ¾eny! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1);62 WriteLog('Zmìny v Questu: '.$entry.' uloµeny! <a href="form.php?ID='.$QuestID.'">'.$QuestID.'</a>', 1); 57 63 $Database->SQLCommand("DELETE FROM `quests_vote` WHERE `quests_vote`.`IDquest` = ".$QuestID); 58 64 } 59 65 60 echo 'Pøekládat: <a href="ListQuests.php?selection">Nepøelo µené</a> ';66 echo 'Pøekládat: <a href="ListQuests.php?selection">Nepøeloené</a> '; 61 67 62 68 }
Note:
See TracChangeset
for help on using the changeset viewer.