if (CheckTaskSwitch()) { ?> <dd><a href="<?php echo U('public/Task/index'); ?> "><i class="ico-mytask"></i>任务中心</a></dd> <dd><a href="<?php echo U('public/Medal/index'); ?> "><i class="ico-mymedal"></i>勋章馆</a></dd> <?php } ?> <?php if (!isVerified($user['uid'])) { ?> <dd><a href="<?php echo U('public/Account/authenticate'); ?> "><i class="ico-certification"></i>申请认证</a></dd> <?php } ?> <?php if (isInvite() && CheckPermission('core_normal', 'invite_user')) { ?> <dd><a href="<?php echo U('public/Invite/invite'); ?> "><i class="ico-invite"></i><?php
<div id="login-container"> <div id="logo"> <a href="<?php echo BASE_URL; ?> login"> <img src="<?php echo BASE_URL; ?> assets/img/logos/logo-login.png" alt="Logo"/> </a> </div> <?php if (isVerified()) { ?> <!-- /#forgot --> <div id="login"> <h4>Thank you.</h4> <hr/> <h5>Please check your email to confirm your request for a new password.</h5> <hr/> <?php if (empty($errors) === false) { ?> <div class="alert alert-danger"> <a class="close" data-dismiss="alert" href="#" aria-hidden="true">×</a>
} //echo $username; //echo $password; $stmt2 = $mysqli->prepare("select id, username, passhash from users where username = '******'"); if (!$stmt2) { echo json_encode(array("success" => false, "message" => "Oops, query 2 failed: %s" . $mysqli->error)); exit; } //echo "after first query"; $stmt2->execute(); $stmt2->bind_result($userid, $username, $passhash); $stmt2->fetch(); $stmt2->close(); if ($username != NULL) { //echo "reached here"; if (!isVerified($passhash, $password)) { echo json_encode(array("success" => false, "message" => "Wrong username and password.")); exit; } else { $_SESSION['token'] = substr(md5(rand()), 0, 10); //CSRF token for preventing attacks echo json_encode(array("success" => true, "message" => "Login was successful", "token" => $_SESSION['token'])); exit; } } else { echo json_encode(array("success" => false, "message" => "This username is not signed up.")); exit; } } else { } }
if (isUrlOriginal() || isUpdatePasswordBtnPressed()) { ?> <form action="<?php echo BASE_URL; ?> login/set/<?php echo $_GET['id']; ?> /<?php echo $_GET['gen_string']; ?> " class="form-horizontal" method="post"> <?php if (empty($errors) === true && isVerified()) { ?> <div class="alert alert-success"> <a class="close" data-dismiss="alert" href="#" aria-hidden="true">×</a> <strong>Well done!</strong> Successfully updated password. </div> <div class="form-group text-center"> <input type="hidden" name="hidden_forgot_pressed"> <a href="<?php echo BASE_URL; ?> " name="forgot" class="btn btn-default"> Back to Log In Page </a> </div>