Пример #1
0
 public function index()
 {
     checkIE();
     if (IS_POST) {
         $username = I('username', null);
         $password = I('password', null);
         $code = I('code', null);
         $check_verify = $this->_check_verify($code);
         if ($check_verify) {
             $user = D('Member')->getUsersByUsername($username);
             $auth_success = false;
             if ($user) {
                 $auth_success = validate_password($password, $user[0]['salted_hash']);
             }
             if ($auth_success) {
                 $result['code'] = self::SUCCESS_CODE;
                 session('username', $user[0]['username']);
                 session('uid', $user[0]['uid']);
                 session('email', $user[0]['email']);
                 session('groupid', $user[0]['groupid']);
                 session('gender', $user[0]['gender']);
                 session('avatar', $user[0]['avatar']);
             } else {
                 $result['code'] = self::AUTH_FAILED_CODE;
                 $result['error'] = self::AUTH_FAILED_TIP;
             }
         } else {
             $result['code'] = self::VERIFY_FAILED_CODE;
             $result['error'] = self::VERIFY_FAILED_TIP;
         }
         $this->ajaxReturn($result);
     }
     $this->display();
 }
Пример #2
0
 public function alert()
 {
     if (checkIE(false)) {
         $this->display();
     } else {
         redirect(APP_URL . '/Home/main/index');
     }
 }
Пример #3
0
 public function _initialize()
 {
     // 发送header, 修复 IE 浏览器在 iframe 下限制写入 cookie 的问题
     header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
     header('Content-Type:text/html;charset=utf-8');
     checkIE();
     if (session('username')) {
         $this->username = session('username');
         $this->uid = session('uid');
         $this->assign('username', $this->username);
         $this->assign('uid', $this->uid);
     } else {
         redirect(APP_URL . '/Home/login/index');
     }
 }
Пример #4
0
<?php

require_once 'core/init.php';
require_once 'core/template/header.inc.php';
if (!empty($_SESSION['userInfo']) || !empty($_SESSION['admin'])) {
    redirect('flush.php');
}
?>
<div class="display">
	<h1>Hello</h1>
	<div class="display-content">
		<?php 
if (checkIE() === true) {
    ?>
		<p>For you to be able to use this application you are going to have to use a better browser.</p>
		<p>Internet Explorer is not as advanced as other web browser.</p>
		<p>I recommend using Google Chrome:</p>
		<a href="https://www.google.com/chrome/browser/desktop/" target="_blank">Download Link</a>
		<?php 
} else {
    ?>
		<p>Thank you for taking the time to carry out this questionnaire.</p>
		<p>The questionnaire consists of pairs of contrasting attributes that apply to the application. The slider between the attributes represent gradations between the opposites. You can express your agreement with the attributes by dragging the thumb of the slider toward the attribute that most closely reflects your impression.</p>
		<p>I am well aware of how dull questionnaires can be but please persevere until the end.</p>

		<button data-toggle=".user-info">Lets Begin</button>
		<button data-toggle=".instructions">More Instructions</button>
		<button data-toggle=".disclaimer">Disclaimer</button>
		<?php 
}
?>