* * $Id: add.inc.php 505 2009-07-09 19:15:57Z jellis $ */ @set_include_path(implode(PATH_SEPARATOR, array(dirname(__FILE__) . "/../core", dirname(__FILE__) . "/../core/includes", dirname(__FILE__) . "/../core/library", get_include_path()))); /** * Include the Entrada init code. */ require_once "init.inc.php"; if (!isset($_SESSION["isAuthorized"]) || !$_SESSION["isAuthorized"]) { header("Location: " . ENTRADA_URL); exit; } else { /** * Clears all open buffers so we can return a simple REST response. */ ob_clear_open_buffers(); if (isset($_POST["course_ids"]) && ($course_ids = explode(",", $_POST["course_ids"]))) { //$org_id = $_POST["org_id"]; $org_id = $ENTRADA_USER->getActiveOrganisation(); $top_level_id = $_POST["top_level_id"]; if (isset($_POST["hierarchy"])) { if (isset($_POST["event_id"]) && $_POST["event_id"]) { $event_id = (int) $_POST["event_id"]; } else { $event_id = 0; } list($objectives, $top_level_id) = courses_fetch_objectives($org_id, $course_ids, -1, -0, false, false, $event_id); if ($event_id) { $temp_objectives = $objectives["objectives"]; foreach ($temp_objectives as $objective_id => $objective) { if ($objective["event_objective"]) {
function profile_update_google_password() { global $db, $GOOGLE_APPS, $ERROR, $ERRORSTR, $SUCCESS, $SUCCESSSTR; ob_clear_open_buffers(); if ((bool) $GOOGLE_APPS["active"]) { if (isset($_POST["password"]) && ($tmp_input = clean_input($_POST["password"], "trim"))) { if (google_reset_password($tmp_input)) { echo 1; exit; } } } echo 0; exit; }