Esempio n. 1
0
{
    //SHOW LOGIN FORM
    global $root;
    echo "<div style='margin-left: auto; margin-right: auto; text-align: left; width: 300px;'>";
    echo "<p><strong>Enter your user name and password to login.</strong></p>";
    echo "<form name='form' action='{$PHP_SELF}' method='post'>";
    echo "<p>Username: <input style='margin-left: 5px;' name='Username' type='text' id='Username'></p>";
    echo "<p>StudentID: <input style='margin-left: 6.5px;' name='Password' type='password' id='Password'></p>";
    echo "<p><input type='submit' name='Submit' value='Login'></p>";
    echo "</form></div>";
    include 'includes/footer.html';
}
if ($ldap_cal) {
    include 'includes/ldap/defaultincludes.inc';
    include 'includes/heading2.html';
    printLoginForm($TargetURL);
    include 'includes/footer.html';
} else {
    $Username = $_REQUEST['Username'];
    $Password = $_REQUEST['Password'];
    // encrypt password
    // $encrypted_mypassword=md5($Password);
    //CHECK USERNAME AND PASSWORD
    if (isset($Username)) {
        if (empty($Password)) {
            include 'includes/heading2.html';
            echo "<p class='alert' align='center'>Must Enter a Student ID</p>";
            show_login();
        } else {
            mysql_select_db($database_equip, $equip);
            $query_Recordset1 = sprintf("SELECT * FROM students WHERE UID = '{$Username}'");
Esempio n. 2
0
            exit;
        default:
    }
}
// Print our header
printAdminHeader();
echo "\n</head>";
?>

<body>

<?php 
// If they are not logged in, display the login form and exit
if (!zp_loggedin()) {
    $from = isset($_GET['from']) ? $_GET['from'] : null;
    printLoginForm($from);
    echo "\n</body>";
    echo "\n</html>";
    exit;
} else {
    /* Admin-only content safe from here on. */
    printLogoAndLinks();
    ?>
<div id="main">
<?php 
    printTabs($page);
    ?>
<div id="content">
<?php 
    /*** HOME ***************************************************************************/
    /************************************************************************************/
function printAlternativeLoginForms($authenticators, $default_authenticator, $redirect)
{
    foreach ($authenticators as $key => $value) {
        if ($key != $default_authenticator) {
            printLoginForm($authenticators, $key, 'loginForm hide', $redirect);
        }
    }
}
Esempio n. 4
0
            $_SESSION['user'] = $login;
            if ($referer) {
                $refererParts = explode(':', $referer);
                array_shift($refererParts);
                $refererParts = array_merge(array('https'), $refererParts);
                $referer = implode(':', $refererParts);
            } else {
                $referer = 'index.php';
            }
            header("Location: {$referer}");
            exit;
        }
        sleep(1);
    }
}
printLoginForm($referer, $valid);
/**
 * Print html of login form
 *
 * @param  string	$referer
 * @return void
 */
function printLoginForm($referer = '', $valid)
{
    if (!$valid) {
        echo "<div>Invalid login credentials</div>";
    }
    echo <<<HTM
<form action="" method="POST">
\t<label for="login">login:</label>
\t<input id="login" type="text" class="login-name" name="login" autocomplete="off" />
Esempio n. 5
0
 /**
  * Wrapper function to call template 'printLoginForm' function
  * @param string $msg error messages to display for user
  * @param string $resume page to resume after a login
  */
 function printLoginForm($msg = '', $resume = '')
 {
     printLoginForm($msg, $resume);
 }
Esempio n. 6
0
function authGet()
{
    global $PHP_SELF, $QUERY_STRING;
    print_header_mrbs(0, 0, 0, 0);
    echo "<p>" . get_string('norights', 'block_mrbs') . "</p>\n";
    $TargetURL = basename($PHP_SELF);
    if (isset($QUERY_STRING)) {
        $TargetURL = $TargetURL . "?" . $QUERY_STRING;
    }
    printLoginForm($TargetURL);
    exit;
}
Esempio n. 7
0
     $expected_tables = array($_zp_conf_vars['mysql_prefix'] . 'options', $_zp_conf_vars['mysql_prefix'] . 'albums', $_zp_conf_vars['mysql_prefix'] . 'images', $_zp_conf_vars['mysql_prefix'] . 'comments', $_zp_conf_vars['mysql_prefix'] . 'administrators', $_zp_conf_vars['mysql_prefix'] . 'admintoalbum', $_zp_conf_vars['mysql_prefix'] . 'tags', $_zp_conf_vars['mysql_prefix'] . 'obj_to_tag', $_zp_conf_vars['mysql_prefix'] . 'captcha');
     foreach ($expected_tables as $needed) {
         if (!isset($tables[$needed])) {
             $tables[$needed] = 'create';
         }
     }
     if (!($tables[$_zp_conf_vars['mysql_prefix'] . 'administrators'] == 'create')) {
         if (!($_zp_loggedin & ADMIN_RIGHTS) && (!isset($_GET['create']) && !isset($_GET['update']))) {
             // Display the login form and exit.
             if (!empty($mod)) {
                 $mod = '?' . substr($mod, 1);
             }
             if ($_zp_loggedin) {
                 echo "<br /><br/>" . gettext("You need <em>USER ADMIN</em> rights to run setup.");
             }
             printLoginForm("/" . ZENFOLDER . "/setup.php{$mod}", false);
             echo "\n</div>";
             printAdminFooter();
             echo "\n</body>";
             echo "\n</html>";
             exit;
         }
     }
 }
 // Prefix the table names. These already have `backticks` around them!
 $tbl_albums = prefix('albums');
 $tbl_comments = prefix('comments');
 $tbl_images = prefix('images');
 $tbl_options = prefix('options');
 $tbl_administrators = prefix('administrators');
 $tbl_admintoalbum = prefix('admintoalbum');
Esempio n. 8
0
function printActivationNeeded()
{
    printLoginForm();
    print <<<EOT
        <div class="jumbotron">
            <div class="container">
              <h1></h1>
                <p>You have not yet activated your account. Please check your email for an authentication link.</p>             
            </div>
        </div>
EOT;
}
Esempio n. 9
0
File: index.php Progetto: Gurgy/LMS
?>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<center>
	<span id="footer">Simple LMS Extention © By William Levén</span>
</center>
<div id="hidden-div-background">
	<div id="hidden-div-wrapper">
		<?php 
// Print loginform
printLoginForm();
printPrivateResourceForm();
printEditPrivateResourceForm();
?>
	</div>
</div>

<?php 
// Print loginbuttom if user isnt logged in
if ($student->isPublic) {
    ?>
<span class="login-button login-button-container" onclick="openHiddenDiv('loginform')">Logga in</span><?php 
} else {
    ?>
		<span class="login-button-container">
			<a href="<?php 
Esempio n. 10
0
<?php

include 'common.php';
session_name('app');
session_start();
if (isset($_SESSION['isLoggedIn'])) {
    redirectUser('register.php');
}
if (isset($_SESSION['loginerror'])) {
    printLoginForm($_SESSION['loginerror']);
    $_SESSION['loginerror'] = '';
} else {
    printLoginForm(Null);
}
function printLoginForm($error_message)
{
    $form_string = "\n\t<html>\n\t<body>\n\t<head>\n\t    <link rel=\"stylesheet\" href=\"css/styles_new.css\">\n\t    <title>Login Form</title>\n\t</head>\n\t    \n\t<body>\n\t<div id=\"body\" class=\"pd1\">\n\t";
    if ($error_message != Null) {
        $form_string = $form_string . "<label for=\"error\">" . $error_message . "</label>";
    }
    $form_string = $form_string . "<fieldset>\n\t    <legend><font color=\"red\"  size=\"4\">Login Info</font></legend>  \n\t        <form method=\"post\" action=\"loginhandler.php\">\n\t        <table>\n\t            <tr>\n\t                <div style=\"width:350px\">\n\t                        <label for=\"uname\">User Name:</label>\n\t                        <input required name=\"uname\" id=\"uname\" size=\"35\" type=\"text\" class=\"medium\" placeholder=\"\">\n\t                </div>\n\n\t            </tr>    \n\t            <br>\n\t            <tr>\n\t                     <div style=\"width:350px\">\n\t                        <label for=\"password\">Password:</label>\n\t                        <input required name=\"pwd\" id=\"pwd\" size=\"35\" type=\"password\"  class=\"medium\"  placeholder=\"\">\n\t                    </div>\n\t             </tr>                                  \n\t             <br>\n\t             <tr>\n\t             \t<input type=\"submit\" value=\"submit\">\n\t             </tr>\n\t        </form>\n\t        </table>\n\t    </body>\n\t</body>\n\t</html>\n\t";
    echo $form_string;
}