Last change
on this file since 1078 was
1078,
checked in by Xuefer, 7 years ago
|
htdocs/cache: re-adds help
|
-
Property svn:eol-style set to
native
|
File size:
715 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | include "./common.php"; |
---|
4 | |
---|
5 | if (!isset($_GET['name'])) { |
---|
6 | die("missing name"); |
---|
7 | } |
---|
8 | |
---|
9 | $name = $_GET['name']; |
---|
10 | // trigger auth |
---|
11 | $vcnt = xcache_count(XC_TYPE_VAR); |
---|
12 | |
---|
13 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { |
---|
14 | if (!empty($config['enable_eval'])) { |
---|
15 | eval('$value = ' . $_POST['value']); |
---|
16 | } |
---|
17 | else { |
---|
18 | $value = $_POST['value']; |
---|
19 | } |
---|
20 | xcache_set($name, $value); |
---|
21 | header("Location: xcache.php?type=" . XC_TYPE_VAR); |
---|
22 | exit; |
---|
23 | } |
---|
24 | $value = xcache_get($name); |
---|
25 | if (!empty($enable['enable_eval'])) { |
---|
26 | $value = var_export($value, true); |
---|
27 | $editable = true; |
---|
28 | } |
---|
29 | else { |
---|
30 | if (is_string($value)) { |
---|
31 | $editable = true; |
---|
32 | } |
---|
33 | else { |
---|
34 | $editable = false; |
---|
35 | $value = var_export($value, true); |
---|
36 | } |
---|
37 | } |
---|
38 | |
---|
39 | $module = "cacher"; |
---|
40 | |
---|
41 | include "edit.tpl.php"; |
---|
42 | |
---|
43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.