Ejemplo n.º 1
0
 */
global $CFG;
require dirname(__FILE__) . '/lib/config-defaults.php';
require $CFG->dirroot . 'lib/elgglib.php';
require $CFG->dirroot . 'mod/gettext/lib.php';
global $db, $CFG;
$version = '0.9';
$messages = array();
$configs = array();
$config_ready = false;
// Prevent access on already running configuration
if (file_exists($CFG->dirroot . 'config.php') && config_check_db()) {
    $config_ready = true;
    $messages[] = __gettext('You have already configured Elgg and can safely remove the file <code>install.php</code> from your installation.');
}
config_init();
// workaround for backward compatibility
if (!function_exists('__gettext')) {
    function __gettext($s)
    {
        return $s;
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Elgg <?php 
echo $version;
?>
 <?php 
Ejemplo n.º 2
0
$site_data = array('name' => '', 'description' => '');
$user_data = array('username' => '', 'secretphrase' => '');
$success_msg = '';
if (isset($_POST['confignow'])) {
    unset($_POST['confignow']);
    //Separate the data
    //User Data
    $user_data['id'] = '1';
    $user_data['username'] = $_POST['username'];
    $user_data['secretphrase'] = create_hash($_POST['secretphrase']);
    //Unset user data from $_POST;
    foreach ($user_data as $key => $value) {
        unset($_POST[$key]);
    }
    //Create all the needed files and server configurations
    if (config_init($_POST) && rss_init($_POST) && admin_init($user_data)) {
        unset($user_data['secretphrase']);
        foreach ($_POST as $key => $value) {
            $site_data[$key] = $value;
        }
        $success_msg = '<div class="over-top-msg"><p>Please wait, Your blog is being configured.</p></div>';
        header('refresh:3;url=' . dirname($_SERVER['PHP_SELF']));
    }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>iGuana Blog | Initial Setup</title>
</head>
<body>