From 51d99728286212717003009dd5706bb74edcb272 Mon Sep 17 00:00:00 2001 From: Patrick Davison Date: Wed, 1 May 2013 01:54:08 -0700 Subject: Challengesss Challenges... DB Updates. Challenges --- pages/challengeeditor.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'pages/challengeeditor.php') 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);
Goal:
"inequality"
E.G. greater than, less than, equal:
hint +
dialogStart +
dialogFail +
dialogSuccess
Order:
-- cgit v1.2.3