feat: support automatic dark mode

refactor: run linter and cleanup php files
fix: not every payment cycle was shown on the calendar
feat: also show previous payments on the calendar for the current month
This commit is contained in:
Miguel Ribeiro
2024-06-26 18:11:37 +02:00
committed by GitHub
parent 15fc8f1238
commit c2e85d6e10
101 changed files with 4538 additions and 4152 deletions

View File

@@ -1,20 +1,20 @@
<?php
require_once 'includes/connect.php';
session_start();
// get token from cookie to remove from DB
if (isset($_SESSION['token'])) {
$token = $_SESSION['token'];
$sql = "DELETE FROM login_tokens WHERE token = :token AND user_id = :userId";
$stmt = $db->prepare($sql);
$stmt->bindParam(':token', $token, SQLITE3_TEXT);
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
$stmt->execute();
}
$_SESSION = array();
session_destroy();
$cookieExpire = time() - 3600;
setcookie('wallos_login', '', $cookieExpire);
$db->close();
header("Location: .");
exit();
require_once 'includes/connect.php';
session_start();
// get token from cookie to remove from DB
if (isset($_SESSION['token'])) {
$token = $_SESSION['token'];
$sql = "DELETE FROM login_tokens WHERE token = :token AND user_id = :userId";
$stmt = $db->prepare($sql);
$stmt->bindParam(':token', $token, SQLITE3_TEXT);
$stmt->bindParam(':userId', $userId, SQLITE3_INTEGER);
$stmt->execute();
}
$_SESSION = array();
session_destroy();
$cookieExpire = time() - 3600;
setcookie('wallos_login', '', $cookieExpire);
$db->close();
header("Location: .");
exit();
?>