/**
 * PHP Grid Component
 *
 * @author Abu Ghufran <*****@*****.**> - http://www.phpgrid.org
 * @version 1.5.2 build 20140503-2240
 * @license: see license.txt included in package
 */
global $valid;
$valid['config'] = true;
$valid['connection'] = true;
$valid['dbready'] = true;
if (is_writeable('.')) {
    $valid['confwritable'] = true;
}
if (!empty($_POST)) {
    do_install();
    $ready = true;
    foreach ($valid as $key => $value) {
        if ($value === false) {
            $ready = false;
        }
    }
    if ($ready) {
        // delete from non-dev server
        if ($_SERVER["SERVER_ADDR"] != "127.0.0.1") {
            @unlink("install.php");
            @unlink("database.sql");
            @unlink("config.sample.php");
        }
        header("location: ./index.php");
        die;
Пример #2
0
    if (get_post('name') == '') {
        display_error(_('Company name cannot be empty.'));
        set_focus('name');
    } elseif (get_post('admin') == '') {
        display_error(_('Company admin name cannot be empty.'));
        set_focus('admin');
    } elseif (get_post('pass') == '') {
        display_error(_('Company admin password cannot be empty.'));
        set_focus('pass');
    } elseif (get_post('pass') != get_post('repass')) {
        display_error(_('Company admin passwords differ.'));
        unset($_POST['pass'], $_POST['repass']);
        set_focus('pass');
    } else {
        $_SESSION['inst_set'] = array_merge($_SESSION['inst_set'], array('coa' => $_POST['coa'], 'pass' => $_POST['pass'], 'name' => $_POST['name'], 'admin' => $_POST['admin']));
        if (do_install()) {
            $_POST['Page'] = 6;
        }
    }
}
if (list_updated('inst_lang')) {
    $_SESSION['inst_set']['inst_lang'] = get_post('inst_lang');
    $Ajax->setEncoding($inst_langs[get_post('inst_lang')]['encoding']);
    $Ajax->activate('welcome');
}
start_form();
switch (@$_POST['Page']) {
    default:
        //			include ('../install.html');
        //			submit_center('continue', _('Continue >>'));
        //			break;
Пример #3
0
    if (empty($mysql)) {
        create_tables();
        configure_plogger($_SESSION["install_values"]);
        require "plog-load_config.php";
        connect_db();
        $col = add_collection("Plogger test collection", "feel free to delete it");
        $alb = add_album("Plogger test album", "feel free to delete it", $col["id"]);
        unset($_SESSION["plogger_config"]);
        unset($_SESSION["install_values"]);
        header("Location: admin/index.php");
        exit;
    }
}
?>
<html>
	<head>
		<title>Install Plogger</title>
		<link rel="stylesheet" type="text/css" href="css/admin.css">
	</head>
	<body>
		<img src="graphics/plogger.gif" alt="Plogger">
<?php 
if (empty($_POST['proceed'])) {
    do_install($_POST);
} else {
    require PLOGGER_DIR . 'lib/plogger/form_setup_complete.php';
}
?>
</body>
</html>
Пример #4
0
	<meta http-equiv="Content-Type" content="txt/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="css/admin.css" />
</head>

<body>

<div><img src="images/plogger.gif" alt="Plogger" /></div>

<?php 
// Check if Plogger is already installed
$installed = is_plogger_installed();
// If not installed, do the installation
if (!$installed) {
    // If not told to proceed, do the configuration setup
    if (empty($_POST['proceed'])) {
        $configured = do_install($_POST);
    }
    // If setup configuration done, do the install
    if (isset($_POST['proceed']) || $configured) {
        // If not DB information not defined, prompt the user to download the plog-config.php file
        if (!defined('PLOGGER_DB_HOST')) {
            echo "\n\t" . '<h1>' . plog_tr('Plogger Configuration Complete') . '</h1>';
            echo "\n\n\t" . '<form action="_install.php" method="post">';
            echo "\n\n\t\t" . '<p>' . plog_tr('Configuration setup is now complete.') . '</p>';
            echo "\n\n\t\t" . '<p>' . plog_tr('Click <strong>Install</strong> to complete the installation.') . '</p>';
            if (!empty($_SESSION['plogger_config'])) {
                echo "\n\n\t\t" . '<p>' . sprintf(plog_tr('Before you can proceed, please %s to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).'), '<input type="submit" class="submit-inline" name="dlconfig" value="' . plog_tr('click here') . '" />') . '</p>';
            }
            echo "\n\n\t\t" . '<p><input type="submit" class="submit" name="proceed" id="proceed" value="' . plog_tr('Install') . '" /></p>';
            echo "\n\n\t" . '</form>' . "\n";
            // Otherwise, do the install
Пример #5
0
$GO_SECURITY->authenticate(true);
require $GO_LANGUAGE->get_base_language_file('modules');
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$return_to = $GO_CONFIG->host . 'administrator/';
$link_back = $_SERVER['PHP_SELF'];
require_once $GO_CONFIG->class_path . 'filesystem.class.inc';
$fs = new filesystem();
$fs->root = '';
$page_title = $menu_modules;
$overlib = new overlib();
$GO_HEADER['head'] = $overlib->get_header();
require $GO_THEME->theme_path . "header.inc";
switch ($task) {
    case 'process':
        if (isset($_REQUEST['install']) && is_array($_REQUEST['install'])) {
            do_install($_REQUEST['install']);
        }
        if (isset($_REQUEST['uninstall']) && is_array($_REQUEST['uninstall'])) {
            do_uninstall($_REQUEST['uninstall']);
        }
        if (isset($_REQUEST['enable']) && is_array($_REQUEST['enable'])) {
            update_enable($_REQUEST['enable']);
        } else {
            update_enable(array());
        }
        break;
    case 'install':
        $module_id = $_POST['module_id'];
        $acl_read = $GO_SECURITY->get_new_acl('Module read: ' . $module_id, 0);
        $acl_write = $GO_SECURITY->get_new_acl('Module write: ' . $module_id, 0);
        if ($acl_read > 0 && $acl_write > 0) {