This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'client') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
// Add your authentication check here | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database connection | |
$servername = "localhost"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'admin') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'admin') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['username']) || $_SESSION['role'] != 'admin') { | |
header("Location: login.php"); | |
exit(); | |
} | |
// Database connection | |
$servername = "localhost"; | |
$username = "root"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
if (!isset($_SESSION['user_id']) || $_SESSION['role'] != 'trainer') { | |
header('Content-Type: application/json'); | |
echo json_encode(['success' => false, 'message' => 'Unauthorized access']); | |
exit(); | |
} | |
// Database configuration | |
$servername = "localhost"; |
NewerOlder