-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathsave_setting_redirect.php
More file actions
54 lines (43 loc) · 1.58 KB
/
save_setting_redirect.php
File metadata and controls
54 lines (43 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**************************************************************
"Learning with Texts" (LWT) is released into the Public Domain.
This applies worldwide.
In case this is not legally possible, any entity is granted the
right to use this work for any purpose, without any conditions,
unless such conditions are required by law.
Developed by J. Pierre in 2011.
***************************************************************/
/**************************************************************
Call: save_setting_redirect.php?k=[key]&v=[value]&u=[RedirURI]
Save a Setting (k/v) and redirect to URI u
***************************************************************/
include "connect.inc.php";
include "settings.inc.php";
include "utilities.inc.php";
$k = getreq('k');
$v = getreq('v');
$u = getreq('u');
if($k == 'currentlanguage') {
unset($_SESSION['currenttextpage']);
unset($_SESSION['currenttextquery']);
unset($_SESSION['currenttexttag1']);
unset($_SESSION['currenttexttag2']);
unset($_SESSION['currenttexttag12']);
unset($_SESSION['currentwordpage']);
unset($_SESSION['currentwordquery']);
unset($_SESSION['currentwordstatus']);
unset($_SESSION['currentwordtext']);
unset($_SESSION['currentwordtag1']);
unset($_SESSION['currentwordtag2']);
unset($_SESSION['currentwordtag12']);
unset($_SESSION['currentarchivepage']);
unset($_SESSION['currentarchivequery']);
unset($_SESSION['currentarchivetexttag1']);
unset($_SESSION['currentarchivetexttag2']);
unset($_SESSION['currentarchivetexttag12']);
saveSetting('currenttext','');
}
saveSetting($k,$v);
header("Location: " . $u);
exit();
?>