Notes

setSafeMode(true); function isLoggedIn() { return isset($_SESSION['user_id']); } function isAdmin() { return false;// isLoggedIn() && isset($_SESSION['role']) && $_SESSION['role'] === 'admin'; } function sanitize($data, $flags = ENT_QUOTES, $encoding = 'UTF-8') { return htmlspecialchars((string)$data, $flags, $encoding); } $sortBy = $_GET['sort_by'] ?? 'updated_at'; $sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC'); // Ensure uppercase for comparison ?>
ID Title Owner Content (Preview) Last Edited Actions
text($note['content'] ?? '')); $previewContent = mb_substr($plainTextContent, 0, 70); echo sanitize($previewContent) . (mb_strlen($plainTextContent) > 70 ? '...' : ''); ?> Edit