OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
new_ui
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📁
assets
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
checkSession.php
1.52 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
follow_action.php
1.7 KB
05/19/2025 10:07:13 AM
rw-r--r--
📁
genai
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📁
inc
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
index.php
54.5 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
logInCheck.php
4.41 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
logout.php
1.14 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new-page-copy.php
10.89 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new-page.php
10.63 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
new_my_collection.php
52.1 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
process_data.php
5.02 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
sign-in.php
34.79 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
signInProcess.php
14.06 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
stream.php
70.38 KB
05/19/2025 10:07:13 AM
rw-r--r--
Editing: logout.php
Close
<?php session_start(); include 'assets/php/db_config.php'; // Check if user is logged in and session variables are set if (isset($_SESSION['userEmail'])) { // $email = $_SESSION['userEmail']; $user_id = $_SESSION['userId']; // Assuming you store the user ID in the session // // Update the logout timestamp in the 'user' table // $stmt = $creamdb->prepare("UPDATE user SET logout = NOW() WHERE email = ?"); // $stmt->bind_param('s', $email); // $stmt->execute(); // Now update the end time in the 'user_sessions' table to mark the session as ended $session_id = session_id(); // Get the session ID // echo "Session ID: " . session_id(); $stmt2 = $creamdb->prepare("UPDATE session_log SET endTime = NOW() WHERE sessionId = ? AND userId = ?"); $stmt2->bind_param('si', $session_id, $user_id); $stmt2->execute(); } // Delete the cookie if it exists if (isset($_COOKIE['knobly_user_data'])) { setcookie('knobly_user_data', '', time() - 3600, "/"); } // Destroy the session session_destroy(); // Redirect to the index page after logout header("Location: index.php"); exit(); ?>