コード例 #1
0
function auth($update = false)
{
    global $success, $errors, $authmech, $lti;
    $returnedproc = login_processing(false);
    list($success, $errors) = $returnedproc;
    if ($success && empty($errors)) {
        if ($update) {
            $lti->update_lti_user();
        } else {
            $lti->add_lti_user($authmech->getUsername());
        }
        login_processing2();
        //sucessfull authentication
    } else {
        html_headers();
        login_prompt($errors, '../');
    }
}
コード例 #2
0
ファイル: play.php プロジェクト: jak786/xerteonlinetoolkits
     require_once 'LTI/ims-lti/UoN_LTI.php';
     if (strlen($xerte_toolkits_site->database_table_prefix) > 0) {
         $lti = new UoN_LTI($mysqli, array('table_prefix' => $xerte_toolkits_site->database_table_prefix));
     } else {
         $lti = new UoN_LTI($mysqli);
     }
     if (session_id() == '') {
         session_start();
     }
     $lti->init_lti();
 }
 if ($lti->valid) {
     $success = true;
     unset($errors);
 } else {
     $returnedproc = login_processing(false);
     list($success, $errors) = $returnedproc;
 }
 if ($success && empty($errors)) {
     //sucessfull authentication
     db_query("UPDATE {$xerte_toolkits_site->database_table_prefix}templatedetails SET number_of_uses=number_of_uses+1 WHERE template_id=?", array($safe_template_id));
     show_template($row_play);
 } else {
     html_headers();
     login_prompt($errors);
 }
 /*
  * Check the password
  */
 /*        $auth = Xerte_Authentication_Factory::create($xerte_toolkits_site->authentication_method);
         if ($auth->check() && isset($_POST['login']) && isset($_POST['password']) && $auth->login($_POST['login'], $_POST['password'])) {
コード例 #3
0
// Load the plugin files and fire a startup action
require_once dirname(__FILE__) . "/plugins.php";
startup();
require_once dirname(__FILE__) . "/config.php";
_load_language_file("/index.inc");
/**
 *
 * Login page, self posts to become management page
 *
 * @author Patrick Lockley
 * @version 1.0
 * @package
 */
include $xerte_toolkits_site->php_library_path . "display_library.php";
require_once dirname(__FILE__) . "/website_code/php/login_library.php";
login_processing();
login_processing2();
/*If the authentication method isn't set to Moodle
* the code in the required file below is simply skipped
*/
require_once dirname(__FILE__) . "/moodle_restrictions.php";
recycle_bin();
/*
 * Output the main page, including the user's and blank templates
 */
?>
<!DOCTYPE html>
<html>
<head>
    <?php 
head_start();