예제 #1
0
            /* Everything went well, redirect to main.php */
            self::redirect();
        }
    }
}
if ($config->get_cfg_value('casActivated') == 'TRUE') {
    require_once 'CAS.php';
    /* Move CAS autoload before FD autoload */
    spl_autoload_unregister('CAS_autoload');
    spl_autoload_register('CAS_autoload', TRUE, TRUE);
    Index::casLoginProcess();
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['login'])) {
    /* Got a formular answer, validate and try to log in */
    Index::fullLoginProcess();
}
/* Translation of cookie-warning. Whether to display it, is determined by JavaScript */
$smarty->assign('cookies', '<b>' . _('Warning') . ':</b> ' . _('Your browser has cookies disabled. Please enable cookies and reload this page before logging in!'));
/* Set focus to the error button if we've an error message */
$focus = '';
if (session::is_set('errors') && session::get('errors') != '') {
    $focus = '<script type="text/javascript">';
    $focus .= 'document.forms[0].error_accept.focus();';
    $focus .= '</script>';
}
$smarty->assign('focus', $focus);
displayLogin();
?>

</body>
</html>
예제 #2
0
    }
    array_push($query_parameters, $pid);
    if (sqlNumRows($res)) {
        sqlStatement("UPDATE patient_access_" . add_escape_custom($portalsite) . "site SET portal_username=?,portal_pwd=?,portal_pwd_status=0 " . $salt_clause . " WHERE pid=?", $query_parameters);
    } else {
        sqlStatement("INSERT INTO patient_access_" . add_escape_custom($portalsite) . "site SET portal_username=?,portal_pwd=?,portal_pwd_status=0" . $salt_clause . " ,pid=?", $query_parameters);
    }
    // Create the message
    $message = messageCreate($_REQUEST['uname'], $clear_pass, $portalsite);
    // Email and display/print the message
    if (emailLogin($pid, $message)) {
        // email was sent
        displayLogin($pid, $message, true);
    } else {
        // email wasn't sent
        displayLogin($pid, $message, false);
    }
    exit;
}
?>

<html>
<head>
<link rel="stylesheet" href="<?php 
echo $css_header;
?>
" type="text/css">

<script type="text/javascript" src="<?php 
echo $GLOBALS['webroot'];
?>
예제 #3
0
/**
 * displayLockedOut 
 * 
 * @return void
 */
function displayLockedOut()
{
    displayHeader();
    echo '
    <div class="err-msg">
        <h2>' . T_('Hold On a Second!') . '</h2>
        <p>' . T_('You have exceeded the number of allowed login attempts.') . '</p>
        <p>' . T_('Your account has been locked for 1 hour.') . '</p>
    </div>';
    displayLogin();
}
예제 #4
0
        // Display instruction text
        	
        $html  =	"\n	If you don't have a Username and Password, please <a href='" . $pageName . ".html?user=register'>REGISTER here</a>.";
        $html .= 	"\n <br /><br />";
        echo $html;
        */
        if (!isset($_POST['submit'])) {
            // Display form
            displayLogin($pageName);
        } else {
            // Try and login with the given username & pass
            $result = user_login($_POST['username'], $_POST['password']);
            if ($result != 'Correct') {
                // Display form with the error
                $login_error = $result;
                displayLogin($pageName);
            } else {
                echo 'Currently logged in as ';
                echo strtoupper($_SESSION['username']) . ".<br/>";
                echo "<a href='" . $pageName . ".html?user=continue'>Click here</a> to CONTINUE</a>.";
            }
        }
    } else {
        echo 'Currently logged in as ';
        echo strtoupper($_SESSION['username']) . ".<br/>";
    }
}
// REGISTER
if ($user == 'register') {
    if (!is_authed()) {
        if (!$accept) {
예제 #5
0
    <div id="animation" ></div>
        <div class="content_container">
            <div class="container_12 content_highlight">
                <!--Left Menu Section -->
                <div class="grid_4">
                    <?php 
displayMenu($config);
?>
                </div>

                <!--Center Content Section -->
                <div class="grid_8">
                    <!--Content Login Section -->
                    <div class="login">
                        <?php 
displayLogin($config);
?>
                        <div class="clear"></div>
                    </div> 

                    <div class="divider"></div>

                    <!--Content Section -->
                    
                    <div id="Loading">
                    <?php 
displayContent($wts_content, $config);
?>

                    <!--Content Post 2 Section -->
                    <!-- <div class="post">
예제 #6
0
        if ($stmt->execute()) {
            //store username and password in array
            $userResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
            //store username and hashed password
            $_SESSION['dbUser'] = strtolower($userResult[0]['username']);
            $_SESSION['dbPass'] = $userResult[0]['password'];
            //check password entered matches the password from the datebase for that user
            if ($_SESSION['pass'] == $_SESSION['dbPass']) {
                $msg = "<h3 class='text-center'>Login Successful</h3>";
                displayLogin($msg, $username);
                header('location: /inkhub/index.php');
                echo "Success";
                die;
            } else {
                $msg = "<h3 class='text-center'>Password not found</h3>";
                session_destroy();
                displayLogin($msg, $username);
            }
            //redisplay if user does not exist
        } else {
            $msg = "<h3 class='text-center'>Username not found</h3>";
            $username = "";
            displayLogin($msg, $username);
        }
        //tell user to enter both fields
    } else {
        $msg = "<h3 class='text-center'>Please enter a username and password</h3>";
        $username = "";
        displayLogin($msg, $username);
    }
}