Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.129.210.35
Current Path : /var/www/html/oums/src/ |
| Current File : /var/www/html/oums/src/sys_session.php |
<?php
if (session_id() == '') {
session_start();
}
if (!isset($_SESSION['userid'])) {
header('Location:index.html');
echo "<script>";
echo "alert('Please login again!')";
echo "</script>";
}
$user_id = strtoupper($_SESSION["userid"]);
$name_id = strtoupper($_SESSION["nameid"]);
$empl_id = strtoupper($_SESSION['emplid']);
$dept_id = strtoupper($_SESSION['deptid']);
$town_id = strtoupper($_SESSION['townid']);
$type_id = strtoupper($_SESSION['typeid']);
$head_id = strtoupper($_SESSION['headid']);
$phot_id = strtolower($_SESSION['photid']);
date_default_timezone_set('Asia/Calcutta');
$user_ip = $_SERVER['REMOTE_ADDR']; // Get IP Address
ob_start();
system('ipconfig /all'); //Execute external program to display output
$mycom = ob_get_contents(); // Capture the output into a variable
$find_me = "Physical";
$posi_mc = strpos($mycom, $find_me); // Find the position of Physical text
$user_mc = substr($mycom, ($posi_mc + 36), 17); // Get Physical Address
ob_clean(); // Clean (erase) the output buffer
|