100) { dashboard\primary\error("Must upgrade to developer or seller to create variables longer than 100 characters!"); echo ""; return; } $query = misc\mysql\query("SELECT count(*) AS 'numVars' FROM `vars` WHERE `app` = ?",[$_SESSION['app']]); $row = mysqli_fetch_array($query->result); $numVars = $row["numVars"]; if($numVars >= 5) { dashboard\primary\error("Must upgrade to developer or seller to create more than 5 variables!"); echo ""; return; } } $authed = misc\etc\sanitize($_POST['authed']) == NULL ? 0 : 1; $resp = misc\variable\add($_POST['varname'], $_POST['vardata'], $authed); match($resp){ 'exists' => dashboard\primary\error("Variable name already exists!"), 'too_long' => dashboard\primary\error("Variable too long! Must be 1000 characters or less"), 'failure' => dashboard\primary\error("Failed to create variable"), 'success' => dashboard\primary\success("Successfully created variable"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['delvars'])) { $resp = misc\variable\deleteAll(); match($resp){ 'failure' => dashboard\primary\error("Failed to delete all variables"), 'success' => dashboard\primary\success("Successfully deleted all variables"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } if (isset($_POST['deletevar'])) { $resp = misc\variable\deleteSingular($_POST['deletevar']); match($resp){ 'failure' => dashboard\primary\error("Failed to delete variable"), 'success' => dashboard\primary\success("Successfully deleted variable"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } // edit modal if (isset($_POST['editvar'])) { $variable = misc\etc\sanitize($_POST['editvar']); $query = misc\mysql\query("SELECT * FROM `vars` WHERE `varid` = ? AND `app` = ?",[$variable, $_SESSION['app']]); if ($query->num_rows < 1) { dashboard\primary\error("Variable not Found!"); echo ""; return; } $row = mysqli_fetch_array($query->result); $data = $row["msg"]; $authed = $row["authed"]; echo ' '; } if (isset($_POST['savevar'])) { $authed = misc\etc\sanitize($_POST['authed']) == NULL ? 0 : 1; $resp = misc\variable\edit($_POST['variable'], $_POST['msg'], $authed); switch ($resp) { case 'success': misc\cache\purge('KeyAuthVar:' . $_SESSION['app'] . ':' . $_POST['variable']); dashboard\primary\success("Successfully edited variable!"); break; } match($resp){ 'failure' => dashboard\primary\error("Failed to edit variable!"), 'too_long' => dashboard\primary\error("Variable too long! Must be 1000 characters or less"), 'success' => dashboard\primary\success("Successfully edited variable!"), default => dashboard\primary\error("Unhandled Error! Contact us if you need help") }; } ?>

Global Variables

Pass, assign, obtain data globally. Learn More.



Variable Name Variable Data Authenticated Actions

Dropdown actions in RED do not show a confirmation! Dropdown actions in BLUE will show a confirmation!