git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
94120d8
Branches
Tags
master
bibweb.git
clear.php
Session zerstören wenn der Auftrag fertig übermittelt wurde
Bernd Wurst
commited
94120d8
at 2024-08-20 16:44:56
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']; } 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'])) { setcookie('NAME', '', 1, ""); setcookie('NUMBER', '', 1, ""); } $param = ''; if ($mode == 'local') { $param = '?mode=local'; } header('Location: index.php'.$param);