Initial import

This commit is contained in:
pongpon pitisuk
2026-06-25 16:49:13 +07:00
commit 72701ad58c
120 changed files with 17590 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
require_once __DIR__ . '/config.php';
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true) {
header('Location: ' . BASE_URL . '/index.php');
exit;
}
$state = bin2hex(random_bytes(16));
$_SESSION['google_state'] = $state;
$params = [
'client_id' => GOOGLE_CLIENT_ID,
'redirect_uri' => GOOGLE_REDIRECT_URI,
'response_type' => 'code',
'scope' => 'openid email profile',
'access_type' => 'online',
'state' => $state,
];
header('Location: https://accounts.google.com/o/oauth2/v2/auth?' . http_build_query($params));
exit;