|
Last change
on this file since 605 was
605,
checked in by moo, 4 years ago
|
|
eol-style
|
-
Property svn:eol-style set to
native
|
|
File size:
729 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 ($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 ($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 | $xcache_version = XCACHE_VERSION; |
|---|
| 40 | $xcache_modules = XCACHE_MODULES; |
|---|
| 41 | |
|---|
| 42 | include("edit.tpl.php"); |
|---|
| 43 | |
|---|
| 44 | ?> |
|---|
Note: See
TracBrowser
for help on using the repository browser.