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/dev.outerorbittech.com/oot/admin/

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


OR Upload from URL:
URL: Save as:

📄 File: index.php

Path: /home2/outerorb/dev.outerorbittech.com/oot/admin/index.php

Size: 11.72 KB

Permissions: 0644

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

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

$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 {
  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 = ?";

$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

if ($num > 0) {
    $res = $result->fetch_object(); // 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>-->

<style>
    
    body {

      background: #e0e5ec;

      margin: 0;

      font-family: Arial, sans-serif;

      height: 100vh;

      display: flex;

      justify-content: center;

      align-items: center;

      padding: 15px;

    }



    .neumorphic-card {

      background: #e0e5ec;

      border-radius: 20px;

      box-shadow: 10px 10px 20px #a3b1c6, -10px -10px 20px #ffffff;

      padding: 30px 25px;

      width: 100%;

      max-width: 380px;

      text-align: center;

    }



    .logo {

      width: 150px;

      height: auto;

      margin-bottom: 20px;

      border-radius: 12px;

    }



    .neumorphic-input {

      width: 100%;

      padding: 12px 20px;

      margin: 10px 0;

      border-radius: 20px;

      border: none;

      box-shadow: inset 6px 6px 12px #a3b1c6, inset -6px -6px 12px #ffffff;

      background: #e0e5ec;

      font-size: 14px;

      color: #333;

      outline: none;

      box-sizing: border-box;

    }



    .neumorphic-input:hover,

    .neumorphic-input:focus {

      box-shadow: inset 8px 8px 15px #a3b1c6, inset -8px -8px 15px #ffffff;

      background: #e0e5ec;

      outline: none;

    }



    .password-container {

      position: relative;

      width: 100%;

    }



    .password-container input {

      padding-right: 40px;

    }



    .toggle-password {

      position: absolute;

      top: 50%;

      right: 15px;

      transform: translateY(-50%);

      cursor: pointer;

      font-size: 18px;

      user-select: none;

      color: #888;

    }



    .neumorphic-button {

      margin-top: 20px;

      padding: 12px 0;

      width: 40%;

      border: none;

      border-radius: 20px;

      font-size: 16px;

      background: #e0e5ec;

      color: #333;

      cursor: pointer;

      box-shadow: 6px 6px 12px #a3b1c6, -6px -6px 12px #ffffff;

      transition: all 0.3s ease;

    }



    .neumorphic-button:hover {

      box-shadow: 10px 10px 20px #a3b1c6, -10px -10px 20px #ffffff;

      transform: translateY(-3px);

    }



    .neumorphic-button:active {

      box-shadow: inset 6px 6px 12px #a3b1c6, inset -6px -6px 12px #ffffff;

      transform: translateY(2px);

    }



    .session-message {

      color: red;

      margin-bottom: 15px;

      font-weight: 600;

    }



    footer {

      position: fixed;

      bottom: 0;

      width: 100%;

      background: transparent;

      padding: 11px 0;

      font-weight: 400;

      color: #000;

      text-align: center;

    }



    @media (max-width: 480px) {

      .neumorphic-card {

        padding: 25px 20px;

        max-width: 90vw;

      }



      .logo {

        width: 100px;

        margin-bottom: 15px;

      }



      .neumorphic-button {

        font-size: 15px;

      }



      footer {

        font-size: 14px;

        padding: 8px 0;

      }

    }
</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>-->
  
  <div class="neumorphic-card">

    <img src="<?=admin_url?>images/logo.png" alt="Logo" class="logo" />



    <?php if (isset($_SESSION['session_message']) && $_SESSION['session_message'] != ''): ?>

      <div class="session-message"><?= htmlspecialchars($_SESSION['session_message']); $_SESSION['session_message'] = ''; ?></div>

    <?php endif; ?>



    <form method="POST" action="">

      <input

        type="text"

        name="login_id"

        class="neumorphic-input"

        placeholder="Username"

        required

      />

      <div class="password-container">

        <input

          type="password"

          id="password"

          name="password"

          class="neumorphic-input"

          placeholder="Password"

          required

        />

        <span class="toggle-password" onclick="togglePassword()">🙉️</span>

      </div>

      <button type="submit" name="id1" value="login" class="neumorphic-button">

        Sign In

      </button>

    </form>

  </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 -->
  
  <script>

    function togglePassword() {

      const passInput = document.getElementById('password');

      const icon = document.querySelector('.toggle-password');

      if (passInput.type === 'password') {

        passInput.type = 'text';

        icon.textContent = '🙈';

      } else {

        passInput.type = 'password';

        icon.textContent = '🙉️';

      }

    }

  </script>
</body>
</html>

← Back to Directory Edit File 🔒 Chmod

WP File Manager