Mini Shell
<?php
/* Database connection */
include("config.php");
$conn = dbconnect();
session_start();
// login or not
if ($_SESSION['name'] == '' || $_SESSION['admin_id'] == '') {
header('location:logout.php');
die();
}
date_default_timezone_set('Asia/Kolkata');
$today_date = date('Y-m-d');
$name = $_SESSION['name'];
$admin_id = $_SESSION['admin_id'];
$query = "SELECT * FROM tb1_admin WHERE name='" . $name . "' AND admin_id='" . $admin_id . "'";
$res_query = mysqli_query($conn, $query);
$fetch = mysqli_fetch_object($res_query);
$name = $fetch->name;
$username = $fetch->user_name;
$phone = $fetch->phone;
$gender = $fetch->gender;
$phone = $fetch->phone;
$status = $fetch->status;
$adminposition = $fetch->position;
$created_at = $fetch->updated_log;
$updated_log = date('d-m-Y h:i:s A', strtotime($created_at));
$created = $fetch->created_log;
$created_log = date('d-m-Y h:i:s A', strtotime($created));
if ($adminposition == 1) {
$type = 'Main Admin';
} elseif ($adminposition == 2) {
$type = 'Accounts';
} elseif ($adminposition == 3) {
$type = 'Marketing';
} else {
$type = 'Others';
}
$contact_today_query = "SELECT count(course_id) as contacttodaycount FROM tb1_ugcourses WHERE status = '1'";
$contact_today_res = mysqli_query($conn, $contact_today_query);
$contact_today_row = mysqli_fetch_object($contact_today_res);
$a_contact = $contact_today_row->contacttodaycount;
$e_course_today_query = "SELECT count(course_id) as e_coursetodaycount FROM tb1_pgcourses WHERE status = '1'";
$e_course_today_res = mysqli_query($conn, $e_course_today_query);
$e_course_today_row = mysqli_fetch_object($e_course_today_res);
$j_contact = $e_course_today_row->e_coursetodaycount;
$direct_course_today_query = "SELECT count(admin_id) as direct_coursetodaycount FROM tb1_admin WHERE status = '1'";
$direct_course_today_res = mysqli_query($conn, $direct_course_today_query);
$direct_course_today_row = mysqli_fetch_object($direct_course_today_res);
$g_contact = $direct_course_today_row->direct_coursetodaycount;
?>
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Admin - Sri Aravindar Arts & Science College </title>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Favicon icon -->
<link rel="icon" href="assets/images/favicon.png" type="image/x-icon">
<!-- Google font-->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800" rel="stylesheet">
<!-- Required Fremwork -->
<link rel="stylesheet" type="text/css" href="plugin/bootstrap/dist/css/bootstrap.min.css">
<!-- radial chart.css -->
<link rel="stylesheet" href="assets/pages/chart/radial/css/radial.css" type="text/css" media="all">
<!-- feather Awesome -->
<link rel="stylesheet" type="text/css" href="assets/icon/feather/css/feather.css">
<!-- Style.css -->
<!-- Font Awesome -->
<link rel="stylesheet" type="text/css" href="assets/icon/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<link rel="stylesheet" type="text/css" href="assets/css/jquery.mCustomScrollbar.css">
</head>
<!-- Menu sidebar static layout -->
<body>
<!-- Pre-loader start -->
<div class="theme-loader">
<div class="ball-scale">
<div class='contain'>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
<div class="ring">
<div class="frame"></div>
</div>
</div>
</div>
</div>
<!-- Pre-loader end -->
<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">
<?php include('static-header.php') ?>
<div class="pcoded-main-container">
<div class="pcoded-wrapper">
<?php include('static-sidebar.php') ?>
<div class="pcoded-content">
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
<div class="row">
<!-- user card start -->
<div class="col-md-6 col-xl-3">
<div class="card user-widget-card bg-c-blue">
<div class="card-block">
<i class="feather icon-help-circle bg-simple-c-blue card1-icon"></i>
<h4><?php echo $a_contact ?></h4>
<p>UG Courses</p>
<a href="./ug_course.php" class="more-info">More Info</a>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card user-widget-card bg-c-yellow">
<div class="card-block">
<i class="feather icon-help-circle bg-simple-c-yellow card1-icon"></i>
<h4><?php echo $j_contact ?></h4>
<p>PG Courses</p>
<a href="./pg_course.php" class="more-info">More Info</a>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card user-widget-card bg-c-green">
<div class="card-block">
<i class="feather icon-help-circle bg-simple-c-green card1-icon"></i>
<h4><?php echo $g_contact ?></h4>
<p>Admin Users</p>
<a href="./user-list.php" class="more-info">More Info</a>
</div>
</div>
</div>
<!-- user card end -->
<!-- user start -->
<div class="col-xl-9 col-md-12">
<div class="card user-card-full">
<div class="row m-l-0 m-r-0">
<div class="col-sm-4 bg-c-lite-green user-profile">
<div class="card-block text-center text-white">
<div class="m-b-25">
<img src="assets/images/user.png" class="img-radius" alt="User-Profile-Image" height="100">
</div>
<h6 class="f-w-600"><?php echo $name ?></h6>
<p><?php echo $type ?></p>
</div>
</div>
<div class="col-sm-8">
<div class="card-block">
<h6 class="m-b-20 p-b-5 b-b-default f-w-600">User Profile
</h6>
<div class="row">
<div class="col-sm-6">
<p class="m-b-5 f-w-600">User Name</p>
<h6 class="text-muted f-w-400"><?php echo $username ?>
</h6>
</div>
<div class="col-sm-6">
<p class="m-b-5 f-w-600">Phone</p>
<h6 class="text-muted f-w-400"><?php echo $phone ?>
</h6>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6">
<p class="m-b-5 f-w-600">Gender</p>
<h6 class="text-muted f-w-400"><?php echo $gender ?>
</h6>
</div>
<div class="col-sm-6">
<p class="m-b-5 f-w-600">Account</p>
<h6 class="text-muted f-w-400">
<?php
if ($status == 1) {
?>
<i class="fa fa-circle" aria-hidden="true" style="color:#008000" title="Active User"> Active</i>
<?php
} else {
?>
<i class="fa fa-circle" aria-hidden="true" style="color:#FF0000" title="Inactive User">Inactive</i>
<?php
}
?>
</h6>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6">
<p class="m-b-5 f-w-600">Created Log</p>
<h6 class="text-muted f-w-400"><?php echo $created_log ?>
</h6>
</div>
<div class="col-sm-6">
<p class="m-b-5 f-w-600">Updated Log</p>
<h6 class="text-muted f-w-400"><?php echo $updated_log ?>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="styleSelector">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Required Jquery -->
<script type="text/javascript" src="plugin/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="plugin/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="plugin/popper.js/dist/umd/popper.min.js"></script>
<script type="text/javascript" src="plugin/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- jquery slimscroll js -->
<script type="text/javascript" src="plugin/jquery-slimscroll/jquery.slimscroll.js"></script>
<!-- modernizr js -->
<script type="text/javascript" src="plugin/modernizr/modernizr.js"></script>
<script type="text/javascript" src="plugin/modernizr/feature-detects/css-scrollbars.js"></script>
<!-- Chart js -->
<script type="text/javascript" src="plugin/chart.js/dist/Chart.js"></script>
<!-- Google map js -->
<!-- gauge js -->
<script src="assets/pages/widget/gauge/gauge.min.js"></script>
<script src="assets/pages/widget/amchart/amcharts.js"></script>
<script src="assets/pages/widget/amchart/serial.js"></script>
<script src="assets/pages/widget/amchart/gauge.js"></script>
<script src="assets/pages/widget/amchart/pie.js"></script>
<script src="assets/pages/widget/amchart/light.js"></script>
<!-- Custom js -->
<script src="assets/js/pcoded.min.js"></script>
<script src="assets/js/vartical-layout.min.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script type="text/javascript" src="assets/pages/dashboard/crm-dashboard.min.js"></script>
<script type="text/javascript" src="assets/js/script.js"></script>
</body>
</html>
Zerion Mini Shell 1.0