|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/../demo/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
// First we execute our common code to connection to the database and start the session
require("common.php");
// If we want to keep some session information such as shopping cart contents,
// we only remove the user's data from the session without unsetting remaining
// session variables and without destroying the session.
$redirect="school-login.php";
if(isset($_SESSION['user']))
{
unset($_SESSION['user']);
$redirect="school-login.php";
}
if(isset($_SESSION['Mng_User']))
{
unset($_SESSION['user']);
$redirect="management-login.php";
}
// Otherwise, we unset all of the session variables.
$_SESSION = array();
//echo $_SESSION['code']."1";
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
$SchooldCodeNew=$_SESSION['code'];
// Finally, destroy the session.
session_destroy();
session_start();
// If strict types are enabled i.e. declare(strict_types=1);
$file = file_get_contents('dirroot.txt', true);
// Otherwise
$file = file_get_contents('dirroot.txt', FILE_USE_INCLUDE_PATH);
echo $_SESSION['code']."2";
echo $_SESSION['code']=$file;
// Whether we destroy the session or not, we redirect them to the login page
$_SESSION['MasterSchoolCode']=$SchooldCodeNew;
//echo $_SESSION['code']; exit;
header("Location: $redirect");
die("Redirecting to: $redirect");