diff options
Diffstat (limited to 'pages/challengeeditor.php')
-rw-r--r-- | pages/challengeeditor.php | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pages/challengeeditor.php b/pages/challengeeditor.php index 33a9511..9b1371f 100644 --- a/pages/challengeeditor.php +++ b/pages/challengeeditor.php @@ -55,15 +55,15 @@ function addNewChallengeMap($mapCode, $tier, $subOrder, $name) { } //Returns challenge ID -function addNewChallenge($mapID, $inequality, $goal, $ordering, $hint, +function addNewChallenge($mapID, $inequality, $goal, $ordering, $hint, $dialogStart, $dialogFail, $dialogSuccess, $restrictWallCount = 'null', $restrictWallPlacement = 'null', $restrictTeleportCount = 'null', $restrictTeleportsUsed = 'null', $restrictStartPoint = 'null', $restrictEndPoint = 'null') { $sql = "INSERT INTO `challenges` ( - `mapID`, `inequality`, `goal`, `ordering`, `hint` + `mapID`, `inequality`, `goal`, `ordering`, `hint`, `dialogStart`, `dialogFail`, `dialogSuccess` ) VALUES ( - '$mapID', '$inequality', $goal, $ordering, '$hint' + '$mapID', '$inequality', $goal, $ordering, '$hint', '$dialogStart', '$dialogFail', '$dialogSuccess' )"; // `restrictWallCount`, `restrictWallPlacement`, `restrictTeleportCount`, @@ -96,7 +96,16 @@ if (isset($_POST['challengeMapID'])) { $goal = $_POST['goal']; $ordering = $_POST['ordering']; $hint = $_POST['hint']; - $challengeID = addNewChallenge($mapID, $inequality, $goal, $ordering, $hint); + + $dialogStart = $_POST['dialogStart']; + $dialogFail = $_POST['dialogFail']; + $dialogSuccess = $_POST['dialogSuccess']; + + $challengeID = addNewChallenge( + $mapID, $inequality, $goal, + $ordering, $hint, $dialogStart, + $dialogFail, $dialogSuccess + ); $infoDisplayText = "Challenge Added!: $challengeID"; } @@ -153,6 +162,9 @@ topbar($Links); <br />Goal:<input name='goal' size="5" type="number" value="" class="forminput"/> <br /><b>"inequality" </b><br />E.G. greater than, less than, equal: <input name='inequality' size="15" type="text" value="" class="forminput"/> <br />hint <input name='hint' size="15" type="hint" value="" class="forminput"/> + <br />dialogStart <input name='dialogStart' size="20" type="hint" value="" class="forminput"/> + <br />dialogFail <input name='dialogFail' size="20" type="hint" value="" class="forminput"/> + <br />dialogSuccess <input name='dialogSuccess' size="20" type="hint" value="" class="forminput"/> <br />Order:<input name='ordering' size="5" type="text" value="" class="forminput"/> <br /><input type="submit" value="Add Challenge" class="forminput"/> </div> |