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, '../');
    }
}
<?php

$page_file = "year_end_poll_contestants.php";
$page_title = "View All Year End Poll Contestants";
require "functions/main_fns.php";
require "functions/year_end_poll_fns.php";
require "partials/_header.php";
if (!$_SESSION["logged_in"]) {
    login_prompt($_POST[username], $_POST[remember_me], $_SESSION["error"]);
} else {
    /*----- CONTENT ------*/
    ?>
<div class="row">
  <div class="tweleve columns content full-width">
    <h1>View all Year End Poll Contestants</h1>
      <?php 
    view_all_contestants();
    ?>
    <br>
    Click on the name to see their picks.
    <div class="top-spacer_20">
      <a href="cp.php">Control Panel</a>
    </div>
  </div>
</div> <!-- end of row div -->
<?php 
}
require "partials/_footer.php";
示例#3
0
     $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'])) {
 
             /*
              * Update uses and display the template
              *-/
 
             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));
 
             require $xerte_toolkits_site->root_file_path . "modules/" . $row_play['template_framework'] . "/play.php";
 
<html><head>
<title>Pavati Marine Authors</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../assets/css/dashboard.css">
</head><body>
<?php 
session_start();
require_once "../functions.php";
require_once "../../../connect.php";
if ($_SESSION['author']) {
    ?>

<header></header>


<?php 
} else {
    login_prompt();
}
?>
</body></html>
function login_form($messages, $xerte_toolkits_site)
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php 
    echo $xerte_toolkits_site->site_title;
    ?>
</title>

    <link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />

    <!--

    University of Nottingham Xerte Online Toolkits

    HTML to use to set up the login page
    The {{}} pairs are replaced in the page formatting functions in display library

    Version 1.0

    -->

</head>

<body>

<div class="topbar">
    <img src="<?php 
    echo $xerte_toolkits_site->site_logo;
    ?>
" style="margin-left:10px; float:left" />
    <img src="<?php 
    echo $xerte_toolkits_site->organisational_logo;
    ?>
" style="margin-right:10px; float:right" />
    <?php 
    display_language_selectionform("");
    ?>

</div>
<div class="mainbody">
    <div class="title">
        <p>
          <?php 
    echo $xerte_toolkits_site->welcome_message;
    ?>
        </p>
    </div>
    <div class="mainbody_holder">
        <div class="mainbody_div_2">

<?php 
    login_prompt($messages);
    ?>

            <div class="border"></div>
            <div class="news">
                <p class="news_title">
                  <?php 
    echo INDEX_HELP_TITLE;
    ?>
                </p>
                <p class="news_story">
                  <?php 
    echo INDEX_HELP_INTRODUCTION;
    ?>
                    <br/>
                    <br/><a href="<?php 
    echo $xerte_toolkits_site->demonstration_page;
    ?>
" target="new"><?php 
    echo INDEX_HELP_INTRO_LINK_TEXT;
    ?>
</a>
                </p>
            </div>
            <div class="border"></div>
            <div class="news">
              <?php 
    echo $xerte_toolkits_site->news_text;
    ?>
            </div>

        </div>
        <div class="mainbody_left">
            <div class="tutorials">
                <?php 
    echo $xerte_toolkits_site->tutorial_text;
    ?>
            </div>
        </div>
        <div class="mainbody_div">
            <p class="intro">
              <?php 
    echo $xerte_toolkits_site->site_text;
    ?>
            </p>
        </div>
    </div>
</div>
<div class="border">
</div>
<p class="copyright">
    <img src="website_code/images/lt_logo.gif" /><br/>
  <?php 
    echo $xerte_toolkits_site->copyright;
    ?>
</p>
</div>
</body>
</html>
<?php 
}