コード例 #1
0
                        /**
                         * If you're in MEdTech, always assign a graduating year,
                         * because we normally see more than normal users.
                         */
                        $_SESSION["details"]["grad_year"] = fetch_first_year();
                        break;
                    case "staff":
                    case "faculty":
                    default:
                        continue;
                        break;
                }
                /**
                 * Set the active organisation profile for the user.
                 */
                load_active_organisation();
                header("Location: " . ENTRADA_URL);
                exit;
            } else {
                header("Location: " . ENTRADA_URL . "/admin/users");
                exit;
            }
        } else {
            header("Location: " . ENTRADA_URL . "/admin/users");
            exit;
        }
    } else {
        header("Location: " . ENTRADA_URL . "/admin/users");
        exit;
    }
}
コード例 #2
0
if ($ENTRADA_USER) {
    /**
     * Check whether we are using the organisation_id + ua_id from the URL, from
     * user preferences, or the default.
     */
    if (isset($_GET["organisation_id"]) && clean_input($_GET["organisation_id"], "int") && isset($_GET["ua_id"]) && clean_input($_GET["ua_id"], "int")) {
        $organisation_id = clean_input($_GET["organisation_id"], "int");
        $user_access_id = clean_input($_GET["ua_id"], "int");
    } else {
        $organisation_id = 0;
        $user_access_id = 0;
    }
    /**
     * Set the active organisation profile for the user.
     */
    load_active_organisation($organisation_id, $user_access_id);
}
/**
 * Setup Zend_Translate for language file support.
 */
if ($ENTRADA_CACHE) {
    Zend_Translate::setCache($ENTRADA_CACHE);
}
$translate = new Zend_Translate("array", ENTRADA_ABSOLUTE . "/templates/" . $ENTRADA_TEMPLATE->activeTemplate() . "/languages/" . DEFAULT_LANGUAGE . ".lang.php", DEFAULT_LANGUAGE);
$ADODB_CACHE_DIR = CACHE_DIRECTORY;
$time_start = getmicrotime();
$ERROR = 0;
$ERRORSTR = array();
$NOTICE = 0;
$NOTICESTR = array();
$SUCCESS = 0;