git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
4f087e8
Branches
Tags
master
bibweb.git
clear.php
Noch ein Versuch, den Mode immer beizubehalten
Bernd Wurst
commited
4f087e8
at 2024-09-03 19:24:24
clear.php
Blame
History
Raw
<?php require_once "lib/api.php"; session_start(); $mode = null; if (isset($_SESSION['mode'])) { $mode = $_SESSION['mode']; } if (isset($_REQUEST['mode'])) { $mode = $_REQUEST['mode']; } /* Hier nie aus der API löschen if (isset($_SESSION['orderid']) && is_numeric($_SESSION['orderid'])) { $ret = api_call('DELETE', 'orders/'.$_SESSION['orderid']); } */ if (isset($_SESSION['handle'])) { $filename = '../data/'.date('Y').'/'.$_SESSION['handle'].'.json'; if (file_exists($filename)) { unlink($filename); } } session_destroy(); if (isset($_REQUEST['number']) || $mode == 'local') { setcookie('NAME', '', 1, ""); setcookie('NUMBER', '', 1, ""); } $param = ''; if ($mode == 'local') { $param = '?mode=local'; } header('Location: index.php'.$param);