git.schokokeks.org
Repositories
Help
Report an Issue
bibweb.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
3a6b9e8
Branches
Tags
master
bibweb.git
clear.php
Erste Version, die über die API speichert
Bernd Wurst
commited
3a6b9e8
at 2020-06-06 20:24:13
clear.php
Blame
History
Raw
<?php session_start(); $mode = null; if (isset($_SESSION['mode'])) { $mode = $_SESSION['mode']; } if (isset($_REQUEST['mode'])) { $mode = $_REQUEST['mode']; } 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);