// Additional helper functions function isLoggedIn() { return isset($_SESSION['user_id']) && isset($_SESSION['user_type']); } function isAdmin() { return isset($_SESSION['user_type']) && $_SESSION['user_type'] === 'admin'; } function isTenant() { return isset($_SESSION['user_type']) && $_SESSION['user_type'] === 'tenant'; } function redirect($url) { header("Location: $url"); exit(); } // Helper function to safely delete old files function deleteOldFile($filepath) { if (!empty($filepath) && file_exists($filepath)) { @unlink($filepath); return true; } return false; }
প্রপার্টি ম্যানেজমেন্ট সিস্টেম