'.gettext("No file name specified").'' . '|'); } elseif (is_dir($_POST['file'])) { print('|4|' . '' . '|'); } elseif (!is_file($_POST['file'])) { print('|3|' . '' . '|'); } else { $data = file_get_contents(urldecode($_POST['file'])); if ($data === false) { print('|1|' . '' . '|'); } else { $data = base64_encode($data); print("|0|{$_POST['file']}|{$data}|"); } } exit; case 'save': if (strlen($_POST['file']) < 1) { print('|' . '' . '|'); } else { conf_mount_rw(); $_POST['data'] = str_replace("\r", "", base64_decode($_POST['data'])); $ret = file_put_contents($_POST['file'], $_POST['data']); conf_mount_ro(); if ($_POST['file'] == "/conf/config.xml" || $_POST['file'] == "/cf/conf/config.xml") { if (file_exists("/tmp/config.cache")) { unlink("/tmp/config.cache"); } disable_security_checks(); } if ($ret === false) { print('|' . '' . '|'); } elseif ($ret != strlen($_POST['data'])) { print('|' . '' . '|'); } else { print('|' . '' . '|'); } } exit; } exit; } require("head.inc"); ?>