Browse code

Erste Version, die über die API speichert

Bernd Wurst authored on06/06/2020 20:24:13
Showing1 changed files
... ...
@@ -1,13 +1,27 @@
1 1
 <?php
2 2
 session_start();
3
-$filename = '../data/'.date('Y').'/'.$_SESSION['handle'].'.json';
4
-if (file_exists($filename)) {
5
-    unlink($filename);
3
+$mode = null;
4
+if (isset($_SESSION['mode'])) {
5
+    $mode = $_SESSION['mode'];
6
+}
7
+if (isset($_REQUEST['mode'])) {
8
+    $mode = $_REQUEST['mode'];
9
+}
10
+if (isset($_SESSION['handle'])) {
11
+    $filename = '../data/'.date('Y').'/'.$_SESSION['handle'].'.json';
12
+    if (file_exists($filename)) {
13
+        unlink($filename);
14
+    }
6 15
 }
7 16
 session_destroy();
8 17
 
9 18
 if (isset($_REQUEST['number'])) {
19
+            setcookie('NAME', '', 1, "");
10 20
             setcookie('NUMBER', '', 1, "");
11 21
 }
12 22
 
13
-header('Location: index.php');
23
+$param = '';
24
+if ($mode == 'local') {
25
+    $param = '?mode=local';
26
+}
27
+header('Location: index.php'.$param);
Browse code

Cookie löschbar, Datenschutzhinweise

Bernd Wurst authored on18/03/2018 20:54:39
Showing1 changed files
... ...
@@ -5,4 +5,9 @@ if (file_exists($filename)) {
5 5
     unlink($filename);
6 6
 }
7 7
 session_destroy();
8
+
9
+if (isset($_REQUEST['number'])) {
10
+            setcookie('NUMBER', '', 1, "");
11
+}
12
+
8 13
 header('Location: index.php');
Browse code

Fehlermeldungen auf BS4 portiert. Abbrechen löscht den angefangenen Auftrag.

Bernd Wurst authored on18/03/2018 20:12:58
Showing1 changed files
... ...
@@ -1,4 +1,8 @@
1 1
 <?php
2 2
 session_start();
3
+$filename = '../data/'.date('Y').'/'.$_SESSION['handle'].'.json';
4
+if (file_exists($filename)) {
5
+    unlink($filename);
6
+}
3 7
 session_destroy();
4 8
 header('Location: index.php');
Browse code

Spätere Anlieferung eingebaut

Bernd Wurst authored on17/03/2018 17:14:44
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+<?php
2
+session_start();
3
+session_destroy();
4
+header('Location: index.php');