示例#1
0
                renderLogout($device, $lang);
                // clean-up
                imap_expunge($mbox);
                imap_close($mbox);
            } else {
                echo '<div class="error">' . translate('There was an error connecting to', $lang) . ' ' . $server . '. ' . translate('Please try again', $lang) . '.</div>';
                renderLogin($device, $lang);
                // DEBUG
                echo imap_last_error();
            }
        } else {
            echo '<div class="error">' . translate('Username, password or server were blank', $lang) . '</div>';
            renderLogin($device, $lang);
        }
    } else {
        renderLogin($device, $lang);
    }
}
?>
	</form>
  </body>
</html>

<?php 
function pluralize($term, $count)
{
    if ($count == 1) {
        return $term;
    } else {
        switch ($term) {
            case 'is':
示例#2
0
function proc_login()
{
    if (isset($_POST['account']) && isset($_POST['password'])) {
        $usr = safe($_POST['account']);
        $psd = safe($_POST['password']);
        if (vaildate($usr, $psd)) {
            renderJump('You are successfully login', ajaxLink());
        } else {
            renderLogin("Can not find match account and password");
        }
    } else {
        renderLogin();
    }
}
示例#3
0
    // Didn't Submit Login Form
    // Therefore Unsuccesful Login
    $login_success = false;
}
?>

<html>
    <head>
        <title><?php 
echo $splash_title;
?>
</title>
    </head>
    <body>
        <h1><?php 
echo $splash_title;
?>
 Login</h1>
        <?php 
// Check if Login was Successful
if ($login_success) {
    // Login Successful
    // Render Login Continue Button
    renderLoginButton($cat_gateway);
} else {
    // Render Login Form
    renderLogin($splash_url, $logging);
}
?>
    </body>
</html>
示例#4
0
 function login()
 {
     $this->load->library('form_validation');
     $this->form_validation->set_rules('username', 'Username', 'trim|required|xss_clean');
     $this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean|callback_check_database');
     if ($this->form_validation->run() == FALSE) {
         $data['page_url'] = main_url() . 'home';
         $data['title_here'] = "Login";
         renderLogin($this, $this->table . '/login', $data);
     } else {
         redirect('home/base', 'refresh');
     }
 }