HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/unbox/uc-live/admin-dash/login.php
<?php
include_once('../wp-config.php');
global $wpdb;

if (is_user_logged_in() && isset($_SESSION['PANEL'])) {
  $msg = "not able";
  header("location:/admin-dash/index.php");
  exit();
}

$curDate = date('Y-m-d H:i:s');

if (isset($_POST['loginSubmit'])) {
  $login = $_REQUEST['userEmail'];
  $password = $_REQUEST['userPassword'];

  if ($login != '' && $password != '') {
    $creds = array();
    $creds['user_login'] = $login;
    $creds['user_password'] = $password;
    $creds['remember'] = true;
    $user = wp_signon($creds, false);
    if (is_wp_error($user)) {
      $error = $user->get_error_message();
      $login_msg = '<div class="alert alert-danger" role="alert">Login ' . $error . '</div>';
    } else {
      // echo "select count(*) from `uc_users` where ID='$user->ID' and user_status!='2'";
      // echo get_site_url() . '/admin-dash/index.php' ;
      $checkAccess = $wpdb->get_var("select count(*) from `uc_users` where ID='$user->ID' and user_status!='2'");
      if ($checkAccess > 0) {
        $_SESSION['PANEL'] = 1;
        $redirect_to = get_site_url() . '/admin-dash/index.php';
        $sessionId = session_id();
        $mesgg = '<div class="alert alert-success" role="alert">Login Success</div>';
        header("Location: " . $redirect_to);
      } else {
        $login_msg = '<div class="alert alert-danger" role="alert">Access denied!</div>';
      }
    }
  } else {
    $login_msg = '<div class="alert alert-danger" role="alert">Please enter username and password</div>';
  }
}
?>
<!DOCTYPE html>
<!--
Template Name: Cropper
Author: Sandhya
Website: https://unboxcatalysts.com/
-->
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="description" content="Admin Panel">
	<meta name="author" content="Unbox">
	<meta name="keywords" content="Unbox web">

	<title>Unbox </title>

  <!-- Fonts -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet">
  <!-- End fonts -->

	<!-- core:css -->
	<link rel="stylesheet" href="assets/vendors/core/core.css">
	<!-- endinject -->

	<!-- Plugin css for this page -->
	<!-- End plugin css for this page -->

	<!-- inject:css -->
	<link rel="stylesheet" href="assets/fonts/feather-font/css/iconfont.css">
	<link rel="stylesheet" href="assets/vendors/flag-icon-css/css/flag-icon.min.css">
	<!-- endinject -->

  <!-- Layout styles -->  
	<link rel="stylesheet" href="assets/css/style.css">
  <!-- End layout styles -->

  <link rel="shortcut icon" href="assets/images/favicon.png" />
</head>
<body>
	<div class="main-wrapper">
		<div class="page-wrapper full-page">
			<div class="page-content d-flex align-items-center justify-content-center">

				<div class="row w-100 mx-0 auth-page">
					<div class="col-md-8 col-xl-6 mx-auto">
						<div class="card">
							<div class="row">
                <div class="col-md-4 pe-md-0">
                  <div class="auth-side-wrapper">

                  </div>
                </div>
                <div class="col-md-8 ps-md-0">
                  <div class="auth-form-wrapper px-4 py-5">
                    <a href="#" class="main-logo d-block mb-2">UNBOX<span>CATALYST</span></a>
                    <h5 class="text-muted fw-normal mb-4">Welcome back! Log in to your account.</h5>
                    <?php if (isset($login_msg)) echo $login_msg; ?>
                    <form class="forms-sample" method="POST">
                      <div class="mb-3">
                        <label for="userEmail" class="form-label">User Name</label>
                        <input type="text" class="form-control" id="userEmail" name="userEmail" placeholder="Email">
                      </div>
                      <div class="mb-3">
                        <label for="userPassword" class="form-label">Password</label>
                        <input type="password" class="form-control" id="userPassword" name="userPassword" autocomplete="current-password" placeholder="Password">
                      </div>
                      <!-- <div class="form-check mb-3">
                        <input type="checkbox" class="form-check-input" id="authCheck">
                        <label class="form-check-label" for="authCheck">
                          Remember me
                        </label>
                      </div> -->
                      <div>
                        <!-- <a href="dashboard.php" class="btn btn-primary me-2 mb-2 mb-md-0 text-white">Login</a> -->
                        <button type="submit" name="loginSubmit" class="btn btn-primary me-2 mb-2 mb-md-0 text-white">
                          <i class="btn-icon-prepend" data-feather="twitter"></i>
                          Login
                        </button>
                      </div>
                      <a href="register.php" class="d-block mt-3 text-muted">Not a user? Sign up</a>
                    </form>
                  </div>
                </div>
              </div>
						</div>
					</div>
				</div>

			</div>
		</div>
	</div>


	<script src="assets/vendors/core/core.js"></script>
	<!-- inject:js -->
	<script src="assets/vendors/feather-icons/feather.min.js"></script>
	<script src="assets/js/template.js"></script>
	<!-- endinject -->

</body>
</html>