Example #1
0
function update()
{
    $head = "";
    $html = "";
    $update_submit = "";
    $update_pages = "";
    if (!isset($_POST['update_cms'])) {
        $updates = testUpdate();
        if ($updates['conf'] !== "empty") {
            $html .= contend_template(getLanguageValue("install_update_conf_help"), $updates['conf']);
        }
        if ($updates['kategorien'] !== "empty") {
            $html .= contend_template(getLanguageValue("install_update_kategorien_help"), $updates['kategorien']);
        }
        if ($updates['galerien'] !== "empty") {
            $html .= contend_template(getLanguageValue("install_update_galerien_help"), $updates['galerien']);
        }
        if ($updates['plugins'] !== "empty") {
            $html .= contend_template(getLanguageValue("install_update_plugins_help"), $updates['plugins']);
        }
        if ($updates['layouts'] !== "empty") {
            $html .= contend_template(getLanguageValue("install_update_layouts_help"), $updates['layouts']);
        }
        if (strlen($html) > 1) {
            $head = contend_template(installHelp("install_update_help"), "");
            $update_button = false;
            foreach ($updates as $status) {
                if ($status === false) {
                    $update_button = false;
                    $head = contend_template(getLanguageValue("install_update_error"), false) . $head;
                    break;
                }
                if ($status === true) {
                    $update_button = true;
                }
            }
            if ($update_button === true) {
                if ($updates['kategorien'] === true) {
                    $update_pages = '<input type="checkbox" value="true" name="update_pages" id="update_pages"><label for="update_pages">' . getLanguageValue("install_update_files_in_pages") . '</label><br /><br />';
                }
                $update_submit = $update_pages . '<input type="submit" name="update_cms" value="' . getLanguageValue("install_update_buttom") . '" />';
                $update_submit = contend_template($update_submit, "");
            }
        } else {
            $head = contend_template(installHelp("install_update_no_help"), "");
        }
    } elseif (isset($_POST['update_cms'])) {
        makeUpdate();
        $head = contend_template(installHelp("install_update_successful"), true);
    }
    return array(true, $head . $html . $update_submit, true);
}
Example #2
0
    $LANG_TMP = $ADMIN_CONF->get('language');
}
$LANG = new Language(BASE_DIR_ADMIN . LANGUAGE_DIR_NAME . "/language_" . $LANG_TMP . ".txt");
if (is_file(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php') and isFileRW(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php')) {
    $CMS_CONF = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . '/main.conf.php');
    setTimeLocale($LANG);
}
session_start();
ini_set("default_charset", CHARSET);
header('content-type: text/html; charset=' . strtolower(CHARSET));
$steps = array("help", "language", "chmod_test", "environment", "rewrite", "password", "finish");
$html_check_update = '';
if (is_file("update.php")) {
    require_once "update.php";
    $steps = array("help", "language", "chmod_test", "environment", "rewrite", "password", "update", "finish");
    if (function_exists("testUpdate") and testUpdate(true)) {
        if (!isset($_POST['check_update'])) {
            $html_check_update = '<input type="hidden" name="check_update" value="true" />';
        }
        if (isset($_POST['check_update']) and $_POST['check_update'] == "true") {
            $html_check_update = '<input type="hidden" name="check_update" value="' . $_POST['check_update'] . '" />';
        }
    }
}
$current_step = $steps[0];
if (isset($_POST["current_step"]) and in_array($_POST["current_step"], $steps)) {
    $current_step = $_POST["current_step"];
}
if (isset($_POST["only"]) and $current_step == $steps[0]) {
    unset($_POST["only"], $_POST["finish_steps"]);
}
Example #3
0
<?php

/**
 * @package Database
 * @subpackage mysql
 * @ignore
 */
include 'autoload.php';
include '../sql/autoload.php';
testSelect();
testReplace();
testDelete();
testInsert();
testUpdate();
function testReplace()
{
    $query = new MysqlReplace();
    $query->replaceInto('foo');
    $query->values('foo, bar, baz');
    echo $query;
    echo PHP_EOL;
    $query->columns('asdf,qwer,zxvc');
    echo $query;
    echo PHP_EOL;
    $query = new MysqlReplace();
    $query->replaceInto('foo');
    $query->set('x = y, z = 2');
    $query->set('foo = bar');
    echo $query;
    echo PHP_EOL;
    $select = new MysqlSelect();