diff --git a/includes/title-editor.php b/includes/title-editor.php index 5ceb51a..86c3466 100644 --- a/includes/title-editor.php +++ b/includes/title-editor.php @@ -1,6 +1,6 @@ '; -echo ''; +echo '
titlenameidtitlenametitletype
'; $stmtview = $con->prepare("SELECT * FROM gwtitles WHERE titlenameid = ?"); $stmtview->bind_param("i", $_POST['tid']); $stmtview->execute(); @@ -9,6 +9,7 @@ while ($row = $result->fetch_assoc()) { $tid = $row['titlenameid']; $tname = $row['titlename']; $ttype = $row['titletype']; + $tmr = $row['titlemaxrank']; echo ''; + echo 'value="1">Character'; } $stmtview->close(); echo '
titlenameidtitlenametitletypetitlemaxrank
'; echo 'fetch_assoc()) { if ($ttype == 1) { echo 'checked '; } - echo 'value="1">Character
Delete title?


'; diff --git a/includes/title-submit.php b/includes/title-submit.php index cef8a57..7284c43 100644 --- a/includes/title-submit.php +++ b/includes/title-submit.php @@ -1,6 +1,6 @@ prepare("INSERT INTO gwtitles (titlename, titletype) VALUES (?, ?)"); -$stmtins->bind_param("si", $_POST['titlename'], $_POST['titletype']); +$stmtins = $con->prepare("INSERT INTO gwtitles (titlename, titletype, titlemaxrank) VALUES (?, ?, ?)"); +$stmtins->bind_param("sii", $_POST['titlename'], $_POST['titletype'], $_POST['titlemaxrank']); $stmtins->execute(); $stmtins->close(); echo 'New title added!

'; @@ -11,8 +11,9 @@ while ($row = $result->fetch_assoc()) { $tid = $row['titlenameid']; $tname = $row['titlename']; $ttype = $row['titletype']; - echo ''; - echo '
titleidtitlenametitletype
' . $tid . '' . $tname . '' . $ttype . '

'; + $tmr = $row['titlemaxrank']; + echo ''; + echo '
titleidtitlenametitletypetitlemaxrank
' . $tid . '' . $tname . '' . $ttype . '' . $tmr . '

'; } $stmtview->close(); echo 'Return to title manager'; diff --git a/includes/title-update.php b/includes/title-update.php index 4773de2..db790d8 100644 --- a/includes/title-update.php +++ b/includes/title-update.php @@ -15,8 +15,8 @@ if (isset($_POST['deltitle'])) { } } else { // this section updates the title name - $stmtupd = $con->prepare("UPDATE gwtitles SET titlename = ?, titletype = ? WHERE titlenameid = ?"); - $stmtupd->bind_param("sii", $_POST['titlename'], $_POST['titletype'], $_POST['titlenameid']); + $stmtupd = $con->prepare("UPDATE gwtitles SET titlename = ?, titletype = ?, titlemaxrank = ? WHERE titlenameid = ?"); + $stmtupd->bind_param("siii", $_POST['titlename'], $_POST['titletype'], $_POST['titlemaxrank'], $_POST['titlenameid']); $stmtupd->execute(); $stmtupd->close(); echo 'Title updated, redirecting!';