Server : LiteSpeed
System : Linux terra.hostitbro.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : outerorb ( 1091)
PHP Version : 8.1.34
Disable Function : mail
Directory :  /home2/outerorb/zapnixinc.com/admin/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: index.php

Path: /home2/outerorb/zapnixinc.com/admin/index.php

Size: 7.81 KB

Permissions: 0644

<?php
session_start(); // Start the session

include_once("../include/main.inc.php");

// error_reporting(0);

// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);

$ip = $_SERVER['REMOTE_ADDR'];
$title = "Admin Login Panel";

if ($_REQUEST['action'] == "remind_password") {
  $res = getResult("admin_details", " where 1");
  $To = $res['email'];
  $from = SITE_EMAIL;
  $fromName = getAdminname();
  $message = 'Dear ' . $res['name'] . ',<br/><br/>Your username is : ' . $res['user_id'] . '<br/>Your password is : ' . $res['pwd'] . '<br /><br />Regards<br /><br />' . $_SESSION['companyName'] . ' Customer Support Team<br />' . SITE_EMAIL;
  send_email($fromName, $from, $To, $subject, $message);
  $_SESSION['session_message'] = "An intimation mail has been sent to your email id about username and password.";
  header("location:index.php");
  exit();
}

if ($_GET['id1'] == "Logout") {
  session_destroy();
  echo "<script>window.location.href='".admin_url."index.php';</script>";
  exit();
}

if (isset($_SESSION['MyCpanel'])) {
  header("Location:welcome.php");
  exit();
} else {
  @extract($_POST);
  if ($_POST['id1'] == "login") {
    // @extract($_POST);
    // $sql1 = "select slno, last_login, name, user_type, user_id, country from admin_details where user_id='" . $login_id . "' and pwd='" . $password . "' and status='Y'";
    // $db = mysqli_query($GLOBALS['dbconn'], $sql1);
    // $num = mysqli_num_rows($db);

    // if ($num > 0) {
    //   $res = mysqli_fetch_object($db);
    //   $admin_detail = getAdminDetails();
    //   ob_start();
    //   $_SESSION['MyCpanel'] = $res->last_login;
    //   $_SESSION['MyAdminUserType'] = $res->user_type;
    //   $_SESSION['MyAdminUserName'] = $res->name;
    //   $_SESSION['MyAdminUserID'] = $res->user_id;
    //   $_SESSION['MyAdminCountry'] = $res->country;
    //   $_SESSION['MyAdminUserSLNO'] = $res->slno;
    //   $_SESSION['companyName'] = $admin_detail['companyName'];
    //   echo "<script>window.location.href='".admin_url."welcome.php';</script>";
    //   exit();
    // } else {
    //   $_SESSION['session_message'] = "Invalid Username/Password!! ";
    //   header("Location:index.php");
    //   exit();
    // }
    
    
    // $sql1 = "select slno, last_login, name, user_type, user_id, country from admin_details where user_id='" . $login_id . "' and pwd='" . $password . "' and status='Y'";
    // $db = mysqli_query($GLOBALS['dbconn'], $sql1);
    // $num = mysqli_num_rows($db);

    // if ($num > 0) {
    //   $res = mysqli_fetch_object($db);
    //   $admin_detail = getAdminDetails();
    //   ob_start();
    //   $_SESSION['MyCpanel'] = $res->last_login;
    //   $_SESSION['MyAdminUserType'] = $res->user_type;
    //   $_SESSION['MyAdminUserName'] = $res->name;
    //   $_SESSION['MyAdminUserID'] = $res->user_id;
    //   $_SESSION['MyAdminCountry'] = $res->country;
    //   $_SESSION['MyAdminUserSLNO'] = $res->slno;
    //   $_SESSION['companyName'] = $admin_detail['companyName'];
    //   echo "<script>window.location.href='".admin_url."welcome.php';</script>";
    //   exit();
    // } else {
    //   $_SESSION['session_message'] = "Invalid Username/Password!! ";
    //   header("Location:index.php");
    //   exit();
    // } 
    

        // $sql1 = "SELECT slno, companyName, last_login, user_type, user_id, country 
        //  FROM admin_details 
        //  WHERE user_id = ? AND pwd = ?";

        //  echo "SELECT slno, companyName, last_login, user_type, user_id, country 
        //  FROM admin_details 
        //  WHERE user_id = ? AND pwd = ?"; die;

// $stmt = $GLOBALS['dbconn']->prepare($sql1); // Prepare the statement

// // Bind the parameters (s for string, s for string)
// $stmt->bind_param("ss", $login_id, $password);

// $stmt->execute(); // Execute the prepared statement

// $result = $stmt->get_result(); // Get the result of the query

// $num = $result->num_rows; // Get the number of rows returned 
$login_id = $_POST['login_id'];
$password = $_POST['password'];

$sql1 = "SELECT slno, companyName, last_login, user_type, user_id, country  from admin_details where user_id='" . $login_id . "' and pwd='" . $password . "'";
    $db = mysqli_query($GLOBALS['dbconn'], $sql1);
    $num = mysqli_num_rows($db);

if ($num > 0) {
    $res = mysqli_fetch_object($db); // Fetch the result as an object

    // Store session variables securely
    $_SESSION['MyCpanel'] = $res->last_login;
    $_SESSION['MyAdminUserType'] = $res->user_type;
    $_SESSION['MyAdminUserID'] = $res->user_id;
    $_SESSION['MyAdminCountry'] = $res->country;
    $_SESSION['MyAdminUserSLNO'] = $res->slno;
    $_SESSION['companyName'] = $res->companyName;

    header("Location: welcome.php");
    exit;
} else {
    $_SESSION['session_message'] = "Invalid Username/Password!";
    header("Location: index.php");
    exit;
}

$stmt->close(); // Close the statement
  }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Outer Orbit Technologies - Login</title>
  <!-- plugins:css -->
  <link rel="stylesheet" href="<?=admin_url?>vendors/iconfonts/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="<?=admin_url?>vendors/css/vendor.bundle.base.css">
  <link rel="stylesheet" href="<?=admin_url?>vendors/css/vendor.bundle.addons.css">
  <!-- endinject -->
  <!-- plugin css for this page -->
  <!-- End plugin css for this page -->
  <!-- inject:css -->
  <link rel="stylesheet" href="<?=admin_url?>css/style.css">
  <!-- endinject -->
  <link rel="icon" href="<?=admin_url?>images/favicon.ico">
  <style>
    footer {
    position: absolute;
    bottom: 0px;
    width: 100%;
    background: transparent;
    padding: 11px 0px;
    font-weight: 400;
    z-index: 99999;
    color: #000;
}
  </style>
</head>

<body>
  <div class="container-scroller">
    <div class="container-fluid page-body-wrapper full-page-wrapper">
      <div class="content-wrapper d-flex align-items-center auth">
        <div class="row w-100">
          <div class="col-lg-4 mx-auto">
            <div class="auth-form-light text-left p-5">
              <div class="brand-logo">
                <img src="<?=admin_url?>/images/logo-old.png" alt="logo">
              </div>
              <!--<h4>Hello! let's get started</h4>-->
              <h6 class="font-weight-light">Sign in to continue.</h6>
              <span style="color:red">
                <?php
                if (isset($_SESSION['session_message']) && $_SESSION['session_message'] != '') {
                  echo $_SESSION['session_message'];
                  $_SESSION['session_message'] = '';
                }
                ?>
              </span>
              <form class="pt-3" method="POST" action=''>
                <div class="form-group">
                  <input type="text" class="form-control form-control-lg" name="login_id" placeholder="Username" required>
                </div>
                <div class="form-group">
                  <input type="password" class="form-control form-control-lg" name="password" placeholder="Password" required>
                </div>
                <div class="mt-3">
                  <button class="btn btn-block btn-primary btn-lg font-weight-medium auth-form-btn"  type="submit" name="id1" value="login">Login</button>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
      <!-- content-wrapper ends -->
    </div>
    <!-- page-body-wrapper ends -->
  </div>
  <footer>
    <div class="col-lg-12 col-md-12 text-center">Powered by Outer Orbit Technologies</div>
  </footer>
  <!-- container-scroller -->
  <!-- plugins:js -->
  <script src="<?=admin_url?>vendors/js/vendor.bundle.base.js"></script>
  <script src="<?=admin_url?>vendors/js/vendor.bundle.addons.js"></script>
  <!-- endinject -->
</body>
</html>

← Back to Directory Edit File 🔒 Chmod

WP File Manager