function entry_audit() { global $_DB, $_STATE; init_setup(); //restore the list if (!array_key_exists($_POST["selOrgs"], $_STATE->records)) { throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid org id " . $_POST["selOrgs"]); //we're being spoofed } init_setup(); //re-display the list $_SESSION["organization_id"] = intval($_POST["selOrgs"]); //Set theme for organization: $sql = "SELECT theme FROM " . $_DB->prefix . "d10_preferences\n\t\t\tWHERE organization_idref=" . $_SESSION["organization_id"] . ";"; $stmt = $_DB->query($sql); if ($row = $stmt->fetchObject()) { $_SESSION["_SITE_CONF"]["THEME"] = $row->theme; } $stmt->closeCursor(); $_SESSION["org_TZO"] = $_STATE->records[$_POST["selOrgs"]][1]; $_SESSION["UserPermits"] = $GLOBALS["_PERMITS"]->get_permits($_SESSION["person_id"]); //set the users's permissions $_STATE->msgStatus = "Your organization has been changed"; return true; }
function entry_audit() { global $_STATE; init_setup(); //restore the list if (!array_key_exists($_POST["selOrgs"], $_STATE->records)) { throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid org id " . $_POST["selOrgs"]); //we're being spoofed } init_setup(); //re-display the list $_SESSION["organization_id"] = intval($_POST["selOrgs"]); $_SESSION["org_TZO"] = $_STATE->records[$_POST["selOrgs"]][1]; $_SESSION["UserPermits"] = $GLOBALS["_PERMITS"]->get_permits($_SESSION["person_id"]); //set the users's permissions $_STATE->msgStatus = "Your organization has been changed"; return true; }