source: trunk/admin/edit.php @ 419

Last change on this file since 419 was 419, checked in by moo, 7 years ago

fixed #103, able to edit non-string variable

File size: 479 bytes
Line 
1<?php
2
3include("./common.php");
4
5if (!isset($_GET['name'])) {
6    die("missing name");
7}
8
9$name = $_GET['name'];
10// trigger auth
11$vcnt = xcache_count(XC_TYPE_VAR);
12
13if ($_SERVER['REQUEST_METHOD'] == 'POST') {
14    eval('$value = ' . $_POST['value']);
15    xcache_set($name, $value);
16    header("Location: xcache.php?type=" . XC_TYPE_VAR);
17    exit;
18}
19$value = var_export(xcache_get($name), true);
20
21$xcache_version = XCACHE_VERSION;
22$xcache_modules = XCACHE_MODULES;
23
24include("edit.tpl.php");
25
26?>
Note: See TracBrowser for help on using the repository browser.