gitea init

This commit is contained in:
skryper
2025-10-08 21:28:30 +04:00
commit d4651a423d
2518 changed files with 522832 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
// auth_check.php - ავტორიზაციის შემოწმების ფაილი
session_start();
function checkAuth() {
if (!isset($_SESSION['user_id'])) {
header('Location: login.php');
exit;
}
}
function isLoggedIn() {
return isset($_SESSION['user_id']);
}
function getUserId() {
return $_SESSION['user_id'] ?? null;
}
function getUserName() {
return $_SESSION['user_name'] ?? 'ანონიმი';
}
function logout() {
session_destroy();
header('Location: login.php');
exit;
}
?>