Beispiel #1
0
if (isset($_GET["key"]) && $_GET["key"] != "") {
    $_SESSION["core"] = "";
    if ($param[0] != '') {
        $_SESSION["core"] = $param[0];
    }
} else {
    if (isset($_POST["core"])) {
        $_SESSION["core"] = $_POST["core"];
    }
}
$configFilePath = $rootpath . "/../config/" . $config_file;
if (!file_exists($configFilePath)) {
    echo "Configuration file not found [" . $configFilePath . "]";
    exit;
}
$config = new ConfigTool();
$config->setConfigFromFile($configFilePath);
$config->setCookiePath("/");
$config->setCookieDomain($_SERVER['SERVER_NAME']);
$config->setCookieExpire(3600 * 10);
$debug = $config->get("application.debug") == "1";
$debug_file = $config->getDefault("application.logfile", "");
$cLog = new Logger($debug_file);
if ($debug) {
    $cLog->setDebug(true);
}
$cLog->log_debug("------ search2 ------");
$cLog->log_debug("config = " . $config_file);
$cLog->log_debug("key = " . $key);
// $user initialisation
//
<?php

session_start();
$strMaxLen = 30;
$debug = FALSE;
if (!empty($_GET['debug'])) {
    $debug = TRUE;
}
if (!$debug) {
    header('Content-type: text/json;');
}
include "../dbConnect.php";
$configFilename = '../config.inc.php';
$conf = new ConfigTool();
$conf->setConfigFromFile($configFilename);
if (!$conf->get('s_projectTitle')) {
    echo '<p><b>There was a problem with the config file.  Please contact an administrator.</b></p>';
    exit;
}
// current table
$table = trim($_POST['table']);
$curTablePkValue = trim($_POST['curTablePkValue']);
// relational table
$relTable = trim($_POST['relTable']);
$relTablePk = trim($_POST['relTablePk']);
$relTablePkValue = trim($_POST['relTablePkValue']);
// second table
$secTable = trim($_POST['secTable']);
$secTablePk = trim($_POST['secTablePk']);
$content = trim($_POST['content']);
// replaces secTablePkValue
Beispiel #3
0
            } else {
                $config_file = "config.ini";
            }
        }
    }
}
if (!isset($_SESSION["config"]) || $_SESSION["config"] != $config_file) {
    session_unset();
    $_SESSION["config"] = $config_file;
}
$configFilePath = $rootpath . "/config/" . $config_file;
if (!file_exists($configFilePath)) {
    echo "Configuration file not found [" . $configFilePath . "]";
    exit;
}
$config = new ConfigTool();
$config->setConfigFromFile($configFilePath);
$debug = $config->get("application.debug") == "1";
$debug_file = $config->getDefault("application.logfile", "");
$cLog = new Logger($debug_file);
if ($debug) {
    $cLog->setDebug(true);
}
$theme_name = $config->getDefault("application.theme_name", "ca");
//
// $user initialisation
//
if (isset($_SESSION["user"])) {
    $user = $_SESSION["user"];
} else {
    $user = new User();