RE: Upgraded Xcache, etc. and it's now broken » edit.php
| 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 |
?>
|