function getWorkflowRolesHash() { $handleDB = getDBHandle(); $SQLStmt = "select distinct(RoleCode), RoleDesc "; $SQLStmt = $SQLStmt . "from COREInformant.WorkflowRoles "; $SQLStmt = $SQLStmt . "order by RoleCode"; if (handleDB != null) { $result = mysqli_query($handleDB, $SQLStmt); $hash = array(); while ($row = mysqli_fetch_array($result)) { $hash[$row['RoleCode']] = $row['RoleDesc']; } return $hash; } mysqli_close($handleDB); }
<?php require_once '../configuration_admin.php'; // start the session $session = getSession(); // get smarty handle $smarty = getSmartyHandle(); $GLOBALS['applog']->logMessage(var_export($_REQUEST, true), LOGGER_ERROR, 'edit_custom'); // check permissions if ($session->isLoggedIn()) { // get handle on database $db = getDBHandle(); // get handle on the settings $settings = getSettings(); // define standard fields to parse/clear $fields = array('eventHeaderCustom', 'eventTextCustom', 'eventSubtextCustom', 'eventLinkCustom', 'boingoLinkCustom'); if (isset($_REQUEST['submit'])) { $GLOBALS['applog']->logMessage("normal form submission hit", LOGGER_ERROR, 'edit_custom'); // some of the fields just get dumped into settings $fields = array('eventLinkCustom', 'boingoLinkCustom'); foreach ($fields as $key) { if (strlen($_REQUEST[$key])) { $GLOBALS['applog']->logMessage("Saving setting {$key}, value " . $_REQUEST[$key], LOGGER_DEBUG, 'edit_custom'); $settings->__set($key, $_REQUEST[$key]); } } // some get truncated if they are too long $fields = array('eventHeaderCustom', 'eventTextCustom', 'eventSubtextCustom'); foreach ($fields as $key) { if (strlen($_REQUEST[$key])) { if (strlen($_REQUEST[$key]) > $GLOBALS['textRestrictions'][$key]) {