我從某人處購買了一個代碼並將其託管在本地,並且它工作得非常好,但是我的問題是。我在phpmyadmin中打開了管理表,並獲得了管理員電子郵件和加密的密碼。但是因爲我不知道密碼是什麼,我嘗試通過phpmyadmin添加另一個管理員帳戶(仍然使用本地主機),但我仍然無法登錄到管理控制檯。 任何解決方案?無法訪問我的本地託管網站的管理儀表板
<?php require("../includes/config.php");
require_once(ROOT_PATH . "core/class.admin.php");
$login = new ADMIN();
if($login->
is_loggedin() != ""){
$login->
redirect(BASE_URL.'administrator');
}
if(isset($_POST['loginBtn'])){
$username = strip_tags($_POST['userID']);
$password = strip_tags($_POST['password']);
if($login->
doLogin($username, $password)){
$login->
redirect(BASE_URL.'administrator');
}
else{
$error = "Email Address or Password does not match, please try again!";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
Naija Helper</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="author" content="http://creativeweb.com.ng" />
<!-- css -->
<link href="<?php echo BASE_URL;
?>
css/bootstrap.min.css" rel="stylesheet" />
<link href="<?php echo BASE_URL;
?>
css/fancybox/jquery.fancybox.css" rel="stylesheet">
<link href="<?php echo BASE_URL;
?>
css/jcarousel.css" rel="stylesheet" />
<link href="<?php echo BASE_URL;
?>
css/flexslider.css" rel="stylesheet" />
<link href="<?php echo BASE_URL;
?>
js/owl-carousel/owl.carousel.css" rel="stylesheet">
<link href="<?php echo BASE_URL;
?>
css/style.css" rel="stylesheet" />
<style type="text/css">
.formWrapper {
width: 40%;
margin: auto;
}
@media (max-width: 767px) {
.formWrapper {
width: 70%;
margin: auto;
}
}
@media (max-width: 480px) {
.formWrapper {
width: 90%;
margin: auto;
}
}
</style>
</head>
<div class="featured_content" style="margin: 0px;
">
<div class="formWrapper">
<div align="center" style="margin-bottom: 20px;
">
<a style="padding-bottom: 20px;
" href="<?php echo BASE_URL;
?>
">
<img src="<?php echo BASE_URL;
?>
img/logo.png" alt="logo"/>
</a>
</div>
<div align="center" style="margin-bottom: 10px;
">
<span style="font-size: 28px;
">
Adminstrators only</span>
<br>
<span>
Secure admin access</span>
</div>
<div style="background: #FFF;
padding: 50px 20px 20px;
border-radius: 5px;
">
<?php if(isset($error)) {
?>
<div class="alert alert-danger">
<i class="fa fa-exclamation-triangle">
</i>
<?php echo $error;
?>
! </div>
<?php }
?>
<form id="contact-form" method="post" action="" role="form" novalidate>
<div class="form-group has-feedback">
<label for="email">
Email Address*</label>
<input type="text" class="form-control" id="userID" name="userID" required placeholder="Enter your Email Or Username">
<i class="fa fa-envelope form-control-feedback">
</i>
</div>
<div class="form-group has-feedback">
<label for="password">
Password*</label>
<input type="password" class="form-control" id="password" name="password" required placeholder="Password">
<i class="fa fa-lock form-control-feedback">
</i>
</div>
<br>
<input type="submit" style="width: 100%;
padding: 20px;
border-radius: 5px;
" value="Login" name="loginBtn" class="btn btn-default">
</form>
</div>
<div class="row">
<div class="col-md-6">
<span style="font-size: 12px;
padding-left: 10px;
">
<a style="color: #666;
" href="register">
<i class="fa fa-lock">
</i>
Register</a>
</span>
</div>
<div class="col-md-6" align="right">
<span style="font-size: 12px;
padding-right: 10px;
">
<a style="color: #666;
" href="#">
<i class="fa fa-lock">
</i>
Forgot Password</a>
</span>
</div>
</div>
</div>
</div>
<?php include(ROOT_PATH."includes/footer.php");
?>
你需要檢查PHP –
登錄代碼向我們展示了登錄代碼,請。 – 2017-06-12 19:49:48
@aendeerei請檢查編輯後的版本我的問題 – Bennyfans