Esempio n. 1
0
                } else {
                    error(4);
                }
            } else {
                error(5);
            }
        } else {
            error(6);
        }
    } else {
        error(7);
    }
} elseif ($method == 'export') {
    require_once 'import.php';
    require_once 'db.php';
    BaseStream::registerStream('db');
    Importer::cbd_run();
    Importer::log("export");
    header('Location: index.php?success=1');
} elseif ($method == 'save') {
    if (strpos($_POST['f'], '/') !== false) {
        die('Not allowed!');
    }
    $content = $_POST['contents'];
    $f = $_POST['f'];
    file_put_contents('xsl/' . $f, stripslashes($content)) or error(8);
    Importer::log("save", $f, strlen($content));
    header("Location: index.php?admin={$f}&success=1");
} elseif ($method == 'chmac_t') {
    if ($_POST['inputNull']) {
        query("ALTER TABLE {$_POST['inputTable']} SET MAC TO NULL");
Esempio n. 2
0
<?php

require_once 'render.php';
require_once 'db.php';
require_once 'custom.php';
BaseStream::registerStream('db');
BaseStream::registerStream('func');
$params = array('base_url' => "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . dirname($_SERVER["REQUEST_URI"] . '?') . '/', 'logout_url' => "http://logout@" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . dirname($_SERVER["REQUEST_URI"] . '?') . '/', 'request_url' => $_SERVER['QUERY_STRING'], 'request' => $_REQUEST, 'SOURCE_SRV' => $ekos_host, 'SOURCE_DB' => $ekos_db, 'TARGET_SRV' => $cbd_host, 'TARGET_DB' => $cbd_db, 'USER_NAME' => $user_name, 'USER_GROUP' => $user_group['name'], 'USER_GECOS' => $user_info['gecos'], 'USER_MACLABEL' => $user_maclabel);
if (isset($_GET['debug'])) {
    HTMLRenderer::render('xsl/test.xsl', $params, $params);
} else {
    HTMLRenderer::render('xsl/index.xsl', $params, $params);
}