Esempio n. 1
0
<?php

require_once 'config.php';
require_once 'class/rating.php';
if (isset($_POST['Login'])) {
    $email = $_REQUEST['email'];
    $password = $_REQUEST['password'];
    $renderObj = new rating();
    $status = $renderObj->admin_login($email, $password);
    if (isset($_SESSION['userinfo']) && $_SESSION['userinfo']->role_id == 8) {
        header('Location: user_list_page.php');
    } else {
        header('Location: admin.php?err=1');
    }
}
require_once 'header.php';
?>
    <?php 
require_once "error.php";
?>

    <div class="mid-col-12">
      <?php 
if ($_GET['err'] != '') {
    ?>
        <div class="alert alert-danger">
          <strong>Opps !</strong> Please Login with given credentials.
        </div>
         <?php 
}
?>
Esempio n. 2
0
<?php

require_once 'config.php';
require_once 'class/rating.php';
$renderObj = new rating();
$status = $renderObj->admin_login();
if (isset($_SESSION['userinfo']) && $_SESSION['userinfo']->role_id == 8) {
    header('Location: user_list_page.php');
}