Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Binary file images/about-powered-pgsql.png has changed
--- a/images/enano-artwork/README Thu Jan 03 18:39:19 2008 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-The images in this directory are copyright (C) 2007 Dan Fuhry. Except
-as permitted by applicable law, they may not be used in any way other
-than to promote the unmodified Enano CMS. You also may not modify and
-then distribute the images in this directory, or distribute them sep-
-arately from the Enano packages. The goal here is to establish a uni-
-que identity for Enano through the use of a logo, and that identity
-would be confused if this logo is used for unofficial Enano distros.
-
Binary file images/enano-artwork/installer-greeting-blue.png has changed
Binary file images/enano-artwork/installer-greeting-green.png has changed
--- a/includes/clientside/static/editor.js Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/clientside/static/editor.js Wed Jan 16 13:55:49 2008 -0500
@@ -33,7 +33,7 @@
{
if ( typeof(tinyMCE) == 'object' )
{
- if ( !KILL_SWITCH )
+ if ( !KILL_SWITCH && !DISABLE_MCE )
{
tinyMCE.init(enano_tinymce_options);
}
--- a/includes/clientside/static/enano-lib-basic.js Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/clientside/static/enano-lib-basic.js Wed Jan 16 13:55:49 2008 -0500
@@ -63,6 +63,11 @@
// dummy tinyMCE object
var tinyMCE = new Object();
+if ( typeof(DISABLE_MCE) == undefined )
+{
+ var DISABLE_MCE = false;
+}
+
// Obsolete JSON kill switch
function disableJSONExts() { };
@@ -251,7 +256,7 @@
}
var head = document.getElementsByTagName('head')[0];
-if ( !KILL_SWITCH )
+if ( !KILL_SWITCH && !DISABLE_MCE )
{
var script = document.createElement('script');
script.type="text/javascript";
--- a/includes/clientside/static/misc.js Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/clientside/static/misc.js Wed Jan 16 13:55:49 2008 -0500
@@ -565,32 +565,8 @@
disableJSONExts();
- //
- // Encryption test
- //
+ var auth_enabled = aes_self_test();
- var str = '';
- for(i=0;i<keySizeInBits/4;i++)
- {
- str+='0';
- }
- str = hexToByteArray(str);
- var ct = rijndaelEncrypt(str, str, 'ECB');
- ct = byteArrayToHex(ct);
- var v;
- switch(keySizeInBits)
- {
- case 128:
- v = '66e94bd4ef8a2c3b884cfa59ca342b2e';
- break;
- case 192:
- v = 'aae06992acbf52a3e8f4a96ec9300bd7aae06992acbf52a3e8f4a96ec9300bd7';
- break;
- case 256:
- v = 'dc95c078a2408989ad48a21492842087dc95c078a2408989ad48a21492842087';
- break;
- }
- auth_enabled = ( ct == v && md5_vm_test() );
if ( !auth_enabled )
{
alert('Login error: encryption sanity check failed\n');
@@ -796,6 +772,18 @@
}
/**
+ * Validates a username.
+ * @param string Username to test
+ * @return bool
+ */
+
+function validateUsername(username)
+{
+ var regex = new RegExp('^[^<>&\?\'"%\n\r/]+$', '');
+ return ( username.match(regex) ) ? true : false;
+}
+
+/**
* Equivalent of PHP's time()
* @return int
*/
--- a/includes/clientside/static/rijndael.js Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/clientside/static/rijndael.js Wed Jan 16 13:55:49 2008 -0500
@@ -577,3 +577,34 @@
return result;
}
+function aes_self_test()
+{
+ //
+ // Encryption test
+ //
+
+ var str = '';
+ for(i=0;i<keySizeInBits/4;i++)
+ {
+ str+='0';
+ }
+ str = hexToByteArray(str);
+ var ct = rijndaelEncrypt(str, str, 'ECB');
+ ct = byteArrayToHex(ct);
+ var v;
+ switch(keySizeInBits)
+ {
+ // These test vectors are for 128-bit block size.
+ case 128:
+ v = '66e94bd4ef8a2c3b884cfa59ca342b2e';
+ break;
+ case 192:
+ v = 'aae06992acbf52a3e8f4a96ec9300bd7aae06992acbf52a3e8f4a96ec9300bd7';
+ break;
+ case 256:
+ v = 'dc95c078a2408989ad48a21492842087dc95c078a2408989ad48a21492842087';
+ break;
+ }
+ return ( ct == v && md5_vm_test() );
+}
+
--- a/includes/common.php Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/common.php Wed Jan 16 13:55:49 2008 -0500
@@ -85,12 +85,6 @@
if ( !defined('ENANO_ROOT') )
define('ENANO_ROOT', dirname(dirname($filename)));
-// Debugging features are PHP5-specifid
-if ( defined('ENANO_DEBUG') && version_compare(PHP_VERSION, '5.0.0') < 0 )
-{
- die(__FILE__.':'.__LINE__.': The debugConsole requires PHP 5.x.x or greater. Please comment out the ENANO_DEBUG constant in your index.php.');
-}
-
// We deprecated debugConsole in 1.0.2 because it was never used and there were a lot of unneeded debugging points in the code.
// _nightly.php is used to tag non-Mercurial-generated nightly builds
@@ -185,7 +179,7 @@
unset($_COOKIE['sid']);
setcookie('sid', '', time()-3600*24, scriptPath);
setcookie('sid', '', time()-3600*24, scriptPath.'/');
- die('Session cookie cleared. <a href="'.$_SERVER['PHP_SELF'].'">Continue</a>');
+ die('Session cookie cleared. <a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'">Continue</a>');
break;
}
}
@@ -209,7 +203,7 @@
$db->free_result();
// Now that we have the config, check the Enano version.
-if ( enano_version(false, true) != $version )
+if ( enano_version(false, true) != $version && !defined('IN_ENANO_UPGRADE') )
{
grinding_halt('Version mismatch', '<p>It seems that the Enano release we\'re trying to run ('.$version.') is different from the version specified in your database ('.enano_version().'). Perhaps you need to <a href="'.scriptPath.'/upgrade.php">upgrade</a>?</p>');
}
@@ -283,7 +277,6 @@
table_prefix.'privmsgs',
table_prefix.'sidebar',
table_prefix.'hits',
- table_prefix.'search_index',
table_prefix.'groups',
table_prefix.'group_members',
table_prefix.'acl',
@@ -350,7 +343,10 @@
// All checks passed! Start the main components up.
$session->start();
- // This is where plugins will want to add pages from 1.1.x on out. You can still add pages at base_classes_initted but the titles won't be localized.
+ // This is where plugins will want to add pages from 1.1.x on out. You can still add
+ // pages at base_classes_initted but the titles won't be localized. This is because
+ // the session manager has to be started before localization will work in the user's
+ // preferred language.
$code = $plugins->setHook('session_started');
foreach ( $code as $cmd )
{
--- a/includes/constants.php Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/constants.php Wed Jan 16 13:55:49 2008 -0500
@@ -137,6 +137,8 @@
// define('AES_BLOCKSIZE', AES_BITS);
// }
+// You probably don't want to change the block size because it will cause the Javascript test vectors to fail. Changing it doesn't
+// significantly increase encryption strength either.
define('AES_BLOCKSIZE', 128);
/*
--- a/includes/dbal.php Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/dbal.php Wed Jan 16 13:55:49 2008 -0500
@@ -163,14 +163,14 @@
define('scriptPath', $sp);
define('contentPath', "$sp/index.php?title=");
}
- $loc = scriptPath . '/install.php';
+ $loc = scriptPath . '/install/index.php';
define('IN_ENANO_INSTALL', 1);
$GLOBALS['lang'] = new Language('eng');
global $lang;
- $lang->load_file('./language/english/enano.json');
+ $lang->load_file('./language/english/core.json');
$lang->load_file('./language/english/install.json');
// header("Location: $loc");
- redirect($loc, 'Enano not installed', 'We can\'t seem to find an Enano installation (valid config file). You will be transferred to the installation wizard momentarily...', 3);
+ redirect($loc, 'Enano not installed', 'We can\'t seem to find an Enano installation (valid config file). You will be transferred to the installation wizard momentarily...', 0);
exit;
}
}
@@ -179,10 +179,14 @@
unset($dbuser);
unset($dbpasswd); // Security
- if ( !$this->_conn )
+ if ( !$this->_conn && !$manual_credentials )
{
grinding_halt('Enano is having a problem', '<p>Error: couldn\'t connect to MySQL.<br />'.mysql_error().'</p>');
}
+ else if ( !$this->_conn && $manual_credentials )
+ {
+ return false;
+ }
// Reset some variables
$this->query_backtrace = array();
@@ -677,14 +681,7 @@
function sql_error()
{
- if ( $this->_conn )
- {
- return mysql_error();
- }
- else
- {
- return array();
- }
+ return mysql_error();
}
function sql_escape_string($t)
{
@@ -865,7 +862,7 @@
}
function get_error($t = '') {
- header('HTTP/1.1 500 Internal Server Error');
+ @header('HTTP/1.1 500 Internal Server Error');
$bt = $this->sql_backtrace();
$e = htmlspecialchars(pg_last_error());
if($e=='') $e='<none>';
@@ -933,10 +930,14 @@
unset($dbuser);
unset($dbpasswd); // Security
- if ( !$this->_conn )
+ if ( !$this->_conn && !$manual_credentials )
{
grinding_halt('Enano is having a problem', '<p>Error: couldn\'t connect to PostgreSQL.<br />'.pg_last_error().'</p>');
}
+ else if ( !$this->_conn && $manual_credentials )
+ {
+ return false;
+ }
// Reset some variables
$this->query_backtrace = array();
@@ -1425,11 +1426,11 @@
{
if ( $this->_conn )
{
- return mysql_error();
+ return pg_last_error();
}
else
{
- return array();
+ return ( defined('IN_ENANO_INSTALL') ) ? $GLOBALS["lang"]->get('dbpgsql_msg_err_auth') : 'Access to the database was denied. Ensure that your database exists and that your username and password are correct.';
}
}
function sql_escape_string($t)
--- a/includes/lang.php Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/lang.php Wed Jan 16 13:55:49 2008 -0500
@@ -185,7 +185,16 @@
global $db, $session, $paths, $template, $plugins; // Common objects
if ( !file_exists($file) )
- $db->_die('lang.php - requested JSON file doesn\'t exist');
+ {
+ if ( defined('IN_ENANO_INSTALL') )
+ {
+ die('lang.php - requested JSON file (' . htmlspecialchars($file) . ') doesn\'t exist');
+ }
+ else
+ {
+ $db->_die('lang.php - requested JSON file doesn\'t exist');
+ }
+ }
$contents = trim(@file_get_contents($file));
if ( empty($contents) )
@@ -206,7 +215,29 @@
}
else
{
- $langdata = enano_json_decode($contents);
+ // Correct syntax to be nice to the json parser
+
+ // eliminate comments
+ $contents = preg_replace(array(
+ // eliminate single line comments in '// ...' form
+ '#^\s*//(.+)$#m',
+ // eliminate multi-line comments in '/* ... */' form, at start of string
+ '#^\s*/\*(.+)\*/#Us',
+ // eliminate multi-line comments in '/* ... */' form, at end of string
+ '#/\*(.+)\*/\s*$#Us'
+ ), '', $contents);
+
+ $contents = preg_replace('/([,\{\[])([\s]*?)([a-z0-9_]+)([\s]*?):/', '\\1\\2"\\3" :', $contents);
+
+ try
+ {
+ $langdata = enano_json_decode($contents);
+ }
+ catch(Zend_Json_Exception $e)
+ {
+ $db->_die('lang.php - Exception caught by JSON parser</p><pre>' . htmlspecialchars(print_r($e, true)) . '</pre><p>');
+ exit;
+ }
if ( !is_array($langdata) )
$db->_die('lang.php - invalid language file');
--- a/includes/rijndael.php Thu Jan 03 18:39:19 2008 -0500
+++ b/includes/rijndael.php Wed Jan 16 13:55:49 2008 -0500
@@ -126,7 +126,7 @@
$this->debug = $debug;
}
- function singleton($key_size, $block_size)
+ public static function singleton($key_size, $block_size)
{
global $_aes_objcache;
if ( isset($_aes_objcache["$key_size,$block_size"]) )
--- a/install.php Thu Jan 03 18:39:19 2008 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2470 +0,0 @@
-<?php
-
-/*
- * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.1.1
- * Copyright (C) 2006-2007 Dan Fuhry
- * install.php - handles everything related to installation and initial configuration
- *
- * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- */
-
-@include('config.php');
-if( ( defined('ENANO_INSTALLED') || defined('MIDGET_INSTALLED') ) && ((isset($_GET['mode']) && ($_GET['mode']!='finish' && $_GET['mode']!='css') && $_GET['mode']!='showlicense') || !isset($_GET['mode'])))
-{
- $_GET['title'] = 'Enano:Installation_locked';
- require('includes/common.php');
- die_friendly('Installation locked', '<p>The Enano installer has found a Enano installation in this directory. You MUST delete config.php if you want to re-install Enano.</p><p>If you wish to upgrade an older Enano installation to this version, please use the <a href="upgrade.php">upgrade script</a>.</p>');
- exit;
-}
-
-define('IN_ENANO_INSTALL', 'true');
-
-define('ENANO_VERSION', '1.1.1');
-define('ENANO_CODE_NAME', 'Germination');
-// In beta versions, define ENANO_BETA_VERSION here
-
-// This is required to make installation work right
-define("ENANO_ALLOW_LOAD_NOLANG", 1);
-
-if(!defined('scriptPath')) {
- $sp = dirname($_SERVER['REQUEST_URI']);
- if($sp == '/' || $sp == '\\') $sp = '';
- define('scriptPath', $sp);
-}
-
-if(!defined('contentPath')) {
- $sp = dirname($_SERVER['REQUEST_URI']);
- if($sp == '/' || $sp == '\\') $sp = '';
- define('contentPath', $sp);
-}
-global $_starttime, $this_page, $sideinfo;
-$_starttime = microtime(true);
-
-global $db;
-
-// Determine directory (special case for development servers)
-if ( strpos(__FILE__, '/repo/') && file_exists('.enanodev') )
-{
- $filename = str_replace('/repo/', '/', __FILE__);
-}
-else
-{
- $filename = __FILE__;
-}
-
-define('ENANO_ROOT', dirname($filename));
-
-function is_page($p)
-{
- return true;
-}
-
-function microtime_float()
-{
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-
-require('includes/wikiformat.php');
-require('includes/constants.php');
-require('includes/rijndael.php');
-require('includes/functions.php');
-require('includes/dbal.php');
-require('includes/lang.php');
-require('includes/json.php');
-
-// Initialize language support
-$lang = new Language('eng');
-$lang->load_file('./language/english/install.json');
-
-strip_magic_quotes_gpc();
-
-//
-// INSTALLER LIBRARY
-//
-
-$neutral_color = 'C';
-
-function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
-{
- static $resumed = false;
- static $resume_stack = array();
-
- if ( empty($resume_stack) && isset($_POST['resume_stack']) && preg_match('/[a-z_]+((\|[a-z_]+)+)/', $_POST['resume_stack']) )
- {
- $resume_stack = explode('|', $_POST['resume_stack']);
- }
-
- $already_run = false;
- if ( in_array($stage_id, $resume_stack) )
- {
- $already_run = true;
- }
-
- if ( !$resumed )
- {
- if ( !isset($_GET['stage']) )
- $resumed = true;
- if ( isset($_GET['stage']) && $_GET['stage'] == $stage_id )
- {
- $resumed = true;
- }
- }
- if ( !$resumed && $allow_skip )
- {
- echo_stage_success($stage_id, $stage_name);
- return false;
- }
- if ( !function_exists($function) )
- die('libenanoinstall: CRITICAL: function "' . $function . '" for ' . $stage_id . ' doesn\'t exist');
- $result = @call_user_func($function, false, $already_run);
- if ( $result )
- {
- echo_stage_success($stage_id, $stage_name);
- $resume_stack[] = $stage_id;
- return true;
- }
- else
- {
- echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack);
- return false;
- }
-}
-
-function start_install_table()
-{
- echo '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">' . "\n";
- ob_start();
-}
-
-function close_install_table()
-{
- echo '</table>' . "\n\n";
- ob_end_flush();
-}
-
-function echo_stage_success($stage_id, $stage_name)
-{
- global $neutral_color;
- $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
- echo '<tr><td style="width: 500px; background-color: #' . "{$neutral_color}{$neutral_color}FF{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Done" src="images/good.gif" /></td></tr>' . "\n";
- ob_flush();
-}
-
-function echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack)
-{
- global $neutral_color;
- global $lang;
-
- $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
- echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="images/bad.gif" /></td></tr>' . "\n";
- ob_flush();
- close_install_table();
- $post_data = '';
- $mysql_error = mysql_error();
- foreach ( $_POST as $key => $value )
- {
- // FIXME: These should really also be sanitized for double quotes
- $value = htmlspecialchars($value);
- $key = htmlspecialchars($key);
- $post_data .= " <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
- }
- echo '<form action="install.php?mode=install&stage=' . $stage_id . '" method="post">
- ' . $post_data . '
- <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
- <h3>' . $lang->get('meta_msg_err_stagefailed_title') . '</h3>
- <p>' . $failure_explanation . '</p>
- ' . ( !empty($mysql_error) ? "<p>" . $lang->get('meta_msg_err_stagefailed_mysqlerror') . " $mysql_error</p>" : '' ) . '
- <p>' . $lang->get('meta_msg_err_stagefailed_body') . '</p>
- <p style="text-align: center;"><input type="submit" value="' . $lang->get('meta_btn_retry_installation') . '" /></p>
- </form>';
- global $template, $template_bak;
- if ( is_object($template_bak) )
- $template_bak->footer();
- else
- $template->footer();
- exit;
-}
-
-//
-// INSTALLER STAGES
-//
-
-function stg_mysql_connect($act_get = false)
-{
- global $db;
- $db = new mysql();
-
- static $conn = false;
- if ( $act_get )
- return $conn;
-
- $db_user =& $_POST['db_user'];
- $db_pass =& $_POST['db_pass'];
- $db_name =& $_POST['db_name'];
-
- if ( !preg_match('/^[a-z0-9_-]+$/', $db_name) )
- {
- $db_name = htmlspecialchars($db_name);
- die("<p>SECURITY: malformed database name \"$db_name\"</p>");
- }
-
- // First, try to connect using the normal credentials
- $conn = @mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
- if ( !$conn )
- {
- // Connection failed. Do we have the root username and password?
- if ( !empty($_POST['db_root_user']) && !empty($_POST['db_root_pass']) )
- {
- $conn_root = @mysql_connect($_POST['db_host'], $_POST['db_root_user'], $_POST['db_root_pass']);
- if ( !$conn_root )
- {
- // Couldn't connect using either set of credentials. Bail out.
- return false;
- }
- unset($db_user, $db_pass);
- $db_user = mysql_real_escape_string($_POST['db_user']);
- $db_pass = mysql_real_escape_string($_POST['db_pass']);
- // Create the user account
- $q = @mysql_query("GRANT ALL PRIVILEGES ON test.* TO '{$db_user}'@'localhost' IDENTIFIED BY '$db_pass' WITH GRANT OPTION;", $conn_root);
- if ( !$q )
- {
- return false;
- }
- // Revoke privileges from test, we don't need them
- $q = @mysql_query("REVOKE ALL PRIVILEGES ON test.* FROM '{$db_user}'@'localhost';", $conn_root);
- if ( !$q )
- {
- return false;
- }
- if ( $_POST['db_host'] != 'localhost' && $_POST['db_host'] != '127.0.0.1' && $_POST['db_host'] != '::1' )
- {
- // If not connecting to a server running on localhost, allow from any host
- // this is safer than trying to detect the hostname of the webserver, but less secure
- $q = @mysql_query("GRANT ALL PRIVILEGES ON test.* TO '{$db_user}'@'%' IDENTIFIED BY '$db_pass' WITH GRANT OPTION;", $conn_root);
- if ( !$q )
- {
- return false;
- }
- // Revoke privileges from test, we don't need them
- $q = @mysql_query("REVOKE ALL PRIVILEGES ON test.* FROM '{$db_user}'@'%';", $conn_root);
- if ( !$q )
- {
- return false;
- }
- }
- mysql_close($conn_root);
- $conn = @mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
- if ( !$conn )
- {
- // This should honestly never happen.
- return false;
- }
- }
- }
- $q = @mysql_query("USE `$db_name`;", $conn);
- if ( !$q )
- {
- // access denied to the database; try the whole root schenanegan again
- if ( !empty($_POST['db_root_user']) && !empty($_POST['db_root_pass']) )
- {
- $conn_root = @mysql_connect($_POST['db_host'], $_POST['db_root_user'], $_POST['db_root_pass']);
- if ( !$conn_root )
- {
- // Couldn't connect as root; bail out
- return false;
- }
- // create the database, if it doesn't exist
- $q = @mysql_query("CREATE DATABASE IF NOT EXISTS `$db_name`;", $conn_root);
- if ( !$q )
- {
- // this really should never fail, so don't give any tolerance to it
- return false;
- }
- unset($db_user, $db_pass);
- $db_user = mysql_real_escape_string($_POST['db_user']);
- $db_pass = mysql_real_escape_string($_POST['db_pass']);
- // we're in with root rights; grant access to the database
- $q = @mysql_query("GRANT ALL PRIVILEGES ON `$db_name`.* TO '{$db_user}'@'localhost';", $conn_root);
- if ( !$q )
- {
- return false;
- }
- if ( $_POST['db_host'] != 'localhost' && $_POST['db_host'] != '127.0.0.1' && $_POST['db_host'] != '::1' )
- {
- $q = @mysql_query("GRANT ALL PRIVILEGES ON `$db_name`.* TO '{$db_user}'@'%';", $conn_root);
- if ( !$q )
- {
- return false;
- }
- }
- mysql_close($conn_root);
- // grant tables have hopefully been flushed, kill and reconnect our regular user connection
- mysql_close($conn);
- $conn = @mysql_connect($_POST['db_host'], $_POST['db_user'], $_POST['db_pass']);
- if ( !$conn )
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- // try again
- $q = @mysql_query("USE `$db_name`;", $conn);
- if ( !$q )
- {
- // really failed this time; bail out
- return false;
- }
- }
- // initialize DBAL
- $db->connect(true, $_POST['db_host'], $db_user, $db_pass, $db_name);
- // connected and database exists
- return true;
-}
-
-function stg_pgsql_connect($act_get = false)
-{
- global $db;
- $db = new postgresql();
-
- static $conn = false;
- if ( $act_get )
- return $conn;
-
- $db_user =& $_POST['db_user'];
- $db_pass =& $_POST['db_pass'];
- $db_name =& $_POST['db_name'];
-
- if ( !preg_match('/^[a-z0-9_-]+$/', $db_name) )
- {
- $db_name = htmlspecialchars($db_name);
- die("<p>SECURITY: malformed database name \"$db_name\"</p>");
- }
-
- // First, try to connect using the normal credentials
- $conn = @pg_connect("host={$_POST['db_host']} port=5432 user={$_POST['db_user']} password={$_POST['db_pass']}");
- if ( !$conn )
- {
- // Connection failed. Do we have the root username and password?
- if ( !empty($_POST['db_root_user']) && !empty($_POST['db_root_pass']) )
- {
- $conn_root = @pg_connect("host={$_POST['db_host']} port=5432 user={$_POST['db_root_user']} password={$_POST['db_root_pass']}");
- if ( !$conn_root )
- {
- // Couldn't connect using either set of credentials. Bail out.
- return false;
- }
- unset($db_user, $db_pass);
- $db_user = pg_escape_string($_POST['db_user']);
- $db_pass = pg_escape_string($_POST['db_pass']);
- // Create the user account
- $q = @pg_query("CREATE ROLE '$db_user' WITH NOSUPERUSER UNENCRYPTED PASSWORD '$db_pass';", $conn_root);
- if ( !$q )
- {
- return false;
- }
- pg_close($conn_root);
- $conn = @pg_connect("host={$_POST['db_host']} port=5432 user={$_POST['db_user']} password={$_POST['db_pass']}");
- if ( !$conn )
- {
- // This should honestly never happen.
- return false;
- }
- }
- }
- if ( !$q )
- {
- // access denied to the database; try the whole root schenanegan again
- if ( !empty($_POST['db_root_user']) && !empty($_POST['db_root_pass']) )
- {
- $conn_root = @pg_connect("host={$_POST['db_host']} port=5432 user={$_POST['db_root_user']} password={$_POST['db_root_pass']}");
- if ( !$conn_root )
- {
- // Couldn't connect as root; bail out
- return false;
- }
- unset($db_user, $db_pass);
- $db_user = pg_escape_string($_POST['db_user']);
- $db_pass = pg_escape_string($_POST['db_pass']);
- // create the database, if it doesn't exist
- $q = @mysql_query("CREATE DATABASE $db_name WITH OWNER $db_user;", $conn_root);
- if ( !$q )
- {
- // this really should never fail, so don't give any tolerance to it
- return false;
- }
- // Setting the owner to $db_user should grant all the rights we need
- pg_close($conn_root);
- // grant tables have hopefully been flushed, kill and reconnect our regular user connection
- pg_close($conn);
- $conn = @pg_connect("host={$_POST['db_host']} port=5432 user={$_POST['db_user']} password={$_POST['db_pass']}");
- if ( !$conn )
- {
- return false;
- }
- }
- else
- {
- return false;
- }
- // try again
- $q = @mysql_query("USE `$db_name`;", $conn);
- if ( !$q )
- {
- // really failed this time; bail out
- return false;
- }
- }
- // initialize DBAL
- $db->connect(true, $_POST['db_host'], $db_user, $db_pass, $db_name);
- // connected and database exists
- return true;
-}
-
-function stg_drop_tables()
-{
- global $db;
- // Our list of tables included in Enano
- $tables = Array( 'categories', 'comments', 'config', 'logs', 'page_text', 'session_keys', 'pages', 'users', 'users_extra', 'themes', 'buddies', 'banlist', 'files', 'privmsgs', 'sidebar', 'hits', 'search_index', 'groups', 'group_members', 'acl', 'tags', 'page_groups', 'page_group_members' );
-
- // Drop each table individually; if it fails, it probably means we're trying to drop a
- // table that didn't exist in the Enano version we're deleting the database for.
- foreach ( $tables as $table )
- {
- // Remember that table_prefix is sanitized.
- $table = "{$_POST['table_prefix']}$table";
- $db->sql_query("DROP TABLE $table;", $conn);
- }
- return true;
-}
-
-function stg_decrypt_admin_pass($act_get = false)
-{
- static $decrypted_pass = false;
- if ( $act_get )
- return $decrypted_pass;
-
- $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
-
- if ( !empty($_POST['crypt_data']) )
- {
- require('config.new.php');
- if ( !isset($cryptkey) )
- {
- return false;
- }
- define('_INSTRESUME_AES_KEYBACKUP', $key);
- $key = hexdecode($cryptkey);
-
- $decrypted_pass = $aes->decrypt($_POST['crypt_data'], $key, ENC_HEX);
-
- }
- else
- {
- $decrypted_pass = $_POST['admin_pass'];
- }
- if ( empty($decrypted_pass) )
- return false;
- return true;
-}
-
-function stg_generate_aes_key($act_get = false)
-{
- static $key = false;
- if ( $act_get )
- return $key;
-
- $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
- $key = $aes->gen_readymade_key();
- return true;
-}
-
-function stg_parse_schema($act_get = false)
-{
- static $schema;
- if ( $act_get )
- return $schema;
-
- global $db;
-
- $admin_pass = stg_decrypt_admin_pass(true);
- $key = stg_generate_aes_key(true);
- $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
- $key = $aes->hextostring($key);
- $admin_pass = $aes->encrypt($admin_pass, $key, ENC_HEX);
-
- $cacheonoff = is_writable(ENANO_ROOT.'/cache/') ? '1' : '0';
-
- $admin_user = $_POST['admin_user'];
- $admin_user = str_replace('_', ' ', $admin_user);
- $admin_user = $db->escape($admin_user);
-
- switch ( $_POST['db_driver'] )
- {
- case 'mysql':
- $schema_file = 'schema.sql';
- break;
- case 'postgresql':
- $schema_file = 'schema-pg.sql';
- break;
- }
-
- if ( !isset($schema_file) )
- die('insanity');
-
- $schema = file_get_contents($schema_file);
- $schema = str_replace('{{SITE_NAME}}', $db->escape($_POST['sitename'] ), $schema);
- $schema = str_replace('{{SITE_DESC}}', $db->escape($_POST['sitedesc'] ), $schema);
- $schema = str_replace('{{COPYRIGHT}}', $db->escape($_POST['copyright'] ), $schema);
- $schema = str_replace('{{ADMIN_USER}}', $admin_user , $schema);
- $schema = str_replace('{{ADMIN_PASS}}', $db->escape($admin_pass ), $schema);
- $schema = str_replace('{{ADMIN_EMAIL}}', $db->escape($_POST['admin_email']), $schema);
- $schema = str_replace('{{ENABLE_CACHE}}', $db->escape($cacheonoff ), $schema);
- $schema = str_replace('{{REAL_NAME}}', '', $schema);
- $schema = str_replace('{{TABLE_PREFIX}}', $_POST['table_prefix'], $schema);
- $schema = str_replace('{{VERSION}}', ENANO_VERSION, $schema);
- $schema = str_replace('{{ADMIN_EMBED_PHP}}', $_POST['admin_embed_php'], $schema);
- // Not anymore!! :-D
- // $schema = str_replace('{{BETA_VERSION}}', ENANO_BETA_VERSION, $schema);
-
- if(isset($_POST['wiki_mode']))
- {
- $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
- }
- else
- {
- $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
- }
-
- // Build an array of queries
- $schema = explode("\n", $schema);
-
- foreach ( $schema as $i => $sql )
- {
- $query =& $schema[$i];
- $t = trim($query);
- if ( empty($t) || preg_match('/^(\#|--)/i', $t) )
- {
- unset($schema[$i]);
- unset($query);
- }
- }
-
- $schema = array_values($schema);
- $schema = implode("\n", $schema);
- $schema = explode(";\n", $schema);
-
- foreach ( $schema as $i => $sql )
- {
- $query =& $schema[$i];
- if ( substr($query, ( strlen($query) - 1 ), 1 ) != ';' )
- {
- $query .= ';';
- }
- }
-
- return true;
-}
-
-function stg_install($_unused, $already_run)
-{
- // This one's pretty easy.
- $conn = stg_mysql_connect(true);
- if ( !is_resource($conn) )
- return false;
- $schema = stg_parse_schema(true);
- if ( !is_array($schema) )
- return false;
-
- // If we're resuming installation, the encryption key was regenerated.
- // This means we'll have to update the encrypted password in the database.
- if ( $already_run )
- {
- $admin_pass = stg_decrypt_admin_pass(true);
- $key = stg_generate_aes_key(true);
- $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
- $key = $aes->hextostring($key);
- $admin_pass = $aes->encrypt($admin_pass, $key, ENC_HEX);
- $admin_user = mysql_real_escape_string($_POST['admin_user']);
- $admin_user = str_replace('_', ' ', $admin_user);
-
- $q = @mysql_query("UPDATE {$_POST['table_prefix']}users SET password='$admin_pass' WHERE username='$admin_user';");
- if ( !$q )
- {
- echo '<p><tt>MySQL return: ' . mysql_error() . '</tt></p>';
- return false;
- }
-
- return true;
- }
-
- // OK, do the loop, baby!!!
- foreach($schema as $q)
- {
- $r = mysql_query($q, $conn);
- if ( !$r )
- {
- echo '<p><tt>MySQL return: ' . mysql_error() . '</tt></p>';
- return false;
- }
- }
-
- return true;
-}
-
-function stg_write_config()
-{
- $privkey = stg_generate_aes_key(true);
-
- switch($_POST['urlscheme'])
- {
- case "ugly":
- default:
- $cp = scriptPath.'/index.php?title=';
- break;
- case "short":
- $cp = scriptPath.'/index.php/';
- break;
- case "tiny":
- $cp = scriptPath.'/';
- break;
- }
-
- if ( $_POST['urlscheme'] == 'tiny' )
- {
- $contents = '# Begin Enano rules
-RewriteEngine on
-RewriteCond %{REQUEST_FILENAME} !-d
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.+) '.scriptPath.'/index.php?title=$1 [L,QSA]
-RewriteRule \.(php|html|gif|jpg|png|css|js)$ - [L]
-# End Enano rules
-';
- if ( file_exists('./.htaccess') )
- $ht = fopen(ENANO_ROOT.'/.htaccess', 'a+');
- else
- $ht = fopen(ENANO_ROOT.'/.htaccess.new', 'w');
- if ( !$ht )
- return false;
- fwrite($ht, $contents);
- fclose($ht);
- }
-
- $config_file = '<?php
-/* Enano auto-generated configuration file - editing not recommended! */
-$dbhost = \''.addslashes($_POST['db_host']).'\';
-$dbname = \''.addslashes($_POST['db_name']).'\';
-$dbuser = \''.addslashes($_POST['db_user']).'\';
-$dbpasswd = \''.addslashes($_POST['db_pass']).'\';
-if ( !defined(\'ENANO_CONSTANTS\') )
-{
-define(\'ENANO_CONSTANTS\', \'\');
-define(\'table_prefix\', \''.addslashes($_POST['table_prefix']).'\');
-define(\'scriptPath\', \''.scriptPath.'\');
-define(\'contentPath\', \''.$cp.'\');
-define(\'ENANO_INSTALLED\', \'true\');
-}
-$crypto_key = \''.$privkey.'\';
-?>';
-
- $cf_handle = fopen(ENANO_ROOT.'/config.new.php', 'w');
- if ( !$cf_handle )
- return false;
- fwrite($cf_handle, $config_file);
-
- fclose($cf_handle);
-
- return true;
-}
-
-function _stg_rename_config_revert()
-{
- if ( file_exists('./config.php') )
- {
- @rename('./config.php', './config.new.php');
- }
-
- $handle = @fopen('./config.php.new', 'w');
- if ( !$handle )
- return false;
- $contents = '<?php $cryptkey = \'' . _INSTRESUME_AES_KEYBACKUP . '\'; ?>';
- fwrite($handle, $contents);
- fclose($handle);
- return true;
-}
-
-function stg_build_index()
-{
- global $db, $session, $paths, $template, $plugins; // Common objects;
- if ( $paths->rebuild_search_index() )
- return true;
- return false;
-}
-
-function stg_rename_config()
-{
- if ( !@rename('./config.new.php', './config.php') )
- {
- echo '<p>Can\'t rename config.php</p>';
- _stg_rename_config_revert();
- return false;
- }
-
- if ( $_POST['urlscheme'] == 'tiny' && !file_exists('./.htaccess') )
- {
- if ( !@rename('./.htaccess.new', './.htaccess') )
- {
- echo '<p>Can\'t rename .htaccess</p>';
- _stg_rename_config_revert();
- return false;
- }
- }
- return true;
-}
-
-function stg_start_api_success()
-{
- return true;
-}
-
-function stg_start_api_failure()
-{
- return false;
-}
-
-function stg_import_language()
-{
- global $db, $session, $paths, $template, $plugins; // Common objects
-
- $lang_file = ENANO_ROOT . "/language/english/enano.json";
- install_language("eng", "English", "English", $lang_file);
-
- return true;
-}
-
-function stg_init_logs()
-{
- global $db, $session, $paths, $template, $plugins; // Common objects
-
- $q = $db->sql_query('INSERT INTO ' . table_prefix . 'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'install_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($_POST['admin_user']) . '\', \'' . mysql_real_escape_string(ENANO_VERSION) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');');
- if ( !$q )
- {
- echo '<p><tt>MySQL return: ' . mysql_error() . '</tt></p>';
- return false;
- }
-
- if ( !$session->get_permissions('clear_logs') )
- {
- echo '<p><tt>$session: denied clear_logs</tt></p>';
- return false;
- }
-
- PageUtils::flushlogs('Main_Page', 'Article');
-
- return true;
-}
-
-//die('Key size: ' . AES_BITS . '<br />Block size: ' . AES_BLOCKSIZE);
-
-if(!function_exists('wikiFormat'))
-{
- function wikiFormat($message, $filter_links = true)
- {
- $wiki = & Text_Wiki::singleton('Mediawiki');
- $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
- $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath);
- $result = $wiki->transform($message, 'Xhtml');
-
- // HTML fixes
- $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
- $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
- $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
-
- return $result;
- }
-}
-
-global $failed, $warned;
-
-$failed = false;
-$warned = false;
-
-function not($var)
-{
- if($var)
- {
- return false;
- }
- else
- {
- return true;
- }
-}
-
-function run_test($code, $desc, $extended_desc, $warn = false)
-{
- global $failed, $warned;
- static $cv = true;
- $cv = not($cv);
- $val = eval($code);
- if($val)
- {
- if($cv) $color='CCFFCC'; else $color='AAFFAA';
- echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='images/good.gif' /></td></tr>";
- } elseif(!$val && $warn) {
- if($cv) $color='FFFFCC'; else $color='FFFFAA';
- echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='images/unknown.gif' /></td></tr>";
- $warned = true;
- } else {
- if($cv) $color='FFCCCC'; else $color='FFAAAA';
- echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='images/bad.gif' /></td></tr>";
- $failed = true;
- }
-}
-function is_apache() { $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false; return $r; }
-
-function show_license($fb = false)
-{
- global $lang;
- ?>
- <div style="height: 500px; clip: rect(0px,auto,500px,auto); overflow: auto; padding: 10px; border: 1px dashed #456798; margin: 1em;">
- <?php
- if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
- {
- echo 'Cannot find the license files.';
- }
- echo file_get_contents('./language/english/install/license-deed.html');
- if ( defined('ENANO_BETA_VERSION') || $branch == 'unstable' )
- {
- ?>
- <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
- <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
- <?php
- }
- ?>
- <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3>
- <?php if ( $lang->lang_code != 'eng' ): ?>
- <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p>
- <?php endif; ?>
- <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?>
- <?php
- global $template;
- if ( $fb )
- {
- echo '<p style="text-align: center;">Because I could never find the Create a Page button in PHP-Nuke.</p>';
- echo '<p>' . str_replace('http://enanocms.org/', 'http://www.2robots.com/2003/10/15/web-portals-suck/', $template->fading_button) . '</p>';
- echo '<p style="text-align: center;">It\'s not a portal, my friends.</p>';
- }
- ?>
- </div>
- <?php
-}
-
-require_once('includes/template.php');
-
-if(!isset($_GET['mode']))
-{
- $_GET['mode'] = 'welcome';
-}
-switch($_GET['mode'])
-{
- case 'mysql_test':
- error_reporting(0);
- $dbhost = rawurldecode($_POST['host']);
- $dbname = rawurldecode($_POST['name']);
- $dbuser = rawurldecode($_POST['user']);
- $dbpass = rawurldecode($_POST['pass']);
- $dbrootuser = rawurldecode($_POST['root_user']);
- $dbrootpass = rawurldecode($_POST['root_pass']);
- if($dbrootuser != '')
- {
- $conn = mysql_connect($dbhost, $dbrootuser, $dbrootpass);
- if(!$conn)
- {
- $e = mysql_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- die('root'.$e);
- }
- $rsp = 'good';
- $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
- if(!$q)
- {
- $e = mysql_error();
- if(strstr($e, 'Unknown database'))
- {
- $rsp .= '_creating_db';
- }
- }
- mysql_close($conn);
- $conn = mysql_connect($dbhost, $dbuser, $dbpass);
- if(!$conn)
- {
- $e = mysql_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- $rsp .= '_creating_user';
- }
- mysql_close($conn);
- die($rsp);
- }
- else
- {
- $conn = mysql_connect($dbhost, $dbuser, $dbpass);
- if(!$conn)
- {
- $e = mysql_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- die('auth'.$e);
- }
- $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
- if(!$q)
- {
- $e = mysql_error();
- if(strstr($e, 'Unknown database'))
- {
- die('name'.$e);
- }
- else
- {
- die('perm'.$e);
- }
- }
- }
- $v = mysql_get_server_info();
- if(version_compare($v, '4.1.17', '<')) die('vers'.$v);
- mysql_close($conn);
- die('good');
- break;
- case 'pgsql_test':
- error_reporting(0);
- $dbhost = rawurldecode($_POST['host']);
- $dbname = rawurldecode($_POST['name']);
- $dbuser = rawurldecode($_POST['user']);
- $dbpass = rawurldecode($_POST['pass']);
- $dbrootuser = rawurldecode($_POST['root_user']);
- $dbrootpass = rawurldecode($_POST['root_pass']);
- if($dbrootuser != '')
- {
- $conn = @pg_connect("host=$dbhost port=5432 user=$dbuser password=$dbpass dbname=$dbname");
- if(!$conn)
- {
- $e = pg_last_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- die('root'.$e);
- }
- $rsp = 'good';
- $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
- if(!$q)
- {
- $e = mysql_error();
- if(strstr($e, 'Unknown database'))
- {
- $rsp .= '_creating_db';
- }
- }
- mysql_close($conn);
- $conn = mysql_connect($dbhost, $dbuser, $dbpass);
- if(!$conn)
- {
- $e = mysql_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- $rsp .= '_creating_user';
- }
- mysql_close($conn);
- die($rsp);
- }
- else
- {
- $conn = mysql_connect($dbhost, $dbuser, $dbpass);
- if(!$conn)
- {
- $e = mysql_error();
- if(strstr($e, "Lost connection"))
- die('host'.$e);
- else
- die('auth'.$e);
- }
- $q = mysql_query('USE `' . mysql_real_escape_string($dbname) . '`;', $conn);
- if(!$q)
- {
- $e = mysql_error();
- if(strstr($e, 'Unknown database'))
- {
- die('name'.$e);
- }
- else
- {
- die('perm'.$e);
- }
- }
- }
- $v = mysql_get_server_info();
- if(version_compare($v, '4.1.17', '<')) die('vers'.$v);
- mysql_close($conn);
- die('good');
- break;
- case 'pophelp':
- $topic = ( isset($_GET['topic']) ) ? $_GET['topic'] : 'invalid';
- switch($topic)
- {
- case 'admin_embed_php':
- $title = $lang->get('pophelp_admin_embed_php_title');
- $content = $lang->get('pophelp_admin_embed_php_body');
- break;
- case 'url_schemes':
- $title = $lang->get('pophelp_url_schemes_title');
- $content = $lang->get('pophelp_url_schemes_body');
- break;
- default:
- $title = 'Invalid topic';
- $content = 'Invalid help topic.';
- break;
- }
- $close_window = $lang->get('pophelp_btn_close_window');
- echo <<<EOF
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html>
- <head>
- <title>Enano installation quick help • {$title}</title>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <style type="text/css">
- body {
- font-family: trebuchet ms, verdana, arial, helvetica, sans-serif;
- font-size: 9pt;
- }
- h2 { border-bottom: 1px solid #90B0D0; margin-bottom: 0; }
- h3 { font-size: 11pt; font-weight: bold; }
- li { list-style: url(../images/bullet.gif); }
- p { margin: 1.0em; }
- blockquote { background-color: #F4F4F4; border: 1px dotted #406080; margin: 1em; padding: 10px; max-height: 250px; overflow: auto; }
- a { color: #7090B0; }
- a:hover { color: #90B0D0; }
- </style>
- </head>
- <body>
- <h2>{$title}</h2>
- {$content}
- <p style="text-align: right;">
- <a href="#" onclick="window.close(); return false;">{$close_window}</a>
- </p>
- </body>
-</html>
-EOF;
- exit;
- break;
- case 'langjs':
- header('Content-type: text/javascript');
- $lang_js = enano_json_encode($lang->strings);
- // use EEOF here because jEdit misinterprets "typ'eof'"
- echo <<<EEOF
-if ( typeof(enano_lang) != 'object' )
- var enano_lang = new Object();
-
-enano_lang[1] = $lang_js;
-
-EEOF;
- exit;
- break;
- default:
- break;
-}
-
-$template = new template_nodb();
-$template->load_theme('stpatty', 'shamrock', false);
-
-$modestrings = Array(
- 'welcome' => $lang->get('welcome_modetitle'),
- 'license' => $lang->get('license_modetitle'),
- 'sysreqs' => $lang->get('sysreqs_modetitle'),
- 'database' => $lang->get('database_modetitle'),
- 'database_mysql'=> $lang->get('database_mysql_modetitle'),
- 'database_pgsql'=> $lang->get('database_pgsql_modetitle'),
- 'website' => $lang->get('website_modetitle'),
- 'login' => $lang->get('login_modetitle'),
- 'confirm' => $lang->get('confirm_modetitle'),
- 'install' => $lang->get('install_modetitle'),
- 'finish' => $lang->get('finish_modetitle'),
- '_hiddenstages' => '...', // all stages below this line are hidden
- 'showlicense' => $lang->get('license_modetitle')
- );
-
-$sideinfo = '';
-$vars = $template->extract_vars('elements.tpl');
-$p = $template->makeParserText($vars['sidebar_button']);
-$hidden = false;
-foreach ( $modestrings as $id => $str )
-{
- if ( $_GET['mode'] == $id )
- {
- $flags = 'style="font-weight: bold; text-decoration: underline;"';
- $this_page = $str;
- }
- else
- {
- $flags = '';
- }
- if ( $id == '_hiddenstages' )
- $hidden = true;
- if ( !$hidden )
- {
- $p->assign_vars(Array(
- 'HREF' => '#',
- 'FLAGS' => $flags . ' onclick="return false;"',
- 'TEXT' => $str
- ));
- $sideinfo .= $p->run();
- }
-}
-
-$template->init_vars();
-
-if(isset($_GET['mode']) && $_GET['mode'] == 'css')
-{
- header('Content-type: text/css');
- echo $template->get_css();
- exit;
-}
-
-if ( defined('ENANO_IS_STABLE') )
- $branch = 'stable';
-else if ( defined('ENANO_IS_UNSTABLE') )
- $branch = 'unstable';
-else
-{
- $version = explode('.', ENANO_VERSION);
- if ( !isset($version[1]) )
- // unknown branch, really
- $branch = 'unstable';
- else
- {
- $version[1] = intval($version[1]);
- if ( $version[1] % 2 == 1 )
- $branch = 'unstable';
- else
- $branch = 'stable';
- }
-}
-
-$template->header();
-
-switch($_GET['mode'])
-{
- default:
- case 'welcome':
- ?>
- <div style="text-align: center; margin-top: 10px;">
- <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-green.png" style="display: block; margin: 0 auto; padding-left: 100px;" />
- <h2><?php echo $lang->get('welcome_heading'); ?></h2>
- <h3>
- <?php
- $branch_l = $lang->get("welcome_branch_$branch");
-
- $v_string = sprintf('%s %s – %s', $lang->get('welcome_version'), ENANO_VERSION, $branch_l);
- echo $v_string;
- ?>
- </h3>
- <?php
- if ( defined('ENANO_CODE_NAME') )
- {
- echo '<p>';
- echo $lang->get('welcome_aka', array(
- 'codename' => strtolower(ENANO_CODE_NAME)
- ));
- echo '</p>';
- }
- ?>
- <form action="install.php?mode=license" method="post">
- <input type="submit" value="<?php echo $lang->get('welcome_btn_start'); ?>" />
- </form>
- </div>
- <?php
- break;
- case "license":
- ?>
- <h3><?php echo $lang->get('license_heading'); ?></h3>
- <p><?php echo $lang->get('license_blurb_thankyou'); ?></p>
- <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p>
- <?php show_license(); ?>
- <div class="pagenav">
- <form action="install.php?mode=sysreqs" method="post">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- • <?php echo $lang->get('license_objective_ensure_agree'); ?><br />
- • <?php echo $lang->get('license_objective_have_db_info'); ?>
- </p>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- break;
- case "sysreqs":
- error_reporting(E_ALL);
- ?>
- <h3><?php echo $lang->get('sysreqs_heading'); ?></h3>
- <p><?php echo $lang->get('sysreqs_blurb'); ?></p>
- <table border="0" cellspacing="0" cellpadding="0">
- <?php
- run_test('return version_compare(\'4.3.0\', PHP_VERSION, \'<\');', $lang->get('sysreqs_req_php'), $lang->get('sysreqs_req_desc_php') );
- run_test('return version_compare(\'5.2.0\', PHP_VERSION, \'<\');', $lang->get('sysreqs_req_php5'), $lang->get('sysreqs_req_desc_php5'), true);
- run_test('return function_exists(\'mysql_connect\');', $lang->get('sysreqs_req_mysql'), $lang->get('sysreqs_req_desc_mysql') );
- run_test('return function_exists(\'pg_connect\');', 'PostgreSQL extension for PHP', 'It seems that your PHP installation does not have the PostgreSQL extension enabled. Because of this, you won\'t be able to use the PostgreSQL database driver. This is OK in the majority of cases. If you want to use PostgreSQL support, you\'ll need to either compile the PHP extension for Postgres or install the extension with your distribution\'s package manager. Windows administrators will need enable php_pgsql.dll in their php.ini.', true);
- run_test('return @ini_get(\'file_uploads\');', $lang->get('sysreqs_req_uploads'), $lang->get('sysreqs_req_desc_uploads') );
- run_test('return is_apache();', $lang->get('sysreqs_req_apache'), $lang->get('sysreqs_req_desc_apache'), true);
- run_test('return is_writable(ENANO_ROOT.\'/config.new.php\');', $lang->get('sysreqs_req_config'), $lang->get('sysreqs_req_desc_config') );
- run_test('return file_exists(\'/usr/bin/convert\');', $lang->get('sysreqs_req_magick'), $lang->get('sysreqs_req_desc_magick'), true);
- run_test('return is_writable(ENANO_ROOT.\'/cache/\');', $lang->get('sysreqs_req_cachewriteable'), $lang->get('sysreqs_req_desc_cachewriteable'), true);
- run_test('return is_writable(ENANO_ROOT.\'/files/\');', $lang->get('sysreqs_req_fileswriteable'), $lang->get('sysreqs_req_desc_fileswriteable'), true);
- if ( !function_exists('mysql_connect') && !function_exists('pg_connect') )
- {
- run_test('return false;', 'No database drivers are available.', 'You need to have at least one database driver working to install Enano. See the warnings on MySQL and PostgreSQL above for more information on installing these database drivers.', false);
- }
- echo '</table>';
- if(!$failed)
- {
- ?>
-
- <div class="pagenav">
- <?php
- if($warned) {
- echo '<table border="0" cellspacing="0" cellpadding="0">';
- run_test('return false;', $lang->get('sysreqs_summary_warn_title'), $lang->get('sysreqs_summary_warn_body'), true);
- echo '</table>';
- } else {
- echo '<table border="0" cellspacing="0" cellpadding="0">';
- run_test('return true;', '<b>' . $lang->get('sysreqs_summary_success_title') . '</b><br />' . $lang->get('sysreqs_summary_success_body'), 'You should never see this text. Congratulations for being an Enano hacker!');
- echo '</table>';
- }
- ?>
- <form action="install.php?mode=database" method="post">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- • <?php echo $lang->get('sysreqs_objective_scalebacks'); ?><br />
- • <?php echo $lang->get('license_objective_have_db_info'); ?>
- </p>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <?php
- }
- else
- {
- if ( $failed )
- {
- echo '<div class="pagenav"><table border="0" cellspacing="0" cellpadding="0">';
- run_test('return false;', $lang->get('sysreqs_summary_fail_title'), $lang->get('sysreqs_summary_fail_body'));
- echo '</table></div>';
- }
- }
- ?>
- <?php
- break;
- case "database":
- echo '<h3>Choose a database driver</h3>';
- echo '<p>The next step is to choose the database driver that Enano will use. In most cases this is MySQL, but there are certain
- advantages to PostgreSQL, which is made available only experimentally.</p>';
- if ( @file_exists('/etc/enano-is-virt-appliance') )
- {
- echo '<p><b>You\'re using the Enano virtual appliance.</b><br />Unless you configured the appliance manually, PostgreSQL support is not available. In 99% of cases you\'ll want to click MySQL below.</p>';
- }
-
- $mysql_disable_reason = '';
- $pgsql_disable_reason = '';
- $mysql_disable = '';
- $pgsql_disable = '';
- if ( !function_exists('mysql_connect') )
- {
- $mysql_disable = ' disabled="disabled"';
- $mysql_disable_reason = 'You don\'t have the MySQL PHP extension installed.';
- }
- if ( !function_exists('pg_connect') )
- {
- $pgsql_disable = ' disabled="disabled"';
- $pgsql_disable_reason = 'You don\'t have the PostgreSQL PHP extensnion installed.';
- }
- if ( function_exists('pg_connect') && version_compare(PHP_VERSION, '5.0.0', '<') )
- {
- $pgsql_disable = ' disabled="disabled"';
- $pgsql_disable_reason = 'You need to have at least PHP 5 to use the PostgreSQL database driver.';
- }
-
- echo '<form action="install.php" method="get">';
- ?>
- <table border="0" cellspacing="5">
- <tr>
- <td>
- <input type="image" name="mode" value="database_mysql" src="images/about-powered-mysql.png"<?php echo $mysql_disable; ?>/>
- </td>
- <td<?php if ( $mysql_disable ) echo ' style="opacity: 0.5; filter: alpha(opacity=50);"'; ?>>
- <b>MySQL</b><br />
- Click this button to use MySQL as the database backend for your site. Most web hosts support MySQL, and if you have
- administrative access to your MySQL server, you can create a new database and user during this installation process if you
- haven't done so already.
- <?php
- if ( $mysql_disable )
- {
- echo "<br /><br /><b>$mysql_disable_reason</b>";
- }
- ?>
- </td>
- </tr>
- <tr>
- <td>
- <input type="image" name="mode" value="database_pgsql" src="images/about-powered-pgsql.png"<?php echo $pgsql_disable; ?> />
- </td>
- <td<?php if ( $pgsql_disable ) echo ' style="opacity: 0.5; filter: alpha(opacity=50);"'; ?>>
- <b>PostgreSQL</b><br />
- Click this button to use PostgreSQL as the database backend for your site. While not as widely supported, PostgreSQL has more
- liberal licensing conditions and when properly configured is faster than MySQL. Some plugins may not work with the PostgreSQL
- driver.
- <?php
- if ( $pgsql_disable )
- {
- echo "<br /><br /><b>$pgsql_disable_reason</b>";
- }
- ?>
- </td>
- </tr>
- </table>
- <?php
- echo '</form>';
- break;
- case "database_mysql":
- ?>
- <script type="text/javascript">
- function ajaxGet(uri, f) {
- if (window.XMLHttpRequest) {
- ajax = new XMLHttpRequest();
- } else {
- if (window.ActiveXObject) {
- ajax = new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- alert('Enano client-side runtime error: No AJAX support, unable to continue');
- return;
- }
- }
- ajax.onreadystatechange = f;
- ajax.open('GET', uri, true);
- ajax.send(null);
- }
-
- function ajaxPost(uri, parms, f) {
- if (window.XMLHttpRequest) {
- ajax = new XMLHttpRequest();
- } else {
- if (window.ActiveXObject) {
- ajax = new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- alert('Enano client-side runtime error: No AJAX support, unable to continue');
- return;
- }
- }
- ajax.onreadystatechange = f;
- ajax.open('POST', uri, true);
- ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- ajax.setRequestHeader("Content-length", parms.length);
- ajax.setRequestHeader("Connection", "close");
- ajax.send(parms);
- }
- function ajaxTestConnection()
- {
- v = verify();
- if(!v)
- {
- alert($lang.get('meta_msg_err_verification'));
- return false;
- }
- var frm = document.forms.dbinfo;
- db_host = escape(frm.db_host.value.replace('+', '%2B'));
- db_name = escape(frm.db_name.value.replace('+', '%2B'));
- db_user = escape(frm.db_user.value.replace('+', '%2B'));
- db_pass = escape(frm.db_pass.value.replace('+', '%2B'));
- db_root_user = escape(frm.db_root_user.value.replace('+', '%2B'));
- db_root_pass = escape(frm.db_root_pass.value.replace('+', '%2B'));
-
- parms = 'host='+db_host+'&name='+db_name+'&user='+db_user+'&pass='+db_pass+'&root_user='+db_root_user+'&root_pass='+db_root_pass;
- ajaxPost('<?php echo scriptPath; ?>/install.php?mode=mysql_test', parms, function() {
- if(ajax.readyState==4)
- {
- s = ajax.responseText.substr(0, 4);
- t = ajax.responseText.substr(4, ajax.responseText.length);
- if(s.substr(0, 4)=='good')
- {
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/good.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/good.gif';
- if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
- if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
- document.getElementById('s_mysql_version').src='images/good.gif';
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_info_mysql_good');
- }
- else
- {
- switch(s)
- {
- case 'host':
- document.getElementById('s_db_host').src='images/bad.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/unknown.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_host').innerHTML = $lang.get('database_msg_err_mysql_connect', { db_host: document.forms.dbinfo.db_host.value, mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'auth':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/bad.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'perm':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/bad.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbperm', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'name':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/bad.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbexist', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'root':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/unknown.gif';
- document.getElementById('s_db_root').src='images/bad.gif';
- document.getElementById('e_db_root').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'vers':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/good.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/good.gif';
- if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
- if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
-
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_err_mysql_version', { mysql_version: t });
- document.getElementById('s_mysql_version').src='images/bad.gif';
- default:
- alert(t);
- break;
- }
- }
- }
- });
- }
- function verify()
- {
- document.getElementById('e_db_host').innerHTML = '';
- document.getElementById('e_db_auth').innerHTML = '';
- document.getElementById('e_db_name').innerHTML = '';
- document.getElementById('e_db_root').innerHTML = '';
- var frm = document.forms.dbinfo;
- ret = true;
- if(frm.db_host.value != '')
- {
- document.getElementById('s_db_host').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_host').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_name.value.match(/^([a-z0-9_-]+)$/g))
- {
- document.getElementById('s_db_name').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_name').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_user.value != '')
- {
- document.getElementById('s_db_auth').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_auth').src='images/bad.gif';
- ret = false;
- }
- if(frm.table_prefix.value.match(/^([a-z0-9_]*)$/g))
- {
- document.getElementById('s_table_prefix').src='images/good.gif';
- }
- else
- {
- document.getElementById('s_table_prefix').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_root_user.value == '')
- {
- document.getElementById('s_db_root').src='images/good.gif';
- }
- else if(frm.db_root_user.value != '' && frm.db_root_pass.value == '')
- {
- document.getElementById('s_db_root').src='images/bad.gif';
- ret = false;
- }
- else
- {
- document.getElementById('s_db_root').src='images/unknown.gif';
- }
- if(ret) frm._cont.disabled = false;
- else frm._cont.disabled = true;
- return ret;
- }
- window.onload = verify;
- </script>
- <p><?php echo $lang->get('database_blurb_needdb'); ?></p>
- <p><?php echo $lang->get('database_blurb_howtomysql'); ?></p>
- <?php
- if ( file_exists('/etc/enano-is-virt-appliance') )
- {
- echo '<p>
- ' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . '
- </p>';
- }
- ?>
- <form name="dbinfo" action="install.php?mode=website" method="post">
- <input type="hidden" name="db_driver" value="mysql" />
- <table border="0">
- <tr>
- <td colspan="3" style="text-align: center">
- <h3><?php echo $lang->get('database_table_title'); ?></h3>
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('database_field_hostname_title'); ?></b>
- <br /><?php echo $lang->get('database_field_hostname_body'); ?>
- <br /><span style="color: #993300" id="e_db_host"></span>
- </td>
- <td>
- <input onkeyup="verify();" name="db_host" size="30" type="text" />
- </td>
- <td>
- <img id="s_db_host" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('database_field_dbname_title'); ?></b><br />
- <?php echo $lang->get('database_field_dbname_body'); ?><br />
- <span style="color: #993300" id="e_db_name"></span>
- </td>
- <td>
- <input onkeyup="verify();" name="db_name" size="30" type="text" />
- </td>
- <td>
- <img id="s_db_name" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td rowspan="2">
- <b><?php echo $lang->get('database_field_dbauth_title'); ?></b><br />
- <?php echo $lang->get('database_field_dbauth_body'); ?><br />
- <span style="color: #993300" id="e_db_auth"></span>
- </td>
- <td>
- <input onkeyup="verify();" name="db_user" size="30" type="text" />
- </td>
- <td rowspan="2">
- <img id="s_db_auth" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <input name="db_pass" size="30" type="password" />
- </td>
- </tr>
- <tr>
- <td colspan="3" style="text-align: center">
- <h3><?php echo $lang->get('database_heading_optionalinfo'); ?></h3>
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('database_field_tableprefix_title'); ?></b><br />
- <?php echo $lang->get('database_field_tableprefix_body'); ?>
- </td>
- <td>
- <input onkeyup="verify();" name="table_prefix" size="30" type="text" />
- </td>
- <td>
- <img id="s_table_prefix" alt="Good/bad icon" src="images/good.gif" />
- </td>
- </tr>
- <tr>
- <td rowspan="2">
- <b><?php echo $lang->get('database_field_rootauth_title'); ?></b><br />
- <?php echo $lang->get('database_field_rootauth_body'); ?><br />
- <span style="color: #993300" id="e_db_root"></span>
- </td>
- <td>
- <input onkeyup="verify();" name="db_root_user" size="30" type="text" />
- </td>
- <td rowspan="2">
- <img id="s_db_root" alt="Good/bad icon" src="images/good.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <input onkeyup="verify();" name="db_root_pass" size="30" type="password" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('database_field_mysqlversion_title'); ?></b>
- </td>
- <td id="e_mysql_version">
- <?php echo $lang->get('database_field_mysqlversion_blurb_willbechecked'); ?>
- </td>
- <td>
- <img id="s_mysql_version" alt="Good/bad icon" src="images/unknown.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('database_field_droptables_title'); ?></b><br />
- <?php echo $lang->get('database_field_droptables_body'); ?>
- </td>
- <td>
- <input type="checkbox" name="drop_tables" id="dtcheck" /> <label for="dtcheck"><?php echo $lang->get('database_field_droptables_lbl'); ?></label>
- </td>
- </tr>
- <tr>
- <td colspan="3" style="text-align: center">
- <input type="button" value="<?php echo $lang->get('database_btn_testconnection'); ?>" onclick="ajaxTestConnection();" />
- </td>
- </tr>
- </table>
- <div class="pagenav">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- • <?php echo $lang->get('database_objective_test'); ?><br />
- • <?php echo $lang->get('database_objective_uncrypt'); ?>
- </p>
- </td>
- </tr>
- </table>
- </div>
- <?php
- break;
- case 'database_pgsql':
- ?>
- <script type="text/javascript">
- function ajaxGet(uri, f) {
- if (window.XMLHttpRequest) {
- ajax = new XMLHttpRequest();
- } else {
- if (window.ActiveXObject) {
- ajax = new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- alert('Enano client-side runtime error: No AJAX support, unable to continue');
- return;
- }
- }
- ajax.onreadystatechange = f;
- ajax.open('GET', uri, true);
- ajax.send(null);
- }
-
- function ajaxPost(uri, parms, f) {
- if (window.XMLHttpRequest) {
- ajax = new XMLHttpRequest();
- } else {
- if (window.ActiveXObject) {
- ajax = new ActiveXObject("Microsoft.XMLHTTP");
- } else {
- alert('Enano client-side runtime error: No AJAX support, unable to continue');
- return;
- }
- }
- ajax.onreadystatechange = f;
- ajax.open('POST', uri, true);
- ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- ajax.setRequestHeader("Content-length", parms.length);
- ajax.setRequestHeader("Connection", "close");
- ajax.send(parms);
- }
- function ajaxTestConnection()
- {
- v = verify();
- if(!v)
- {
- alert($lang.get('meta_msg_err_verification'));
- return false;
- }
- var frm = document.forms.dbinfo;
- db_host = escape(frm.db_host.value.replace('+', '%2B'));
- db_name = escape(frm.db_name.value.replace('+', '%2B'));
- db_user = escape(frm.db_user.value.replace('+', '%2B'));
- db_pass = escape(frm.db_pass.value.replace('+', '%2B'));
- db_root_user = escape(frm.db_root_user.value.replace('+', '%2B'));
- db_root_pass = escape(frm.db_root_pass.value.replace('+', '%2B'));
-
- parms = 'host='+db_host+'&name='+db_name+'&user='+db_user+'&pass='+db_pass+'&root_user='+db_root_user+'&root_pass='+db_root_pass;
- ajaxPost('<?php echo scriptPath; ?>/install.php?mode=mysql_test', parms, function() {
- if(ajax.readyState==4)
- {
- s = ajax.responseText.substr(0, 4);
- t = ajax.responseText.substr(4, ajax.responseText.length);
- if(s.substr(0, 4)=='good')
- {
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/good.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/good.gif';
- if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
- if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
- document.getElementById('s_mysql_version').src='images/good.gif';
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_info_mysql_good');
- }
- else
- {
- switch(s)
- {
- case 'host':
- document.getElementById('s_db_host').src='images/bad.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/unknown.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_host').innerHTML = $lang.get('database_msg_err_mysql_connect', { db_host: document.forms.dbinfo.db_host.value, mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'auth':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/bad.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'perm':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/bad.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbperm', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'name':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/bad.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/unknown.gif';
- document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_err_mysql_dbexist', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'root':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/unknown.gif';
- document.getElementById('s_db_auth').src='images/unknown.gif';
- document.getElementById('s_db_root').src='images/bad.gif';
- document.getElementById('e_db_root').innerHTML = $lang.get('database_msg_err_mysql_auth', { mysql_error: t });
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_warn_mysql_version');
- break;
- case 'vers':
- document.getElementById('s_db_host').src='images/good.gif';
- document.getElementById('s_db_name').src='images/good.gif';
- document.getElementById('s_db_auth').src='images/good.gif';
- document.getElementById('s_db_root').src='images/good.gif';
- if(t.match(/_creating_db/)) document.getElementById('e_db_name').innerHTML = $lang.get('database_msg_warn_creating_db');
- if(t.match(/_creating_user/)) document.getElementById('e_db_auth').innerHTML = $lang.get('database_msg_warn_creating_user');
-
- document.getElementById('e_mysql_version').innerHTML = $lang.get('database_msg_err_mysql_version', { mysql_version: t });
- document.getElementById('s_mysql_version').src='images/bad.gif';
- default:
- alert(t);
- break;
- }
- }
- }
- });
- }
- function verify()
- {
- document.getElementById('e_db_host').innerHTML = '';
- document.getElementById('e_db_auth').innerHTML = '';
- document.getElementById('e_db_name').innerHTML = '';
- document.getElementById('e_db_root').innerHTML = '';
- var frm = document.forms.dbinfo;
- ret = true;
- if(frm.db_host.value != '')
- {
- document.getElementById('s_db_host').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_host').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_name.value.match(/^([a-z0-9_-]+)$/g))
- {
- document.getElementById('s_db_name').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_name').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_user.value != '')
- {
- document.getElementById('s_db_auth').src='images/unknown.gif';
- }
- else
- {
- document.getElementById('s_db_auth').src='images/bad.gif';
- ret = false;
- }
- if(frm.table_prefix.value.match(/^([a-z0-9_]*)$/g))
- {
- document.getElementById('s_table_prefix').src='images/good.gif';
- }
- else
- {
- document.getElementById('s_table_prefix').src='images/bad.gif';
- ret = false;
- }
- if(frm.db_root_user.value == '')
- {
- document.getElementById('s_db_root').src='images/good.gif';
- }
- else if(frm.db_root_user.value != '' && frm.db_root_pass.value == '')
- {
- document.getElementById('s_db_root').src='images/bad.gif';
- ret = false;
- }
- else
- {
- document.getElementById('s_db_root').src='images/unknown.gif';
- }
- if(ret) frm._cont.disabled = false;
- else frm._cont.disabled = true;
- return ret;
- }
- window.onload = verify;
- </script>
- <p><?php echo $lang->get('database_blurb_needdb'); ?></p>
- <p><?php echo $lang->get('database_blurb_howtomysql'); ?></p>
- <?php
- if ( file_exists('/etc/enano-is-virt-appliance') )
- {
- echo '<p>
- ' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . '
- </p>';
- }
- ?>
- <form name="dbinfo" action="install.php?mode=website" method="post">
- <input type="hidden" name="db_driver" value="postgresql" />
- <table border="0">
- <tr><td colspan="3" style="text-align: center"><h3>Database information</h3></td></tr>
- <tr><td><b>Database hostname</b><br />This is the hostname (or sometimes the IP address) of your Postgres server. In many cases, this is "localhost".<br /><span style="color: #993300" id="e_db_host"></span></td><td><input onkeyup="verify();" name="db_host" size="30" type="text" /></td><td><img id="s_db_host" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
- <tr><td><b>Database name</b><br />The name of the actual database. If you don't already have a database, you can create one here, if you have the username and password of a PostgreSQL superuser.<br /><span style="color: #993300" id="e_db_name"></span></td><td><input onkeyup="verify();" name="db_name" size="30" type="text" /></td><td><img id="s_db_name" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
- <tr><td rowspan="2"><b>Database login</b><br />These fields should be the username and password for a role that has permission to create and alter tables, select data, insert data, update data, and delete data. You may or may not choose to allow dropping tables.<br /><span style="color: #993300" id="e_db_auth"></span></td><td><input onkeyup="verify();" name="db_user" size="30" type="text" /></td><td rowspan="2"><img id="s_db_auth" alt="Good/bad icon" src="images/bad.gif" /></td></tr>
- <tr><td><input name="db_pass" size="30" type="password" /></td></tr>
- <tr><td colspan="3" style="text-align: center"><h3>Optional information</h3></td></tr>
- <tr><td><b>Table prefix</b><br />The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).</td><td><input onkeyup="verify();" name="table_prefix" size="30" type="text" /></td><td><img id="s_table_prefix" alt="Good/bad icon" src="images/good.gif" /></td></tr>
- <tr><td rowspan="2"><b>Database administrative login</b><br />If the Postgres database or role that you entered above does not exist yet, you can create them here, assuming that you have the login information for a PostgreSQL superuser. Leave these fields blank unless you need to use them.<br /><span style="color: #993300" id="e_db_root"></span></td><td><input onkeyup="verify();" name="db_root_user" size="30" type="text" /></td><td rowspan="2"><img id="s_db_root" alt="Good/bad icon" src="images/good.gif" /></td></tr>
- <tr><td><input onkeyup="verify();" name="db_root_pass" size="30" type="password" /></td></tr>
- <tr><td><b>PostgreSQL version</b></td><td id="e_mysql_version">PostgreSQL version information will<br />be checked when you click "Test<br />Connection". You need to have at<br />least PostgreSQL 8.2.0 to install Enano.</td><td><img id="s_mysql_version" alt="Good/bad icon" src="images/unknown.gif" /></td></tr>
- <tr><td><b>Delete existing tables?</b><br />If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.</td><td><input type="checkbox" name="drop_tables" id="dtcheck" /> <label for="dtcheck">Drop existing tables</label></td></tr>
- <tr><td colspan="3" style="text-align: center"><input type="button" value="Test connection" onclick="ajaxTestConnection();" /></td></tr>
- </table>
- <div class="pagenav">
- <table border="0">
- <tr>
- <td><input type="submit" value="Continue" onclick="return verify();" name="_cont" /></td><td><p><span style="font-weight: bold;">Before clicking continue:</span><br />• Check your PostgreSQL connection using the "Test Connection" button.<br />• Be aware that your database information will be transmitted unencrypted several times.</p></td>
- </tr>
- </table>
- </div>
- </form>
- <?php
- break;
- case "website":
- if ( !isset($_POST['_cont']) )
- {
- echo 'No POST data signature found. Please <a href="install.php?mode=license">restart the installation</a>.';
- $template->footer();
- exit;
- }
- unset($_POST['_cont']);
- ?>
- <script type="text/javascript">
- function verify()
- {
- var frm = document.forms.siteinfo;
- ret = true;
- if(frm.sitename.value.match(/^(.+)$/g) && frm.sitename.value != 'Enano')
- {
- document.getElementById('s_name').src='images/good.gif';
- }
- else
- {
- document.getElementById('s_name').src='images/bad.gif';
- ret = false;
- }
- if(frm.sitedesc.value.match(/^(.+)$/g))
- {
- document.getElementById('s_desc').src='images/good.gif';
- }
- else
- {
- document.getElementById('s_desc').src='images/bad.gif';
- ret = false;
- }
- if(frm.copyright.value.match(/^(.+)$/g))
- {
- document.getElementById('s_copyright').src='images/good.gif';
- }
- else
- {
- document.getElementById('s_copyright').src='images/bad.gif';
- ret = false;
- }
- if(ret) frm._cont.disabled = false;
- else frm._cont.disabled = true;
- return ret;
- }
- window.onload = verify;
- </script>
- <form name="siteinfo" action="install.php?mode=login" method="post">
- <?php
- $k = array_keys($_POST);
- for($i=0;$i<sizeof($_POST);$i++) {
- echo '<input type="hidden" name="'.htmlspecialchars($k[$i]).'" value="'.htmlspecialchars($_POST[$k[$i]]).'" />'."\n";
- }
- ?>
- <p><?php echo $lang->get('website_header_blurb'); ?></p>
- <table border="0">
- <tr>
- <td>
- <b><?php echo $lang->get('website_field_name_title'); ?></b><br />
- <?php echo $lang->get('website_field_name_body'); ?>
- </td>
- <td>
- <input onkeyup="verify();" name="sitename" type="text" size="30" />
- </td>
- <td>
- <img id="s_name" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('website_field_desc_title'); ?></b><br />
- <?php echo $lang->get('website_field_desc_body'); ?>
- </td>
- <td>
- <input onkeyup="verify();" name="sitedesc" type="text" size="30" />
- </td>
- <td>
- <img id="s_desc" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('website_field_copyright_title'); ?></b><br />
- <?php echo $lang->get('website_field_copyright_body'); ?>
- </td>
- <td>
- <input onkeyup="verify();" name="copyright" type="text" size="30" />
- </td>
- <td>
- <img id="s_copyright" alt="Good/bad icon" src="images/bad.gif" />
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('website_field_wikimode_title'); ?></b><br />
- <?php echo $lang->get('website_field_wikimode_body'); ?>
- </td>
- <td>
- <input name="wiki_mode" type="checkbox" id="wmcheck" /> <label for="wmcheck"><?php echo $lang->get('website_field_wikimode_checkbox'); ?></label>
- </td>
- <td>
-
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo $lang->get('website_field_urlscheme_title'); ?></b><br />
- <?php echo $lang->get('website_field_urlscheme_body'); ?>
- </td>
- <td colspan="2">
- <input type="radio" <?php if(!is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="ugly" id="ugly" /> <label for="ugly"><?php echo $lang->get('website_field_urlscheme_ugly'); ?></label><br />
- <input type="radio" <?php if(is_apache()) echo 'checked="checked" '; ?>name="urlscheme" value="short" id="short" /> <label for="short"><?php echo $lang->get('website_field_urlscheme_short'); ?></label><br />
- <input type="radio" name="urlscheme" value="tiny" id="petite"> <label for="petite"><?php echo $lang->get('website_field_urlscheme_tiny'); ?></label><br />
- <small><a href="install.php?mode=pophelp&topic=url_schemes" onclick="window.open(this.href, 'pophelpwin', 'width=550,height=400,status=no,toolbars=no,toolbar=no,address=no,scroll=yes'); return false;"><?php echo $lang->get('website_field_urlscheme_helplink'); ?></a></small>
- </td>
- </tr>
- </table>
- <div class="pagenav">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- • <?php echo $lang->get('website_objective_verify'); ?>
- </p>
- </td>
- </tr>
- </table>
- </div>
- </form>
- <?php
- break;
- case "login":
- if(!isset($_POST['_cont'])) {
- echo 'No POST data signature found. Please <a href="install.php?mode=license">restart the installation</a>.';
- $template->footer();
- exit;
- }
- unset($_POST['_cont']);
- require('config.new.php');
- $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
- if ( isset($crypto_key) )
- {
- $cryptkey = $crypto_key;
- }
- if(!isset($cryptkey) || ( isset($cryptkey) && strlen($cryptkey) != AES_BITS / 4) )
- {
- $cryptkey = $aes->gen_readymade_key();
- $handle = @fopen(ENANO_ROOT.'/config.new.php', 'w');
- if(!$handle)
- {
- echo '<p>ERROR: Despite my repeated attempts to verify that the configuration file can be written, I was indeed prevented from opening it for writing. Maybe you\'re still on <del>crack</del> Windows?</p>';
- $template->footer();
- exit;
- }
- fwrite($handle, '<?php $cryptkey = \''.$cryptkey.'\'; ?>');
- fclose($handle);
- }
- // Sorry for the ugly hack, but this f***s up jEdit badly.
- echo '
- <script type="text/javascript">
- function verify()
- {
- var frm = document.forms.login;
- ret = true;
- if ( frm.admin_user.value.match(/^([^<>&\?\'"%\/]+)$/) && !frm.admin_user.value.match(/^(?:(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$/) && frm.admin_user.value.toLowerCase() != \'anonymous\' )
- {
- document.getElementById(\'s_user\').src = \'images/good.gif\';
- }
- else
- {
- document.getElementById(\'s_user\').src = \'images/bad.gif\';
- ret = false;
- }
- if(frm.admin_pass.value.length >= 6 && frm.admin_pass.value == frm.admin_pass_confirm.value)
- {
- document.getElementById(\'s_password\').src = \'images/good.gif\';
- }
- else
- {
- document.getElementById(\'s_password\').src = \'images/bad.gif\';
- ret = false;
- }
- if(frm.admin_email.value.match(/^(?:[\\w\\d_-]+\\.?)+@(?:(?:[\\w\\d-]\\-?)+\\.)+\\w{2,4}$/))
- {
- document.getElementById(\'s_email\').src = \'images/good.gif\';
- }
- else
- {
- document.getElementById(\'s_email\').src = \'images/bad.gif\';
- ret = false;
- }
- if(ret) frm._cont.disabled = false;
- else frm._cont.disabled = true;
- return ret;
- }
- window.onload = verify;
-
- function cryptdata()
- {
- if(!verify()) return false;
- }
- </script>
- ';
- ?>
- <form name="login" action="install.php?mode=confirm" method="post" onsubmit="runEncryption();">
- <?php
- $k = array_keys($_POST);
- for($i=0;$i<sizeof($_POST);$i++) {
- echo '<input type="hidden" name="'.htmlspecialchars($k[$i]).'" value="'.htmlspecialchars($_POST[$k[$i]]).'" />'."\n";
- }
- ?>
- <p><?php echo $lang->get('login_header_blurb'); ?></p>
- <table border="0">
- <tr>
- <td><b><?php echo $lang->get('login_field_username_title'); ?></b><br /><small><?php echo $lang->get('login_field_username_body'); ?></small></td>
- <td><input onkeyup="verify();" name="admin_user" type="text" size="30" /></td>
- <td><img id="s_user" alt="Good/bad icon" src="images/bad.gif" /></td>
- </tr>
- <tr>
- <td><?php echo $lang->get('login_field_password_title'); ?></td>
- <td><input onkeyup="verify();" name="admin_pass" type="password" size="30" /></td>
- <td rowspan="2"><img id="s_password" alt="Good/bad icon" src="images/bad.gif" /></td>
- </tr>
- <tr>
- <td><?php echo $lang->get('login_field_password_confirm'); ?></td>
- <td><input onkeyup="verify();" name="admin_pass_confirm" type="password" size="30" /></td>
- </tr>
- <tr>
- <td><?php echo $lang->get('login_field_email_title'); ?></td>
- <td><input onkeyup="verify();" name="admin_email" type="text" size="30" /></td>
- <td><img id="s_email" alt="Good/bad icon" src="images/bad.gif" /></td>
- </tr>
- <tr>
- <td>
- <?php echo $lang->get('login_field_allowphp_title'); ?><br />
- <small>
- <span style="color: #D84308">
- <?php
- echo $lang->get('login_field_allowphp_body',
- array(
- 'important_notes' => '<a href="install.php?mode=pophelp&topic=admin_embed_php" onclick="window.open(this.href, \'pophelpwin\', \'width=550,height=400,status=no,toolbars=no,toolbar=no,address=no,scroll=yes\'); return false;" style="color: #D84308; text-decoration: underline;">' . $lang->get('login_field_allowphp_isi') . '</a>'
- )
- );
- ?>
- </span>
- </small>
- </td>
- <td>
- <label><input type="radio" name="admin_embed_php" value="2" checked="checked" /> <?php echo $lang->get('login_field_allowphp_disabled'); ?></label>
- <label><input type="radio" name="admin_embed_php" value="4" /> <?php echo $lang->get('login_field_allowphp_enabled'); ?></label>
- </td>
- <td></td>
- </tr>
- <tr><td colspan="3"><?php echo $lang->get('login_aes_blurb'); ?></td></tr>
- </table>
- <div class="pagenav">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return cryptdata();" name="_cont" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- • <?php echo $lang->get('login_objective_remember'); ?>
- </p>
- </td>
- </tr>
- </table>
- </div>
- <div id="cryptdebug"></div>
- <input type="hidden" name="use_crypt" value="no" />
- <input type="hidden" name="crypt_key" value="<?php echo $cryptkey; ?>" />
- <input type="hidden" name="crypt_data" value="" />
- </form>
- <script type="text/javascript">
- // <![CDATA[
- var frm = document.forms.login;
- frm.admin_user.focus();
- function runEncryption()
- {
- str = '';
- for(i=0;i<keySizeInBits/4;i++) str+='0';
- var key = hexToByteArray(str);
- var pt = hexToByteArray(str);
- var ct = rijndaelEncrypt(pt, key, "ECB");
- var ect = byteArrayToHex(ct);
- switch(keySizeInBits)
- {
- case 128:
- v = '66e94bd4ef8a2c3b884cfa59ca342b2e';
- break;
- case 192:
- v = 'aae06992acbf52a3e8f4a96ec9300bd7aae06992acbf52a3e8f4a96ec9300bd7';
- break;
- case 256:
- v = 'dc95c078a2408989ad48a21492842087dc95c078a2408989ad48a21492842087';
- break;
- }
- var testpassed = ( ect == v && md5_vm_test() );
- var frm = document.forms.login;
- if(testpassed)
- {
- // alert('encryption self-test passed');
- frm.use_crypt.value = 'yes';
- var cryptkey = frm.crypt_key.value;
- frm.crypt_key.value = '';
- if(cryptkey != byteArrayToHex(hexToByteArray(cryptkey)))
- {
- alert('Byte array conversion SUCKS');
- testpassed = false;
- }
- cryptkey = hexToByteArray(cryptkey);
- if(!cryptkey || ( ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ) && cryptkey.length != keySizeInBits / 8 )
- {
- frm._cont.disabled = true;
- len = ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ? '\nLen: '+cryptkey.length : '';
- alert('The key is messed up\nType: '+typeof(cryptkey)+len);
- }
- }
- else
- {
- // alert('encryption self-test FAILED');
- }
- if(testpassed)
- {
- pass = frm.admin_pass.value;
- pass = stringToByteArray(pass);
- cryptstring = rijndaelEncrypt(pass, cryptkey, 'ECB');
- //decrypted = rijndaelDecrypt(cryptstring, cryptkey, 'ECB');
- //decrypted = byteArrayToString(decrypted);
- //return false;
- if(!cryptstring)
- {
- return false;
- }
- cryptstring = byteArrayToHex(cryptstring);
- // document.getElementById('cryptdebug').innerHTML = '<pre>Data: '+cryptstring+'<br />Key: '+byteArrayToHex(cryptkey)+'</pre>';
- frm.crypt_data.value = cryptstring;
- frm.admin_pass.value = '';
- frm.admin_pass_confirm.value = '';
- }
- return false;
- }
- // ]]>
- </script>
- <?php
- break;
- case "confirm":
- if(!isset($_POST['_cont'])) {
- echo 'No POST data signature found. Please <a href="install.php?mode=sysreqs">restart the installation</a>.';
- $template->footer();
- exit;
- }
- unset($_POST['_cont']);
- ?>
- <form name="confirm" action="install.php?mode=install" method="post">
- <?php
- $k = array_keys($_POST);
- for($i=0;$i<sizeof($_POST);$i++) {
- echo '<input type="hidden" name="'.htmlspecialchars($k[$i]).'" value="'.htmlspecialchars($_POST[$k[$i]]).'" />'."\n";
- }
- ?>
- <h3><?php echo $lang->get('confirm_header_blurb_title'); ?></h3>
- <p><?php echo $lang->get('confirm_header_blurb_body'); ?></p>
- <ul>
- <li><?php echo $lang->get('confirm_lbl_db_host'); ?> <?php echo $_POST['db_host']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_db_name'); ?> <?php echo $_POST['db_name']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_db_user'); ?> <?php echo $_POST['db_user']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_db_pass'); ?></li>
- <li><?php echo $lang->get('confirm_lbl_sitename'); ?> <?php echo $_POST['sitename']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_sitedesc'); ?> <?php echo $_POST['sitedesc']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_adminuser'); ?> <?php echo $_POST['admin_user']; ?></li>
- <li><?php echo $lang->get('confirm_lbl_aesbits'); ?> <?php echo $lang->get('confirm_lbl_aes_strength', array( 'aes_bits' => AES_BITS )); ?><br /><small><?php echo $lang->get('confirm_lbl_aes_change'); ?></small></li>
- </ul>
- <div class="pagenav">
- <table border="0">
- <tr>
- <td>
- <input type="submit" value="<?php echo $lang->get('confirm_btn_install_enano'); ?>" name="_cont" />
- </td>
- <td>
- <p>
- <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
- <!-- Like this even needs to be localized. :-P -->
- • <?php echo $lang->get('confirm_objective_pray'); ?>
- </p>
- </td>
- </tr>
- </table>
- </div>
- </form>
- <?php
- break;
- case "install":
- if(!isset($_POST['db_host']) ||
- !isset($_POST['db_name']) ||
- !isset($_POST['db_user']) ||
- !isset($_POST['db_pass']) ||
- !isset($_POST['db_driver']) ||
- !isset($_POST['sitename']) ||
- !isset($_POST['sitedesc']) ||
- !isset($_POST['copyright']) ||
- !isset($_POST['admin_user']) ||
- !isset($_POST['admin_pass']) ||
- !isset($_POST['admin_embed_php']) || ( isset($_POST['admin_embed_php']) && !in_array($_POST['admin_embed_php'], array('2', '4')) ) ||
- !isset($_POST['urlscheme'])
- )
- {
- echo 'The installer has detected that one or more required form values is not set. Please <a href="install.php?mode=license">restart the installation</a>.';
- $template->footer();
- exit;
- }
- if ( !in_array($_POST['db_driver'], array('mysql', 'postgresql')) )
- {
- echo 'Invalid database driver.';
- $template->footer();
- exit;
- }
- switch($_POST['urlscheme'])
- {
- case "ugly":
- default:
- $cp = scriptPath.'/index.php?title=';
- break;
- case "short":
- $cp = scriptPath.'/index.php/';
- break;
- case "tiny":
- $cp = scriptPath.'/';
- break;
- }
- function err($t) { global $template; echo $t; $template->footer(); exit; }
-
- // $stages = array('connect', 'decrypt', 'genkey', 'parse', 'sql', 'writeconfig', 'renameconfig', 'startapi', 'initlogs');
-
- if ( !preg_match('/^[a-z0-9_-]*$/', $_POST['table_prefix']) )
- err('Hacking attempt was detected in table_prefix.');
-
- start_install_table();
-
- // Are we just trying to auto-rename the config files? If so, skip everything else
- if ( !isset($_GET['stage']) || ( isset($_GET['stage']) && $_GET['stage'] != 'renameconfig' ) )
- {
- // The stages connect, decrypt, genkey, and parse are preprocessing and don't do any actual data modification.
- // Thus, they need to be run on each retry, e.g. never skipped.
- run_installer_stage('connect', $lang->get('install_stg_connect_title'), 'stg_mysql_connect', $lang->get('install_stg_connect_body'), false);
- if ( isset($_POST['drop_tables']) )
- {
- // Are we supposed to drop any existing tables? If so, do it now
- run_installer_stage('drop', $lang->get('install_stg_drop_title'), 'stg_drop_tables', 'This step never returns failure');
- }
- run_installer_stage('decrypt', $lang->get('install_stg_decrypt_title'), 'stg_decrypt_admin_pass', $lang->get('install_stg_decrypt_body'), false);
- run_installer_stage('genkey', $lang->get('install_stg_genkey_title', array( 'aes_bits' => AES_BITS )), 'stg_generate_aes_key', $lang->get('install_stg_genkey_body'), false);
- run_installer_stage('parse', $lang->get('install_stg_parse_title'), 'stg_parse_schema', $lang->get('install_stg_parse_body'), false);
- run_installer_stage('sql', $lang->get('install_stg_sql_title'), 'stg_install', $lang->get('install_stg_sql_body'), false);
- run_installer_stage('writeconfig', $lang->get('install_stg_writeconfig_title'), 'stg_write_config', $lang->get('install_stg_writeconfig_body'));
-
- // Mainstream installation complete - Enano should be usable now
- // The stage of starting the API is special because it has to be called out of function context.
- // To alleviate this, we have two functions, one that returns success and one that returns failure
- // If the Enano API load is successful, the success function is called to report the action to the user
- // If unsuccessful, the failure report is sent
-
- $template_bak = $template;
-
- $_GET['title'] = 'Main_Page';
- require('includes/common.php');
-
- if ( is_object($db) && is_object($session) )
- {
- run_installer_stage('startapi', $lang->get('install_stg_startapi_title'), 'stg_start_api_success', '...', false);
- }
- else
- {
- run_installer_stage('startapi', $lang->get('install_stg_startapi_title'), 'stg_start_api_failure', $lang->get('install_stg_startapi_body'), false);
- }
-
- // We need to be logged in (with admin rights) before logs can be flushed
- $admin_password = stg_decrypt_admin_pass(true);
- $session->login_without_crypto($_POST['admin_user'], $admin_password, false);
-
- // Now that login cookies are set, initialize the session manager and ACLs
- $session->start();
- $paths->init();
-
- run_installer_stage('importlang', $lang->get('install_stg_importlang_title'), 'stg_import_language', $lang->get('install_stg_importlang_body'));
- run_installer_stage('initlogs', $lang->get('install_stg_initlogs_title'), 'stg_init_logs', $lang->get('install_stg_initlogs_body'));
-
- run_installer_stage('buildindex', $lang->get('install_stg_buildindex_title'), 'stg_build_index', $lang->get('install_stg_buildindex_body'));
-
- /*
- * HACKERS:
- * If you're making a custom distribution of Enano, put all your custom plugin-related code here.
- * You have access to the full Enano API as well as being logged in with complete admin rights.
- * Don't do anything horrendously fancy here, unless you add a new stage (or more than one) and
- * have the progress printed out properly.
- */
-
- } // check for stage == renameconfig
- else
- {
- // If we did skip the main installer routine, set $template_bak to make the reversal later work properly
- $template_bak = $template;
- }
-
- // Final step is to rename the config file
- // In early revisions of 1.0.2, this step was performed prior to the initialization of the Enano API. It was decided to move
- // this stage to the end because it will fail more often than any other stage, thus making alternate routes imperative. If this
- // stage fails, then no big deal, we'll just have the user rename the files manually and then let them see the pretty success message.
- run_installer_stage('renameconfig', $lang->get('install_stg_rename_title'), 'stg_rename_config', $lang->get('install_stg_rename_body'));
-
- close_install_table();
-
- unset($template);
- $template =& $template_bak;
-
- echo '<h3>' . $lang->get('install_msg_complete_title') . '</h3>';
- echo '<p>' . $lang->get('install_msg_complete_body', array('finish_link' => 'install.php?mode=finish')) . '</p>';
-
- // echo '<script type="text/javascript">window.location="'.scriptPath.'/install.php?mode=finish";</script>';
-
- break;
- case "finish":
- echo '<h3>' . $lang->get('finish_msg_congratulations') . '</h3>
- ' . $lang->get('finish_body') . '
- <p>' . $lang->get('finish_link_mainpage', array('mainpage_link' => 'index.php')) . '</p>';
- break;
- // this stage is never shown during the installation, but is provided for legal purposes
- case "showlicense":
- show_license(true);
- break;
-}
-$template->footer();
-
-?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/.htaccess Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,8 @@
+# Used for testing mod_rewrite.
+
+RewriteEngine on
+
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule (.*) install.php?do=modrewrite_test&str=$1
+
Binary file install/images/balancer.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/css/installer.css Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,231 @@
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * installer.css - visual styling rules for the installer
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+body {
+ font-family: DejaVu Sans, Arial, Helvetica, sans-serif;
+ font-size: 9pt;
+ margin: 0;
+ padding: 0;
+}
+
+div#header {
+ margin: 0px auto;
+ width: 800px;
+ padding: 10px 0;
+}
+
+div#step {
+ float: right;
+ font-size: 12pt;
+ color: #D84308;
+ line-height: 48px;
+ background-image: url(../icons/install.png);
+ background-position: right center;
+ background-repeat: no-repeat;
+ padding-right: 56px;
+ margin: 10px 0 0 0;
+}
+
+div.stages-holder {
+ color: #ffffff;
+ background-color: #2f527a;
+ width: 100%;
+}
+
+ul.stages {
+ margin: 0;
+ line-height: 24px;
+ font-size: 8pt;
+ padding: 0;
+}
+ul.stages-fixed {
+ /*
+ width: 840px;
+ */
+ display: table;
+ margin: 0 auto;
+}
+li.stage {
+ list-style-type: none;
+ float: left;
+ text-align: center;
+ padding: 3px 20px 3px 20px;
+}
+li.stage-active {
+ font-weight: bold;
+ padding: 1px 20px 5px 20px;
+ background-image: url(../marker.gif);
+ background-position: center bottom;
+ background-repeat: no-repeat;
+ background-color: #5f82aa;
+}
+div#enano-fill {
+ background-image: url(../substages.png);
+ background-repeat: repeat-x;
+}
+div#enano-body {
+ width: 780px;
+ padding: 10px;
+ margin: 0 auto;
+}
+div#enano-body a {
+ color: #003366;
+ text-decoration: underline;
+}
+div#enano-body a:hover {
+ color: #0055AA;
+}
+div#copyright {
+ border-top: 1px dotted #003399;
+ font-size: 6pt;
+ padding: 10px;
+ background-image: url(../substages.png);
+ background-repeat: repeat-x;
+ width: 70%;
+ margin: 20px auto 0 auto;
+ text-align: center;
+ color: #808080;
+}
+td.balancer {
+ width: 21px;
+ background-image: url(../balancer.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+}
+ul.icons {
+ margin: 0;
+ padding: 0;
+ list-style-type: none;
+ display: table;
+}
+ul.icons li:first-child {
+ border-top-color: #FFFFFF;
+}
+ul.icons li {
+ /* Invisible border to prevent size-switching later */
+ border: 1px solid #FFFFFF;
+ border-top-color: #F0F0F0;
+ margin: 0 0 -2px 0;
+ padding: 0;
+ display: block;
+}
+ul.icons li:hover {
+ border-color: #D0D0D0;
+ -moz-border-radius: 5px;
+}
+a.icon {
+ display: block;
+ font-size: 18pt;
+ line-height: 48px;
+ padding: 10px 20px 10px 68px;
+ background-position: 10px center;
+ background-repeat: no-repeat;
+ color: #002266;
+ text-decoration: none !important;
+}
+a.icon:hover {
+ cursor: pointer;
+ color: #002266 !important;
+ background-color: #F0F0F0;
+}
+a.icon-disabled {
+ color: #808080 !important;
+ opacity: 0.7;
+ filter: alpha(opacity=70);
+}
+a.icon-disabled:hover {
+ color: #808080 !important;
+ background-color: #FCFCFC;
+ border-color: #F8F8F8;
+}
+a.icon small, a.icon-disabled small {
+ display: block;
+ font-size: 8pt;
+ line-height: normal;
+ margin-top: -10px;
+}
+a.readme {
+ background-image: url(../icons/readme.png);
+}
+a.install {
+ background-image: url(../icons/install.png);
+}
+a.install-disabled {
+ background-image: url(../icons/install-disabled.png);
+}
+a.upgrade {
+ background-image: url(../icons/upgrade.png);
+}
+a.upgrade-disabled {
+ background-image: url(../icons/upgrade-disabled.png);
+}
+
+.scroller {
+ padding: 10px;
+ border: 1px dotted #002266;
+ background-color: #F0F0F0;
+ max-height: 500px;
+ clip: rect(0px, auto, auto, 0px);
+ overflow: auto;
+}
+
+div#installnotice {
+ margin: 5% 0 0 0;
+}
+
+table#installmenu {
+ margin: 0 auto 5% auto;
+}
+span.fieldtip_js {
+ display: block;
+ background-color: #F0F0FF;
+ padding: 10px;
+ border: 1px solid #245687;
+ position: absolute;
+}
+
+/* Inputs, form controls */
+
+input[type ^="button"], button {
+ background-color: #F8F8FB;
+ color: #202020;
+ border-color: #B0B0B8 #D0D0D8 #D0D0D8 #B0B0B8;
+ border-width: 1px;
+ border-style: solid;
+}
+input[type ^="submit"] {
+ background-color: #4F729A;
+ color: #FFFFFF;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #1F426A #7FA2CA #7FA2CA #1F426A;
+}
+input[type ^="submit"]:hover, input[type ^="submit"]:focus {
+ background-color: #5f82aa;
+}
+input[type ^="text"], input[type ^="password"] {
+ color: #202020;
+ background-color: #F0F0F4;
+ border: 1px solid #D6D6E9;
+}
+input[type ^="text"]:hover, input[type ^="password"]:hover {
+ color: #202020;
+ background-color: #F4F4F8;
+ border: 1px solid #D6D6E9;
+}
+input[type ^="text"]:focus, input[type ^="password"]:focus {
+ color: #202020;
+ background-color: #FFFFFF;
+ border: 1px solid #D6D6E9;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/enano-artwork/README Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,8 @@
+The images in this directory are copyright (C) 2007 Dan Fuhry. Except
+as permitted by applicable law, they may not be used in any way other
+than to promote the unmodified Enano CMS. You also may not modify and
+then distribute the images in this directory, or distribute them sep-
+arately from the Enano packages. The goal here is to establish a uni-
+que identity for Enano through the use of a logo, and that identity
+would be confused if this logo is used for unofficial Enano distros.
+
Binary file install/images/enano-artwork/installer-greeting.png has changed
Binary file install/images/enano-artwork/installer-header-blue.png has changed
Binary file install/images/icons/install-disabled.png has changed
Binary file install/images/icons/install.png has changed
Binary file install/images/icons/readme.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/icons/src/README Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,3 @@
+These icons are from the Flygo icon set, which is based on icons from the Tango
+Desktop Project. They are released under the GNU General Public License.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/icons/src/accessories-text-editor.svg Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,916 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.44"
+ version="1.0"
+ sodipodi:docbase="/home/lapo/Icone/cvs/gnome-icon-theme/scalable/apps"
+ sodipodi:docname="accessories-text-editor.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient4700"
+ inkscape:collect="always">
+ <stop
+ id="stop4702"
+ offset="0"
+ style="stop-color:#2e3436;stop-opacity:1" />
+ <stop
+ id="stop4704"
+ offset="1"
+ style="stop-color:#888a85;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4690">
+ <stop
+ style="stop-color:white;stop-opacity:1"
+ offset="0"
+ id="stop4692" />
+ <stop
+ style="stop-color:#eeeeec;stop-opacity:1"
+ offset="1"
+ id="stop4694" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4682">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop4684" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop4686" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4333">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop4335" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop4337" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3415">
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="0"
+ id="stop3417" />
+ <stop
+ id="stop3423"
+ offset="0.5"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop3419" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3399">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop3401" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop3403" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient2919">
+ <stop
+ style="stop-color:#d3d7cf;stop-opacity:1;"
+ offset="0"
+ id="stop2921" />
+ <stop
+ style="stop-color:#d3d7cf;stop-opacity:0;"
+ offset="1"
+ id="stop2923" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2804">
+ <stop
+ style="stop-color:white;stop-opacity:1"
+ offset="0"
+ id="stop2806" />
+ <stop
+ style="stop-color:#d3d7cf;stop-opacity:1"
+ offset="1"
+ id="stop2808" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2791">
+ <stop
+ style="stop-color:#555753;stop-opacity:1;"
+ offset="0"
+ id="stop2793" />
+ <stop
+ id="stop2799"
+ offset="0.5"
+ style="stop-color:#cccdcb;stop-opacity:1;" />
+ <stop
+ style="stop-color:#555753;stop-opacity:1"
+ offset="1"
+ id="stop2795" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2791"
+ id="linearGradient2797"
+ x1="11.669194"
+ y1="6.728353"
+ x2="11.580806"
+ y2="14.662594"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2804"
+ id="radialGradient2810"
+ cx="12.321928"
+ cy="11.669307"
+ fx="12.321928"
+ fy="11.669307"
+ r="1.499999"
+ gradientTransform="matrix(9.835652,1.854444e-6,0,1.136384,-108.6942,-1.914856)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2919"
+ id="linearGradient2925"
+ x1="11.949747"
+ y1="40.664974"
+ x2="94.364037"
+ y2="47.897068"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.489708,-2,-22.55226)" />
+ <linearGradient
+ id="linearGradient2275"
+ inkscape:collect="always">
+ <stop
+ id="stop2277"
+ offset="0"
+ style="stop-color:#fce94f;stop-opacity:1;" />
+ <stop
+ id="stop2279"
+ offset="1"
+ style="stop-color:#c4a000" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient2301"
+ inkscape:collect="always">
+ <stop
+ id="stop2303"
+ offset="0"
+ style="stop-color:#c4a000;stop-opacity:1;" />
+ <stop
+ id="stop2305"
+ offset="1"
+ style="stop-color:#edd400" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient1813"
+ inkscape:collect="always">
+ <stop
+ id="stop1815"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop1817"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient1813"
+ id="linearGradient3273"
+ gradientUnits="userSpaceOnUse"
+ x1="18.1875"
+ y1="18.53828"
+ x2="32.9375"
+ y2="18.392296"
+ gradientTransform="matrix(1,0,0,0.415008,0,14.33231)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2275"
+ id="linearGradient3275"
+ gradientUnits="userSpaceOnUse"
+ x1="26.993084"
+ y1="11.252465"
+ x2="30.432114"
+ y2="14.691495" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient2301"
+ id="linearGradient3277"
+ gradientUnits="userSpaceOnUse"
+ x1="29.03377"
+ y1="14.298466"
+ x2="25.991804"
+ y2="11.2565" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3399"
+ id="radialGradient3430"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,2.166667,0,-46.08333)"
+ cx="6"
+ cy="39.5"
+ fx="6"
+ fy="39.5"
+ r="3" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3399"
+ id="radialGradient3432"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,2.166667,-45,-125.0833)"
+ cx="6"
+ cy="39.5"
+ fx="6"
+ fy="39.5"
+ r="3" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3415"
+ id="linearGradient3434"
+ gradientUnits="userSpaceOnUse"
+ x1="18"
+ y1="46"
+ x2="18"
+ y2="32.999397" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4333"
+ id="radialGradient4339"
+ cx="37.375"
+ cy="33.1875"
+ fx="37.375"
+ fy="33.1875"
+ r="14.625"
+ gradientTransform="matrix(1,0,0,0.226496,0,25.67067)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4682"
+ id="linearGradient4688"
+ x1="6.7928934"
+ y1="32.963203"
+ x2="7.9215727"
+ y2="54.448856"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4690"
+ id="radialGradient4696"
+ cx="29.480816"
+ cy="36.776756"
+ fx="29.480816"
+ fy="36.776756"
+ r="18.5"
+ gradientTransform="matrix(2.012905,0,0,1.338879,-28.88714,-12.68199)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4700"
+ id="linearGradient4698"
+ x1="5.6568546"
+ y1="53.320892"
+ x2="4"
+ y2="16.003418"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#afafaf"
+ borderopacity="1"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="33.31508"
+ inkscape:cy="5.7688415"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ width="48px"
+ height="48px"
+ gridspacingx="0.5px"
+ gridspacingy="0.5px"
+ inkscape:showpageshadow="false"
+ borderlayer="true"
+ gridempspacing="2"
+ inkscape:window-width="1051"
+ inkscape:window-height="797"
+ inkscape:window-x="0"
+ inkscape:window-y="25"
+ showgrid="false"
+ showborder="false"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:grid-points="true" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Lapo Calamandrei</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
+ <dc:title>Text editor</dc:title>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/SourceCode" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <path
+ style="opacity:1;fill:url(#radialGradient4696);fill-opacity:1.0;stroke:url(#linearGradient4698);stroke-width:0.99999952;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 8.267767,10.523348 L 36.73221,10.523348 C 37.711553,10.523348 38.428998,11.276023 38.499977,12.291115 L 40.437477,40 L 40.5,43.5 L 4.5,43.5 L 4.5,40 L 6.5,12.291115 C 6.570075,11.320264 7.288424,10.523348 8.267767,10.523348 z "
+ id="rect3790"
+ sodipodi:nodetypes="cczcccczc" />
+ <g
+ id="g3425"
+ transform="matrix(1.000001,0,0,0.375001,-1.538462e-6,28.12497)"
+ style="opacity:0.3">
+ <rect
+ y="33"
+ x="3"
+ height="13"
+ width="3"
+ id="rect3397"
+ style="opacity:1;fill:url(#radialGradient3430);fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ transform="scale(-1,-1)"
+ y="-46"
+ x="-42"
+ height="13"
+ width="3"
+ id="rect3407"
+ style="opacity:1;fill:url(#radialGradient3432);fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ y="33"
+ x="6"
+ height="13"
+ width="33"
+ id="rect3413"
+ style="opacity:1;fill:url(#linearGradient3434);fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="opacity:0.07;fill:url(#radialGradient4339);fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ id="path4331"
+ sodipodi:cx="37.375"
+ sodipodi:cy="33.1875"
+ sodipodi:rx="14.625"
+ sodipodi:ry="3.3125"
+ d="M 52 33.1875 A 14.625 3.3125 0 1 1 22.75,33.1875 A 14.625 3.3125 0 1 1 52 33.1875 z"
+ transform="matrix(0.897436,0,0,0.981132,1.333333,1.688679)" />
+ <g
+ id="g2894"
+ transform="translate(-1.75,-1)">
+ <path
+ transform="matrix(1.143498,0,0,1.268986,-1.524595,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2878"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,2.475405,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2880"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,6.475405,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2882"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,10.47541,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2884"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,14.47541,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2886"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,18.47541,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2888"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ transform="matrix(1.143498,0,0,1.268986,22.47541,-5.176204)"
+ d="M 13.999999 15.109375 A 1.7421875 1.578125 0 1 1 10.515624,15.109375 A 1.7421875 1.578125 0 1 1 13.999999 15.109375 z"
+ sodipodi:ry="1.578125"
+ sodipodi:rx="1.7421875"
+ sodipodi:cy="15.109375"
+ sodipodi:cx="12.257812"
+ id="path2890"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ </g>
+ <rect
+ style="opacity:1;fill:url(#linearGradient2925);fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ id="rect2757"
+ width="35"
+ height="3.0103984"
+ x="5"
+ y="40" />
+ <path
+ sodipodi:type="inkscape:offset"
+ inkscape:radius="-0.9722718"
+ inkscape:original="M 8.28125 10.53125 C 7.301907 10.53125 6.570075 11.310399 6.5 12.28125 L 4.5 40 L 4.5 43.5 L 40.5 43.5 L 40.4375 40 L 38.5 12.28125 C 38.429021 11.266158 37.698095 10.53125 36.71875 10.53125 L 8.28125 10.53125 z "
+ style="opacity:1;fill:none;fill-opacity:1.0;stroke:url(#linearGradient4688);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;stroke-dasharray:none"
+ id="path4680"
+ d="M 8.28125,11.5 C 7.8175892,11.5 7.5065211,11.820452 7.46875,12.34375 L 5.46875,40 L 5.46875,40.0625 L 5.46875,42.53125 L 39.5,42.53125 L 39.46875,40.0625 L 39.46875,40.03125 L 37.53125,12.34375 C 37.490391,11.75941 37.211695,11.5 36.71875,11.5 L 8.28125,11.5 z " />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#c17d11;stroke-width:1px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 4.5,43.5 L 40.5,43.5"
+ id="path2760"
+ sodipodi:nodetypes="cc" />
+ <g
+ id="g2814"
+ transform="translate(-2,-1)">
+ <rect
+ ry="1.5072321"
+ rx="0.99899912"
+ y="9.5010004"
+ x="11.500997"
+ height="5.0440111"
+ width="1.9979982"
+ id="rect2776"
+ style="opacity:1;fill:url(#radialGradient2810);fill-opacity:1;stroke:url(#linearGradient2797);stroke-width:1.00199974;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <path
+ transform="translate(-0.21875,-0.109374)"
+ d="M 12.71875 11.257812 A 0.59375 0.6484375 0 1 1 11.53125,11.257812 A 0.59375 0.6484375 0 1 1 12.71875 11.257812 z"
+ sodipodi:ry="0.6484375"
+ sodipodi:rx="0.59375"
+ sodipodi:cy="11.257812"
+ sodipodi:cx="12.125"
+ id="path2812"
+ style="opacity:1;fill:white;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ id="g2637"
+ inkscape:label="base"
+ style="display:inline"
+ transform="translate(60.78337,49.43458)" />
+ <g
+ id="g2953"
+ style="opacity:0.6"
+ transform="translate(0,-1)">
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="31"
+ height="1"
+ width="5"
+ id="rect3297"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="20"
+ x="8.875"
+ height="1"
+ width="2.125"
+ id="rect3305"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.46088129"
+ y="36"
+ x="7.828125"
+ height="1"
+ width="4.171875"
+ id="rect3287"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="23"
+ x="8.609375"
+ height="1"
+ width="8.390625"
+ id="rect3307"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.49520382"
+ y="25"
+ x="8.484375"
+ height="1"
+ width="3.515625"
+ id="rect3309"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="33"
+ x="33"
+ height="1"
+ width="4"
+ id="rect3313"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ inkscape:transform-center-x="0.28125"
+ ry="0.5"
+ rx="0.5"
+ y="36"
+ x="21"
+ height="1"
+ width="3"
+ id="rect2940"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="23"
+ x="30"
+ height="1"
+ width="5"
+ id="rect2915"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="28"
+ x="8.359375"
+ height="1"
+ width="2.640625"
+ id="rect2885"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="9"
+ height="1"
+ width="6"
+ id="rect2893"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="21"
+ height="1"
+ width="5"
+ id="rect2895"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="28"
+ height="1"
+ width="2"
+ id="rect2897"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="16"
+ height="1"
+ width="2"
+ id="rect2899"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="18"
+ x="19"
+ height="1"
+ width="2"
+ id="rect2901"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="20"
+ x="12"
+ height="1"
+ width="4"
+ id="rect2903"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="20"
+ x="17"
+ height="1"
+ width="2"
+ id="rect2905"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="20"
+ x="20"
+ height="1"
+ width="4"
+ id="rect2907"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="23"
+ x="19"
+ height="1"
+ width="4"
+ id="rect2909"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="23"
+ x="23"
+ height="1"
+ width="2"
+ id="rect2911"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="23"
+ x="26"
+ height="1"
+ width="3"
+ id="rect2913"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="25"
+ x="13"
+ height="1"
+ width="2"
+ id="rect2919"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="25"
+ x="16"
+ height="1"
+ width="4"
+ id="rect2921"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="25"
+ x="20"
+ height="1"
+ width="2"
+ id="rect2923"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="25"
+ x="24"
+ height="1"
+ width="2"
+ id="rect2925"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="28"
+ x="12"
+ height="1"
+ width="2"
+ id="rect2931"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="28"
+ x="14"
+ height="1"
+ width="4"
+ id="rect2933"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="28"
+ x="19"
+ height="1"
+ width="2"
+ id="rect2935"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="36"
+ x="13"
+ height="1"
+ width="6"
+ id="rect2938"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.5"
+ y="33"
+ x="8"
+ height="1"
+ width="2"
+ id="rect2942"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="33"
+ x="11"
+ height="1"
+ width="4"
+ id="rect2945"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="33"
+ x="17"
+ height="1"
+ width="5"
+ id="rect2947"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="33"
+ x="23"
+ height="1"
+ width="4"
+ id="rect2949"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ <rect
+ ry="0.5"
+ rx="0.54237288"
+ y="33.004311"
+ x="28.007845"
+ height="1"
+ width="4"
+ id="rect2951"
+ style="opacity:0.8;fill:#888a85;fill-opacity:1;stroke:none;stroke-width:1.00199997;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.20000057;stroke-opacity:1" />
+ </g>
+ <g
+ transform="translate(6.5485,12.43459)"
+ id="g2369">
+ <path
+ id="path2334"
+ d="M 34.53125,16.03125 L 19.53125,20.504163 L 19.40625,20.569008 L 19.3125,20.646822 L 16.5625,23.5 L 24,22.657016 L 24.28125,22.631078 L 24.46875,22.553264 L 34.53125,19.870071 L 34.53125,16.03125 z "
+ style="opacity:0.23529412;fill:url(#linearGradient3273);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+ sodipodi:nodetypes="cccccccccc" />
+ <g
+ id="g2321"
+ transform="translate(-0.15625,-0.25)">
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path2273"
+ d="M 19.5,18 L 36.5,1 C 38.675049,1.359961 39.584719,2.7322249 40,4.5 L 23,21.5 L 17.5,23 L 19.5,18 z "
+ style="fill:url(#linearGradient3275);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3277);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path2313"
+ d="M 20.399998,18.5 L 36.897748,2.1022524 C 37.987493,2.280687 38.415009,3.0901961 38.897748,4.1022524 L 22.5,20.600002 L 19.199997,21.500003 L 20.399998,18.5 z "
+ style="opacity:0.28235294;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:white;stroke-width:1.0000006;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" />
+ <path
+ sodipodi:nodetypes="cczcc"
+ id="path2298"
+ d="M 18.34633,22.276561 L 19.94414,18.268127 C 19.94414,18.268127 21.094356,18.503399 21.796875,19.203125 C 22.499394,19.902851 22.754217,21.067032 22.754217,21.067032 L 18.34633,22.276561 z "
+ style="opacity:0.50196078;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.31200001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ id="path2283"
+ d="M 17.5625,21.5 L 16.65625,23.75 L 19,23.09375 C 19.00202,23.061913 19,23.032344 19,23 C 19,22.197875 18.354692,21.540199 17.5625,21.5 z "
+ style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline"
+ sodipodi:nodetypes="cccsc" />
+ </g>
+ </g>
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4712"
+ transform="translate(4,0)"
+ width="48"
+ height="48" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4714"
+ transform="translate(8,0)"
+ width="48"
+ height="48" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4716"
+ transform="translate(12,0)"
+ width="48"
+ height="48" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4718"
+ transform="translate(16,0)"
+ width="48"
+ height="48" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4720"
+ transform="translate(20,0)"
+ width="48"
+ height="48" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#g2814"
+ id="use4722"
+ transform="translate(24,0)"
+ width="48"
+ height="48" />
+ </g>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/icons/src/system-installer.svg Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,495 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48.000000px"
+ height="48.000000px"
+ id="svg14603"
+ sodipodi:version="0.32"
+ inkscape:version="0.43+devel"
+ sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/apps"
+ sodipodi:docname="system-installer.svg">
+ <defs
+ id="defs3">
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5060"
+ id="radialGradient5031"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
+ cx="605.71429"
+ cy="486.64789"
+ fx="605.71429"
+ fy="486.64789"
+ r="117.14286" />
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient5060">
+ <stop
+ style="stop-color:black;stop-opacity:1;"
+ offset="0"
+ id="stop5062" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop5064" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5060"
+ id="radialGradient5029"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+ cx="605.71429"
+ cy="486.64789"
+ fx="605.71429"
+ fy="486.64789"
+ r="117.14286" />
+ <linearGradient
+ id="linearGradient5048">
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="0"
+ id="stop5050" />
+ <stop
+ id="stop5056"
+ offset="0.5"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ style="stop-color:black;stop-opacity:0;"
+ offset="1"
+ id="stop5052" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5048"
+ id="linearGradient5027"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
+ x1="302.85715"
+ y1="366.64789"
+ x2="302.85715"
+ y2="609.50507" />
+ <linearGradient
+ id="linearGradient7844"
+ inkscape:collect="always">
+ <stop
+ id="stop7846"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop7848"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7834"
+ inkscape:collect="always">
+ <stop
+ id="stop7836"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop7838"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient7670">
+ <stop
+ id="stop7672"
+ offset="0"
+ style="stop-color:#dfdfdf;stop-opacity:1;" />
+ <stop
+ id="stop7674"
+ offset="1.0000000"
+ style="stop-color:#c0c0c0;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ gradientTransform="matrix(1.008511,0.000000,0.000000,1.000000,-47.59576,-0.285714)"
+ gradientUnits="userSpaceOnUse"
+ y2="40.857143"
+ x2="72.857140"
+ y1="9.7142859"
+ x1="64.571426"
+ id="linearGradient7676"
+ xlink:href="#linearGradient7670"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientTransform="translate(-2.000000,0.000000)"
+ gradientUnits="userSpaceOnUse"
+ y2="0.50379461"
+ x2="19.323767"
+ y1="11.312428"
+ x1="19.362535"
+ id="linearGradient7840"
+ xlink:href="#linearGradient7834"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,1.298874e-16,25.06362)"
+ r="22.728432"
+ fy="37.595428"
+ fx="24.546707"
+ cy="37.595428"
+ cx="24.546707"
+ id="radialGradient7850"
+ xlink:href="#linearGradient7844"
+ inkscape:collect="always" />
+ <linearGradient
+ id="aigrd1"
+ gradientUnits="userSpaceOnUse"
+ x1="14.9966"
+ y1="11.1885"
+ x2="32.511"
+ y2="34.3075">
+ <stop
+ offset="0"
+ style="stop-color:#EBEBEB"
+ id="stop3034" />
+ <stop
+ offset="0.5"
+ style="stop-color:#FFFFFF"
+ id="stop3036" />
+ <stop
+ offset="1"
+ style="stop-color:#EBEBEB"
+ id="stop3038" />
+ </linearGradient>
+ <linearGradient
+ id="aigrd2"
+ gradientUnits="userSpaceOnUse"
+ x1="12.2744"
+ y1="32.4165"
+ x2="35.3912"
+ y2="14.2033">
+ <stop
+ offset="0"
+ style="stop-color:#FBFBFB"
+ id="stop3043" />
+ <stop
+ offset="0.5"
+ style="stop-color:#B6B6B6"
+ id="stop3045" />
+ <stop
+ offset="1"
+ style="stop-color:#E4E4E4"
+ id="stop3047" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4236">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.32673267;"
+ offset="0.0000000"
+ id="stop4238" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.60396039;"
+ offset="1.0000000"
+ id="stop4240" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient6028">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop6030" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop6032" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient6036">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop6038" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop6040" />
+ </linearGradient>
+ <linearGradient
+ y2="14.2033"
+ x2="35.3912"
+ y1="32.4165"
+ x1="12.2744"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient3394">
+ <stop
+ id="stop3396"
+ style="stop-color:#fff307;stop-opacity:1.0000000;"
+ offset="0.0000000" />
+ <stop
+ id="stop3398"
+ style="stop-color:#166eff;stop-opacity:1.0000000;"
+ offset="0.50000000" />
+ <stop
+ id="stop3400"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;"
+ offset="1.0000000" />
+ </linearGradient>
+ <radialGradient
+ r="22.728432"
+ fy="37.595428"
+ fx="24.546707"
+ cy="37.595428"
+ cx="24.546707"
+ gradientTransform="matrix(1.000000,0.000000,0.000000,0.333333,1.121564e-14,25.06362)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient10566"
+ xlink:href="#linearGradient7844"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="34.3075"
+ x2="32.511"
+ y1="11.1885"
+ x1="14.9966"
+ gradientTransform="matrix(0.683145,0.000000,0.000000,0.683145,18.55581,18.12886)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10568"
+ xlink:href="#aigrd1"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="14.2033"
+ x2="35.3912"
+ y1="32.4165"
+ x1="12.2744"
+ gradientTransform="matrix(0.705308,0.000000,0.000000,0.705308,18.02392,17.61692)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10570"
+ xlink:href="#aigrd2"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="28.000000"
+ x2="29.000000"
+ y1="14.625000"
+ x1="21.125000"
+ gradientTransform="matrix(0.717302,0.000000,0.000000,0.717302,17.73603,18.06909)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10572"
+ xlink:href="#linearGradient4236"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="28.000000"
+ x2="29.000000"
+ y1="14.625000"
+ x1="21.125000"
+ gradientTransform="matrix(0.717302,0.000000,0.000000,0.717302,17.73603,18.06909)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10574"
+ xlink:href="#linearGradient4236"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="54.698483"
+ x2="48.798885"
+ y1="3.6100161"
+ x1="10.501720"
+ gradientTransform="matrix(0.573842,0.000000,0.000000,0.573842,20.97995,19.56347)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10576"
+ xlink:href="#linearGradient6036"
+ inkscape:collect="always" />
+ <linearGradient
+ y2="18.366575"
+ x2="17.742729"
+ y1="31.494707"
+ x1="28.702885"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient10578"
+ xlink:href="#linearGradient6028"
+ inkscape:collect="always" />
+ <radialGradient
+ r="21.333334"
+ fy="27.569166"
+ fx="37.751469"
+ cy="27.569166"
+ cx="37.751469"
+ gradientTransform="matrix(0.441746,0.498655,-0.407098,0.360624,32.00755,10.21308)"
+ gradientUnits="userSpaceOnUse"
+ id="radialGradient10580"
+ xlink:href="#linearGradient3394"
+ inkscape:collect="always" />
+ </defs>
+ <sodipodi:namedview
+ fill="#a40000"
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="0.26666667"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="34.663875"
+ inkscape:cy="17.441956"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:showpageshadow="false"
+ inkscape:window-width="872"
+ inkscape:window-height="684"
+ inkscape:window-x="213"
+ inkscape:window-y="252" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>System - Installer</dc:title>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path7822"
+ d="M 7.0663522,9.8326324 L 11.142857,5.5714286 L 34.714286,5.5714286 L 39.034663,9.9336477 L 7.0663522,9.8326324 z "
+ style="opacity:1.0000000;color:#000000;fill:#6b6c69;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#606060;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+ <g
+ id="g5022"
+ transform="matrix(2.01828e-2,0,0,2.086758e-2,41.09416,37.29644)">
+ <rect
+ y="-150.69685"
+ x="-1559.2523"
+ height="478.35718"
+ width="1339.6335"
+ id="rect4173"
+ style="opacity:0.40206185;color:black;fill:url(#linearGradient5027);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path5058"
+ d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
+ style="opacity:0.40206185;color:black;fill:url(#radialGradient5029);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="opacity:0.40206185;color:black;fill:url(#radialGradient5031);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
+ id="path5018"
+ sodipodi:nodetypes="cccc" />
+ </g>
+ <rect
+ ry="1.4285715"
+ rx="1.4285721"
+ y="9.4285717"
+ x="6.5756874"
+ height="31.142857"
+ width="32.848644"
+ id="rect6910"
+ style="opacity:1.0000000;color:#000000;fill:url(#linearGradient7676);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#606060;stroke-width:1.0000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="rect7826"
+ d="M 38.857143,22.756128 L 38.857143,39.184701 C 38.857143,39.659558 38.494011,40.041844 38.042945,40.041844 L 15.874474,40.041844 L 15.923863,22.756128 C 15.923863,22.756128 38.857143,22.756128 38.857143,22.756128 z "
+ style="color:#000000;fill:#a40000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:1.0000000 1.0000000 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path7824"
+ d="M 15.379549,11.285714 L 15.379549,39.285714"
+ style="opacity:1.0000000;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#606060;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:1.0000000 1.0000000 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+ <path
+ style="color:#000000;fill:#f0f0f0;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:1.0000000 1.0000000 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+ d="M 38.857143,22.613273 L 38.857143,11.470414 C 38.857143,10.995557 38.494011,10.613271 38.042945,10.613271 L 15.874474,10.613271 L 15.923863,22.613273 C 15.923863,22.613273 38.857143,22.613273 38.857143,22.613273 z "
+ id="path10582"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ sodipodi:nodetypes="ccccccccs"
+ id="rect7829"
+ d="M 11.512932,6.5274685 C 11.512932,6.5274685 34.285047,6.5274685 34.285047,6.5274685 C 34.285047,6.5274685 38.542046,10.784467 38.542046,10.784467 L 38.542046,39.215524 C 38.542046,39.503290 38.310378,39.734958 38.022612,39.734958 L 7.9773979,39.734958 C 7.6896315,39.734958 7.4579639,39.503290 7.4579639,39.215524 L 7.4579639,10.784467 C 7.4579639,10.784467 11.512932,6.5274685 11.512932,6.5274685 z "
+ style="opacity:0.62566847;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient7840);stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
+ <g
+ transform="translate(-0.999997,-0.285714)"
+ id="g10554">
+ <path
+ transform="matrix(0.550240,0.000000,0.000000,0.550240,19.89726,20.62321)"
+ d="M 47.275139 37.595428 A 22.728432 7.5761442 0 1 1 1.8182755,37.595428 A 22.728432 7.5761442 0 1 1 47.275139 37.595428 z"
+ sodipodi:ry="7.5761442"
+ sodipodi:rx="22.728432"
+ sodipodi:cy="37.595428"
+ sodipodi:cx="24.546707"
+ id="path10170"
+ style="opacity:0.62566847;color:#000000;fill:url(#radialGradient10566);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:1.0000000 1.0000000 ;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <g
+ id="g10156"
+ transform="translate(-1.642857,-2.642857)">
+ <path
+ style="fill:url(#linearGradient10568);fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+ d="M 34.951289,21.954475 C 28.324780,21.954475 22.996247,27.283008 22.996247,33.909517 C 22.996247,40.536026 28.324780,45.864559 34.951289,45.864559 C 41.577799,45.864559 46.906332,40.536026 46.906332,33.909517 C 46.906332,27.283008 41.577799,21.954475 34.951289,21.954475 L 34.951289,21.954475 z M 34.951289,36.778727 C 33.380055,36.778727 32.082079,35.480751 32.082079,33.909517 C 32.082079,32.338283 33.380055,31.040307 34.951289,31.040307 C 36.522523,31.040307 37.820499,32.338283 37.820499,33.909517 C 37.820499,35.480751 36.522523,36.778727 34.951289,36.778727 z "
+ id="path3040" />
+ <path
+ style="fill:url(#linearGradient10570);fill-rule:nonzero;stroke:#808080;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ d="M 34.951305,21.566644 C 28.109819,21.566644 22.608417,27.068045 22.608417,33.909532 C 22.608417,40.751018 28.109819,46.252419 34.951305,46.252419 C 41.792792,46.252419 47.294193,40.751018 47.294193,33.909532 C 47.294193,27.068045 41.792792,21.566644 34.951305,21.566644 L 34.951305,21.566644 z M 34.951305,36.871824 C 33.329097,36.871824 31.989012,35.531740 31.989012,33.909532 C 31.989012,32.287324 33.329097,30.947239 34.951305,30.947239 C 36.573513,30.947239 37.913598,32.287324 37.913598,33.909532 C 37.913598,35.531740 36.573513,36.871824 34.951305,36.871824 z "
+ id="path3049" />
+ <path
+ style="opacity:0.10999996;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+ d="M 34.951289,28.111323 C 31.713337,28.111323 29.153095,30.746866 29.153095,33.909517 C 29.153095,37.147471 31.788638,39.707712 34.951289,39.707712 C 38.189242,39.707712 40.749484,37.072169 40.749484,33.909517 C 40.749484,30.671564 38.113940,28.111323 34.951289,28.111323 L 34.951289,28.111323 z M 34.951289,37.072169 C 33.219361,37.072169 31.788638,35.641446 31.788638,33.909517 C 31.788638,32.177589 33.219361,30.746866 34.951289,30.746866 C 36.683217,30.746866 38.113940,32.177589 38.113940,33.909517 C 38.113940,35.641446 36.683217,37.072169 34.951289,37.072169 z "
+ id="path3051" />
+ <path
+ id="path3916"
+ d="M 38.150519,22.816711 L 36.086643,30.847436 C 36.732045,31.019312 37.248181,31.418679 37.598790,31.971330 L 44.709966,27.639233 C 43.255134,25.269429 40.920193,23.525895 38.150519,22.816711 z "
+ style="fill:url(#linearGradient10572);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
+ <path
+ style="fill:url(#linearGradient10574);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ d="M 30.911911,44.678269 L 33.629199,36.844465 C 33.000117,36.620097 32.518571,36.179639 32.214597,35.600027 L 24.771257,39.332667 C 26.026282,41.814082 28.209936,43.743724 30.911911,44.678269 z "
+ id="path4214" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path5264"
+ d="M 34.951287,22.548803 C 28.654207,22.548803 23.590575,27.612435 23.590575,33.909515 C 23.590575,40.206596 28.654207,45.270227 34.951287,45.270227 C 41.248368,45.270227 46.311999,40.206596 46.311999,33.909515 C 46.311999,27.612435 41.248368,22.548803 34.951287,22.548803 L 34.951287,22.548803 z "
+ style="opacity:0.54644811;fill:none;fill-rule:nonzero;stroke:url(#linearGradient10576);stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
+ <path
+ transform="matrix(0.573842,0.000000,0.000000,0.573842,21.03068,19.61419)"
+ d="M 30.405591 24.930641 A 6.0987959 6.0987959 0 1 1 18.207999,24.930641 A 6.0987959 6.0987959 0 1 1 30.405591 24.930641 z"
+ sodipodi:ry="6.0987959"
+ sodipodi:rx="6.0987959"
+ sodipodi:cy="24.930641"
+ sodipodi:cx="24.306795"
+ id="path6026"
+ style="opacity:0.67213112;color:#000000;fill:none;fill-opacity:0.31638417;fill-rule:nonzero;stroke:url(#linearGradient10578);stroke-width:1.6215941;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
+ sodipodi:type="arc" />
+ <path
+ id="path3390"
+ d="M 34.951289,23.065643 C 28.940684,23.065643 24.107415,27.898912 24.107415,33.909517 C 24.107415,39.920122 28.940684,44.753391 34.951289,44.753391 C 40.961895,44.753391 45.795164,39.920122 45.795164,33.909517 C 45.795164,27.898912 40.961895,23.065643 34.951289,23.065643 L 34.951289,23.065643 z M 34.951289,36.512047 C 33.526094,36.512047 32.348759,35.334712 32.348759,33.909517 C 32.348759,32.484322 33.526094,31.306987 34.951289,31.306987 C 36.376484,31.306987 37.553819,32.484322 37.553819,33.909517 C 37.553819,35.334712 36.376484,36.512047 34.951289,36.512047 z "
+ style="opacity:0.11428566;fill:url(#radialGradient10580);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
+ </g>
+ </g>
+ </g>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/images/icons/src/system-software-update.svg Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,1378 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ sodipodi:docname="system-software-update.svg"
+ sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/apps"
+ inkscape:version="0.43+devel"
+ sodipodi:version="0.32"
+ id="svg3440"
+ height="48px"
+ width="48px"
+ inkscape:export-filename="/home/jimmac/Desktop/big-software-update.png"
+ inkscape:export-xdpi="360.00000"
+ inkscape:export-ydpi="360.00000">
+ <defs
+ id="defs3">
+ <linearGradient
+ id="linearGradient264">
+ <stop
+ id="stop265"
+ offset="0.0000000"
+ style="stop-color:#000000;stop-opacity:0.50299400;" />
+ <stop
+ id="stop266"
+ offset="1.0000000"
+ style="stop-color:#000000;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="31.490198"
+ x2="28.783722"
+ y1="29.943159"
+ x1="28.632685"
+ gradientTransform="matrix(0.810817,0.000000,0.000000,1.233324,1.118717,-4.642761)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient263"
+ xlink:href="#linearGradient264"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient218">
+ <stop
+ id="stop219"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.44910181;" />
+ <stop
+ id="stop222"
+ offset="1.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="22.227985"
+ x2="38.105118"
+ y1="22.227985"
+ x1="36.373066"
+ gradientTransform="matrix(1.138691,0.000000,0.000000,1.732051,-19.29901,-4.517761)"
+ id="linearGradient217"
+ xlink:href="#linearGradient218"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient204">
+ <stop
+ id="stop205"
+ offset="0.0000000"
+ style="stop-color:#7a7a7a;stop-opacity:1.0000000;" />
+ <stop
+ id="stop207"
+ offset="0.19801980"
+ style="stop-color:#c5c5c5;stop-opacity:1.0000000;" />
+ <stop
+ id="stop208"
+ offset="0.59900987"
+ style="stop-color:#626262;stop-opacity:1.0000000;" />
+ <stop
+ id="stop206"
+ offset="1.0000000"
+ style="stop-color:#888888;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="43.915466"
+ x2="23.100046"
+ y1="38.296745"
+ x1="23.100046"
+ gradientTransform="matrix(0.983801,0.000000,0.000000,1.016466,1.118717,-3.017762)"
+ id="linearGradient203"
+ xlink:href="#linearGradient204"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient178">
+ <stop
+ id="stop179"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ <stop
+ id="stop180"
+ offset="0.10827128"
+ style="stop-color:#ffffff;stop-opacity:0.70658684;" />
+ <stop
+ id="stop181"
+ offset="0.92053902"
+ style="stop-color:#ffffff;stop-opacity:0.70658684;" />
+ <stop
+ id="stop182"
+ offset="1.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="117.82710"
+ x2="15.343062"
+ y1="117.82710"
+ x1="1.6422368"
+ gradientTransform="matrix(2.740165,0,0,0.182471,1.118717,16.49994)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient177"
+ xlink:href="#linearGradient178"
+ inkscape:collect="always" />
+ <linearGradient
+ gradientUnits="userSpaceOnUse"
+ y2="372.57819"
+ x2="5.0856376"
+ y1="372.57819"
+ x1="0.61210024"
+ gradientTransform="matrix(8.168597,0,0,0.228621,1.118717,-40.55063)"
+ id="linearGradient271"
+ xlink:href="#linearGradient272"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient272">
+ <stop
+ id="stop273"
+ offset="0.0000000"
+ style="stop-color:#474747;stop-opacity:0.0000000;" />
+ <stop
+ id="stop275"
+ offset="0.10000000"
+ style="stop-color:#474747;stop-opacity:1.0000000;" />
+ <stop
+ id="stop276"
+ offset="0.89999998"
+ style="stop-color:#474747;stop-opacity:1.0000000;" />
+ <stop
+ id="stop274"
+ offset="1.0000000"
+ style="stop-color:#474747;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="372.57819"
+ x2="5.0856376"
+ y1="372.57819"
+ x1="0.61210024"
+ gradientTransform="matrix(8.168597,0.000000,0.000000,0.221210,1.118717,-41.93917)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient283"
+ xlink:href="#linearGradient272"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient158">
+ <stop
+ id="stop159"
+ offset="0.0000000"
+ style="stop-color:#686868;stop-opacity:0.0000000;" />
+ <stop
+ id="stop162"
+ offset="0.23762377"
+ style="stop-color:#686868;stop-opacity:1.0000000;" />
+ <stop
+ id="stop163"
+ offset="0.78109992"
+ style="stop-color:#686868;stop-opacity:1.0000000;" />
+ <stop
+ id="stop160"
+ offset="1.0000000"
+ style="stop-color:#686868;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ y2="117.82710"
+ x2="15.343062"
+ y1="117.82710"
+ x1="1.6422368"
+ gradientTransform="matrix(2.740165,0.000000,0.000000,0.364942,1.118717,-4.017762)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient175"
+ xlink:href="#linearGradient158"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient6377">
+ <stop
+ id="stop6379"
+ offset="0.0000000"
+ style="stop-color:#e02b2b;stop-opacity:1.0000000;" />
+ <stop
+ id="stop6381"
+ offset="1.0000000"
+ style="stop-color:#e02b2b;stop-opacity:0.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient6361">
+ <stop
+ style="stop-color:#143b68;stop-opacity:1;"
+ offset="0"
+ id="stop6363" />
+ <stop
+ style="stop-color:#143b68;stop-opacity:0;"
+ offset="1"
+ id="stop6365" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4750">
+ <stop
+ id="stop4752"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop4758"
+ offset="0.37931034"
+ style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+ <stop
+ id="stop4754"
+ offset="1.0000000"
+ style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4350"
+ inkscape:collect="always">
+ <stop
+ id="stop4352"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop4354"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4126">
+ <stop
+ id="stop4128"
+ offset="0.0000000"
+ style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop4130"
+ offset="1.0000000"
+ style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4114"
+ inkscape:collect="always">
+ <stop
+ id="stop4116"
+ offset="0"
+ style="stop-color:#000000;stop-opacity:1;" />
+ <stop
+ id="stop4118"
+ offset="1"
+ style="stop-color:#000000;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3962">
+ <stop
+ id="stop3964"
+ offset="0.0000000"
+ style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop4134"
+ offset="0.15517241"
+ style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+ <stop
+ id="stop4346"
+ offset="0.75000000"
+ style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+ <stop
+ id="stop3966"
+ offset="1.0000000"
+ style="stop-color:#36486c;stop-opacity:1.0000000;" />
+ </linearGradient>
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="29.993349"
+ fy="15.716079"
+ fx="18.247644"
+ cy="15.716079"
+ cx="18.247644"
+ gradientTransform="matrix(0.674967,0.000000,0.000000,0.674981,7.864706,3.589839)"
+ id="radialGradient3968"
+ xlink:href="#linearGradient3962"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="12.289036"
+ fy="63.965388"
+ fx="15.115514"
+ cy="63.965388"
+ cx="15.115514"
+ gradientTransform="scale(1.64399,0.608276)"
+ id="radialGradient4120"
+ xlink:href="#linearGradient4114"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="43.526714"
+ fy="12.142302"
+ fx="15.601279"
+ cy="12.142302"
+ cx="15.601279"
+ gradientTransform="matrix(0.674967,0.000000,0.000000,0.674981,7.864706,3.589839)"
+ id="radialGradient4132"
+ xlink:href="#linearGradient4126"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="32.664848"
+ fy="10.476453"
+ fx="11.826907"
+ cy="10.476453"
+ cx="11.826907"
+ gradientTransform="scale(1.179536,0.847791)"
+ id="radialGradient4356"
+ xlink:href="#linearGradient4350"
+ inkscape:collect="always" />
+ <radialGradient
+ gradientUnits="userSpaceOnUse"
+ r="40.692665"
+ fy="17.810213"
+ fx="18.934305"
+ cy="17.486208"
+ cx="18.633780"
+ gradientTransform="scale(1.036822,0.964486)"
+ id="radialGradient4756"
+ xlink:href="#linearGradient4750"
+ inkscape:collect="always" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6261"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6263"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6265"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6267"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6269"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6271"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6273"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6275"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6277"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6279"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6281"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6283"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6285"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6287"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6289"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6291"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6293"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6295"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6297"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6299"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6301"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6303"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6305"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6307"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6309"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6311"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6313"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6315"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6317"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6319"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6321"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6323"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6325"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6327"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6329"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6331"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6333"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6335"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6337"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6339"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6341"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6343"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6345"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6347"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6349"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6351"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6353"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6355"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6357"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4750"
+ id="radialGradient6359"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="scale(1.036822,0.964486)"
+ cx="18.633780"
+ cy="17.486208"
+ fx="18.934305"
+ fy="17.810213"
+ r="40.692665" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6361"
+ id="linearGradient6367"
+ gradientTransform="matrix(0.950176,0.000000,0.000000,1.250550,-2.628603,-7.378111)"
+ x1="12.190513"
+ y1="12.062389"
+ x2="17.850138"
+ y2="31.674618"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6377"
+ id="linearGradient6375"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.950176,-5.364674e-17,7.060588e-17,-1.250550,51.70714,46.10410)"
+ x1="9.7568795"
+ y1="12.524661"
+ x2="17.850138"
+ y2="31.674618" />
+ </defs>
+ <sodipodi:namedview
+ inkscape:window-y="138"
+ inkscape:window-x="124"
+ inkscape:window-height="659"
+ inkscape:window-width="872"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ showgrid="true"
+ inkscape:current-layer="layer1"
+ inkscape:cy="12.601861"
+ inkscape:cx="40.499842"
+ inkscape:zoom="1"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="0.16470588"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:showpageshadow="false" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Software Update</dc:title>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Jakub Steiner</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title />
+ </cc:Agent>
+ </dc:contributor>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
+ <dc:source>http://jimmac.musichall.cz</dc:source>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>network update</rdf:li>
+ <rdf:li>software</rdf:li>
+ <rdf:li>synchronize</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Attribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:groupmode="layer"
+ inkscape:label="Layer 1"
+ id="layer1">
+ <rect
+ y="36.982246"
+ x="6.1187172"
+ height="4.0000000"
+ width="36.542522"
+ id="rect69"
+ style="color:#000000;fill:url(#linearGradient175);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <path
+ transform="matrix(0.759089,0,0,0.877848,5.774479,4.605797)"
+ d="M 45.052803 38.908627 A 20.203051 7.4751287 0 1 1 4.6467018,38.908627 A 20.203051 7.4751287 0 1 1 45.052803 38.908627 z"
+ sodipodi:ry="7.4751287"
+ sodipodi:rx="20.203051"
+ sodipodi:cy="38.908627"
+ sodipodi:cx="24.849752"
+ id="path4112"
+ style="fill:url(#radialGradient4120);fill-opacity:1;stroke:none;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <rect
+ y="39.984222"
+ x="6.1187172"
+ height="0.98959237"
+ width="36.542522"
+ id="rect255"
+ style="color:#000000;fill:url(#linearGradient283);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <rect
+ y="36.017567"
+ x="6.1187172"
+ height="1.022747"
+ width="36.542522"
+ id="rect250"
+ style="color:black;fill:url(#linearGradient271);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+ <rect
+ y="37"
+ x="6.1187172"
+ height="2"
+ width="36.542522"
+ id="rect176"
+ style="color:black;fill:url(#linearGradient177);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:block;overflow:visible" />
+ <path
+ id="rect183"
+ d="M 22.584707,26.450993 C 21.801233,26.450993 21.178457,27.073767 21.178457,27.857243 L 21.178457,35.450993 L 18.115957,35.450993 C 17.332483,35.450993 16.709707,36.073767 16.709707,36.857243 L 16.709707,40.575993 C 16.709707,41.359467 17.332483,41.982246 18.115957,41.982243 L 30.303457,41.982243 C 31.086931,41.982243 31.709707,41.359464 31.709707,40.575993 L 31.709707,36.857243 C 31.709707,36.073769 31.086931,35.450993 30.303457,35.450993 L 27.709707,35.450993 L 27.709707,27.857243 C 27.709707,27.073769 27.086932,26.450993 26.303457,26.450993 L 22.584707,26.450993 z "
+ style="color:#000000;fill:url(#linearGradient203);fill-opacity:1.0000000;fill-rule:nonzero;stroke:#434343;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <rect
+ ry="0.29955584"
+ rx="0.29955584"
+ y="32.482246"
+ x="22.118719"
+ height="3.0000000"
+ width="1.9722718"
+ id="rect209"
+ style="color:#000000;fill:url(#linearGradient217);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <path
+ id="path3214"
+ d="M 37.536463,19.441939 C 37.536463,26.670720 31.676269,32.530847 24.448482,32.530847 C 17.220034,32.530847 11.360171,26.670654 11.360171,19.441939 C 11.360171,12.213491 17.220034,6.3539621 24.448482,6.3539621 C 31.676269,6.3539621 37.536463,12.213491 37.536463,19.441939 L 37.536463,19.441939 z "
+ style="fill:url(#radialGradient3968);fill-opacity:1.0000000;fill-rule:nonzero;stroke:#39396c;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000;stroke-dasharray:none;stroke-width:2.0000000" />
+ <path
+ transform="matrix(0.564236,0.000000,0.000000,0.674974,14.53810,3.589842)"
+ d="M 30.708637 15.271057 A 12.929953 9.2934036 0 1 1 4.8487320,15.271057 A 12.929953 9.2934036 0 1 1 30.708637 15.271057 z"
+ sodipodi:ry="9.2934036"
+ sodipodi:rx="12.929953"
+ sodipodi:cy="15.271057"
+ sodipodi:cx="17.778685"
+ id="path4348"
+ style="opacity:0.42159382;fill:url(#radialGradient4356);fill-opacity:1.0000000;stroke:none;stroke-opacity:1.0000000"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path258"
+ d="M 27.212467,32.185368 L 21.681217,32.185368 C 21.681217,32.185368 21.681217,33.872868 21.681217,34.357243 C 22.228092,32.575993 27.212467,32.185368 27.212467,32.185368 z "
+ style="color:#000000;fill:url(#linearGradient263);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <g
+ transform="matrix(0.663075,0.000000,0.000000,0.663075,7.946434,3.747052)"
+ style="fill:#000000;fill-opacity:0.71345031;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+ id="g4136">
+ <g
+ id="g4138">
+ <g
+ id="g4142">
+ <path
+ id="path4144"
+ d="M 44.071300,20.714400 C 44.071300,20.977100 44.071300,20.714400 44.071300,20.714400 L 43.526400,21.331600 C 43.192400,20.938000 42.817400,20.607000 42.436600,20.261300 L 41.600700,20.384300 L 40.837000,19.521000 L 40.837000,20.589400 L 41.491300,21.084500 L 41.926800,21.577700 L 42.508800,20.919500 C 42.655300,21.193900 42.799800,21.468300 42.945300,21.742700 L 42.945300,22.565000 L 42.290000,23.305200 L 41.090800,24.128400 L 40.182600,25.034700 L 39.600600,24.374500 L 39.891600,23.634300 L 39.310500,22.976100 L 38.329100,20.878400 L 37.493200,19.933100 L 37.274400,20.179200 L 37.602500,21.372600 L 38.219700,22.071800 C 38.572200,23.089400 38.920900,24.062000 39.383800,25.034700 C 40.101600,25.034700 40.778300,24.958500 41.491200,24.868700 L 41.491200,25.444900 L 40.619100,27.584100 L 39.819300,28.488400 L 39.165000,29.888800 C 39.165000,30.656400 39.165000,31.424000 39.165000,32.191500 L 39.383800,33.097800 L 39.020500,33.508000 L 38.219700,34.002100 L 37.383800,34.701300 L 38.075200,35.482600 L 37.129900,36.306800 L 37.311500,36.840000 L 35.893500,38.445500 L 34.949200,38.445500 L 34.149400,38.939600 L 33.639600,38.939600 L 33.639600,38.281400 L 33.422800,36.963000 C 33.141500,36.136800 32.848600,35.316500 32.550700,34.496200 C 32.550700,33.890700 32.586800,33.291100 32.623000,32.685700 L 32.987300,31.863400 L 32.477500,30.875100 L 32.514600,29.517700 L 31.823200,28.736400 L 32.168900,27.605500 L 31.606400,26.967300 L 30.624000,26.967300 L 30.296900,26.597200 L 29.315500,27.214900 L 28.916100,26.761300 L 28.006900,27.543000 C 27.389700,26.843300 26.771500,26.144100 26.153400,25.444900 L 25.426800,23.716400 L 26.081100,22.730100 L 25.717800,22.319000 L 26.516600,20.425400 C 27.172900,19.609000 27.858400,18.825800 28.551800,18.039700 L 29.788100,17.710600 L 31.169000,17.546500 L 32.114300,17.793600 L 33.459000,19.150000 L 33.931700,18.615800 L 34.585000,18.533800 L 35.821300,18.944900 L 36.766600,18.944900 L 37.420900,18.368700 L 37.711900,17.957600 L 37.056600,17.546500 L 35.965800,17.464500 C 35.663100,17.044600 35.381800,16.603200 35.022400,16.230100 L 34.658100,16.394200 L 34.512600,17.464500 L 33.858300,16.724300 L 33.713800,15.900100 L 32.987200,15.325900 L 32.695200,15.325900 L 33.422700,16.148200 L 33.131700,16.888400 L 32.550600,17.052500 L 32.913900,16.312300 L 32.258600,15.984200 L 31.678500,15.326000 L 30.586700,15.572100 L 30.442200,15.900200 L 29.787900,16.312300 L 29.424600,17.217600 L 28.516400,17.669700 L 28.116000,17.217600 L 27.680500,17.217600 L 27.680500,15.736200 L 28.625800,15.242100 L 29.352400,15.242100 L 29.205900,14.666900 L 28.625800,14.090700 L 29.606300,13.884600 L 30.151200,13.268400 L 30.586700,12.527200 L 31.387500,12.527200 L 31.168700,11.952000 L 31.678500,11.622900 L 31.678500,12.281100 L 32.768300,12.527200 L 33.858100,11.622900 L 33.931300,11.210800 L 34.875600,10.553100 C 34.533800,10.595600 34.192000,10.626800 33.858000,10.717700 L 33.858000,9.9766000 L 34.221300,9.1538000 L 33.858000,9.1538000 L 33.059600,9.8940000 L 32.840800,10.305600 L 33.059600,10.882300 L 32.695300,11.868600 L 32.114200,11.539500 L 31.606400,10.964300 L 30.805600,11.539500 L 30.514600,10.223600 L 31.895500,9.3188000 L 31.895500,8.8247000 L 32.768500,8.2490000 L 34.149400,7.9194000 L 35.094700,8.2490000 L 36.838800,8.5781000 L 36.403300,9.0713000 L 35.458000,9.0713000 L 36.403300,10.058600 L 37.129900,9.2363000 L 37.350600,8.8745000 C 37.350600,8.8745000 40.137700,11.372500 41.730500,14.105000 C 43.323300,16.838400 44.071300,20.060100 44.071300,20.714400 z " />
+ </g>
+ </g>
+ <g
+ id="g4146">
+ <g
+ id="g4150">
+ <path
+ id="path4152"
+ d="M 26.070300,9.2363000 L 25.997100,9.7295000 L 26.506900,10.058600 L 27.378000,9.4829000 L 26.942500,8.9892000 L 26.360500,9.3188000 L 26.070500,9.2363000" />
+ </g>
+ </g>
+ <g
+ id="g4154">
+ <g
+ id="g4158">
+ <path
+ id="path4160"
+ d="M 26.870100,5.8633000 L 24.979500,5.1226000 L 22.799800,5.3692000 L 20.109400,6.1094000 L 19.600600,6.6035000 L 21.272500,7.7549000 L 21.272500,8.4131000 L 20.618200,9.0713000 L 21.491200,10.800300 L 22.071300,10.470200 L 22.799800,9.3188000 C 23.922800,8.9716000 24.929700,8.5781000 25.997100,8.0844000 L 26.870100,5.8632000" />
+ </g>
+ </g>
+ <g
+ id="g4162">
+ <g
+ id="g4166">
+ <path
+ id="path4168"
+ d="M 28.833000,12.774900 L 28.542000,12.033700 L 28.032200,12.198700 L 28.178700,13.103000 L 28.833000,12.774900" />
+ </g>
+ </g>
+ <g
+ id="g4170">
+ <g
+ id="g4174">
+ <path
+ id="path4176"
+ d="M 29.123000,12.608900 L 28.977500,13.597200 L 29.777300,13.432200 L 30.358400,12.857000 L 29.849600,12.362900 C 29.678700,11.907800 29.482400,11.483000 29.268500,11.046500 L 28.833000,11.046500 L 28.833000,11.539700 L 29.123000,11.868800 L 29.123000,12.609000" />
+ </g>
+ </g>
+ <g
+ id="g4178">
+ <g
+ id="g4182">
+ <path
+ id="path4184"
+ d="M 18.365200,28.242200 L 17.783200,27.089900 L 16.692900,26.843300 L 16.111400,25.280800 L 14.657800,25.444900 L 13.422400,24.540600 L 12.113300,25.692000 L 12.113300,25.873600 C 11.717300,25.759300 11.230500,25.743700 10.877900,25.526900 L 10.586900,24.704600 L 10.586900,23.799300 L 9.7148000,23.881300 C 9.7876000,23.305100 9.8598000,22.729900 9.9331000,22.153800 L 9.4238000,22.153800 L 8.9155000,22.812000 L 8.4062000,23.058100 L 7.6791000,22.647900 L 7.6063000,21.742600 L 7.7518000,20.755300 L 8.8426000,19.933000 L 9.7147000,19.933000 L 9.8597000,19.438900 L 10.950000,19.685000 L 11.749800,20.673300 L 11.895300,19.026800 L 13.276600,17.875400 L 13.785400,16.641000 L 14.803000,16.229900 L 15.384500,15.407600 L 16.692600,15.159600 L 17.347400,14.173300 C 16.693100,14.173300 16.038800,14.173300 15.384500,14.173300 L 16.620300,13.597100 L 17.491900,13.597100 L 18.728200,13.185000 L 18.873700,12.692800 L 18.437200,12.280700 L 17.928400,12.115700 L 18.073900,11.622500 L 17.710600,10.882300 L 16.838000,11.210400 L 16.983500,10.552700 L 15.965900,9.9765000 L 15.166600,11.374400 L 15.238900,11.868500 L 14.439600,12.198600 L 13.930300,13.267900 L 13.712500,12.280600 L 12.331200,11.704400 L 12.112900,10.964200 L 13.930300,9.8939000 L 14.730100,9.1537000 L 14.802900,8.2489000 L 14.366900,8.0018000 L 13.785400,7.9193000 L 13.422100,8.8246000 C 13.422100,8.8246000 12.814200,8.9437000 12.657900,8.9823000 C 10.661800,10.821700 6.6286000,14.792400 5.6916000,22.288500 C 5.7287000,22.462300 6.3708000,23.470100 6.3708000,23.470100 L 7.8972000,24.374400 L 9.4236000,24.786500 L 10.078400,25.609700 L 11.095500,26.349900 L 11.677000,26.267900 L 12.113000,26.464200 L 12.113000,26.597000 L 11.531900,28.160000 L 11.095400,28.818200 L 11.240900,29.148300 L 10.877600,30.380700 L 12.186200,32.767400 L 13.494300,33.919700 L 14.076300,34.742000 L 14.003100,36.470500 L 14.439600,37.456800 L 14.003100,39.349400 C 14.003100,39.349400 13.968900,39.337700 14.024600,39.527100 C 14.080800,39.716600 16.353700,40.978300 16.498200,40.870900 C 16.642200,40.761500 16.765300,40.665800 16.765300,40.665800 L 16.620300,40.255600 L 17.201400,39.679400 L 17.419700,39.103200 L 18.365000,38.773100 L 19.091600,36.962600 L 18.873800,36.470400 L 19.381600,35.730200 L 20.472400,35.482200 L 21.054400,34.165800 L 20.908900,32.521300 L 21.781000,31.286900 L 21.926500,30.052500 C 20.733100,29.460700 19.549500,28.851300 18.365000,28.242000" />
+ </g>
+ </g>
+ <g
+ id="g4186">
+ <g
+ id="g4190">
+ <path
+ id="path4192"
+ d="M 16.765600,9.5649000 L 17.492200,10.058600 L 18.074200,10.058600 L 18.074200,9.4829000 L 17.347600,9.1538000 L 16.765600,9.5649000" />
+ </g>
+ </g>
+ <g
+ id="g4194">
+ <g
+ id="g4198">
+ <path
+ id="path4200"
+ d="M 14.876000,8.9072000 L 14.512200,9.8120000 L 15.239300,9.8120000 L 15.603100,8.9892000 C 15.916600,8.7675000 16.228600,8.5444000 16.547900,8.3310000 L 17.275000,8.5781000 C 17.759400,8.9072000 18.243800,9.2363000 18.728600,9.5649000 L 19.456100,8.9072000 L 18.655800,8.5781000 L 18.292000,7.8374000 L 16.911100,7.6728000 L 16.838300,7.2612000 L 16.184000,7.4262000 L 15.893600,8.0020000 L 15.529800,7.2613000 L 15.384800,7.5904000 L 15.457600,8.4132000 L 14.876000,8.9072000" />
+ </g>
+ </g>
+ <g
+ id="g4202">
+ <g
+ id="g4204"
+ style="opacity:0.75000000">
+ <path
+ d=""
+ id="path4206" />
+ </g>
+ <g
+ id="g4208">
+ <path
+ d=""
+ id="path4210" />
+ </g>
+ </g>
+ <g
+ id="g4212">
+ <g
+ id="g4214"
+ style="opacity:0.75000000">
+ <path
+ d=""
+ id="path4216" />
+ </g>
+ <g
+ id="g4218">
+ <path
+ d=""
+ id="path4220" />
+ </g>
+ </g>
+ <g
+ id="g4222">
+ <g
+ id="g4226">
+ <path
+ id="path4228"
+ d="M 17.492200,6.8496000 L 17.856000,6.5210000 L 18.583100,6.3564000 C 19.081100,6.1142000 19.581100,5.9511000 20.109500,5.7802000 L 19.819500,5.2865000 L 18.881000,5.4213000 L 18.437600,5.8632000 L 17.706600,5.9692000 L 17.056700,6.2744000 L 16.740800,6.4272000 L 16.547900,6.6855000 L 17.492200,6.8496000" />
+ </g>
+ </g>
+ <g
+ id="g4230">
+ <g
+ id="g4234">
+ <path
+ id="path4236"
+ d="M 18.728500,14.666500 L 19.165000,14.008300 L 18.510200,13.515100 L 18.728500,14.666500" />
+ </g>
+ </g>
+ </g>
+ <g
+ style="fill:#ffffff;fill-opacity:0.95906430"
+ id="g236"
+ transform="translate(9.098961e-2,-3.064632)">
+ <rect
+ ry="0.50000000"
+ rx="0.50000000"
+ y="40.000000"
+ x="20.000000"
+ height="1.0000000"
+ width="10.000000"
+ id="rect226"
+ style="color:#000000;fill-rule:nonzero;stroke:none;stroke-width:1.1400000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible" />
+ <path
+ transform="matrix(2.058824,0.000000,0.000000,2.058824,-19.49265,-43.10846)"
+ d="M 19.000000 40.625000 A 0.53125000 0.53125000 0 1 1 17.937500,40.625000 A 0.53125000 0.53125000 0 1 1 19.000000 40.625000 z"
+ sodipodi:ry="0.53125000"
+ sodipodi:rx="0.53125000"
+ sodipodi:cy="40.625000"
+ sodipodi:cx="18.468750"
+ id="path235"
+ style="color:#000000;fill-rule:nonzero;stroke:none;stroke-width:1.1400000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:block;overflow:visible"
+ sodipodi:type="arc" />
+ </g>
+ <g
+ transform="matrix(0.663075,0.000000,0.000000,0.663075,7.810068,3.610686)"
+ style="color:#000000;fill:url(#radialGradient6261);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.0179454;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3216">
+ <g
+ style="color:#000000;fill:url(#radialGradient6263);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3218">
+ <g
+ style="color:#000000;fill:url(#radialGradient6267);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3222">
+ <path
+ style="color:#000000;fill:url(#radialGradient6269);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3224"
+ d="M 44.071300,20.714400 C 44.071300,20.977100 44.071300,20.714400 44.071300,20.714400 L 43.526400,21.331600 C 43.192400,20.938000 42.817400,20.607000 42.436600,20.261300 L 41.600700,20.384300 L 40.837000,19.521000 L 40.837000,20.589400 L 41.491300,21.084500 L 41.926800,21.577700 L 42.508800,20.919500 C 42.655300,21.193900 42.799800,21.468300 42.945300,21.742700 L 42.945300,22.565000 L 42.290000,23.305200 L 41.090800,24.128400 L 40.182600,25.034700 L 39.600600,24.374500 L 39.891600,23.634300 L 39.310500,22.976100 L 38.329100,20.878400 L 37.493200,19.933100 L 37.274400,20.179200 L 37.602500,21.372600 L 38.219700,22.071800 C 38.572200,23.089400 38.920900,24.062000 39.383800,25.034700 C 40.101600,25.034700 40.778300,24.958500 41.491200,24.868700 L 41.491200,25.444900 L 40.619100,27.584100 L 39.819300,28.488400 L 39.165000,29.888800 C 39.165000,30.656400 39.165000,31.424000 39.165000,32.191500 L 39.383800,33.097800 L 39.020500,33.508000 L 38.219700,34.002100 L 37.383800,34.701300 L 38.075200,35.482600 L 37.129900,36.306800 L 37.311500,36.840000 L 35.893500,38.445500 L 34.949200,38.445500 L 34.149400,38.939600 L 33.639600,38.939600 L 33.639600,38.281400 L 33.422800,36.963000 C 33.141500,36.136800 32.848600,35.316500 32.550700,34.496200 C 32.550700,33.890700 32.586800,33.291100 32.623000,32.685700 L 32.987300,31.863400 L 32.477500,30.875100 L 32.514600,29.517700 L 31.823200,28.736400 L 32.168900,27.605500 L 31.606400,26.967300 L 30.624000,26.967300 L 30.296900,26.597200 L 29.315500,27.214900 L 28.916100,26.761300 L 28.006900,27.543000 C 27.389700,26.843300 26.771500,26.144100 26.153400,25.444900 L 25.426800,23.716400 L 26.081100,22.730100 L 25.717800,22.319000 L 26.516600,20.425400 C 27.172900,19.609000 27.858400,18.825800 28.551800,18.039700 L 29.788100,17.710600 L 31.169000,17.546500 L 32.114300,17.793600 L 33.459000,19.150000 L 33.931700,18.615800 L 34.585000,18.533800 L 35.821300,18.944900 L 36.766600,18.944900 L 37.420900,18.368700 L 37.711900,17.957600 L 37.056600,17.546500 L 35.965800,17.464500 C 35.663100,17.044600 35.381800,16.603200 35.022400,16.230100 L 34.658100,16.394200 L 34.512600,17.464500 L 33.858300,16.724300 L 33.713800,15.900100 L 32.987200,15.325900 L 32.695200,15.325900 L 33.422700,16.148200 L 33.131700,16.888400 L 32.550600,17.052500 L 32.913900,16.312300 L 32.258600,15.984200 L 31.678500,15.326000 L 30.586700,15.572100 L 30.442200,15.900200 L 29.787900,16.312300 L 29.424600,17.217600 L 28.516400,17.669700 L 28.116000,17.217600 L 27.680500,17.217600 L 27.680500,15.736200 L 28.625800,15.242100 L 29.352400,15.242100 L 29.205900,14.666900 L 28.625800,14.090700 L 29.606300,13.884600 L 30.151200,13.268400 L 30.586700,12.527200 L 31.387500,12.527200 L 31.168700,11.952000 L 31.678500,11.622900 L 31.678500,12.281100 L 32.768300,12.527200 L 33.858100,11.622900 L 33.931300,11.210800 L 34.875600,10.553100 C 34.533800,10.595600 34.192000,10.626800 33.858000,10.717700 L 33.858000,9.9766000 L 34.221300,9.1538000 L 33.858000,9.1538000 L 33.059600,9.8940000 L 32.840800,10.305600 L 33.059600,10.882300 L 32.695300,11.868600 L 32.114200,11.539500 L 31.606400,10.964300 L 30.805600,11.539500 L 30.514600,10.223600 L 31.895500,9.3188000 L 31.895500,8.8247000 L 32.768500,8.2490000 L 34.149400,7.9194000 L 35.094700,8.2490000 L 36.838800,8.5781000 L 36.403300,9.0713000 L 35.458000,9.0713000 L 36.403300,10.058600 L 37.129900,9.2363000 L 37.350600,8.8745000 C 37.350600,8.8745000 40.137700,11.372500 41.730500,14.105000 C 43.323300,16.838400 44.071300,20.060100 44.071300,20.714400 z " />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6271);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3226">
+ <g
+ style="color:#000000;fill:url(#radialGradient6275);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3230">
+ <path
+ style="color:#000000;fill:url(#radialGradient6277);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3232"
+ d="M 26.070300,9.2363000 L 25.997100,9.7295000 L 26.506900,10.058600 L 27.378000,9.4829000 L 26.942500,8.9892000 L 26.360500,9.3188000 L 26.070500,9.2363000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6279);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3234">
+ <g
+ style="color:#000000;fill:url(#radialGradient6283);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3238">
+ <path
+ style="color:#000000;fill:url(#radialGradient6285);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3240"
+ d="M 26.870100,5.8633000 L 24.979500,5.1226000 L 22.799800,5.3692000 L 20.109400,6.1094000 L 19.600600,6.6035000 L 21.272500,7.7549000 L 21.272500,8.4131000 L 20.618200,9.0713000 L 21.491200,10.800300 L 22.071300,10.470200 L 22.799800,9.3188000 C 23.922800,8.9716000 24.929700,8.5781000 25.997100,8.0844000 L 26.870100,5.8632000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6287);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3242">
+ <g
+ style="color:#000000;fill:url(#radialGradient6291);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3246">
+ <path
+ style="color:#000000;fill:url(#radialGradient6293);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3248"
+ d="M 28.833000,12.774900 L 28.542000,12.033700 L 28.032200,12.198700 L 28.178700,13.103000 L 28.833000,12.774900" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6295);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3250">
+ <g
+ style="color:#000000;fill:url(#radialGradient6299);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3254">
+ <path
+ style="color:#000000;fill:url(#radialGradient6301);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3256"
+ d="M 29.123000,12.608900 L 28.977500,13.597200 L 29.777300,13.432200 L 30.358400,12.857000 L 29.849600,12.362900 C 29.678700,11.907800 29.482400,11.483000 29.268500,11.046500 L 28.833000,11.046500 L 28.833000,11.539700 L 29.123000,11.868800 L 29.123000,12.609000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6303);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3258">
+ <g
+ style="color:#000000;fill:url(#radialGradient6307);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3262">
+ <path
+ style="color:#000000;fill:url(#radialGradient6309);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3264"
+ d="M 18.365200,28.242200 L 17.783200,27.089900 L 16.692900,26.843300 L 16.111400,25.280800 L 14.657800,25.444900 L 13.422400,24.540600 L 12.113300,25.692000 L 12.113300,25.873600 C 11.717300,25.759300 11.230500,25.743700 10.877900,25.526900 L 10.586900,24.704600 L 10.586900,23.799300 L 9.7148000,23.881300 C 9.7876000,23.305100 9.8598000,22.729900 9.9331000,22.153800 L 9.4238000,22.153800 L 8.9155000,22.812000 L 8.4062000,23.058100 L 7.6791000,22.647900 L 7.6063000,21.742600 L 7.7518000,20.755300 L 8.8426000,19.933000 L 9.7147000,19.933000 L 9.8597000,19.438900 L 10.950000,19.685000 L 11.749800,20.673300 L 11.895300,19.026800 L 13.276600,17.875400 L 13.785400,16.641000 L 14.803000,16.229900 L 15.384500,15.407600 L 16.692600,15.159600 L 17.347400,14.173300 C 16.693100,14.173300 16.038800,14.173300 15.384500,14.173300 L 16.620300,13.597100 L 17.491900,13.597100 L 18.728200,13.185000 L 18.873700,12.692800 L 18.437200,12.280700 L 17.928400,12.115700 L 18.073900,11.622500 L 17.710600,10.882300 L 16.838000,11.210400 L 16.983500,10.552700 L 15.965900,9.9765000 L 15.166600,11.374400 L 15.238900,11.868500 L 14.439600,12.198600 L 13.930300,13.267900 L 13.712500,12.280600 L 12.331200,11.704400 L 12.112900,10.964200 L 13.930300,9.8939000 L 14.730100,9.1537000 L 14.802900,8.2489000 L 14.366900,8.0018000 L 13.785400,7.9193000 L 13.422100,8.8246000 C 13.422100,8.8246000 12.814200,8.9437000 12.657900,8.9823000 C 10.661800,10.821700 6.6286000,14.792400 5.6916000,22.288500 C 5.7287000,22.462300 6.3708000,23.470100 6.3708000,23.470100 L 7.8972000,24.374400 L 9.4236000,24.786500 L 10.078400,25.609700 L 11.095500,26.349900 L 11.677000,26.267900 L 12.113000,26.464200 L 12.113000,26.597000 L 11.531900,28.160000 L 11.095400,28.818200 L 11.240900,29.148300 L 10.877600,30.380700 L 12.186200,32.767400 L 13.494300,33.919700 L 14.076300,34.742000 L 14.003100,36.470500 L 14.439600,37.456800 L 14.003100,39.349400 C 14.003100,39.349400 13.968900,39.337700 14.024600,39.527100 C 14.080800,39.716600 16.353700,40.978300 16.498200,40.870900 C 16.642200,40.761500 16.765300,40.665800 16.765300,40.665800 L 16.620300,40.255600 L 17.201400,39.679400 L 17.419700,39.103200 L 18.365000,38.773100 L 19.091600,36.962600 L 18.873800,36.470400 L 19.381600,35.730200 L 20.472400,35.482200 L 21.054400,34.165800 L 20.908900,32.521300 L 21.781000,31.286900 L 21.926500,30.052500 C 20.733100,29.460700 19.549500,28.851300 18.365000,28.242000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6311);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3266">
+ <g
+ style="color:#000000;fill:url(#radialGradient6315);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3270">
+ <path
+ style="color:#000000;fill:url(#radialGradient6317);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3272"
+ d="M 16.765600,9.5649000 L 17.492200,10.058600 L 18.074200,10.058600 L 18.074200,9.4829000 L 17.347600,9.1538000 L 16.765600,9.5649000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6319);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3274">
+ <g
+ style="color:#000000;fill:url(#radialGradient6323);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3278">
+ <path
+ style="color:#000000;fill:url(#radialGradient6325);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3280"
+ d="M 14.876000,8.9072000 L 14.512200,9.8120000 L 15.239300,9.8120000 L 15.603100,8.9892000 C 15.916600,8.7675000 16.228600,8.5444000 16.547900,8.3310000 L 17.275000,8.5781000 C 17.759400,8.9072000 18.243800,9.2363000 18.728600,9.5649000 L 19.456100,8.9072000 L 18.655800,8.5781000 L 18.292000,7.8374000 L 16.911100,7.6728000 L 16.838300,7.2612000 L 16.184000,7.4262000 L 15.893600,8.0020000 L 15.529800,7.2613000 L 15.384800,7.5904000 L 15.457600,8.4132000 L 14.876000,8.9072000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6327);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3282">
+ <g
+ id="g3284"
+ style="opacity:0.75000000;color:#000000;fill:url(#radialGradient6329);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible">
+ <path
+ id="path3286"
+ style="color:#000000;fill:url(#radialGradient6331);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ d="" />
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6333);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3288">
+ <path
+ style="color:#000000;fill:url(#radialGradient6335);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3290"
+ d="" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6337);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3292">
+ <g
+ id="g3294"
+ style="opacity:0.75000000;color:#000000;fill:url(#radialGradient6339);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible">
+ <path
+ id="path3296"
+ style="color:#000000;fill:url(#radialGradient6341);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ d="" />
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6343);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3298">
+ <path
+ style="color:#000000;fill:url(#radialGradient6345);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3300"
+ d="" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6347);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3302">
+ <g
+ style="color:#000000;fill:url(#radialGradient6351);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3306">
+ <path
+ style="color:#000000;fill:url(#radialGradient6353);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3308"
+ d="M 17.492200,6.8496000 L 17.856000,6.5210000 L 18.583100,6.3564000 C 19.081100,6.1142000 19.581100,5.9511000 20.109500,5.7802000 L 19.819500,5.2865000 L 18.881000,5.4213000 L 18.437600,5.8632000 L 17.706600,5.9692000 L 17.056700,6.2744000 L 16.740800,6.4272000 L 16.547900,6.6855000 L 17.492200,6.8496000" />
+ </g>
+ </g>
+ <g
+ style="color:#000000;fill:url(#radialGradient6355);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3310">
+ <g
+ style="color:#000000;fill:url(#radialGradient6359);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="g3314">
+ <path
+ style="color:#000000;fill:url(#radialGradient4756);stroke-dashoffset:0.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible"
+ id="path3316"
+ d="M 18.728500,14.666500 L 19.165000,14.008300 L 18.510200,13.515100 L 18.728500,14.666500" />
+ </g>
+ </g>
+ </g>
+ <path
+ id="path4122"
+ d="M 36.871774,19.441963 C 36.871774,26.303627 31.309195,31.866145 24.448475,31.866145 C 17.587125,31.866145 12.024859,26.303564 12.024859,19.441963 C 12.024859,12.580614 17.587125,7.0186651 24.448475,7.0186651 C 31.309195,7.0186651 36.871774,12.580614 36.871774,19.441963 L 36.871774,19.441963 z "
+ style="fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:url(#radialGradient4132);stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" />
+ <path
+ id="path5902"
+ d="M 5.3935749,10.941178 C 0.84819341,23.232818 9.4520542,34.433912 23.052696,34.433912 C 14.482897,34.433912 7.5108693,27.461952 7.5108693,18.892087 C 7.5108693,12.874995 11.030621,7.3515951 16.481428,4.8040746 L 0.53977192,8.6930816 L 5.3935749,10.941178 z "
+ style="fill:url(#linearGradient6367);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000" />
+ <path
+ style="fill:url(#linearGradient6375);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-miterlimit:4.0000000"
+ d="M 43.684948,27.784836 C 48.230330,15.493195 39.626469,4.2921045 26.025828,4.2921045 C 34.595627,4.2921045 41.567654,11.264062 41.567654,19.833926 C 41.567654,25.851018 38.047903,31.374420 32.597096,33.921941 L 48.538752,30.032933 L 43.684948,27.784836 z "
+ id="path6369" />
+ </g>
+</svg>
Binary file install/images/icons/upgrade-disabled.png has changed
Binary file install/images/icons/upgrade.png has changed
Binary file install/images/marker.gif has changed
Binary file install/images/substages.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/common.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,130 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * common.php - Installer common functions
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+// Our version number. This needs to be changed for any custom releases.
+$installer_version = array(
+ 'version' => '1.1.1',
+ 'type' => 'alpha'
+ // If type is set to "rc", "beta", or "alpha", optionally another version number can be issued with the key 'sub':
+ // 'sub' => '3' will produce Enano 1.1.1a3 / Enano 1.1.1 alpha 3
+);
+
+// Determine Enano root directory
+
+$enano_root = dirname(dirname(dirname(__FILE__)));
+if ( preg_match('#/repo$#', $enano_root) && file_exists("$enano_root/../.enanodev") )
+{
+ $enano_root = preg_replace('#/repo$#', '', $enano_root);
+}
+
+define('ENANO_ROOT', $enano_root);
+
+chdir(ENANO_ROOT);
+
+// Determine our scriptPath
+if ( isset($_SERVER['REQUEST_URI']) )
+{
+ // Use reverse-matching to determine where the REQUEST_URI overlaps the Enano root.
+ $requri = $_SERVER['REQUEST_URI'];
+ if ( isset($_SERVER['PATH_INFO']) && !preg_match('/index\.php$/', $_SERVER['PATH_INFO']) )
+ {
+ $requri = preg_replace(';' . preg_quote($_SERVER['PATH_INFO']) . '$;', '', $requri);
+ }
+ if ( !preg_match('/\.php$/', $requri) )
+ {
+ // user requested http://foo/enano as opposed to http://foo/enano/index.php
+ $requri .= '/index.php';
+ }
+ $sp = dirname($_SERVER['REQUEST_URI']);
+ if ( $sp == '/' || $sp == '\\' )
+ {
+ $sp = '';
+ }
+ $sp = preg_replace('#/install$#', '', $sp);
+ define('scriptPath', $sp);
+}
+
+// is Enano already installed?
+@include(ENANO_ROOT . '/config.php');
+if ( defined('ENANO_INSTALLED') && defined('ENANO_DANGEROUS') )
+{
+ $title = 'Installation locked';
+ require('includes/common.php');
+ $template->header();
+ echo '<p>The installer has detected that an installation of Enano already exists on your server. You MUST delete config.php if you wish to reinstall Enano.</p>';
+ $template->footer();
+ exit();
+}
+
+function microtime_float()
+{
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+}
+
+define('IN_ENANO_INSTALL', 1);
+
+require(ENANO_ROOT . '/install/includes/ui.php');
+require(ENANO_ROOT . '/includes/functions.php');
+require(ENANO_ROOT . '/includes/json.php');
+require(ENANO_ROOT . '/includes/constants.php');
+require(ENANO_ROOT . '/includes/rijndael.php');
+// If we have at least PHP 5, load json2
+if ( version_compare(PHP_VERSION, '5.0.0', '>=') )
+{
+ require(ENANO_ROOT . '/includes/json2.php');
+}
+
+// Build a list of available languages
+$dir = @opendir( ENANO_ROOT . '/language' );
+if ( !$dir )
+ die('CRITICAL: could not open language directory');
+
+$languages = array();
+// Use the old PHP4-compatible JSON decoder
+$json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
+
+while ( $dh = @readdir($dir) )
+{
+ if ( $dh == '.' || $dh == '..' )
+ continue;
+ if ( file_exists( ENANO_ROOT . "/language/$dh/meta.json" ) )
+ {
+ // Found a language directory, determine metadata
+ $meta = @file_get_contents( ENANO_ROOT . "/language/$dh/meta.json" );
+ if ( empty($meta) )
+ // Could not read metadata file, continue silently
+ continue;
+ $meta = $json->decode($meta);
+ if ( isset($meta['lang_name_english']) && isset($meta['lang_name_native']) && isset($meta['lang_code']) )
+ {
+ $languages[$meta['lang_code']] = array(
+ 'name' => $meta['lang_name_native'],
+ 'dir' => $dh
+ );
+ }
+ }
+}
+
+if ( count($languages) < 1 )
+{
+ die('CRITICAL: No languages are available');
+}
+
+// List of available DB drivers
+$supported_drivers = array('mysql', 'postgresql');
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/js/formutils.js Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,169 @@
+/**
+ * Images used for form field validation
+ * @var string img_bad: Shown on field validation failure
+ * @var string img_good: Shown on field validation success
+ * @var string img_neu: Shown when a field's value matches known good regexp but still needs testing (e.g. DB info)
+ */
+
+var img_bad = '../images/bad.gif';
+var img_good = '../images/good.gif';
+var img_neu = '../images/unknown.gif';
+
+/**
+ * Highlights the background of the next-up <tr> tag.
+ * @param object Form field
+ */
+
+function set_focus(item)
+{
+ var hint_id = ( item.type == 'radio' ) ? 'hint_' + item.name + '_' + item.value : 'hint_' + item.name;
+ if ( document.getElementById(hint_id) )
+ {
+ var el = document.getElementById(hint_id);
+ el.style.zIndex = String(getHighestZ() + 2);
+ domObjChangeOpac(0, el);
+ el.style.display = 'block';
+ domOpacity(el, 0, 100, 400);
+ }
+ item = getParentTR(item);
+ if ( item.tagName == 'TR' )
+ {
+ item.style.backgroundColor = '#FFFFE0';
+ }
+}
+
+/**
+ * Clears the background of the next-up <tr> tag.
+ * @param object Form field
+ */
+
+function clear_focus(item)
+{
+ var hint_id = ( item.type == 'radio' ) ? 'hint_' + item.name + '_' + item.value : 'hint_' + item.name;
+ if ( document.getElementById(hint_id) )
+ {
+ var el = document.getElementById(hint_id);
+ // el.style.display = 'none';
+ domOpacity(el, 100, 0, 200);
+ setTimeout(function()
+ {
+ el.style.display = 'none';
+ }, 250);
+ }
+ item = getParentTR(item);
+ if ( item.tagName == 'TR' )
+ {
+ if ( IE )
+ {
+ item.style.backgroundColor = 'transparent';
+ }
+ else
+ {
+ item.style.backgroundColor = null;
+ }
+ }
+}
+
+function getParentTR(item)
+{
+ var tagName = item.tagName;
+ while ( tagName != 'TR' && tagName != null )
+ {
+ item = item.parentNode;
+ tagName = item.tagName;
+ }
+ if ( tagName == 'TR' && item.className != 'nohighlight' )
+ {
+ return item;
+ }
+ return null;
+}
+
+function init_hint(input, hint)
+{
+ hint.className = 'fieldtip_js';
+ setTimeout(function()
+ {
+ if ( input.type == 'radio' )
+ {
+ var tr = getParentTR(input).parentNode.parentNode.parentNode;
+ var span_width = $(tr).Width() - 24;
+ }
+ else
+ {
+ var span_width = $(input).Width() - 24;
+ }
+ var span_top = $(input).Top() + $(input).Height();
+ var span_left = $(input).Left();
+ hint.style.top = span_top + 'px';
+ hint.style.left = span_left + 'px';
+ hint.style.width = span_width + 'px';
+ hint.style.display = 'none';
+ }, 100);
+}
+
+var set_inputs_to_highlight = function()
+{
+ var inputs = document.getElementsByTagName('input');
+ for ( var i = 0; i < inputs.length; i++ )
+ {
+ // Highlighting
+ var tr = getParentTR(inputs[i]);
+ if ( tr )
+ {
+ inputs[i].onfocus = function()
+ {
+ set_focus(this);
+ }
+ inputs[i].onblur = function()
+ {
+ clear_focus(this);
+ }
+ }
+ // Hints
+ var hint_id = ( inputs[i].type == 'radio' ) ? 'hint_' + inputs[i].name + '_' + inputs[i].value : 'hint_' + inputs[i].name;
+ if ( document.getElementById(hint_id) )
+ {
+ var el = document.getElementById(hint_id);
+ if ( el.tagName == 'SPAN' )
+ {
+ init_hint(inputs[i], el);
+ }
+ }
+ }
+}
+
+addOnloadHook(set_inputs_to_highlight);
+
+function install_set_ajax_loading()
+{
+ var base = document.getElementById('enano-body');
+ var hider = document.createElement('div');
+ hider.style.position = 'absolute';
+ hider.style.backgroundColor = '#FFFFFF';
+ hider.style.top = $(base).Top() + 'px';
+ hider.style.left = $(base).Left() + 'px';
+ hider.style.width = $(base).Width() + 'px';
+ hider.style.height = $(base).Height() + 'px';
+ hider.style.backgroundPosition = 'center center';
+ hider.style.backgroundImage = 'url(../images/loading-big.gif)';
+ hider.style.backgroundRepeat = 'no-repeat';
+ hider.id = 'ajax_loader';
+ domObjChangeOpac(0, hider);
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(hider);
+ opacity('ajax_loader', 0, 70, 750);
+}
+
+function install_unset_ajax_loading()
+{
+ if ( document.getElementById('ajax_loader') )
+ {
+ opacity('ajax_loader', 70, 0, 750);
+ setTimeout(function()
+ {
+ var body = document.getElementsByTagName('body')[0];
+ body.removeChild(document.getElementById('ajax_loader'));
+ }, 1000);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/libenanoinstall.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,116 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * libenanoinstall.php - Installation payload backend
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+$neutral_color = 'C';
+
+function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true)
+{
+ static $resumed = false;
+ static $resume_stack = array();
+
+ if ( empty($resume_stack) && isset($_POST['resume_stack']) && preg_match('/[a-z_]+((\|[a-z_]+)+)/', $_POST['resume_stack']) )
+ {
+ $resume_stack = explode('|', $_POST['resume_stack']);
+ }
+
+ $already_run = false;
+ if ( in_array($stage_id, $resume_stack) )
+ {
+ $already_run = true;
+ }
+
+ if ( !$resumed )
+ {
+ if ( !isset($_GET['sub']) )
+ $resumed = true;
+ if ( isset($_GET['sub']) && $_GET['sub'] == $stage_id )
+ {
+ $resumed = true;
+ }
+ }
+ if ( !$resumed && $allow_skip )
+ {
+ echo_stage_success($stage_id, $stage_name);
+ return false;
+ }
+ if ( !function_exists($function) )
+ die('libenanoinstall: CRITICAL: function "' . $function . '" for ' . $stage_id . ' doesn\'t exist');
+ $result = @call_user_func($function, false, $already_run);
+ if ( $result )
+ {
+ echo_stage_success($stage_id, $stage_name);
+ $resume_stack[] = $stage_id;
+ return true;
+ }
+ else
+ {
+ echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack);
+ return false;
+ }
+}
+
+function start_install_table()
+{
+ echo '<table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">' . "\n";
+}
+
+function close_install_table()
+{
+ echo '</table>' . "\n\n";
+ flush();
+}
+
+function echo_stage_success($stage_id, $stage_name)
+{
+ global $neutral_color;
+ $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
+ echo '<tr><td style="width: 500px; background-color: #' . "{$neutral_color}{$neutral_color}FF{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Done" src="../images/good.gif" /></td></tr>' . "\n";
+ flush();
+}
+
+function echo_stage_failure($stage_id, $stage_name, $failure_explanation, $resume_stack)
+{
+ global $neutral_color;
+ global $lang;
+
+ $neutral_color = ( $neutral_color == 'A' ) ? 'C' : 'A';
+ echo '<tr><td style="width: 500px; background-color: #' . "FF{$neutral_color}{$neutral_color}{$neutral_color}{$neutral_color}" . '; padding: 0 5px;">' . htmlspecialchars($stage_name) . '</td><td style="padding: 0 5px;"><img alt="Failed" src="../images/bad.gif" /></td></tr>' . "\n";
+ flush();
+ close_install_table();
+ $post_data = '';
+ $mysql_error = mysql_error();
+ foreach ( $_POST as $key => $value )
+ {
+ // FIXME: These should really also be sanitized for double quotes
+ $value = htmlspecialchars($value);
+ $key = htmlspecialchars($key);
+ $post_data .= " <input type=\"hidden\" name=\"$key\" value=\"$value\" />\n";
+ }
+ echo '<form action="install.php?stage=install&sub=' . $stage_id . '" method="post">
+ ' . $post_data . '
+ <input type="hidden" name="resume_stack" value="' . htmlspecialchars(implode('|', $resume_stack)) . '" />
+ <h3>' . $lang->get('meta_msg_err_stagefailed_title') . '</h3>
+ <p>' . $failure_explanation . '</p>
+ ' . ( !empty($mysql_error) ? "<p>" . $lang->get('meta_msg_err_stagefailed_mysqlerror') . " $mysql_error</p>" : '' ) . '
+ <p>' . $lang->get('meta_msg_err_stagefailed_body') . '</p>
+ <p style="text-align: center;"><input type="submit" value="' . $lang->get('meta_btn_retry_installation') . '" /></p>
+ </form>';
+ global $ui;
+ $ui->show_footer();
+ exit;
+}
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/payloads/common.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,152 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * payloads/common.php - Installer payload, common stages
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+return true;
+
+function stg_sim_good()
+{
+ return true;
+}
+
+function stg_sim_bad()
+{
+ return true;
+}
+
+function stg_password_decode()
+{
+ global $db;
+ static $pass = false;
+
+ if ( $pass )
+ return $pass;
+
+ if ( !isset($_POST['crypt_data']) && !empty($_POST['password']) && $_POST['password'] === $_POST['password_confirm'] )
+ $pass = $_POST['password'];
+
+ $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
+ // retrieve encryption key
+ $q = $db->sql_query('SELECT config_value FROM ' . table_prefix . 'config WHERE config_name=\'install_aes_key\';');
+ if ( !$q )
+ $db->_die();
+ if ( $db->numrows() < 1 )
+ return false;
+ list($aes_key) = $db->fetchrow_num();
+ $aes_key = $aes->hextostring($aes_key);
+
+ $pass = $aes->decrypt($_POST['crypt_data'], $aes_key, ENC_HEX);
+ if ( !$pass )
+ return false;
+
+ return $pass; // Will be true if the password isn't crapped
+}
+
+function stg_make_private_key()
+{
+ global $db;
+ static $site_key = false;
+
+ if ( $site_key )
+ return $site_key;
+
+ // Is there already a key cached in the database?
+ $q = $db->sql_query('SELECT config_value FROM ' . table_prefix . 'config WHERE config_name=\'site_aes_key\';');
+ if ( !$q )
+ $db->_die();
+
+ if ( $db->numrows() > 0 )
+ {
+ list($site_key) = $db->fetchrow_num();
+ $db->free_result();
+ return $site_key;
+ }
+
+ $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
+ // This will use /dev/urandom if possible
+ $site_key = $aes->gen_readymade_key();
+
+ // Stash it in the database, don't check for errors though because we can always regenerate it
+ $db->sql_query('INSERT INTO ' . table_prefix . 'config ( config_name, config_value ) VALUES ( \'site_aes_key\', \'' . $site_key . '\' );');
+
+ return $site_key;
+}
+
+function stg_load_schema()
+{
+ global $db, $dbdriver, $installer_version;
+ static $sql_parser = false;
+
+ if ( is_object($sql_parser) )
+ return $sql_parser->parse();
+
+ $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
+
+ $site_key = stg_make_private_key();
+ $site_key = $aes->hextostring($site_key);
+ $admin_pass_clean = stg_password_decode();
+ $admin_pass = $aes->encrypt($admin_pass_clean, $site_key, ENC_HEX);
+
+ unset($admin_pass_clean); // Security
+
+ try
+ {
+ $sql_parser = new SQL_Parser( ENANO_ROOT . "/install/schemas/{$dbdriver}_stage2.sql" );
+ }
+ catch ( Exception $e )
+ {
+ echo "<pre>$e</pre>";
+ return false;
+ }
+
+ $vars = array(
+ 'TABLE_PREFIX' => $_POST['table_prefix'],
+ 'SITE_NAME' => $db->escape($_POST['site_name']),
+ 'SITE_DESC' => $db->escape($_POST['site_desc']),
+ 'COPYRIGHT' => $db->escape($_POST['copyright']),
+ // FIXME: update form
+ 'WIKI_MODE' => ( isset($_POST['wiki_mode']) ? '1' : '0' ),
+ 'ENABLE_CACHE' => ( is_writable( ENANO_ROOT . '/cache/' ) ? '1' : '0' ),
+ 'VERSION' => $installer_version['version'],
+ 'ADMIN_USER' => $db->escape($_POST['username']),
+ 'ADMIN_PASS' => $admin_pass,
+ 'ADMIN_EMAIL' => $db->escape($_POST['email']),
+ 'REAL_NAME' => '', // This has always been stubbed.
+ 'ADMIN_EMBED_PHP' => strval(AUTH_DISALLOW),
+ 'UNIX_TIME' => strval(time())
+ );
+
+ $sql_parser->assign_vars($vars);
+ return $sql_parser->parse();
+}
+
+function stg_deliver_payload()
+{
+ global $db;
+ $schema = stg_load_schema();
+ foreach ( $schema as $sql )
+ {
+ if ( !$db->sql_query($sql) )
+ {
+ echo $db->get_error();
+ return false;
+ }
+ }
+ return true;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/payloads/mysql.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * payloads/mysql.php - Installer payload, MySQL-specific
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+return true;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/payloads/postgresql.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,21 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * payloads/mysql.php - Installer payload, PostgreSQL-specific
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+return true;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/sql_parse.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,149 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * sql_parse.php - SQL query splitter and templater
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+/**
+ * Parses a full file of SQL into individual queries. Also includes substitution (template) functions.
+ * @package Enano
+ * @subpackage Installer
+ * @author Dan Fuhry
+ */
+
+class SQL_Parser
+{
+ /**
+ * The SQL to be parsed.
+ * @var string
+ * @access private
+ */
+
+ private $sql_string;
+
+ /**
+ * Parsed SQL array
+ * @var array
+ * @access private
+ */
+
+ private $sql_array;
+
+ /**
+ * Template variables.
+ * @var array
+ * @access private
+ */
+
+ private $tpl_strings;
+
+ /**
+ * Constructor.
+ * @param string If this contains newlines, it will be treated as the target SQL. If not, will be treated as a filename.
+ */
+
+ public function __construct($sql)
+ {
+ if ( strpos("\n", $sql) )
+ {
+ $this->sql_string = $sql;
+ }
+ else
+ {
+ if ( file_exists($sql) )
+ {
+ $this->sql_string = @file_get_contents($sql);
+ if ( empty($this->sql_string) )
+ {
+ throw new Exception('SQL file is blank or permissions are bad');
+ }
+ }
+ else
+ {
+ throw new Exception('SQL file doesn\'t exist');
+ }
+ }
+ $this->sql_array = false;
+ $this->tpl_strings = array();
+ }
+
+ /**
+ * Sets template variables.
+ * @param array Associative array of template variables to assign
+ */
+
+ public function assign_vars($vars)
+ {
+ if ( !is_array($vars) )
+ return false;
+ $this->tpl_strings = array_merge($this->tpl_strings, $vars);
+ }
+
+ /**
+ * Internal function to parse the SQL.
+ * @access private
+ */
+
+ private function parse_sql()
+ {
+ $this->sql_array = $this->sql_string;
+ foreach ( $this->tpl_strings as $key => $value )
+ {
+ $this->sql_array = str_replace("{{{$key}}}", $value, $this->sql_array);
+ }
+
+ // Build an array of queries
+ $this->sql_array = explode("\n", $this->sql_array);
+
+ foreach ( $this->sql_array as $i => $sql )
+ {
+ $query =& $this->sql_array[$i];
+ $t = trim($query);
+ if ( empty($t) || preg_match('/^(\#|--)/i', $t) )
+ {
+ unset($this->sql_array[$i]);
+ unset($query);
+ }
+ }
+ unset($query);
+
+ $this->sql_array = array_values($this->sql_array);
+ $this->sql_array = implode("\n", $this->sql_array);
+ $this->sql_array = explode(";\n", $this->sql_array);
+
+ foreach ( $this->sql_array as $i => $sql )
+ {
+ $query =& $this->sql_array[$i];
+ if ( substr($query, ( strlen($query) - 1 ), 1 ) != ';' )
+ {
+ $query .= ';';
+ }
+ }
+ unset($query);
+ }
+
+ /**
+ * Returns the parsed array of SQL queries.
+ * @param bool Optional. Defaults to false. If true, a parse is performed even if it already happened.
+ * @return array
+ */
+
+ public function parse($force_reparse = false)
+ {
+ if ( !$this->sql_array || $force_reparse )
+ $this->parse_sql();
+ return $this->sql_array;
+ }
+}
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/confirm.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,44 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * confirm.php - Installer installation summary/confirmation stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+require_once( ENANO_ROOT . '/includes/constants.php' );
+
+$ui->show_header();
+?>
+<h3>Enano is ready to install.</h3>
+ <p>Almost there! You've entered all the information we need for now. Click Continue to install the Enano database.</p>
+ <p style="font-size: smaller;"><b>A note on AES encryption:</b>
+ Enano is currently configured to use <?php echo AES_BITS; ?>-bit AES encryption. While the default value of 192 bits is perfectly acceptable for most sites, those in need of extreme security will want to change this value to 256 bits (the maximum available strength). If you need to change the cipher strength, please edit the file includes/constants.php and then <u>restart</u> this installation. Do not click Continue below until you redo the installation process up until this point, or you will experience severe problems with logging into your site.
+ </p>
+ <form action="install.php?stage=install" method="post" name="install_login" onsubmit="return ( verify() && submit_encrypt() );"><?php
+ foreach ( $_POST as $key => &$value )
+ {
+ if ( !preg_match('/^[a-z0-9_]+$/', $key) )
+ die('You idiot hacker...');
+ if ( $key == '_cont' )
+ continue;
+ $value_clean = str_replace(array('\\', '"', '<', '>'), array('\\\\', '\\"', '<', '>'), $value);
+ echo "\n <input type=\"hidden\" name=\"$key\" value=\"$value_clean\" />";
+ }
+?>
+
+ <div style="text-align: center;">
+ <input type="submit" name="_cont" value="<?= $lang->get('meta_btn_continue'); ?>" />
+ </div>
+ </form>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/database.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,110 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * database.php - Installer database driver selection stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+echo '<h3>' . $lang->get('database_driver_heading') . '</h3>';
+echo '<p>' . $lang->get('database_driver_intro') . '</p>';
+if ( @file_exists('/etc/enano-is-virt-appliance') )
+{
+ echo '<p>' . $lang->get('database_driver_msg_virt_appliance') . '</p>';
+}
+
+$mysql_disable_reason = '';
+$pgsql_disable_reason = '';
+$mysql_disable = '';
+$pgsql_disable = '';
+if ( !function_exists('mysql_connect') )
+{
+ $mysql_disable = ' disabled="disabled"';
+ $mysql_disable_reason = $lang->get('database_driver_err_no_mysql');
+}
+if ( !function_exists('pg_connect') )
+{
+ $pgsql_disable = ' disabled="disabled"';
+ $pgsql_disable_reason = $lang->get('database_driver_err_no_pgsql');
+}
+
+echo '<form action="install.php?stage=database" method="post" enctype="multipart/form-data">';
+echo '<input type="hidden" name="language" value="' . $lang_id . '" />';
+?>
+<table border="0" cellspacing="5">
+ <tr>
+ <td>
+ <?php
+ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ):
+ ?>
+ <input type="radio" checked="checked" name="driver" value="mysql" <?php echo $mysql_disable; ?>/>
+ <?php
+ else:
+ ?>
+ <button name="driver" value="mysql"<?php echo $mysql_disable; ?>>
+ <img src="../images/about-powered-mysql.png" />
+ </button>
+ <?php
+ endif;
+ ?>
+ </td>
+ <td<?php if ( $mysql_disable ) echo ' style="opacity: 0.5; filter: alpha(opacity=50);"'; ?>>
+ <b><?php echo $lang->get('database_driver_mysql'); ?></b><br />
+ <?php echo $lang->get('database_driver_mysql_intro'); ?>
+ <?php
+ if ( $mysql_disable )
+ {
+ echo "<br /><br /><b>$mysql_disable_reason</b>";
+ }
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <?php
+ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') ):
+ ?>
+ <input type="radio" name="driver" value="mysql" <?php echo $pgsql_disable; ?>/>
+ <?php
+ else:
+ ?>
+ <button name="driver" value="postgresql"<?php echo $pgsql_disable; ?>>
+ <img src="../images/about-powered-pgsql.png" />
+ </button>
+ <?php
+ endif;
+ ?>
+ </td>
+ <td<?php if ( $pgsql_disable ) echo ' style="opacity: 0.5; filter: alpha(opacity=50);"'; ?>>
+ <b><?php echo $lang->get('database_driver_pgsql'); ?></b><br />
+ <?php echo $lang->get('database_driver_pgsql_intro'); ?>
+ <?php
+ if ( $pgsql_disable )
+ {
+ echo "<br /><br /><b>$pgsql_disable_reason</b>";
+ }
+ ?>
+ </td>
+ </tr>
+</table>
+
+<?php
+if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') )
+{
+ echo '<div style="text-align: center;">
+ <input type="submit" />
+ </div>';
+}
+
+echo '</form>';
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/database_mysql.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,508 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * database_mysql.php - Installer database info page, MySQL
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+if ( isset($_POST['_cont']) )
+{
+ $allow_go = true;
+ // Do we have everything? If so, continue with installation.
+ foreach ( array('db_host', 'db_name', 'db_user', 'db_pass') as $field )
+ {
+ if ( empty($_POST[$field]) )
+ {
+ $allow_go = false;
+ }
+ }
+ if ( $allow_go )
+ {
+ require( ENANO_ROOT . '/install/includes/stages/database_post.php' );
+ return true;
+ }
+}
+
+if ( isset($_POST['ajax_test']) )
+{
+ // Test the database connection
+ $return = array(
+ 'can_install' => false,
+ 'host_good' => true,
+ 'creating_user' => false,
+ 'db_exist' => false,
+ 'creating_db' => false,
+ 'creating_db_grant' => false,
+ 'root_fail' => false,
+ 'version' => array(
+ 'version' => 'unknown',
+ 'good' => 'indeterminate'
+ ),
+ 'last_error' => ''
+ );
+
+ if ( !isset($_POST['info']) )
+ die();
+
+ $info = $_POST['info'];
+
+ // From here on out will be JSON responses
+ header('Content-type: application/json');
+
+ try
+ {
+ $info = @enano_json_decode($info);
+ }
+ catch ( Zend_Json_Exception $e )
+ {
+ die(enano_json_encode(array(
+ 'mode' => 'error',
+ 'error' => 'Exception in JSON decoder'
+ )));
+ }
+
+ // Try to connect as the normal user
+ $test = @mysql_connect($info['db_host'], $info['db_user'], $info['db_pass']);
+ if ( !$test )
+ {
+ $return['creating_user'] = true;
+ $return['last_error'] = mysql_error();
+ if ( strstr( $return['last_error'], 'Lost connection' ) || strstr( $return['last_error'], 'Unknown MySQL server host' ) )
+ {
+ $return['host_good'] = false;
+ }
+ // Doing that failed. If we have root credentials, test those
+ if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
+ {
+ // Log in with root rights and if that works, tell 'em we'll reset the password or create
+ // the account if it doesn't exist already. This is done with GRANT ALL PRIVILEGES ON enano_db.*
+ // etc etc, a little hackish but known to work with MySQL >= 4.1.
+ $test_root = @mysql_connect($info['db_host'], $info['db_root_user'], $info['db_root_pass']);
+ if ( $test_root )
+ {
+ // We logged in with root rights, assume that we have appropriate permissions.
+ // If not, well, the installation will fail. Tough on the user, but creating
+ // test databases/users is too risky.
+
+ // Does the database exist?
+ $q = @mysql_query('USE `' . mysql_real_escape_string($info['db_name']) . '`;', $test_root);
+ if ( !$q )
+ {
+ // Nope, we'll have to create it
+ $return['creating_db'] = true;
+ $return['last_error'] = mysql_error();
+ }
+
+ $version = mysql_get_server_info($test_root);
+ $return['version'] = array(
+ 'version' => $version,
+ 'good' => version_compare($version, '4.0.17', '>=')
+ );
+
+ $return['can_install'] = ( $return['version']['good'] ) ? true : false;
+ }
+ else
+ {
+ // Well that helped. Root credentials are bad.
+ $return['creating_db'] = true;
+ $return['root_fail'] = true;
+ }
+ }
+ else
+ {
+ // No root credentials, fail out
+ $return['root_fail'] = true;
+ }
+ }
+ else
+ {
+ // We're connected; do we have permission to use the database?
+ $have_database = false;
+ $q = @mysql_query('USE `' . mysql_real_escape_string($info['db_name']) . '`;', $test);
+ if ( $q )
+ {
+ // Permissions are good and we're all connected. Perform version check...
+ $version = mysql_get_server_info($test);
+ $return['version'] = array(
+ 'version' => $version,
+ 'good' => version_compare($version, '4.0.17', '>=')
+ );
+
+ $return['can_install'] = ( $return['version']['good'] ) ? true : false;
+ }
+ else
+ {
+ $return['last_error'] = mysql_error();
+ $return['creating_db'] = true;
+
+ // We don't have permission to use the database or it doesn't exist.
+ // See if we have a root login to work with, if not then fail
+ if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
+ {
+ // Log in with root rights and if that works, tell 'em we'll create the database.
+ $test_root = @mysql_connect($info['db_host'], $info['db_root_user'], $info['db_root_pass']);
+ if ( $test_root )
+ {
+ // We logged in with root rights, assume that we have appropriate permissions.
+ // If not, well, the installation will fail. Tough on the user, but creating
+ // test databases/users is too risky.
+
+ // See if the database already exists
+ $dbname = mysql_real_escape_string($info['db_name']);
+ $q = @mysql_query("SHOW DATABASES LIKE '$dbname';", $test_root);
+ if ( $q )
+ {
+ if ( mysql_num_rows($q) > 0 )
+ {
+ $return['creating_db'] = false;
+ $return['creating_db_grant'] = true;
+ }
+ @mysql_free_result($q);
+ }
+
+ $version = mysql_get_server_info($test);
+ $return['version'] = array(
+ 'version' => $version,
+ 'good' => version_compare($version, '4.0.17', '>=')
+ );
+
+ $return['can_install'] = ( $return['version']['good'] ) ? true : false;
+ }
+ else
+ {
+ // Well that helped. Root credentials are bad.
+ $return['creating_db'] = true;
+ $return['root_fail'] = true;
+ }
+ }
+ // No root credentials, fail out
+ }
+ }
+
+ if ( isset($test) && @is_resource($test) )
+ @mysql_close($test);
+
+ if ( isset($test_root) && @is_resource($test_root) )
+ @mysql_close($test_root);
+
+ echo enano_json_encode($return);
+
+ exit();
+}
+
+$ui->add_header('<script type="text/javascript" src="includes/js/formutils.js"></script>');
+$ui->show_header();
+
+?>
+
+<div style="float: right; padding: 10px 0 10px 10px;">
+ <img alt="MySQL logo" src="../images/about-powered-mysql.png" />
+</div>
+
+<p><?php echo $lang->get('dbmysql_blurb_needdb'); ?></p>
+<p><?php echo $lang->get('dbmysql_blurb_howtomysql'); ?></p>
+<?php
+if ( @file_exists('/etc/enano-is-virt-appliance') )
+{
+ echo '<p>
+ ' . $lang->get('database_vm_login_info', array( 'host' => 'localhost', 'user' => 'enano', 'pass' => 'clurichaun', 'name' => 'enano_www1' )) . '
+ </p>';
+}
+?>
+
+<script type="text/javascript">
+
+ var tested = false;
+
+ function verify(field)
+ {
+ if ( tested && !field )
+ return true;
+ tested = false;
+ if ( document.getElementById('verify_error').className != '' )
+ {
+ document.getElementById('verify_error').className = '';
+ document.getElementById('verify_error').innerHTML = '';
+ }
+ var frm = document.forms.database_info;
+ // List of fields
+ var fields = {
+ db_host: frm.db_host,
+ db_name: frm.db_name,
+ db_user: frm.db_user,
+ db_pass: frm.db_pass,
+ table_prefix: frm.table_prefix,
+ db_root_user: frm.db_root_user,
+ db_root_pass: frm.db_root_pass
+ };
+ var passed = true;
+ // Main validation
+ if ( field == fields.db_host || !field )
+ {
+ var matches = fields.db_host.value.match(/^([a-z0-9_-]+)((\.([a-z0-9_-]+))*)?$/);
+ document.getElementById('s_db_host').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_name || !field )
+ {
+ var matches = fields.db_name.value.match(/^[A-z0-9_-]+$/);
+ document.getElementById('s_db_name').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_user || field == fields.db_pass || !field )
+ {
+ var matches = fields.db_user.value.match(/^[A-z0-9_-]+$/);
+ document.getElementById('s_db_auth').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.table_prefix || !field )
+ {
+ var matches = fields.table_prefix.value.match(/^[a-z0-9_]*$/);
+ document.getElementById('s_table_prefix').src = ( matches ) ? img_good : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_root_user || field == fields.db_root_pass || !field )
+ {
+ var matches = ( ( fields.db_root_user.value.match(/^[A-z0-9_-]+$/) && fields.db_root_pass.value.match(/^.+$/) ) || fields.db_root_user.value == '' );
+ document.getElementById('s_db_root').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ return passed;
+ }
+
+ function ajaxTestConnection()
+ {
+ if ( !verify() )
+ {
+ document.body.scrollTop = 0;
+ new Spry.Effect.Shake('enano-body', {duration: 750}).start();
+ document.getElementById('verify_error').className = 'error-box-mini';
+ document.getElementById('verify_error').innerHTML = $lang.get('meta_msg_err_verification');
+ return false;
+ }
+ install_set_ajax_loading();
+
+ var frm = document.forms.database_info;
+ var connection_info = 'info=' + ajaxEscape(toJSONString({
+ db_host: frm.db_host.value,
+ db_name: frm.db_name.value,
+ db_user: frm.db_user.value,
+ db_pass: frm.db_pass.value,
+ db_root_user: frm.db_root_user.value,
+ db_root_pass: frm.db_root_pass.value
+ }));
+
+ ajaxPost(scriptPath + '/install/install.php?stage=database', connection_info + '&driver=mysql&ajax_test=on&language=' + enano_lang_code[ENANO_LANG_ID], function()
+ {
+ if ( ajax.readyState == 4 )
+ {
+ setTimeout('install_unset_ajax_loading();', 750);
+ // Process response
+ var response = String(ajax.responseText + '');
+ if ( response.substr(0, 1) != '{' )
+ {
+ alert('Received an invalid JSON response from the server.');
+ return false;
+ }
+ response = parseJSON(response);
+ document.getElementById('e_db_host').innerHTML = '';
+ document.getElementById('e_db_name').innerHTML = '';
+ document.getElementById('e_db_auth').innerHTML = '';
+ document.getElementById('e_db_root').innerHTML = '';
+ if ( response.can_install )
+ {
+ tested = true;
+ var statuses = ['s_db_host', 's_db_name', 's_db_auth', 's_table_prefix', 's_db_root', 's_mysql_version'];
+ for ( var i in statuses )
+ {
+ var img = document.getElementById(statuses[i]);
+ if ( img )
+ img.src = img_good;
+ }
+ document.getElementById('e_mysql_version').innerHTML = $lang.get('dbmysql_msg_info_mysql_good');
+ document.getElementById('verify_error').className = 'info-box-mini';
+ document.getElementById('verify_error').innerHTML = $lang.get('dbmysql_msg_test_success');
+ if ( response.creating_db )
+ {
+ document.getElementById('e_db_name').innerHTML = $lang.get('dbmysql_msg_warn_creating_db');
+ }
+ if ( response.creating_user )
+ {
+ document.getElementById('e_db_auth').innerHTML = $lang.get('dbmysql_msg_warn_creating_user');
+ }
+ }
+ else
+ {
+ // Oh dear, oh dear, oh dear, oh dear, oh dear...
+ if ( response.creating_db )
+ {
+ document.getElementById('e_db_name').innerHTML = $lang.get('dbmysql_msg_err_mysql_dbexist', { mysql_error: response.last_error });
+ document.getElementById('s_db_name').src = img_bad;
+ }
+ if ( response.creating_user )
+ {
+ document.getElementById('e_db_auth').innerHTML = $lang.get('dbmysql_msg_err_mysql_auth', { mysql_error: response.last_error });
+ document.getElementById('s_db_auth').src = img_bad;
+ }
+ if ( !response.host_good )
+ {
+ document.getElementById('e_db_host').innerHTML = $lang.get('dbmysql_msg_err_mysql_connect', { db_host: frm.db_host.value, mysql_error: response.last_error });
+ document.getElementById('s_db_host').src = img_bad;
+ }
+ }
+ }
+ });
+ }
+
+</script>
+
+<form action="install.php?stage=database" method="post" name="database_info">
+<input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+<input type="hidden" name="driver" value="mysql" />
+
+<table border="0" cellspacing="0" cellpadding="10" width="100%">
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <h3><?php echo $lang->get('dbmysql_table_title'); ?></h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_hostname_title'); ?></b>
+ <br /><?php echo $lang->get('dbmysql_field_hostname_body'); ?>
+ <br /><span style="color: #993300" id="e_db_host"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="1" name="db_host" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_db_host" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_dbname_title'); ?></b><br />
+ <?php echo $lang->get('dbmysql_field_dbname_body'); ?><br />
+ <span style="color: #993300" id="e_db_name"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="2" name="db_name" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_db_name" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_dbauth_title'); ?></b><br />
+ <?php echo $lang->get('dbmysql_field_dbauth_body'); ?><br />
+ <span style="color: #993300" id="e_db_auth"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="3" name="db_user" size="30" type="text" /><br />
+ <br />
+ <input name="db_pass" tabindex="4" size="30" type="password" />
+ </td>
+ <td>
+ <img id="s_db_auth" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <h3><?php echo $lang->get('database_heading_optionalinfo'); ?></h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_tableprefix_title'); ?></b><br />
+ <?php echo $lang->get('dbmysql_field_tableprefix_body'); ?>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="5" name="table_prefix" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_table_prefix" alt="Good/bad icon" src="../images/good.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_rootauth_title'); ?></b><br />
+ <?php echo $lang->get('dbmysql_field_rootauth_body'); ?><br />
+ <span style="color: #993300" id="e_db_root"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="6" name="db_root_user" size="30" type="text" /><br />
+ <br />
+ <input onkeyup="verify(this);" tabindex="7" name="db_root_pass" size="30" type="password" />
+ </td>
+ <td>
+ <img id="s_db_root" alt="Good/bad icon" src="../images/good.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_mysqlversion_title'); ?></b>
+ </td>
+ <td id="e_mysql_version">
+ <?php echo $lang->get('dbmysql_field_mysqlversion_blurb_willbechecked'); ?>
+ </td>
+ <td>
+ <img id="s_mysql_version" alt="Good/bad icon" src="../images/unknown.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbmysql_field_droptables_title'); ?></b><br />
+ <?php echo $lang->get('dbmysql_field_droptables_body'); ?>
+ </td>
+ <td colspan="2">
+ <input type="checkbox" tabindex="8" name="drop_tables" id="dtcheck" /> <label for="dtcheck"><?php echo $lang->get('dbmysql_field_droptables_lbl'); ?></label>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <input type="button" tabindex="9" value="<?php echo $lang->get('dbmysql_btn_testconnection'); ?>" onclick="ajaxTestConnection();" />
+ <div id="verify_error"></div>
+ </td>
+ </tr>
+
+</table>
+
+<table border="0">
+ <tr>
+ <td>
+ <input type="submit" tabindex="10" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
+ </td>
+ <td>
+ <p>
+ <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
+ • <?php echo $lang->get('database_objective_test'); ?><br />
+ • <?php echo $lang->get('database_objective_uncrypt'); ?>
+ </p>
+ </td>
+ </tr>
+</table>
+
+</form>
+
+<script type="text/javascript">
+ verify();
+</script>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/database_post.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,168 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * database_post.php - Database installation, stage 1
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+// Start up the DBAL
+require( ENANO_ROOT . '/includes/dbal.php' );
+require( ENANO_ROOT . '/install/includes/sql_parse.php' );
+$dbal = new $driver();
+$db_host =& $_POST['db_host'];
+$db_user =& $_POST['db_user'];
+$db_pass =& $_POST['db_pass'];
+$db_name =& $_POST['db_name'];
+$db_prefix =& $_POST['table_prefix'];
+
+$result = $dbal->connect(true, $db_host, $db_user, $db_pass, $db_name);
+
+$ui->show_header();
+
+if ( $result )
+{
+ // We're good, write out a config file
+ $ch = @fopen( ENANO_ROOT . '/config.new.php', 'w' );
+ if ( !$ch )
+ {
+ ?>
+ <form action="install.php?stage=database" method="post" name="database_info">
+ <h3>Configuration file generation failed.</h3>
+ <p>Couldn't open the configuration file to write out database settings. Check your file permissions.</p>
+ <p>
+ <input type="submit" name="_cont" value="Go back" />
+ </p>
+ </form>
+ <?php
+ return true;
+ }
+ $db_host = str_replace("'", "\\'", $db_host);
+ $db_user = str_replace("'", "\\'", $db_user);
+ $db_pass = str_replace("'", "\\'", $db_pass);
+ $db_name = str_replace("'", "\\'", $db_name);
+ $db_prefix = str_replace("'", "\\'", $db_prefix);
+ if ( !preg_match('/^[a-z0-9_]*$/', $db_prefix) )
+ {
+ echo '<p>That table prefix isn\'t going to work.</p>';
+ return true;
+ }
+ fwrite($ch, "<?php
+// Enano temporary configuration file, will be OVERWRITTEN after installation.
+
+\$dbdriver = '$driver';
+\$dbhost = '$db_host';
+\$dbname = '$db_name';
+\$dbuser = '$db_user';
+\$dbpasswd = '$db_pass';
+@define('table_prefix', '$db_prefix');
+
+@define('ENANO_INSTALL_HAVE_CONFIG', 1);
+");
+ fclose($ch);
+ // Create the config table
+ try
+ {
+ $sql_parser = new SQL_Parser( ENANO_ROOT . "/install/schemas/{$driver}_stage1.sql" );
+ }
+ catch ( Exception $e )
+ {
+ ?>
+ <h3>Can't load schema file</h3>
+ <p>The SQL schema file couldn't be loaded.</p>
+ <?php echo "<pre>$e</pre>"; ?>
+ <?php
+ return true;
+ }
+ // Check to see if the config table already exists
+ $q = $dbal->sql_query('SELECT config_name, config_value FROM ' . $db_prefix . 'config LIMIT 1;');
+ if ( !$q )
+ {
+ $sql_parser->assign_vars(array(
+ 'TABLE_PREFIX' => $db_prefix
+ ));
+ $sql = $sql_parser->parse();
+ foreach ( $sql as $q )
+ {
+ if ( !$dbal->sql_query($q) )
+ {
+ ?>
+ <form action="install.php?stage=database" method="post" name="database_info">
+ <input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+ <input type="hidden" name="driver" value="<?php echo $driver; ?>" />
+ <h3>Database operation failed</h3>
+ <p>The installer couldn't create one of the tables used for installation.</p>
+ <p>Error description:
+ <?php
+ echo $dbal->sql_error();
+ ?>
+ </p>
+ <p>
+ <input type="submit" name="_cont" value="Go back" />
+ </p>
+ </form>
+ <?php
+ return true;
+ }
+ }
+ }
+ else
+ {
+ $dbal->free_result();
+ if ( !$dbal->sql_query('DELETE FROM ' . $db_prefix . 'config WHERE config_name = \'install_aes_key\';') )
+ {
+ $dbal->_die('install database_post.php trying to remove old AES installer key');
+ }
+ }
+ $dbal->close();
+ ?>
+ <form action="install.php?stage=website" method="post" name="install_db_post" onsubmit="return verify();">
+ <input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+ <?php
+ // FIXME: l10n
+ ?>
+ <h3>Connection successful</h3>
+ <p>The database has been contacted and initial tables created successfully. Redirecting...</p>
+ <p><input type="submit" name="_cont" value="<?php echo $lang->get('meta_btn_continue'); ?>" /> Click if you're not redirected within 2 seconds</p>
+ </form>
+ <script type="text/javascript">
+ setTimeout(function()
+ {
+ var frm = document.forms.install_db_post;
+ frm.submit();
+ }, 200);
+ </script>
+ <?php
+}
+else
+{
+ // FIXME: l10n
+ ?>
+ <form action="install.php?stage=database" method="post" name="database_info">
+ <input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+ <input type="hidden" name="driver" value="<?php echo $driver; ?>" />
+ <h3>Database connection failed</h3>
+ <p>The installer couldn't connect to the database because something went wrong while the connection attempt was being made. Please press your browser's back button and correct your database information.</p>
+ <p>Error description:
+ <?php
+ echo $dbal->sql_error();
+ ?>
+ </p>
+ <p>
+ <input type="submit" name="_cont" value="Go back" />
+ </p>
+ </form>
+ <?php
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/database_postgresql.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,454 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * database_postgresql.php - Installer database info page, PostgreSQL
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+if ( isset($_POST['_cont']) )
+{
+ $allow_go = true;
+ // Do we have everything? If so, continue with installation.
+ foreach ( array('db_host', 'db_name', 'db_user', 'db_pass') as $field )
+ {
+ if ( empty($_POST[$field]) )
+ {
+ $allow_go = false;
+ }
+ }
+ if ( $allow_go )
+ {
+ require( ENANO_ROOT . '/install/includes/stages/database_post.php' );
+ return true;
+ }
+}
+
+if ( isset($_POST['ajax_test']) )
+{
+ // Test the database connection
+ $return = array(
+ 'can_install' => false,
+ 'host_good' => true,
+ 'creating_user' => false,
+ 'db_exist' => false,
+ 'creating_db' => false,
+ 'creating_db_grant' => false,
+ 'root_fail' => false,
+ 'version' => array(
+ 'version' => 'unknown',
+ 'good' => 'indeterminate'
+ ),
+ 'last_error' => ''
+ );
+
+ if ( !isset($_POST['info']) )
+ die();
+
+ $info = $_POST['info'];
+
+ // From here on out will be JSON responses
+ header('Content-type: application/json');
+
+ try
+ {
+ $info = @enano_json_decode($info);
+ }
+ catch ( Zend_Json_Exception $e )
+ {
+ die(enano_json_encode(array(
+ 'mode' => 'error',
+ 'error' => 'Exception in JSON decoder'
+ )));
+ }
+
+ // Try to connect as the normal user
+ // generate connection string
+ $conn_string = "dbname = '" . addslashes($info['db_name']) . "' port = '5432' host = '" . addslashes($info['db_host']) . "' " .
+ "user= '" . addslashes($info['db_user']) . "' password = '" . addslashes($info['db_pass']) . "'";
+ $test = @pg_connect($conn_string);
+ if ( !$test )
+ {
+ // Connection as normal user failed. PgSQL doesn't give us an error string so
+ // just try to connect as root. If even that fails, exit with an error
+ $return['creating_user'] = true;
+ if ( !empty($info['db_root_user']) && !empty($info['db_root_pass']) )
+ {
+ $conn_string_root = "dbname = '" . addslashes($info['db_name']) . "' port = '5432' host = '" . addslashes($info['db_host']) . "' " .
+ "user= '" . addslashes($info['db_root_user']) . "' password = '" . addslashes($info['db_root_pass']) . "'";
+ // Attempt connection as root
+ $test_root = @pg_connect($conn_string_root);
+ if ( !$test_root )
+ {
+ $return['root_fail'] = true;
+ }
+ else
+ {
+ $return['can_install'] = true;
+ }
+ }
+ }
+ else
+ {
+ $return['can_install'] = true;
+ }
+
+ $did_version_check = false;
+
+ if ( isset($test) && @is_resource($test) )
+ {
+ $server_info = @pg_version($test);
+ if ( isset($server_info['server']) )
+ {
+ $did_version_check = true;
+ $return['version'] = array(
+ 'version' => $server_info['server'],
+ 'good' => ( version_compare($server_info['server'], '8.2.5', '>=') )
+ );
+ }
+ @pg_close($test);
+ }
+
+ if ( isset($test_root) && @is_resource($test_root) )
+ {
+ $server_info = @pg_version($test_root);
+ if ( isset($server_info['server']) )
+ {
+ $did_version_check = true;
+ $return['version'] = array(
+ 'version' => $server_info['server'],
+ 'good' => ( version_compare($server_info['server'], '8.2.5', '>=') )
+ );
+ }
+ @pg_close($test_root);
+ }
+
+ if ( !$did_version_check )
+ {
+ $return['version'] = array(
+ 'version' => 'indeterminate',
+ 'good' => false
+ );
+ }
+ else
+ {
+ if ( !$return['version']['good'] )
+ {
+ $return['can_install'] = false;
+ }
+ }
+
+ echo enano_json_encode($return);
+
+ exit();
+}
+
+$ui->add_header('<script type="text/javascript" src="includes/js/formutils.js"></script>');
+$ui->show_header();
+
+?>
+
+<script type="text/javascript">
+
+ var img_bad = '../images/bad.gif';
+ var img_good = '../images/good.gif';
+ var img_neu = '../images/unknown.gif';
+
+ var tested = false;
+
+ function verify(field)
+ {
+ if ( tested && !field )
+ return true;
+ tested = false;
+ if ( document.getElementById('verify_error').className != '' )
+ {
+ document.getElementById('verify_error').className = '';
+ document.getElementById('verify_error').innerHTML = '';
+ }
+ var frm = document.forms.database_info;
+ // List of fields
+ var fields = {
+ db_host: frm.db_host,
+ db_name: frm.db_name,
+ db_user: frm.db_user,
+ db_pass: frm.db_pass,
+ table_prefix: frm.table_prefix,
+ db_root_user: frm.db_root_user,
+ db_root_pass: frm.db_root_pass
+ };
+ var passed = true;
+ // Main validation
+ if ( field == fields.db_host || !field )
+ {
+ var matches = fields.db_host.value.match(/^([a-z0-9_-]+)((\.([a-z0-9_-]+))*)?$/);
+ document.getElementById('s_db_host').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_name || !field )
+ {
+ var matches = fields.db_name.value.match(/^[A-z0-9_-]+$/);
+ document.getElementById('s_db_name').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_user || field == fields.db_pass || !field )
+ {
+ var matches = fields.db_user.value.match(/^[A-z0-9_-]+$/);
+ document.getElementById('s_db_auth').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.table_prefix || !field )
+ {
+ var matches = fields.table_prefix.value.match(/^[a-z0-9_]*$/);
+ document.getElementById('s_table_prefix').src = ( matches ) ? img_good : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ if ( field == fields.db_root_user || field == fields.db_root_pass || !field )
+ {
+ var matches = ( ( fields.db_root_user.value.match(/^[A-z0-9_-]+$/) && fields.db_root_pass.value.match(/^.+$/) ) || fields.db_root_user.value == '' );
+ document.getElementById('s_db_root').src = ( matches ) ? img_neu : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+ return passed;
+ }
+
+ function ajaxTestConnection()
+ {
+ if ( !verify() )
+ {
+ document.body.scrollTop = 0;
+ new Spry.Effect.Shake('enano-body', {duration: 750}).start();
+ document.getElementById('verify_error').className = 'error-box-mini';
+ document.getElementById('verify_error').innerHTML = $lang.get('meta_msg_err_verification');
+ return false;
+ }
+ install_set_ajax_loading();
+
+ var frm = document.forms.database_info;
+ var connection_info = 'info=' + ajaxEscape(toJSONString({
+ db_host: frm.db_host.value,
+ db_name: frm.db_name.value,
+ db_user: frm.db_user.value,
+ db_pass: frm.db_pass.value,
+ db_root_user: frm.db_root_user.value,
+ db_root_pass: frm.db_root_pass.value
+ }));
+
+ ajaxPost(scriptPath + '/install/install.php?stage=database', connection_info + '&driver=postgresql&ajax_test=on&language=' + enano_lang_code[ENANO_LANG_ID], function()
+ {
+ if ( ajax.readyState == 4 )
+ {
+ setTimeout('install_unset_ajax_loading();', 750);
+ // Process response
+ var response = String(ajax.responseText + '');
+ if ( response.substr(0, 1) != '{' )
+ {
+ alert('Received an invalid JSON response from the server.');
+ return false;
+ }
+ response = parseJSON(response);
+ document.getElementById('e_db_host').innerHTML = '';
+ document.getElementById('e_db_name').innerHTML = '';
+ document.getElementById('e_db_auth').innerHTML = '';
+ document.getElementById('e_db_root').innerHTML = '';
+ if ( response.can_install )
+ {
+ tested = true;
+ var statuses = ['s_db_host', 's_db_name', 's_db_auth', 's_table_prefix', 's_db_root', 's_pgsql_version'];
+ for ( var i in statuses )
+ {
+ var img = document.getElementById(statuses[i]);
+ if ( img )
+ img.src = img_good;
+ }
+ document.getElementById('e_pgsql_version').innerHTML = $lang.get('dbpgsql_msg_info_version_good');
+ document.getElementById('verify_error').className = 'info-box-mini';
+ document.getElementById('verify_error').innerHTML = $lang.get('dbpgsql_msg_test_success');
+ if ( response.creating_db )
+ {
+ document.getElementById('e_db_name').innerHTML = $lang.get('dbpgsql_msg_warn_creating_db');
+ }
+ if ( response.creating_user )
+ {
+ document.getElementById('e_db_auth').innerHTML = $lang.get('dbpgsql_msg_warn_creating_user');
+ }
+ }
+ else
+ {
+ // Oh dear, oh dear, oh dear, oh dear, oh dear...
+ if ( response.creating_db )
+ {
+ document.getElementById('e_db_name').innerHTML = $lang.get('dbpgsql_msg_err_dbexist', { pg_error: response.last_error });
+ document.getElementById('s_db_name').src = img_bad;
+ }
+ if ( response.creating_user )
+ {
+ document.getElementById('e_db_auth').innerHTML = $lang.get('dbpgsql_msg_err_auth', { pg_error: response.last_error });
+ document.getElementById('s_db_auth').src = img_bad;
+ }
+ if ( !response.host_good )
+ {
+ document.getElementById('e_db_host').innerHTML = $lang.get('dbpgsql_msg_err_connect', { db_host: frm.db_host.value, pg_error: response.last_error });
+ document.getElementById('s_db_host').src = img_bad;
+ }
+ if ( !response.version.good )
+ {
+ document.getElementById('e_pgsql_version').innerHTML = $lang.get('dbpgsql_msg_err_version', { pg_version: response.version.version });
+ document.getElementById('s_pgsql_version').src = img_bad;
+ }
+ }
+ }
+ });
+ }
+
+</script>
+
+<form action="install.php?stage=database" method="post" name="database_info">
+<input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+<input type="hidden" name="driver" value="postgresql" />
+
+<table border="0" cellspacing="0" cellpadding="10" width="100%">
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <h3><?php echo $lang->get('dbpgsql_table_title'); ?></h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_hostname_title'); ?></b>
+ <br /><?php echo $lang->get('dbpgsql_field_hostname_body'); ?>
+ <br /><span style="color: #993300" id="e_db_host"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="1" name="db_host" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_db_host" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_dbname_title'); ?></b><br />
+ <?php echo $lang->get('dbpgsql_field_dbname_body'); ?><br />
+ <span style="color: #993300" id="e_db_name"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="2" name="db_name" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_db_name" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_dbauth_title'); ?></b><br />
+ <?php echo $lang->get('dbpgsql_field_dbauth_body'); ?><br />
+ <span style="color: #993300" id="e_db_auth"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="3" name="db_user" size="30" type="text" /><br />
+ <br />
+ <input name="db_pass" size="30" tabindex="4" type="password" />
+ </td>
+ <td>
+ <img id="s_db_auth" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <h3><?php echo $lang->get('database_heading_optionalinfo'); ?></h3>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_tableprefix_title'); ?></b><br />
+ <?php echo $lang->get('dbpgsql_field_tableprefix_body'); ?>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="5" name="table_prefix" size="30" type="text" />
+ </td>
+ <td>
+ <img id="s_table_prefix" alt="Good/bad icon" src="../images/good.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_rootauth_title'); ?></b><br />
+ <?php echo $lang->get('dbpgsql_field_rootauth_body'); ?><br />
+ <span style="color: #993300" id="e_db_root"></span>
+ </td>
+ <td>
+ <input onkeyup="verify(this);" tabindex="6" name="db_root_user" size="30" type="text" /><br />
+ <br />
+ <input onkeyup="verify(this);" tabindex="7" name="db_root_pass" size="30" type="password" />
+ </td>
+ <td>
+ <img id="s_db_root" alt="Good/bad icon" src="../images/good.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_pgsqlversion_title'); ?></b>
+ </td>
+ <td id="e_pgsql_version">
+ <?php echo $lang->get('dbpgsql_field_pgsqlversion_blurb_willbechecked'); ?>
+ </td>
+ <td>
+ <img id="s_pgsql_version" alt="Good/bad icon" src="../images/unknown.gif" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <b><?php echo $lang->get('dbpgsql_field_droptables_title'); ?></b><br />
+ <?php echo $lang->get('dbpgsql_field_droptables_body'); ?>
+ </td>
+ <td colspan="2">
+ <input type="checkbox" tabindex="8" name="drop_tables" id="dtcheck" /> <label for="dtcheck"><?php echo $lang->get('dbpgsql_field_droptables_lbl'); ?></label>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="3" style="text-align: center">
+ <input type="button" value="<?php echo $lang->get('dbpgsql_btn_testconnection'); ?>" onclick="ajaxTestConnection();" />
+ <div id="verify_error"></div>
+ </td>
+ </tr>
+
+</table>
+
+<table border="0">
+ <tr>
+ <td>
+ <input type="submit" tabindex="9" value="<?php echo $lang->get('meta_btn_continue'); ?>" onclick="return verify();" name="_cont" />
+ </td>
+ <td>
+ <p>
+ <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
+ • <?php echo $lang->get('database_objective_test'); ?><br />
+ • <?php echo $lang->get('database_objective_uncrypt'); ?>
+ </p>
+ </td>
+ </tr>
+</table>
+
+</form>
+
+<script type="text/javascript">
+ verify();
+</script>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/install.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,97 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * install.php - Installer payload stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+require ( ENANO_ROOT . '/install/includes/libenanoinstall.php' );
+require ( ENANO_ROOT . '/install/includes/sql_parse.php' );
+require ( ENANO_ROOT . '/includes/dbal.php' );
+require ( ENANO_ROOT . '/config.new.php' );
+
+if ( !in_array($dbdriver, $supported_drivers) )
+{
+ $ui->show_header();
+ echo '<h3>Installation error</h3>
+ <p>ERROR: That database driver is not supported.</p>';
+ return true;
+}
+
+$db = new $dbdriver();
+$result = $db->connect(true, $dbhost, $dbuser, $dbpasswd, $dbname);
+if ( !$result )
+{
+ $ui->show_header();
+ // FIXME: l10n
+ ?>
+ <form action="install.php?stage=database" method="post" name="database_info">
+ <input type="hidden" name="language" value="<?php echo $lang_id; ?>" />
+ <input type="hidden" name="driver" value="<?php echo $dbdriver; ?>" />
+ <h3>Database connection failed</h3>
+ <p>The installer couldn't connect to the database because something went wrong while the connection attempt was being made. Please press your browser's back button and correct your database information.</p>
+ <p>Error description:
+ <?php
+ echo $db->sql_error();
+ ?>
+ </p>
+ <p>
+ <input type="submit" name="_cont" value="Go back" />
+ </p>
+ </form>
+ <?php
+ return true;
+}
+
+// we're connected to the database now.
+
+$ui->show_header();
+flush();
+
+?>
+<h3>Installing Enano</h3>
+<p>Please wait while Enano creates its database and initial content on your server.</p>
+
+<h3>Installation progress</h3>
+
+<?php
+
+@set_time_limit(0);
+
+function stg_load_files()
+{
+ global $dbdriver;
+ if ( !@include( ENANO_ROOT . "/install/includes/payloads/common.php" ) )
+ return false;
+
+ if ( !@include( ENANO_ROOT . "/install/includes/payloads/$dbdriver.php" ) )
+ return false;
+
+ return true;
+}
+
+// FIXME: l10n
+start_install_table();
+
+run_installer_stage('load', 'Load installer files', 'stg_load_files', 'One of the files needed for installation couldn\'t be loaded. Please check your Enano directory.', false);
+run_installer_stage('setpass', 'Retrieve administrator password', 'stg_password_decode', 'The administrator password couldn\'t be decrypted. This really shouldn\'t happen.');
+run_installer_stage('genaes', 'Generate private key', 'stg_make_private_key', 'Couldn\'t generate a private key for the site. This really shouldn\'t happen.');
+run_installer_stage('sqlparse', 'Prepare database schema', 'stg_load_schema', 'Couldn\'t load or parse the schema file. This really shouldn\'t happen.');
+run_installer_stage('payload', 'Install database', 'stg_deliver_payload', 'There was a problem with an SQL query.');
+
+close_install_table();
+
+$db->close();
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/license.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,100 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * license.php - Installer license-agreement stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+function show_license($fb = false)
+{
+ global $lang;
+ ?>
+ <div class="scroller">
+ <?php
+ if ( !file_exists('./GPL') || !file_exists('./language/english/install/license-deed.html') )
+ {
+ echo 'Cannot find the license files.';
+ }
+ echo file_get_contents('./language/english/install/license-deed.html');
+ if ( defined('ENANO_BETA_VERSION') || $branch == 'unstable' )
+ {
+ ?>
+ <h3><?php echo $lang->get('license_info_unstable_title'); ?></h3>
+ <p><?php echo $lang->get('license_info_unstable_body'); ?></p>
+ <?php
+ }
+ ?>
+ <h3><?php echo $lang->get('license_section_gpl_heading'); ?></h3>
+ <?php if ( $lang->lang_code != 'eng' ): ?>
+ <p><i><?php echo $lang->get('license_gpl_blurb_inenglish'); ?></i></p>
+ <?php endif; ?>
+ <?php echo wikiFormat(file_get_contents(ENANO_ROOT . '/GPL')); ?>
+ <?php
+ global $template;
+ if ( $fb )
+ {
+ echo '<p style="text-align: center;">Because I could never find the Create a Page button in PHP-Nuke.</p>';
+ echo '<p>' . str_replace('http://enanocms.org/', 'http://www.2robots.com/2003/10/15/web-portals-suck/', $template->fading_button) . '</p>';
+ echo '<p style="text-align: center;">It\'s not a portal, my friends.</p>';
+ }
+ ?>
+ </div>
+ <?php
+}
+
+function wikiFormat($message, $filter_links = true)
+{
+ $wiki = & Text_Wiki::singleton('Mediawiki');
+ $wiki->setRenderConf('Xhtml', 'code', 'css_filename', 'codefilename');
+ $wiki->setRenderConf('Xhtml', 'wikilink', 'view_url', contentPath);
+ $result = $wiki->transform($message, 'Xhtml');
+
+ // HTML fixes
+ $result = preg_replace('#<tr>([\s]*?)<\/tr>#is', '', $result);
+ $result = preg_replace('#<p>([\s]*?)<\/p>#is', '', $result);
+ $result = preg_replace('#<br />([\s]*?)<table#is', '<table', $result);
+
+ return $result;
+}
+
+?>
+ <h3><?php echo $lang->get('license_heading'); ?></h3>
+ <p><?php echo $lang->get('license_blurb_thankyou'); ?></p>
+ <p><?php echo $lang->get('license_blurb_pleaseread'); ?></p>
+ <?php show_license(); ?>
+ <div class="pagenav">
+ <form action="install.php?stage=sysreqs" method="post">
+ <?php
+ echo '<input type="hidden" name="language" value="' . $lang_id . '" />';
+ ?>
+ <table border="0">
+ <tr>
+ <td>
+ <input type="submit" value="<?php echo $lang->get('license_btn_i_agree'); ?>" />
+ </td>
+ <td>
+ <p>
+ <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
+ • <?php echo $lang->get('license_objective_ensure_agree'); ?><br />
+ • <?php echo $lang->get('license_objective_have_db_info'); ?>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ <?php
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/login.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,228 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * login.php - Installer login information stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+// AES functions required
+require_once( ENANO_ROOT . '/includes/rijndael.php' );
+require_once( ENANO_ROOT . '/includes/constants.php' );
+require_once( ENANO_ROOT . '/includes/dbal.php' );
+
+// Write our temporary password key to the database
+require( ENANO_ROOT . '/config.new.php' );
+if ( !defined('ENANO_INSTALL_HAVE_CONFIG') )
+{
+ die('Config file is corrupt');
+}
+$db = new $dbdriver();
+$result = $db->connect(true, $dbhost, $dbuser, $dbpasswd, $dbname);
+if ( !$result )
+ die('DB privileges were revoked');
+
+// Is the key in the database?
+$q = $db->sql_query('SELECT config_value FROM ' . table_prefix . 'config WHERE config_name = \'install_aes_key\';');
+if ( !$q )
+ $db->_die();
+if ( $db->numrows() > 0 )
+{
+ list($install_aes_key) = $db->fetchrow_num();
+}
+else
+{
+ $aes = AESCrypt::singleton(AES_BITS, AES_BLOCKSIZE);
+ $install_aes_key = $aes->gen_readymade_key();
+
+ if ( ! $db->sql_query('INSERT INTO ' . table_prefix . 'config ( config_name, config_value ) VALUES ( \'install_aes_key\', \'' . $install_aes_key .'\' ); ') )
+ $db->_die();
+}
+$db->free_result($q);
+
+$ui->add_header('<script type="text/javascript" src="includes/js/formutils.js"></script>');
+$ui->show_header();
+
+// FIXME: l10n
+?>
+<h3>Administration account</h3>
+<p>Now it's time to create the account you'll use to administer your site. The e-mail address you enter here will also be used for the global contact address; you can change this after installation is finished if need be.</p>
+<p>Do not forget the information you enter here. Otherwise you will be unable to administer your site.</p>
+
+<script type="text/javascript">
+
+ // <![CDATA[
+
+ function verify(target)
+ {
+ var frm = document.forms [ 'install_login' ];
+ var undefined;
+ var passed = true;
+
+ var data = {
+ username: frm.username.value,
+ password: frm.password.value,
+ password_confirm: frm.password_confirm.value,
+ email: frm.email.value
+ };
+
+ if ( !target )
+ target = { name: undefined };
+
+ if ( target.name == undefined || target.name == 'username' )
+ {
+ var matches = validateUsername(data.username);
+ document.getElementById('s_username').src = ( matches ) ? img_good : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+
+ if ( target.name == undefined || target.name == 'password' || target.name == 'password_confirm' )
+ {
+ var matches = ( data.password.length >= 6 && data.password == data.password_confirm ) ;
+ document.getElementById('s_password').src = ( matches ) ? img_good : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+
+ if ( target.name == undefined || target.name == 'email' )
+ {
+ var matches = validateEmail(data.email);
+ document.getElementById('s_email').src = ( matches ) ? img_good : img_bad;
+ if ( !matches )
+ passed = false;
+ }
+
+ return passed;
+ }
+
+ function verify_submit()
+ {
+ if ( verify() )
+ return true;
+ alert("One or more of the form fields contains an incorrect value. Please correct any fields that have an X next to them.");
+ }
+
+ function submit_encrypt()
+ {
+ var frm = document.forms [ 'install_login' ];
+ var password = frm.password.value;
+ var pass_conf = frm.password_confirm.value;
+ var crypt_key = frm.crypt_key.value;
+
+ if ( password != pass_conf )
+ return false;
+
+ if ( !aes_self_test() )
+ // Return true to prevent form from failing
+ return true;
+
+ if ( frm.crypt_key.KeyBak )
+ {
+ crypt_key = frm.crypt_key.KeyBak;
+ }
+ frm.crypt_key.KeyBak = crypt_key;
+
+ password = stringToByteArray(password);
+ crypt_key = hexToByteArray(crypt_key);
+
+ var crypt_data = rijndaelEncrypt(password, crypt_key, 'ECB');
+
+ if ( !crypt_data )
+ {
+ alert('Received a bad response from rijndaelEncrypt(). Shift-click "reload" or "refresh" (depending on your browser) and try again.');
+ return false;
+ }
+
+ crypt_data = byteArrayToHex(crypt_data);
+
+ frm.password.value = '';
+ frm.password_confirm.value = '';
+ frm.crypt_key.value = '';
+ frm.crypt_data.value = crypt_data;
+
+ return true;
+ }
+
+ // ]]>
+
+</script>
+
+<form action="install.php?stage=confirm" method="post" name="install_login" onsubmit="return ( verify_submit() && submit_encrypt() );"><?php
+ foreach ( $_POST as $key => &$value )
+ {
+ if ( !preg_match('/^[a-z0-9_]+$/', $key) )
+ die('You idiot hacker...');
+ if ( $key == '_cont' )
+ continue;
+ $value_clean = str_replace(array('\\', '"', '<', '>'), array('\\\\', '\\"', '<', '>'), $value);
+ echo "\n <input type=\"hidden\" name=\"$key\" value=\"$value_clean\" />";
+ }
+
+ $https = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' );
+ $scriptpath_full = 'http' . ( $https ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . scriptPath . '/';
+ ?>
+
+ <input type="hidden" name="crypt_key" value="<?php echo $install_aes_key; ?>" />
+ <input type="hidden" name="crypt_data" value="" />
+
+ <table border="0" cellspacing="0" cellpadding="10" style="width: 100%;">
+
+ <tr>
+ <td style="width: 50%;">
+ <b>Username</b>
+ </td>
+ <td style="width: 50%;">
+ <input type="text" tabindex="1" name="username" size="15" onkeyup="verify(this);" />
+ </td>
+ <td>
+ <img id="s_username" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Password</b><br />
+ This will be encrypted with AES before it's sent to the server.
+ </td>
+ <td>
+ <input type="password" tabindex="2" name="password" size="15" onkeyup="password_score_field(this); verify(this);" /><br />
+ <br />
+ <div id="pwmeter"></div>
+ <br />
+ <input type="password" tabindex="3" name="password_confirm" size="15" onkeyup="verify(this);" /> <small>(confirm)</small>
+ </td>
+ <td>
+ <img id="s_password" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+
+ <tr>
+ <td style="width: 50%;">
+ <b>E-mail</b>
+ </td>
+ <td style="width: 50%;">
+ <input type="text" tabindex="4" name="email" size="30" onkeyup="verify(this);" />
+ </td>
+ <td>
+ <img id="s_email" alt="Good/bad icon" src="../images/bad.gif" />
+ </td>
+ </tr>
+
+ </table>
+
+ <div style="text-align: center;">
+ <input type="submit" name="_cont" value="<?= $lang->get('meta_btn_continue'); ?>" />
+ </div>
+</form>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/sysreqs.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,147 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * sysreqs.php - Installer system-requirements page
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+global $failed, $warned;
+
+$failed = false;
+$warned = false;
+
+function not($var)
+{
+ if($var)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+}
+
+function run_test($code, $desc, $extended_desc, $warn = false)
+{
+ global $failed, $warned;
+ static $cv = true;
+ $cv = not($cv);
+ $val = eval($code);
+ if($val)
+ {
+ if($cv) $color='CCFFCC'; else $color='AAFFAA';
+ echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc</td><td style='padding-left: 10px;'><img alt='Test passed' src='../images/good.gif' /></td></tr>";
+ } elseif(!$val && $warn) {
+ if($cv) $color='FFFFCC'; else $color='FFFFAA';
+ echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test passed with warning' src='../images/unknown.gif' /></td></tr>";
+ $warned = true;
+ } else {
+ if($cv) $color='FFCCCC'; else $color='FFAAAA';
+ echo "<tr><td style='background-color: #$color; width: 500px; padding: 5px;'>$desc<br /><b>$extended_desc</b></td><td style='padding-left: 10px;'><img alt='Test failed' src='../images/bad.gif' /></td></tr>";
+ $failed = true;
+ }
+}
+function is_apache()
+{
+ $r = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? true : false;
+ return $r;
+}
+
+function config_write_test()
+{
+ if ( !is_writable(ENANO_ROOT.'/config.new.php') )
+ return false;
+ // We need to actually _open_ the file to make sure it can be written, because sometimes this fails even when is_writable() returns
+ // true on Windows/IIS servers. Don't ask me why.
+ $h = @fopen( ENANO_ROOT . '/config.new.php', 'a+' );
+ if ( !$h )
+ return false;
+ fclose($h);
+ return true;
+}
+
+?>
+<h3><?php echo $lang->get('sysreqs_heading'); ?></h3>
+ <p><?php echo $lang->get('sysreqs_blurb'); ?></p>
+
+<table border="0" cellspacing="0" cellpadding="0">
+
+<?php
+run_test('return version_compare(\'5.2.0\', PHP_VERSION, \'<=\');', $lang->get('sysreqs_req_php5'), $lang->get('sysreqs_req_desc_php5'), true);
+run_test('return function_exists(\'mysql_connect\');', $lang->get('sysreqs_req_mysql'), $lang->get('sysreqs_req_desc_mysql') );
+run_test('return function_exists(\'pg_connect\');', $lang->get('sysreqs_req_postgres'), $lang->get('sysreqs_req_desc_postgres'), true);
+run_test('return @ini_get(\'file_uploads\');', $lang->get('sysreqs_req_uploads'), $lang->get('sysreqs_req_desc_uploads') );
+run_test('return is_apache();', $lang->get('sysreqs_req_apache'), $lang->get('sysreqs_req_desc_apache'), true);
+run_test('return config_write_test();', $lang->get('sysreqs_req_config'), $lang->get('sysreqs_req_desc_config') );
+run_test('return file_exists(\'/usr/bin/convert\');', $lang->get('sysreqs_req_magick'), $lang->get('sysreqs_req_desc_magick'), true);
+run_test('return is_writable(ENANO_ROOT.\'/cache/\');', $lang->get('sysreqs_req_cachewriteable'), $lang->get('sysreqs_req_desc_cachewriteable'), true);
+run_test('return is_writable(ENANO_ROOT.\'/files/\');', $lang->get('sysreqs_req_fileswriteable'), $lang->get('sysreqs_req_desc_fileswriteable'), true);
+if ( !function_exists('mysql_connect') && !function_exists('pg_connect') )
+{
+ // FIXME: l10n
+ run_test('return false;', 'No database drivers are available.', 'You need to have at least one database driver working to install Enano. See the warnings on MySQL and PostgreSQL above for more information on installing these database drivers.', false);
+}
+echo '</table>';
+echo '<br />';
+if(!$failed)
+{
+ ?>
+
+ <div class="pagenav">
+ <?php
+ if($warned) {
+ echo '<table border="0" cellspacing="0" cellpadding="0">';
+ run_test('return false;', $lang->get('sysreqs_summary_warn_title'), $lang->get('sysreqs_summary_warn_body'), true);
+ echo '</table>';
+ } else {
+ echo '<table border="0" cellspacing="0" cellpadding="0">';
+ run_test('return true;', '<b>' . $lang->get('sysreqs_summary_success_title') . '</b><br />' . $lang->get('sysreqs_summary_success_body'), 'You should never see this text. Congratulations for being an Enano hacker!');
+ echo '</table>';
+ }
+ ?>
+ <form action="install.php?stage=database" method="post">
+ <?php
+ echo '<input type="hidden" name="language" value="' . $lang_id . '" />';
+ ?>
+ <table border="0">
+ <tr>
+ <td>
+ <input type="submit" value="<?php echo $lang->get('meta_btn_continue'); ?>" />
+ </td>
+ <td>
+ <p>
+ <span style="font-weight: bold;"><?php echo $lang->get('meta_lbl_before_continue'); ?></span><br />
+ • <?php echo $lang->get('sysreqs_objective_scalebacks'); ?><br />
+ • <?php echo $lang->get('license_objective_have_db_info'); ?>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+<?php
+}
+else
+{
+ if ( $failed )
+ {
+ echo '<div class="pagenav"><table border="0" cellspacing="0" cellpadding="0">';
+ run_test('return false;', $lang->get('sysreqs_summary_fail_title'), $lang->get('sysreqs_summary_fail_body'));
+ echo '</table></div>';
+ }
+}
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/stages/website.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,258 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * website.php - Installer website-settings stage
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+if ( !defined('IN_ENANO_INSTALL') )
+ die();
+
+// Note: this is called from database_*.php, not directly from install.php
+
+$ui->add_header('<script type="text/javascript" src="includes/js/formutils.js"></script>');
+$ui->show_header();
+
+?>
+
+<script type="text/javascript">
+ // <![CDATA[
+ function ajaxMrwTest()
+ {
+ install_set_ajax_loading();
+ // Send a series of tests to the server, and if we get an "expected" response
+ setTimeout("ajaxGet(scriptPath + '/install/rewrite', __ajaxMrwTest_chain_rewrite);", 750);
+ }
+ var __ajaxMrwTest_chain_rewrite = function()
+ {
+ if ( ajax.readyState == 4 )
+ {
+ if ( ajax.responseText == 'good_rewrite' )
+ {
+ ajaxMrwSet('rewrite');
+ }
+ else
+ {
+ ajaxGet(scriptPath + '/install/install.php/shortened?do=modrewrite_test', __ajaxMrwTest_chain_shortened);
+ }
+ }
+ }
+ var __ajaxMrwTest_chain_shortened = function()
+ {
+ if ( ajax.readyState == 4 )
+ {
+ if ( ajax.responseText == 'good_shortened' )
+ {
+ ajaxMrwSet('standard');
+ }
+ else
+ {
+ ajaxGet(scriptPath + '/install/install.php?do=modrewrite_test&str=standard', __ajaxMrwTest_chain_standard);
+ }
+ }
+ }
+ var __ajaxMrwTest_chain_standard = function()
+ {
+ if ( ajax.readyState == 4 )
+ {
+ if ( ajax.responseText == 'good_standard' )
+ {
+ ajaxMrwSet('standard');
+ }
+ else
+ {
+ // FIXME: l10n
+ install_unset_ajax_loading();
+ new messagebox(MB_OK | MB_ICONSTOP, 'All tests failed', 'None of the URL handling tests worked; you may have problems using Enano on your server.');
+ }
+ }
+ }
+ function ajaxMrwSet(level)
+ {
+ install_unset_ajax_loading();
+ if ( !in_array(level, ['rewrite', 'shortened', 'standard']) )
+ return false;
+
+ document.getElementById('url_radio_rewrite').checked = false;
+ document.getElementById('url_radio_shortened').checked = false;
+ document.getElementById('url_radio_standard').checked = false;
+ document.getElementById('url_radio_' + level).checked = true;
+ document.getElementById('url_radio_' + level).focus();
+
+ // FIXME: l10n
+ switch ( level )
+ {
+ case 'rewrite':
+ var str = 'The installer has detected that using rewritten URLs is the best level that will work.';
+ break;
+ case 'shortened':
+ var str = 'The installer has detected that using shortened URLs is the best level that will work.';
+ break;
+ case 'standard':
+ var str = 'The installer has detected that using standard URLs is the only level that will work.';
+ break;
+ }
+ document.getElementById('mrw_report').className = 'info-box-mini';
+ document.getElementById('mrw_report').innerHTML = str;
+ }
+
+ function verify()
+ {
+ var frm = document.forms['install_website'];
+ var fail = false;
+ if ( frm.site_name.value == '' )
+ {
+ fail = true;
+ new Spry.Effect.Shake($(frm.site_name).object, {duration: 750}).start();
+ frm.site_name.focus();
+ }
+ if ( frm.site_desc.value == '' )
+ {
+ new Spry.Effect.Shake($(frm.site_desc).object, {duration: 750}).start();
+ if ( !fail )
+ frm.site_desc.focus();
+ fail = true;
+ }
+ if ( frm.copyright.value == '' )
+ {
+ new Spry.Effect.Shake($(frm.copyright).object, {duration: 750}).start();
+ if ( !fail )
+ frm.copyright.focus();
+ fail = true;
+ }
+ return ( !fail );
+ }
+ // ]]>
+</script>
+
+<form action="install.php?stage=login" method="post" name="install_website" onsubmit="return verify();"><?php
+ foreach ( $_POST as $key => &$value )
+ {
+ if ( !preg_match('/^[a-z0-9_]+$/', $key) )
+ die('You idiot hacker...');
+ if ( $key == '_cont' )
+ continue;
+ $value_clean = str_replace(array('\\', '"', '<', '>'), array('\\\\', '\\"', '<', '>'), $value);
+ echo "\n <input type=\"hidden\" name=\"$key\" value=\"$value_clean\" />";
+ }
+
+ $https = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' );
+ $scriptpath_full = 'http' . ( $https ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST'] . scriptPath . '/';
+ ?>
+
+ <table border="0" cellspacing="0" cellpadding="10">
+
+ <tr>
+ <td>
+ <b>Pick a name</b><br />
+ <span id="hint_site_name" class="fieldtip">Now for the fun part - it's time to name your website. Try to pick something that doesn't include any special characters, since this can make project-page URLs look botched.</span>
+ </td>
+ <td style="width: 50%;">
+ <input type="text" name="site_name" size="50" tabindex="1" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Enter a short description</b><br />
+ <span id="hint_site_desc" class="fieldtip">Here you should enter a very short description of your site. Sometimes this is a slogan or, depending on the theme you've chosen, a set of keywords that can go into a META description tag.</span>
+ </td>
+ <td>
+ <input type="text" name="site_desc" size="50" tabindex="2" />
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <b>Copyright info</b><br />
+ <span id="hint_copyright" class="fieldtip">The text you enter here will be shown at the bottom of most pages. Typically this is where a copyright notice would go. Keep it short and sweet; you can use <a href="http://docs.enanocms.org/Help:3.1">internal links</a> to link to project pages you'll create later.</span>
+ </td>
+ <td>
+ <input type="text" name="copyright" size="50" tabindex="3" />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top">
+ <b>URL formatting</b><br />
+ This lets you choose how URLs within your site will be formatted. If the setting you pick doesn't work, you can change it by editing config.php after installation.
+ </td>
+ <td>
+
+ <table border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <input type="radio" name="url_scheme" value="standard" id="url_radio_standard" tabindex="5" />
+ </td>
+ <td>
+ <label for="url_radio_standard">
+ <b>Standard URLs</b>
+ </label>
+ <span class="fieldtip" id="hint_url_scheme_standard">
+ <p>Compatible with all servers. This is the default option and should be used unless you're sure that one of the other options below.</p>
+ <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'index.php?title=Page'; ?></tt></small></p>
+ </span>
+ </td>
+ </tr>
+ </table>
+
+ <table border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <input type="radio" checked="checked" name="url_scheme" value="shortened" id="url_radio_shortened" tabindex="5" />
+ </td>
+ <td>
+ <label for="url_radio_shortened">
+ <b>Shortened URLs</b>
+ </label>
+ <span class="fieldtip" id="hint_url_scheme_shortened">
+ <p>This eliminates the "?title=" portion of your URL, and instead uses a slash. This is occasionally more friendly to search engines.</p>
+ <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'index.php/Page'; ?></tt></small></p>
+ </span>
+ </td>
+ </tr>
+ </table>
+
+ <table border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td valign="top">
+ <input type="radio" name="url_scheme" value="rewrite" id="url_radio_rewrite" tabindex="5" />
+ </td>
+ <td>
+ <label for="url_radio_rewrite">
+ <b>Rewritten URLs</b>
+ </label>
+ <span id="hint_url_scheme_rewrite" class="fieldtip">
+ <p>Using this option, you can completely eliminate the "index.php" from URLs. This is the most friendly option to search engines and looks very professional, but requires support for URL rewriting on your server. If you're running Apache and have the right permissions, Enano can configure this automatically. Otherwise, you'll need to configure your server manually and have a knowledge of regular expressions for this option to work.</p>
+ <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'Page'; ?></tt></small></p>
+ </span>
+ </td>
+ </tr>
+ </table>
+
+ <p>
+ <a href="#mrw_scan" onclick="ajaxMrwTest(); return false;" tabindex="4">Auto-detect the best formatting scheme</a>
+ </p>
+
+ <div id="mrw_report"></div>
+
+ </td>
+ </tr>
+
+ </table>
+
+ <div style="text-align: center;">
+ <input type="submit" name="_cont" value="<?php echo $lang->get('meta_btn_continue'); ?>" tabindex="6" />
+ </div>
+
+</form>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/includes/ui.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,243 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * ui.php - User interface for installations and upgrades
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+/**
+ * The class for drawing and managing UI components.
+ * @package Enano
+ * @subpackage Installer
+ * @author Dan Fuhry
+ */
+
+class Enano_Installer_UI
+{
+ /**
+ * The list of installer stages.
+ * @var array
+ */
+
+ var $stages = array();
+
+ /**
+ * The GUID of the active stage
+ * @var string
+ */
+
+ var $current_stage = '';
+
+ /**
+ * The application name, or the name displayed after the stage name in the title bar. Should be localized.
+ * @var string
+ */
+
+ var $app_name = '';
+
+ /**
+ * If the header should be simplified (stripped of the Enano logo and top heading), this will be true.
+ * @var bool
+ */
+
+ var $simple = false;
+
+ /**
+ * Text inserted into the header on the right.
+ * @var string
+ */
+
+ var $step = '';
+
+ /**
+ * Extra text to add to the HTML <head> section
+ * @var array Will be implode()'ed
+ */
+
+ var $additional_headers = array();
+
+ /**
+ * Constructor.
+ * @param string The name displayed in the <title> tag
+ * @param bool If true, the simplified header format is displayed.
+ */
+
+ function __construct($app_name, $simple_header)
+ {
+ $this->stages = array(
+ 'main' => array(),
+ 'hide' => array()
+ );
+ $this->app_name = $app_name;
+ $this->simple = ( $simple_header ) ? true : false;
+ }
+
+ /**
+ * Adds more text to the HTML header.
+ * @param string
+ */
+
+ function add_header($html)
+ {
+ $this->additional_headers[] = $html;
+ }
+
+ /**
+ * Adds a stage to the installer.
+ * @param string Title of the stage, should be already put through $lang->get()
+ * @param bool If true, the stage is shown among possible stages at the top of the window. If false, acts as a hidden stage
+ * @return string Unique identifier for stage, used later on set_visible_stage()
+ */
+
+ function add_stage($stage, $visible = true)
+ {
+ $key = ( $visible ) ? 'main' : 'hide';
+ $guid = md5(microtime() . mt_rand());
+ $this->stages[$key][$guid] = $stage;
+ if ( empty($this->current_stage) )
+ $this->current_stage = $guid;
+ return $guid;
+ }
+
+ /**
+ * Resets the active stage of installation. This is for the UI only; it doesn't actually change how the backend works.
+ * @param string GUID of stage, returned from add_stage()
+ * @return bool true on success, false if stage GUID not found
+ */
+
+ function set_visible_stage($guid)
+ {
+ foreach ( $this->stages['main'] as $key => $stage_name )
+ {
+ if ( $key == $guid )
+ {
+ $this->current_stage = $guid;
+ return true;
+ }
+ }
+ foreach ( $this->stages['hide'] as $key => $stage_name )
+ {
+ if ( $key == $guid )
+ {
+ $this->current_stage = $guid;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Outputs the HTML headers and start of the <body>, including stage indicator
+ */
+
+ function show_header()
+ {
+ // Determine the name of the current stage
+ $stage_name = false;
+
+ if ( isset($this->stages['main'][$this->current_stage]) )
+ $stage_name = $this->stages['main'][$this->current_stage];
+ else if ( isset($this->stages['hide'][$this->current_stage]) )
+ $stage_name = $this->stages['hide'][$this->current_stage];
+ else
+ // Can't determine name of stage
+ return false;
+
+ $this->app_name = htmlspecialchars($this->app_name);
+ $stage_name = htmlspecialchars($stage_name);
+
+ global $lang;
+ if ( is_object($lang) && isset($GLOBALS['lang_uri']) )
+ {
+ $lang_uri = sprintf($GLOBALS['lang_uri'], $lang->lang_code);
+ $this->add_header('<script type="text/javascript" src="' . $lang_uri . '"></script>');
+ }
+
+ $additional_headers = implode("\n ", $this->additional_headers);
+ $title = addslashes(str_replace(' ', '_', $stage_name));
+ $js_dynamic = '<script type="text/javascript">
+ var title="' . $title . '";
+ var scriptPath="'.scriptPath.'";
+ var ENANO_SID="";
+ var AES_BITS='.AES_BITS.';
+ var AES_BLOCKSIZE=' . AES_BLOCKSIZE . ';
+ var pagepass=\'\';
+ var ENANO_LANG_ID = 1;
+ var DISABLE_MCE = true;
+ </script>';
+
+ echo <<<EOF
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>{$stage_name} • {$this->app_name}</title>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" type="text/css" href="../includes/clientside/css/enano-shared.css" />
+ <link rel="stylesheet" type="text/css" href="images/css/installer.css" id="mdgCss" />
+ $js_dynamic
+ <script type="text/javascript" src="../includes/clientside/static/enano-lib-basic.js"></script>
+ $additional_headers
+ </head>
+ <body>
+ <div id="enano">
+
+EOF;
+ if ( !$this->simple )
+ {
+ $step = ( !empty($this->step) ) ? '<div id="step">' . htmlspecialchars($this->step) . '</div>' : '';
+ echo <<<EOF
+ <div id="header">
+ $step
+ <img alt="Enano logo" src="images/enano-artwork/installer-header-blue.png" />
+ </div>
+
+EOF;
+ }
+ $stages_class = ( $this->simple ) ? 'stages' : 'stages stages-fixed';
+ echo <<<EOF
+ <div class="stages-holder">
+ <ul class="$stages_class">
+
+EOF;
+ foreach ( $this->stages['main'] as $guid => $stage )
+ {
+ $class = ( $guid == $this->current_stage ) ? 'stage stage-active' : 'stage';
+ $stage = htmlspecialchars($stage);
+ echo " <li class=\"$class\">$stage</li>\n ";
+ }
+ echo " </ul>\n <div style=\"clear: both;\"></div>\n </div>\n";
+ echo " <div id=\"enano-fill\">\n ";
+ echo " <div id=\"enano-body\">\n ";
+ }
+
+ /**
+ * Displays the page footer.
+ */
+
+ function show_footer()
+ {
+ echo <<<EOF
+ <div id="copyright">
+ Enano and its various components, related documentation, and artwork are copyright © 2006-2008 Dan Fuhry.<br />
+ This program is Free Software; see the file "GPL" included with this package for details.
+ </div>
+ </div> <!-- div#enano-body -->
+ </div> <!-- div#enano-fill -->
+ </div> <!-- div#enano -->
+ </body>
+</html>
+EOF;
+ }
+
+}
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/index.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,129 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * welcome.php - Portal to upgrade, readme, and install pages
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+require_once('includes/common.php');
+
+$ui = new Enano_Installer_UI('Enano installation', true);
+if ( version_compare(PHP_VERSION, '5.0.0', '<') )
+{
+ $ui->__construct('Enano installation', true);
+}
+$ui->add_stage('Welcome', true);
+$ui->add_stage('Installation', true);
+$ui->add_stage('Upgrade', true);
+$ui->add_stage('Readme', true);
+
+$ui->show_header();
+
+if ( defined('ENANO_INSTALLED') )
+{
+ // Is Enano installed? If so, load the config and check version info
+ define('IN_ENANO_UPGRADE', 'true');
+ // common.php above calls chdir() to the ENANO_ROOT, so this loads the full Enano API.
+ require('includes/common.php');
+}
+
+?>
+
+ <div id="installnotice">
+ <?php
+ if ( !defined('ENANO_INSTALLED') ):
+ ?>
+ <div class="info-box-mini">
+ <b>Enano hasn't been installed yet!</b><br />
+ You'll need to install the Enano database before you can use your site. To get started, click the Install button below.
+ </div>
+ <?php
+ if ( file_exists('./config.php') )
+ {
+ ?>
+ <div class="warning-box-mini">
+ <b>A configuration file (config.php) exists but doesn't set the ENANO_INSTALLED constant.</b><br />
+ <p>Didn't expect to see this message?
+ It's possible that your configuration file has become corrupted and no longer sets information that Enano needs to connect
+ to the database. You should have a look at your config.php by downloading it with FTP or viewing it over SSH.
+ If the file appears to have been tampered with, please <a href="http://forum.enanocms.org/">contact the Enano team</a>
+ for support immediately.</p>
+ <p><b>Most importantly, if you suspect a security breach, you should contact the Enano team
+ <a href="http://enanocms.org/Contact_us">via e-mail</a>. If you have the capability to use PGP encryption, you should do
+ so; our public key is available <a href="http://enanocms.org/bin/enanocms-signkey.asc">here</a>.</b></p>
+ </div>
+ <?php
+ }
+ endif;
+ ?>
+ </div>
+ <table border="0" cellspacing="10" cellpadding="0" width="100%" id="installmenu">
+ <tr>
+ <td style="text-align: right; width: 50%;">
+ <!-- Enano logo -->
+ <img alt="Enano CMS" src="images/enano-artwork/installer-greeting.png" />
+ </td>
+ <td class="balancer">
+ </td>
+ <td>
+ <ul class="icons">
+ <li><a href="readme.php" class="readme icon">Readme</a></li>
+ <?php
+ if ( !defined('ENANO_INSTALLED') ):
+ ?>
+ <li><a href="install.php" class="install icon">Install</a></li>
+ <li>
+ <a class="upgrade-disabled icon icon-disabled" title="You need to install Enano before you can do this.">
+ Upgrade
+ <small>
+ Enano isn't installed yet. You can use this option when you want to upgrade to a newer release of Enano.
+ </small>
+ </a>
+ </li>
+ <?php
+ else:
+ ?>
+ <li>
+ <a class="install-disabled icon icon-disabled" title="Enano is already installed.">
+ Install
+ <small>Enano is already installed.</small> <!-- CSS takes care of making this position properly -->
+ </a>
+ </li>
+ <?php
+ if ( $version == enano_version(true) )
+ {
+ echo '<li>
+ <a class="upgrade-disabled icon icon-disabled">
+ Upgrade
+ <small>
+ You\'re already running the version of Enano included in this installer. Use the administration panel to check
+ for updates.
+ </small> <!-- CSS takes care of making this position properly -->
+ </a>
+ </li>';
+ }
+ else
+ {
+ echo '<li><a href="upgrade.php" class="upgrade icon">Upgrade</a></li>';
+ }
+ endif;
+ ?>
+ </ul>
+ </td>
+ </tr>
+ </table>
+
+<?php
+
+$ui->show_footer();
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/install.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,275 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * install.php - Main installation interface
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+define('IN_ENANO', 1);
+// DEFINE THIS BEFORE RELEASE!
+define('ENANO_DANGEROUS', 1);
+
+require_once('includes/common.php');
+
+$stages = array('language', 'license', 'sysreqs', 'database', 'website', 'login', 'confirm', 'install', 'finish');
+$stage_ids = array();
+
+if ( isset($_POST['language']) )
+{
+ // Include language lib and additional PHP5-only JSON functions
+ require_once( ENANO_ROOT . '/includes/json2.php' );
+ require_once( ENANO_ROOT . '/includes/lang.php' );
+
+ // We have a language ID - init language
+ $lang_id = $_POST['language'];
+ if ( !isset($languages[$lang_id]) )
+ {
+ die('Invalid language selection - can\'t load metadata');
+ }
+
+ $language_dir = $languages[$lang_id]['dir'];
+
+ // Initialize language support
+ $lang = new Language($lang_id);
+ $lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/install.json');
+ $lang_uri = 'install.php?do=lang_js&language=%s';
+
+ // Init UI
+ $ui = new Enano_Installer_UI($lang->get('meta_site_name'), false);
+
+ // Add stages
+ foreach ( $stages as $stage )
+ {
+ $stage_ids[$stage] = $ui->add_stage($lang->get("{$stage}_modetitle"), true);
+ }
+
+ // Determine stage
+ if ( isset($_REQUEST['stage']) && isset($stage_ids[$_REQUEST['stage']]) )
+ {
+ $ui->set_visible_stage($stage_ids[$_REQUEST['stage']]);
+ $stage = $_REQUEST['stage'];
+ }
+ else
+ {
+ $stage = 'license';
+ }
+
+ $stage_num = array_search($stage, $stages);
+ if ( $stage_num )
+ {
+ $stage_num++;
+ $ui->step = $lang->get('meta_step', array('step' => $stage_num, 'title' => $lang->get("{$stage}_modetitle_long")));
+ }
+}
+else
+{
+ $ui = new Enano_Installer_UI('Enano installation', false);
+
+ if ( version_compare(PHP_VERSION, '5.0.0', '<') )
+ {
+ $ui->__construct('Enano installation', false);
+ }
+
+ $ui->step = 'Step 1: Choose language';
+
+ $stage = 'language';
+ $stage_ids['language'] = $ui->add_stage('Language', true);
+ $stage_ids['license'] = $ui->add_stage('License', true);
+ $stage_ids['sysreqs'] = $ui->add_stage('Requirements', true);
+ $stage_ids['database'] = $ui->add_stage('Database', true);
+ $stage_ids['website'] = $ui->add_stage('Site info', true);
+ $stage_ids['login'] = $ui->add_stage('Admin login', true);
+ $stage_ids['confirm'] = $ui->add_stage('Review', true);
+ $stage_ids['install'] = $ui->add_stage('Install', true);
+ $stage_ids['finish'] = $ui->add_stage('Finish', true);
+}
+
+// If we don't have PHP 5, show a friendly error message and bail out
+if ( version_compare(PHP_VERSION, '5.0.0', '<') || isset($_GET['debug_warn_php4']) )
+{
+ $ui->set_visible_stage(
+ $ui->add_stage('PHP compatibility notice', false)
+ );
+ $ui->step = '';
+ $ui->show_header();
+
+ // This isn't localized because all localization code is dependent on
+ // PHP 5 (loading lang.php will throw a parser error under PHP4). This
+ // one message probably doesn't need to be localized anyway.
+
+ ?>
+ <h2 class="heading-error">
+ Your server doesn't have support for PHP 5.
+ </h2>
+ <p>
+ PHP 5 is the latest version of the language on which Enano was built. Its many new features have been available since early 2004, yet
+ many web hosts have not migrated to it because of the work involved. In 2007, Zend Corporation announced that support for the aging
+ PHP 4.x would be discontinued at the end of the year. An initiative called <a href="http://gophp5.org/">GoPHP5</a> was started to
+ encourage web hosts to migrate to PHP 5.
+ </p>
+ <p>
+ Because of the industry's decision to not support PHP 4 any longer, the Enano team decided that it was time to begin using the powerful
+ features of PHP 5 at the expense of PHP 4 compatibility. Therefore, this version of Enano cannot be installed on your server until it
+ is upgraded to at least PHP 5.0.0, and preferably the latest available version.
+ <!-- No, not even removing the check in this installer script will help. As soon as the PHP4 check is passed, the installer shows the
+ language selection page, after which the language code is loaded. The language code and libjson2 will trigger parse errors under
+ PHP <5.0.0. -->
+ </p>
+ <p>
+ If you need to use Enano but can't upgrade your PHP because you're on a shared or reseller hosting service, you can use the
+ <a href="http://enanocms.org/download?series=1.0">1.0.x series of Enano</a> on your site. While the Enano team attempts to make this
+ older series work on PHP 4, official support is not provided for installations of Enano on PHP 4.
+ </p>
+ <?php
+
+ $ui->show_footer();
+ exit();
+}
+
+if ( isset($_SERVER['PATH_INFO']) && !isset($_GET['str']) && isset($_GET['do']) )
+{
+ $_GET['str'] = substr($_SERVER['PATH_INFO'], 1);
+}
+
+if ( isset($_GET['do']) )
+{
+ switch ( $_GET['do'] )
+ {
+ case 'lang_js':
+ if ( !isset($_GET['language']) )
+ die();
+ $lang_id = $_GET['language'];
+ header('Content-type: text/javascript');
+ if ( !isset($languages[$lang_id]) )
+ {
+ die('// Bad language ID');
+ }
+ $language_dir = $languages[$lang_id]['dir'];
+
+ // Include language lib and additional PHP5-only JSON functions
+ require_once( ENANO_ROOT . '/includes/json2.php' );
+ require_once( ENANO_ROOT . '/includes/lang.php' );
+
+ // Initialize language support
+ $lang = new Language($lang_id);
+ $lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/install.json');
+ $lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/core.json');
+
+ $time_now = microtime_float();
+ $test = "if ( typeof(enano_lang) != 'object' )
+{
+ var enano_lang = new Object();
+ var enano_lang_code = new Object();
+}
+
+enano_lang[{$lang->lang_id}] = " . enano_json_encode($lang->strings) . ";
+enano_lang_code[{$lang->lang_id}] = '{$lang->lang_code}';";
+ $time_total = round(microtime_float() - $time_now, 4);
+ echo "// Generated in $time_total seconds\n";
+ echo $test;
+
+ exit();
+ case 'modrewrite_test':
+ // Include language lib and additional PHP5-only JSON functions
+ require_once( ENANO_ROOT . '/includes/json2.php' );
+
+ if ( isset($_GET['str']) && in_array($_GET['str'], array('standard', 'shortened', 'rewrite')) )
+ {
+ echo 'good_' . $_GET['str'];
+ }
+ else
+ {
+ echo 'bad';
+ }
+ exit();
+ }
+}
+
+switch ( $stage )
+{
+ default:
+ $ui->show_header();
+ echo '<p>Invalid stage.</p>';
+ break;
+ case 'language':
+ $ui->show_header();
+ ?>
+ <h2>Welcome to Enano.</h2>
+ <h3>Bienvenido a Enano /
+ Wilkommen in Enano /
+ Bienvenue à Enano /
+ Benvenuti a Enano /
+ 欢迎 Enano /
+ Enano へようこそ。
+ </h3>
+ <p>
+ <b>Please select a language:</b> /
+ Por favor, seleccione un idioma: /
+ Bitte wählen Sie eine Sprache: /
+ S’il vous plaît choisir une langue: /
+ Selezionare una lingua: /
+ 请选择一种语言: /
+ 言語を選択してください:</p>
+ <form action="install.php?stage=license" method="post">
+ <select name="language" style="width: 200px;" tabindex="1">
+ <?php
+ foreach ( $languages as $code => $meta )
+ {
+ $sel = ( $code == 'eng' ) ? ' selected="selected"' : '';
+ echo '<option value="' . $code . '"' . $sel . '>' . $meta['name'] . '</option>';
+ }
+ ?>
+ </select>
+ <input tabindex="2" type="submit" value=">>" />
+ </form>
+ <?php
+ break;
+ case 'license':
+ $ui->show_header();
+ require( ENANO_ROOT . '/includes/wikiformat.php' );
+ require( ENANO_ROOT . '/install/includes/stages/license.php' );
+ break;
+ case 'sysreqs':
+ $ui->show_header();
+ require( ENANO_ROOT . '/install/includes/stages/sysreqs.php' );
+ break;
+ case 'database':
+ if ( isset($_POST['driver']) && in_array($_POST['driver'], $supported_drivers) )
+ {
+ // This is SAFE! It's validated against the array in in_array() above.
+ $driver = $_POST['driver'];
+ require( ENANO_ROOT . "/install/includes/stages/database_{$driver}.php" );
+ }
+ else
+ {
+ $ui->show_header();
+ // No driver selected - give the DB drive selection page
+ require( ENANO_ROOT . '/install/includes/stages/database.php' );
+ }
+ break;
+ case 'website':
+ require( ENANO_ROOT . '/install/includes/stages/website.php' );
+ break;
+ case 'login':
+ require( ENANO_ROOT . '/install/includes/stages/login.php' );
+ break;
+ case 'confirm':
+ require( ENANO_ROOT . '/install/includes/stages/confirm.php' );
+ break;
+ case 'install':
+ require( ENANO_ROOT . '/install/includes/stages/install.php' );
+ break;
+}
+
+$ui->show_footer();
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/readme.php Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+ * Version 1.1.1
+ * Copyright (C) 2006-2007 Dan Fuhry
+ * Installation package
+ * install.php - Main installation interface
+ *
+ * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ */
+
+require_once('includes/common.php');
+
+$ui = new Enano_Installer_UI('Enano installation', false);
+
+$stg_readme = $ui->add_stage('Readme and important information', true);
+
+$ui->set_visible_stage($stg_readme);
+
+$ui->show_header();
+
+?>
+<h2>Readme</h2>
+<p>This document contains important information you'll want to know before you install Enano. For installation instructions, please
+ see the <a href="http://docs.enanocms.org/Help:2.1">Enano installation guide</a>. <a href="index.php">Return to welcome menu »</a></p>
+<pre class="scroller"><?php
+
+$readme = @file_get_contents('./README');
+echo htmlspecialchars($readme);
+
+?></pre>
+<?php
+
+$ui->show_footer();
+
+?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/mysql_stage1.sql Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,17 @@
+-- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+-- Version 1.0.2 (Coblynau)
+-- Copyright (C) 2006-2007 Dan Fuhry
+
+-- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+
+-- mysql_stage1.sql - MySQL installation schema, early stage
+
+CREATE TABLE {{TABLE_PREFIX}}config(
+ config_name varchar(63),
+ config_value text
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/mysql_stage2.sql Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,343 @@
+-- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+-- Version 1.0.2 (Coblynau)
+-- Copyright (C) 2006-2007 Dan Fuhry
+
+-- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+
+-- mysql_stage2.sql - MySQL installation schema, main payload
+
+CREATE TABLE {{TABLE_PREFIX}}categories(
+ page_id varchar(64),
+ namespace varchar(64),
+ category_id varchar(64)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}comments(
+ comment_id int(12) NOT NULL auto_increment,
+ page_id text,
+ namespace text,
+ subject text,
+ comment_data text,
+ name text,
+ approved tinyint(1) default 1,
+ user_id mediumint(8) NOT NULL DEFAULT -1,
+ time int(12) NOT NULL DEFAULT 0,
+ PRIMARY KEY ( comment_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}logs(
+ log_type varchar(16),
+ action varchar(16),
+ time_id int(12) NOT NULL default '0',
+ date_string varchar(63),
+ page_id text,
+ namespace text,
+ page_text text,
+ char_tag varchar(40),
+ author varchar(63),
+ edit_summary text,
+ minor_edit tinyint(1)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}page_text(
+ page_id varchar(255),
+ namespace varchar(16) NOT NULL default 'Article',
+ page_text text,
+ char_tag varchar(63),
+ FULLTEXT KEY {{TABLE_PREFIX}}page_search_idx (page_id, namespace, page_text)
+) ENGINE = MYISAM CHARACTER SET `utf8`;
+
+CREATE TABLE {{TABLE_PREFIX}}pages(
+ page_order int(8),
+ name varchar(255),
+ urlname varchar(255),
+ namespace varchar(16) NOT NULL default 'Article',
+ special tinyint(1) default '0',
+ visible tinyint(1) default '1',
+ comments_on tinyint(1) default '1',
+ protected tinyint(1) NOT NULL DEFAULT 0,
+ wiki_mode tinyint(1) NOT NULL DEFAULT 2,
+ delvotes int(10) NOT NULL default 0,
+ password varchar(40) NOT NULL DEFAULT '',
+ delvote_ips text DEFAULT NULL
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}session_keys(
+ session_key varchar(32),
+ salt varchar(32),
+ user_id mediumint(8),
+ auth_level tinyint(1) NOT NULL default '0',
+ source_ip varchar(10) default '0x7f000001',
+ time bigint(15) default '0'
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}themes(
+ theme_id varchar(63),
+ theme_name text,
+ theme_order smallint(5) NOT NULL default '1',
+ default_style varchar(63) NOT NULL DEFAULT '',
+ enabled tinyint(1) NOT NULL default '1'
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}users(
+ user_id mediumint(8) NOT NULL auto_increment,
+ username text,
+ password varchar(255),
+ email text,
+ real_name text,
+ user_level tinyint(1) NOT NULL default 2,
+ theme varchar(64) NOT NULL default 'bleu.css',
+ style varchar(64) NOT NULL default 'default',
+ signature text,
+ reg_time int(11) NOT NULL DEFAULT 0,
+ account_active tinyint(1) NOT NULL DEFAULT 0,
+ activation_key varchar(40) NOT NULL DEFAULT 0,
+ old_encryption tinyint(1) NOT NULL DEFAULT 0,
+ temp_password text,
+ temp_password_time int(12) NOT NULL DEFAULT 0,
+ user_coppa tinyint(1) NOT NULL DEFAULT 0,
+ user_lang smallint(5) NOT NULL,
+ user_has_avatar tinyint(1) NOT NULL,
+ avatar_type ENUM('jpg', 'png', 'gif') NOT NULL,
+ PRIMARY KEY (user_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}users_extra(
+ user_id mediumint(8) NOT NULL,
+ user_aim varchar(63),
+ user_yahoo varchar(63),
+ user_msn varchar(255),
+ user_xmpp varchar(255),
+ user_homepage text,
+ user_location text,
+ user_job text,
+ user_hobbies text,
+ email_public tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY ( user_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}banlist(
+ ban_id mediumint(8) NOT NULL auto_increment,
+ ban_type tinyint(1),
+ ban_value varchar(64),
+ is_regex tinyint(1) DEFAULT 0,
+ reason text,
+ PRIMARY KEY ( ban_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}files(
+ file_id int(12) NOT NULL auto_increment,
+ time_id int(12) NOT NULL,
+ page_id varchar(63) NOT NULL,
+ filename varchar(127) default NULL,
+ size bigint(15) NOT NULL,
+ mimetype varchar(63) default NULL,
+ file_extension varchar(8) default NULL,
+ file_key varchar(32) NOT NULL,
+ PRIMARY KEY (file_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}buddies(
+ buddy_id int(15) NOT NULL auto_increment,
+ user_id mediumint(8),
+ buddy_user_id mediumint(8),
+ is_friend tinyint(1) NOT NULL default '1',
+ PRIMARY KEY (buddy_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}privmsgs(
+ message_id int(15) NOT NULL auto_increment,
+ message_from varchar(63),
+ message_to varchar(255),
+ date int(12),
+ subject varchar(63),
+ message_text text,
+ folder_name varchar(63),
+ message_read tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY (message_id)
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}sidebar(
+ item_id smallint(3) NOT NULL auto_increment,
+ item_order smallint(3) NOT NULL DEFAULT 0,
+ item_enabled tinyint(1) NOT NULL DEFAULT 1,
+ sidebar_id smallint(3) NOT NULL DEFAULT 1,
+ block_name varchar(63) NOT NULL,
+ block_type tinyint(1) NOT NULL DEFAULT 0,
+ block_content text,
+ PRIMARY KEY ( item_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}hits(
+ hit_id bigint(20) NOT NULL auto_increment,
+ username varchar(63) NOT NULL,
+ time int(12) NOT NULL DEFAULT 0,
+ page_id varchar(63),
+ namespace varchar(63),
+ PRIMARY KEY ( hit_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}search_index(
+ word varchar(64) NOT NULL,
+ page_names text,
+ PRIMARY KEY ( word )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}groups(
+ group_id mediumint(5) UNSIGNED NOT NULL auto_increment,
+ group_name varchar(64),
+ group_type tinyint(1) NOT NULL DEFAULT 1,
+ PRIMARY KEY ( group_id ),
+ system_group tinyint(1) NOT NULL DEFAULT 0
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}group_members(
+ member_id int(12) UNSIGNED NOT NULL auto_increment,
+ group_id mediumint(5) UNSIGNED NOT NULL,
+ user_id int(12) NOT NULL,
+ is_mod tinyint(1) NOT NULL DEFAULT 0,
+ pending tinyint(1) NOT NULL DEFAULT 0,
+ PRIMARY KEY ( member_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+CREATE TABLE {{TABLE_PREFIX}}acl(
+ rule_id int(12) UNSIGNED NOT NULL auto_increment,
+ target_type tinyint(1) UNSIGNED NOT NULL,
+ target_id int(12) UNSIGNED NOT NULL,
+ page_id varchar(255),
+ namespace varchar(24),
+ rules text,
+ PRIMARY KEY ( rule_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}page_groups(
+ pg_id mediumint(8) NOT NULL auto_increment,
+ pg_type tinyint(2) NOT NULL DEFAULT 1,
+ pg_name varchar(255) NOT NULL DEFAULT '',
+ pg_target varchar(255) DEFAULT NULL,
+ PRIMARY KEY ( pg_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}page_group_members(
+ pg_member_id int(12) NOT NULL auto_increment,
+ pg_id mediumint(8) NOT NULL,
+ page_id varchar(63) NOT NULL,
+ namespace varchar(63) NOT NULL DEFAULT 'Article',
+ PRIMARY KEY ( pg_member_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}tags(
+ tag_id int(12) NOT NULL auto_increment,
+ tag_name varchar(63) NOT NULL DEFAULT 'bla',
+ page_id varchar(255) NOT NULL,
+ namespace varchar(255) NOT NULL,
+ user mediumint(8) NOT NULL DEFAULT 1,
+ PRIMARY KEY ( tag_id )
+) CHARACTER SET `utf8` COLLATE `utf8_bin`;
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}lockout(
+ id int(12) NOT NULL auto_increment,
+ ipaddr varchar(40) NOT NULL,
+ action ENUM('credential', 'level') NOT NULL DEFAULT 'credential',
+ timestamp int(12) NOT NULL DEFAULT 0,
+ PRIMARY KEY ( id )
+) CHARACTER SET `utf8`;
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}language(
+ lang_id smallint(5) NOT NULL auto_increment,
+ lang_code varchar(16) NOT NULL,
+ lang_name_default varchar(64) NOT NULL,
+ lang_name_native varchar(64) NOT NULL,
+ last_changed int(12) NOT NULL DEFAULT 0,
+ PRIMARY KEY ( lang_id )
+) CHARACTER SET `utf8`;
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}language_strings(
+ string_id bigint(15) NOT NULL auto_increment,
+ lang_id smallint(5) NOT NULL,
+ string_category varchar(32) NOT NULL,
+ string_name varchar(64) NOT NULL,
+ string_content longtext NOT NULL,
+ PRIMARY KEY ( string_id )
+);
+
+DELETE FROM {{TABLE_PREFIX}}config;
+
+INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
+ ('site_name', '{{SITE_NAME}}'),
+ ('main_page', 'Main_Page'),
+ ('site_desc', '{{SITE_DESC}}'),
+ ('wiki_mode', '{{WIKI_MODE}}'),
+ ('wiki_edit_notice', '0'),
+ ('sflogo_enabled', '0'),
+ ('sflogo_groupid', ''),
+ ('sflogo_type', '1'),
+ ('w3c_vh32', '0'),
+ ('w3c_vh40', '0'),
+ ('w3c_vh401', '0'),
+ ('w3c_vxhtml10', '0'),
+ ('w3c_vxhtml11', '0'),
+ ('w3c_vcss', '0'),
+ ('approve_comments', '0'),
+ ('enable_comments', '1'),
+ ('plugin_SpecialAdmin.php', '1'),
+ ('plugin_SpecialPageFuncs.php', '1'),
+ ('plugin_SpecialUserFuncs.php', '1'),
+ ('plugin_SpecialCSS.php', '1'),
+ ('copyright_notice', '{{COPYRIGHT}}'),
+ ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'),
+ ('cache_thumbs', '{{ENABLE_CACHE}}'),
+ ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' ),
+ ('contact_email', '{{ADMIN_EMAIL}}'),
+ ('powered_btn', '1');
+
+INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
+ ('Main_Page', 'Article', '=== Enano has been successfully installed and is working. ===\n\nIf you can see this message, it means that you\'ve finished the Enano setup process and are ready to start building your website. Congratulations!\n\nTo edit this front page, click the Log In button to the left, enter the credentials you provided during the installation, and click the Edit This Page button that appears on the blue toolbar just above this text. You can also [http://docs.enanocms.org/Help:2.4 learn more] about editing pages.\n\nTo create more pages, use the Create a Page button to the left. If you enabled wiki mode, you don\'t have to log in first, however your IP address will be shown in the page history.\n\nVisit the [http://docs.enanocms.org/Help:Contents Enano documentation project website] to learn more about administering your site effectively and keeping things secure.\n\n\'\'\'NOTE:\'\'\' You have just installed an unstable version of Enano. This release is completely unsupported and may contain security issues or serious usability bugs. You should not use this release on a production website. The Enano team will not provide any type of support at all for this experimental release.', '');
+
+INSERT INTO {{TABLE_PREFIX}}pages(page_order, name, urlname, namespace, special, visible, comments_on, protected, delvotes, delvote_ips) VALUES
+ (NULL, 'Main Page', 'Main_Page', 'Article', 0, 1, 1, 1, 0, '');
+
+INSERT INTO {{TABLE_PREFIX}}themes(theme_id, theme_name, theme_order, default_style, enabled) VALUES
+ ('oxygen', 'Oxygen', 1, 'bleu.css', 1),
+ ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
+
+INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active) VALUES
+ (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0),
+ (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', UNIX_TIMESTAMP(), 1);
+
+INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
+ (2);
+
+INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
+ (2,'Administrators',3,1),
+ (3,'Moderators',3,1);
+
+INSERT INTO {{TABLE_PREFIX}}group_members(group_id,user_id,is_mod) VALUES(2, 2, 1);
+
+INSERT INTO {{TABLE_PREFIX}}acl(target_type,target_id,page_id,namespace,rules) VALUES
+ (1,2,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=4;clear_logs=4;vote_delete=4;vote_reset=4;delete_page=4;tag_create=4;tag_delete_own=4;tag_delete_other=4;set_wiki_mode=4;password_set=4;password_reset=4;mod_misc=4;edit_cat=4;even_when_protected=4;upload_files=4;upload_new_version=4;create_page=4;php_in_pages={{ADMIN_EMBED_PHP}};edit_acl=4;'),
+ (1,3,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=3;clear_logs=2;vote_delete=4;vote_reset=4;delete_page=4;set_wiki_mode=2;password_set=2;password_reset=2;mod_misc=2;edit_cat=4;even_when_protected=4;upload_files=2;upload_new_version=3;create_page=3;php_in_pages=2;edit_acl=2;');
+
+INSERT INTO {{TABLE_PREFIX}}sidebar(item_id, item_order, sidebar_id, block_name, block_type, block_content) VALUES
+ (1, 1, 1, '{lang:sidebar_title_navigation}', 1, '[[Main_Page|{lang:sidebar_btn_home}]]'),
+ (2, 2, 1, '{lang:sidebar_title_tools}', 1, '[[$NS_SPECIAL$CreatePage|{lang:sidebar_btn_createpage}]]\n[[$NS_SPECIAL$UploadFile|{lang:sidebar_btn_uploadfile}]]\n[[$NS_SPECIAL$SpecialPages|{lang:sidebar_btn_specialpages}]]\n{if auth_admin}\n$ADMIN_LINK$\n[[$NS_SPECIAL$EditSidebar|{lang:sidebar_btn_editsidebar}]]\n{/if}'),
+ (3, 3, 1, '$USERNAME$', 1, '[[$NS_USER$$USERNAME$|{lang:sidebar_btn_userpage}]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|{lang:sidebar_btn_mycontribs}]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|{lang:sidebar_btn_preferences}]]\n[[$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n[[$NS_SPECIAL$Usergroups|{lang:sidebar_btn_groupcp}]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|{lang:sidebar_btn_register}]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n{/if}'),
+ (4, 4, 1, '{lang:sidebar_title_search}', 1, '<div class="slideblock2" style="padding: 0px;"><form action="$CONTENTPATH$$NS_SPECIAL$Search" method="get" style="padding: 0; margin: 0;"><p><input type="hidden" name="title" value="$NS_SPECIAL$Search" />$INPUT_AUTH$<input name="q" alt="Search box" type="text" size="10" style="width: 70%" /> <input type="submit" value="{lang:sidebar_btn_search_go}" style="width: 20%" /></p></form></div>'),
+ (5, 2, 2, '{lang:sidebar_title_links}', 4, 'Links');
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/postgresql_stage1.sql Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,17 @@
+-- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+-- Version 1.0.2 (Coblynau)
+-- Copyright (C) 2006-2007 Dan Fuhry
+
+-- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+
+-- mysql_stage1.sql - MySQL installation schema, early stage
+
+CREATE TABLE {{TABLE_PREFIX}}config(
+ config_name varchar(63),
+ config_value text
+);
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/install/schemas/postgresql_stage2.sql Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,337 @@
+-- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
+-- Version 1.0.2 (Coblynau)
+-- Copyright (C) 2006-2007 Dan Fuhry
+
+-- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+
+-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+
+-- mysql_stage2.sql - MySQL installation schema, main payload
+
+CREATE TABLE {{TABLE_PREFIX}}categories(
+ page_id varchar(64),
+ namespace varchar(64),
+ category_id varchar(64)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}comments(
+ comment_id SERIAL,
+ page_id text,
+ namespace text,
+ subject text,
+ comment_data text,
+ name text,
+ approved smallint default 1,
+ user_id int NOT NULL DEFAULT -1,
+ time int NOT NULL DEFAULT 0,
+ PRIMARY KEY ( comment_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}logs(
+ log_type varchar(16),
+ action varchar(16),
+ time_id int NOT NULL default '0',
+ date_string varchar(63),
+ page_id text,
+ namespace text,
+ page_text text,
+ char_tag varchar(40),
+ author varchar(63),
+ edit_summary text,
+ minor_edit smallint
+);
+
+CREATE TABLE {{TABLE_PREFIX}}page_text(
+ page_id varchar(255),
+ namespace varchar(16) NOT NULL default 'Article',
+ page_text text,
+ char_tag varchar(63)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}pages(
+ page_order int,
+ name varchar(255),
+ urlname varchar(255),
+ namespace varchar(16) NOT NULL default 'Article',
+ special smallint default '0',
+ visible smallint default '1',
+ comments_on smallint default '1',
+ protected smallint NOT NULL DEFAULT 0,
+ wiki_mode smallint NOT NULL DEFAULT 2,
+ delvotes int NOT NULL default 0,
+ password varchar(40) NOT NULL DEFAULT '',
+ delvote_ips text DEFAULT NULL
+);
+
+CREATE TABLE {{TABLE_PREFIX}}session_keys(
+ session_key varchar(32),
+ salt varchar(32),
+ user_id int,
+ auth_level smallint NOT NULL default '0',
+ source_ip varchar(10) default '0x7f000001',
+ time bigint default '0'
+);
+
+CREATE TABLE {{TABLE_PREFIX}}themes(
+ theme_id varchar(63),
+ theme_name text,
+ theme_order smallint NOT NULL default '1',
+ default_style varchar(63) NOT NULL DEFAULT '',
+ enabled smallint NOT NULL default '1'
+);
+
+CREATE TABLE {{TABLE_PREFIX}}users(
+ user_id SERIAL,
+ username text,
+ password varchar(255),
+ email text,
+ real_name text,
+ user_level smallint NOT NULL default 2,
+ theme varchar(64) NOT NULL default 'bleu.css',
+ style varchar(64) NOT NULL default 'default',
+ signature text,
+ reg_time int NOT NULL DEFAULT 0,
+ account_active smallint NOT NULL DEFAULT 0,
+ activation_key varchar(40) NOT NULL DEFAULT 0,
+ old_encryption smallint NOT NULL DEFAULT 0,
+ temp_password text,
+ temp_password_time int NOT NULL DEFAULT 0,
+ user_coppa smallint NOT NULL DEFAULT 0,
+ PRIMARY KEY (user_id)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}users_extra(
+ user_id int NOT NULL,
+ user_aim varchar(63),
+ user_yahoo varchar(63),
+ user_msn varchar(255),
+ user_xmpp varchar(255),
+ user_homepage text,
+ user_location text,
+ user_job text,
+ user_hobbies text,
+ email_public smallint NOT NULL DEFAULT 0,
+ PRIMARY KEY ( user_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}banlist(
+ ban_id SERIAL,
+ ban_type smallint,
+ ban_value varchar(64),
+ is_regex smallint DEFAULT 0,
+ reason text,
+ PRIMARY KEY ( ban_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}files(
+ file_id SERIAL,
+ time_id int NOT NULL,
+ page_id varchar(63) NOT NULL,
+ filename varchar(127) default NULL,
+ size bigint NOT NULL,
+ mimetype varchar(63) default NULL,
+ file_extension varchar(8) default NULL,
+ file_key varchar(32) NOT NULL,
+ PRIMARY KEY (file_id)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}buddies(
+ buddy_id SERIAL,
+ user_id int,
+ buddy_user_id int,
+ is_friend smallint NOT NULL default '1',
+ PRIMARY KEY (buddy_id)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}privmsgs(
+ message_id SERIAL,
+ message_from varchar(63),
+ message_to varchar(255),
+ date int,
+ subject varchar(63),
+ message_text text,
+ folder_name varchar(63),
+ message_read smallint NOT NULL DEFAULT 0,
+ PRIMARY KEY (message_id)
+);
+
+CREATE TABLE {{TABLE_PREFIX}}sidebar(
+ item_id SERIAL,
+ item_order smallint NOT NULL DEFAULT 0,
+ item_enabled smallint NOT NULL DEFAULT 1,
+ sidebar_id smallint NOT NULL DEFAULT 1,
+ block_name varchar(63) NOT NULL,
+ block_type smallint NOT NULL DEFAULT 0,
+ block_content text,
+ PRIMARY KEY ( item_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}hits(
+ hit_id SERIAL,
+ username varchar(63) NOT NULL,
+ time int NOT NULL DEFAULT 0,
+ page_id varchar(63),
+ namespace varchar(63),
+ PRIMARY KEY ( hit_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}search_index(
+ word varchar(64) NOT NULL,
+ page_names text,
+ PRIMARY KEY ( word )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}groups(
+ group_id SERIAL,
+ group_name varchar(64),
+ group_type smallint NOT NULL DEFAULT 1,
+ PRIMARY KEY ( group_id ),
+ system_group smallint NOT NULL DEFAULT 0
+);
+
+CREATE TABLE {{TABLE_PREFIX}}group_members(
+ member_id SERIAL,
+ group_id int NOT NULL,
+ user_id int NOT NULL,
+ is_mod smallint NOT NULL DEFAULT 0,
+ pending smallint NOT NULL DEFAULT 0,
+ PRIMARY KEY ( member_id )
+);
+
+CREATE TABLE {{TABLE_PREFIX}}acl(
+ rule_id SERIAL,
+ target_type smallint NOT NULL,
+ target_id int NOT NULL,
+ page_id varchar(255),
+ namespace varchar(24),
+ rules text,
+ PRIMARY KEY ( rule_id )
+);
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}page_groups(
+ pg_id SERIAL,
+ pg_type smallint NOT NULL DEFAULT 1,
+ pg_name varchar(255) NOT NULL DEFAULT '',
+ pg_target varchar(255) DEFAULT NULL,
+ PRIMARY KEY ( pg_id )
+);
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}page_group_members(
+ pg_member_id SERIAL,
+ pg_id int NOT NULL,
+ page_id varchar(63) NOT NULL,
+ namespace varchar(63) NOT NULL DEFAULT 'Article',
+ PRIMARY KEY ( pg_member_id )
+);
+
+-- Added in 1.0.1
+
+CREATE TABLE {{TABLE_PREFIX}}tags(
+ tag_id SERIAL,
+ tag_name varchar(63) NOT NULL DEFAULT 'bla',
+ page_id varchar(255) NOT NULL,
+ namespace varchar(255) NOT NULL,
+ user_id int NOT NULL DEFAULT 1,
+ PRIMARY KEY ( tag_id )
+);
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}lockout(
+ id SERIAL,
+ ipaddr varchar(40) NOT NULL,
+ action varchar(20) NOT NULL DEFAULT 'credential',
+ timestamp int NOT NULL DEFAULT 0,
+ CHECK ( action IN ('credential', 'level') )
+);
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}language(
+ lang_id SERIAL,
+ lang_code varchar(16) NOT NULL,
+ lang_name_default varchar(64) NOT NULL,
+ lang_name_native varchar(64) NOT NULL,
+ last_changed int NOT NULL DEFAULT 0
+);
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}language_strings(
+ string_id SERIAL,
+ lang_id int NOT NULL,
+ string_category varchar(32) NOT NULL,
+ string_name varchar(64) NOT NULL,
+ string_content text NOT NULL
+);
+
+DELETE FROM {{TABLE_PREFIX}}config;
+
+INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
+ ('site_name', '{{SITE_NAME}}'),
+ ('main_page', 'Main_Page'),
+ ('site_desc', '{{SITE_DESC}}'),
+ ('wiki_mode', '{{WIKI_MODE}}'),
+ ('wiki_edit_notice', '0'),
+ ('sflogo_enabled', '0'),
+ ('sflogo_groupid', ''),
+ ('sflogo_type', '1'),
+ ('w3c_vh32', '0'),
+ ('w3c_vh40', '0'),
+ ('w3c_vh401', '0'),
+ ('w3c_vxhtml10', '0'),
+ ('w3c_vxhtml11', '0'),
+ ('w3c_vcss', '0'),
+ ('approve_comments', '0'),
+ ('enable_comments', '1'),
+ ('plugin_SpecialAdmin.php', '1'),
+ ('plugin_SpecialPageFuncs.php', '1'),
+ ('plugin_SpecialUserFuncs.php', '1'),
+ ('plugin_SpecialCSS.php', '1'),
+ ('copyright_notice', '{{COPYRIGHT}}'),
+ ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'),
+ ('cache_thumbs', '{{ENABLE_CACHE}}'),
+ ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' ),
+ ('contact_email', '{{ADMIN_EMAIL}}'),
+ ('powered_btn', '1');
+
+INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
+ ('Main_Page', 'Article', '=== Enano has been successfully installed and is working. ===\n\nIf you can see this message, it means that you\'ve finished the Enano setup process and are ready to start building your website. Congratulations!\n\nTo edit this front page, click the Log In button to the left, enter the credentials you provided during the installation, and click the Edit This Page button that appears on the blue toolbar just above this text. You can also [http://docs.enanocms.org/Help:2.4 learn more] about editing pages.\n\nTo create more pages, use the Create a Page button to the left. If you enabled wiki mode, you don\'t have to log in first, however your IP address will be shown in the page history.\n\nVisit the [http://docs.enanocms.org/Help:Contents Enano documentation project website] to learn more about administering your site effectively and keeping things secure.\n\n\'\'\'NOTE:\'\'\' You\'ve just installed an unstable version of Enano. This release is completely unsupported and may contain security issues or serious usability bugs. You should not use this release on a production website. The Enano team will not provide any type of support at all for this experimental release.', '');
+
+INSERT INTO {{TABLE_PREFIX}}pages(page_order, name, urlname, namespace, special, visible, comments_on, protected, delvotes, delvote_ips) VALUES
+ (NULL, 'Main Page', 'Main_Page', 'Article', 0, 1, 1, 1, 0, '');
+
+INSERT INTO {{TABLE_PREFIX}}themes(theme_id, theme_name, theme_order, default_style, enabled) VALUES
+ ('oxygen', 'Oxygen', 1, 'bleu.css', 1),
+ ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
+
+INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active) VALUES
+ (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0),
+ (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', {{UNIX_TIME}}, 1);
+
+INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
+ (2);
+
+INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
+ (2,'Administrators',3,1),
+ (3,'Moderators',3,1);
+
+INSERT INTO {{TABLE_PREFIX}}group_members(group_id,user_id,is_mod) VALUES(2, 2, 1);
+
+INSERT INTO {{TABLE_PREFIX}}acl(target_type,target_id,page_id,namespace,rules) VALUES
+ (1,2,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=4;clear_logs=4;vote_delete=4;vote_reset=4;delete_page=4;tag_create=4;tag_delete_own=4;tag_delete_other=4;set_wiki_mode=4;password_set=4;password_reset=4;mod_misc=4;edit_cat=4;even_when_protected=4;upload_files=4;upload_new_version=4;create_page=4;php_in_pages={{ADMIN_EMBED_PHP}};edit_acl=4;'),
+ (1,3,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=3;clear_logs=2;vote_delete=4;vote_reset=4;delete_page=4;set_wiki_mode=2;password_set=2;password_reset=2;mod_misc=2;edit_cat=4;even_when_protected=4;upload_files=2;upload_new_version=3;create_page=3;php_in_pages=2;edit_acl=2;');
+
+INSERT INTO {{TABLE_PREFIX}}sidebar(item_id, item_order, sidebar_id, block_name, block_type, block_content) VALUES
+ (1, 1, 1, '{lang:sidebar_title_navigation}', 1, '[[Main_Page|{lang:sidebar_btn_home}]]'),
+ (2, 2, 1, '{lang:sidebar_title_tools}', 1, '[[$NS_SPECIAL$CreatePage|{lang:sidebar_btn_createpage}]]\n[[$NS_SPECIAL$UploadFile|{lang:sidebar_btn_uploadfile}]]\n[[$NS_SPECIAL$SpecialPages|{lang:sidebar_btn_specialpages}]]\n{if auth_admin}\n$ADMIN_LINK$\n[[$NS_SPECIAL$EditSidebar|{lang:sidebar_btn_editsidebar}]]\n{/if}'),
+ (3, 3, 1, '$USERNAME$', 1, '[[$NS_USER$$USERNAME$|{lang:sidebar_btn_userpage}]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|{lang:sidebar_btn_mycontribs}]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|{lang:sidebar_btn_preferences}]]\n[[$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n[[$NS_SPECIAL$Usergroups|{lang:sidebar_btn_groupcp}]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|{lang:sidebar_btn_register}]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n{/if}'),
+ (4, 4, 1, '{lang:sidebar_title_search}', 1, '<div class="slideblock2" style="padding: 0px;"><form action="$CONTENTPATH$$NS_SPECIAL$Search" method="get" style="padding: 0; margin: 0;"><p><input type="hidden" name="title" value="$NS_SPECIAL$Search" />$INPUT_AUTH$<input name="q" alt="Search box" type="text" size="10" style="width: 70%" /> <input type="submit" value="{lang:sidebar_btn_search_go}" style="width: 20%" /></p></form></div>'),
+ (5, 2, 2, '{lang:sidebar_title_links}', 4, 'Links');
+
--- a/language/english/admin.json Thu Jan 03 18:39:19 2008 -0500
+++ b/language/english/admin.json Wed Jan 16 13:55:49 2008 -0500
@@ -218,6 +218,11 @@
field_activate_user: 'User',
field_activate_admin: 'Admin',
+ // Section: terms of use (TOU)
+ heading_tou: 'Registration agreement/Terms of Use',
+ field_tou: 'Registration agreement',
+ field_tou_hint: 'The text you enter here will be displayed to users upon any attempt to create an account on this site.',
+
// Section: account lockouts
heading_lockout: 'Account lockouts',
lockout_intro: 'Configure Enano to prevent or restrict logins for a specified period of time if a user enters an incorrect password a specific number of times.',
--- a/language/english/install.json Thu Jan 03 18:39:19 2008 -0500
+++ b/language/english/install.json Wed Jan 16 13:55:49 2008 -0500
@@ -15,7 +15,7 @@
var enano_lang_install = {
categories: [
- 'meta', 'welcome', 'license', 'sysreqs', 'database', 'website', 'login', 'confirm', 'install', 'finish', 'pophelp',
+ 'meta', 'language', 'welcome', 'license', 'sysreqs', 'database', 'dbmysql', 'dbpgsql', 'website', 'login', 'confirm', 'install', 'finish', 'pophelp',
],
strings: {
meta: {
@@ -26,6 +26,7 @@
btn_article: 'installation page',
btn_continue: 'Continue',
lbl_before_continue: 'Before continuing:',
+ step: 'Step %step%: %title%',
msg_err_verification: 'One or more of the form fields is incorrect. Please correct any information in the form that has an "X" next to it.',
@@ -34,6 +35,9 @@
msg_err_stagefailed_mysqlerror: 'The error returned from MySQL was:',
btn_retry_installation: 'Retry installation',
},
+ language: {
+ modetitle: 'Language',
+ },
welcome: {
modetitle: 'Welcome',
heading: 'Welcome to Enano',
@@ -44,7 +48,8 @@
btn_start: 'Start installation',
},
license: {
- modetitle: 'License agreement',
+ modetitle: 'License',
+ modetitle_long: 'License agreement',
heading: 'Welcome to the Enano installer.',
blurb_thankyou: 'Thank you for choosing Enano as your CMS. You\'ve selected the finest in design, the strongest in security, and the latest in Web 2.0 toys. Trust us, you\'ll like it.',
blurb_pleaseread: 'To get started, please read and accept the following license agreement. You\'ve probably seen it before.',
@@ -57,11 +62,13 @@
gpl_blurb_inenglish: 'You may view a copy of the GNU General Public License in English in the file GPL-EN included with this package.',
},
sysreqs: {
- modetitle: 'Server requirements',
+ modetitle: 'Requirements',
+ modetitle_long: 'Server requirements',
heading: 'Checking your server',
blurb: 'Enano has several requirements that must be met before it can be installed. If all is good then note any warnings and click Continue below.',
req_php: 'PHP Version >=4.3.0',
req_php5: 'PHP 5.2.0 or later',
+ req_postgres: 'PostgreSQL extension for PHP',
req_mysql: 'MySQL extension for PHP',
req_uploads: 'File upload support',
req_apache: 'Apache HTTP Server',
@@ -72,6 +79,7 @@
req_desc_php: 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.',
req_desc_php5: 'Your server does not have support for PHP 5.2.0. While you may continue installing Enano, please be warned that as of December 31, 2007, all support for Enano on PHP 4 servers is discontinued. If you have at least PHP 5.0.0, support will still be available, but there are many security problems in PHP versions under 5.2.0 that Enano cannot effectively prevent.',
+ req_desc_postgres: 'It seems that your PHP installation does not have the PostgreSQL extension enabled. Because of this, you won\'t be able to use the PostgreSQL database driver. This is OK in the majority of cases. If you want to use PostgreSQL support, you\'ll need to either compile the PHP extension for Postgres or install the extension with your distribution\'s package manager. Windows administrators will need enable php_pgsql.dll in their php.ini.',
req_desc_mysql: 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.',
req_desc_uploads: 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".',
req_desc_apache: 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.',
@@ -92,9 +100,24 @@
objective_scalebacks: 'Review the list above to ensure that you are satisfied with any of Enano\'s workarounds for your server. If you need a particular feature and that feature is listed as disabled above, you should take the opportunity now to correct the problem.'
},
database: {
- modetitle: 'Database information',
+ modetitle: 'Database',
+ modetitle_long: 'Database information',
heading_optionalinfo: 'Optional information',
+ driver_heading: 'Choose a database driver',
+ driver_intro: 'The next step is to choose the database driver that Enano will use. In most cases this is MySQL, but there are certain advantages to PostgreSQL, which is made available only experimentally.',
+ driver_msg_virt_appliance: '<b>You\'re using the Enano virtual appliance.</b><br />Unless you configured the appliance manually, PostgreSQL support is not available. In 99% of cases you\'ll want to click MySQL below.',
+ driver_err_no_mysql: 'You don\'t have the MySQL PHP extension installed.',
+ driver_err_no_pgsql: 'You don\'t have the PostgreSQL PHP extensnion installed.',
+ driver_mysql: 'MySQL',
+ driver_mysql_intro: 'Click this button to use MySQL as the database backend for your site. Most web hosts support MySQL, and if you have administrative access to your MySQL server, you can create a new database and user during this installation process if you haven\'t done so already.',
+ driver_pgsql: 'PostgreSQL',
+ driver_pgsql_intro: 'Click this button to use PostgreSQL as the database backend for your site. While not as widely supported, PostgreSQL has more liberal licensing conditions and when properly configured is faster than MySQL. Some plugins may not work with the PostgreSQL driver.',
+
+ objective_test: 'Check your MySQL connection using the "Test Connection" button.',
+ objective_uncrypt: 'Be aware that your database information will be transmitted unencrypted several times.',
+ },
+ dbmysql: {
msg_err_mysql_connect: '<b>Error:</b> The database server "%db_host%" couldn\'t be contacted.<br />%mysql_error%',
msg_err_mysql_auth: '<b>Error:</b> Access to MySQL under the specified credentials was denied.<br />%mysql_error%',
msg_err_mysql_dbperm: '<b>Error:</b> Access to the specified database using those login credentials was denied.<br />%mysql_error%',
@@ -106,6 +129,7 @@
msg_warn_mysql_version: 'The MySQL version that your server is running could not be determined.',
msg_info_mysql_good: 'Your version of MySQL meets Enano requirements.',
+ msg_test_success: 'All checks passed! You can use this database configuration with Enano.',
blurb_needdb: 'Now we need some information that will allow Enano to contact your database server. Enano uses MySQL as a data storage backend, and we need to have access to a MySQL server in order to continue.',
blurb_howtomysql: 'If you do not have access to a MySQL server, and you are using your own server, you can download MySQL for free from <a href="http://www.mysql.com/">MySQL.com</a>. <b>Please note that, like Enano, MySQL is licensed under the GNU GPL.</b> If you need to modify MySQL and then distribute your modifications, you must either distribute them under the terms of the GPL or purchase a proprietary license.',
@@ -131,12 +155,45 @@
field_droptables_lbl: 'Drop existing tables',
btn_testconnection: 'Test connection',
+ },
+ dbpgsql: {
+ msg_err_connect: 'There was a problem connecting to PostgreSQL. Please check your connection information above.',
+ msg_err_version: '<b>Error:</b> Your version of PostgreSQL (%pg_version%) is older than 8.2.5. Enano cannot be installed.',
- objective_test: 'Check your MySQL connection using the "Test Connection" button.',
- objective_uncrypt: 'Be aware that your database information will be transmitted unencrypted several times.',
+ msg_warn_pg_version: 'The PostgreSQL version that your server is running could not be determined.',
+ msg_err_auth: 'Access to the database was denied. Ensure that your database exists and that your username and password are correct.',
+
+ msg_info_version_good: 'Your version of PostgreSQL meets Enano requirements.',
+ msg_test_success: 'All checks passed! You can use this database configuration with Enano.',
+
+ blurb_needdb: 'Now we need some information that will allow Enano to contact your database server. Enano uses PostgreSQL as a data storage backend, and we need to have access to a PostgreSQL server in order to continue.',
+ blurb_howtomysql: 'If you do not have access to a PostgreSQL server, and you are using your own server, you can download PostgreSQL for free from <a href="http://www.mysql.com/">PostgreSQL.com</a>. <b>Please note that, like Enano, PostgreSQL is licensed under the GNU GPL.</b> If you need to modify PostgreSQL and then distribute your modifications, you must either distribute them under the terms of the GPL or purchase a proprietary license.',
+
+ vm_login_info: '<b>PostgreSQL login information for this virtual appliance:</b><br /><br />Database hostname: %host%<br />Database login: username "%user%", password: "%pass%" (without quotes)<br />Database name: %name%',
+
+ table_title: 'Database information',
+
+ field_hostname_title: 'Database hostname',
+ field_hostname_body: 'This is the hostname (or sometimes the IP address) of your PostgreSQL server. In many cases, this is "localhost".',
+ field_dbname_title: 'Database name',
+ field_dbname_body: 'The name of the actual database. If you don\'t already have a database, you can create one here, if you have the username and password of a PostgreSQL user with administrative rights.',
+ field_dbauth_title: 'Database login',
+ field_dbauth_body: 'These fields should be the username and password of a user with "select", "insert", "update", "delete", "create table", and "replace" privileges for your database.',
+ field_tableprefix_title: 'Table prefix',
+ field_tableprefix_body: 'The value that you enter here will be added to the beginning of the name of each Enano table. You may use lowercase letters (a-z), numbers (0-9), and underscores (_).',
+ field_rootauth_title: 'Database administrative login',
+ field_rootauth_body: 'If the PostgreSQL database or username that you entered above does not exist yet, you can create them here, assuming that you have the login information for an administrative user (such as root). Leave these fields blank unless you need to use them.',
+ field_pgsqlversion_title: 'PostgreSQL version',
+ field_pgsqlversion_blurb_willbechecked: 'PostgreSQL version information will be checked when you click "Test Connection".',
+ field_droptables_title: 'Delete existing tables?',
+ field_droptables_body: 'If this option is checked, all the tables that will be used by Enano will be dropped (deleted) before the schema is executed. Do NOT use this option unless specifically instructed to.',
+ field_droptables_lbl: 'Drop existing tables',
+
+ btn_testconnection: 'Test connection',
},
website: {
- modetitle: 'Website configuration',
+ modetitle: 'Site info',
+ modetitle_long: 'Website information',
header_blurb: 'The next step is to enter some information about your website. You can always change this information later, using the administration panel.',
field_name_title: 'Website name',
@@ -158,8 +215,9 @@
objective_verify: 'Verify that your site information is correct. Again, all of the above settings can be changed from the administration panel.',
},
login: {
- modetitle: 'Administration login',
+ modetitle: 'Admin login',
header_blurb: 'Next, enter your desired username and password. The account you create here will be used to administer your site.',
+ modetitle_long: 'Administration login',
field_username_title: 'Administration username',
field_username_body: 'The administration username you will use to log into your site.<br />This cannot be "anonymous" or in the form of an IP address.',
@@ -177,7 +235,8 @@
objective_remember: 'Remember the username and password you enter here! You will not be able to administer your site without the information you enter on this page.',
},
confirm: {
- modetitle: 'Confirm installation',
+ modetitle: 'Review',
+ modetitle_long: 'Confirm installation',
header_blurb_title: 'Enano is ready to install.',
header_blurb_body: 'The wizard has finished collecting information and is ready to install the database schema. Please review the information below, and then click the button below to install the database.',
@@ -197,7 +256,8 @@
btn_install_enano: 'Install Enano!',
},
install: {
- modetitle: 'Database installation',
+ modetitle: 'Install',
+ modetitle_long: 'Database installation',
stg_connect_title: 'Connect to MySQL',
stg_connect_body: 'MySQL denied our attempt to connect to the database. This is most likely because your login information was incorrect. You will most likely need to <a href="install.php?mode=license">restart the installation</a>.',
@@ -229,7 +289,8 @@
msg_complete_body: 'Review any warnings above, and then <a href="%finish_link%">click here to finish the installation</a>.',
},
finish: {
- modetitle: 'Installation complete',
+ modetitle: 'Finish',
+ modetitle_long: 'Complete installation',
msg_congratulations: 'Congratulations!',
body: '<p>You have finished installing Enano on this server.</p>
<h3>Now what?</h3>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/language/english/meta.json Wed Jan 16 13:55:49 2008 -0500
@@ -0,0 +1,6 @@
+{
+ // Language metadata
+ lang_name_english: 'English',
+ lang_name_native: 'English',
+ lang_code: 'eng'
+}
--- a/language/english/user.json Thu Jan 03 18:39:19 2008 -0500
+++ b/language/english/user.json Wed Jan 16 13:55:49 2008 -0500
@@ -98,6 +98,7 @@
reg_err_alert_password_tooshort: 'Your password must be 6 characters or greater in length.',
reg_err_alert_password_nomatch: 'The passwords you entered do not match.',
reg_err_missing_key: 'Couldn\'t look up public encryption key',
+ reg_err_accept_tou: 'Please read and accept the Terms of Use before creating your account.',
reg_msg_greatercontrol: 'A user account enables you to have greater control over your browsing experience.',
reg_msg_table_title: 'Create a user account',
@@ -112,6 +113,7 @@
reg_msg_realname_optional: 'Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.',
reg_msg_captcha_pleaseenter: 'Please enter the code shown in the image to the right into the text box. The code is case-insensitive and the numeral zero is never used. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can <a %regen_flags%>generate a new image</a>.',
reg_msg_captcha_blind: 'If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.',
+ reg_msg_please_read_tou:'Please read and agree to the following terms before registering. By continuing to create an account you agree to be legally bound by the terms below.',
reg_msg_success_title: 'Registration successful',
reg_msg_success_body: 'Thank you for registering, your user account has been created.',
reg_msg_success_activ_none: 'You may now <a href="%login_link%">log in</a> with the username and password that you created.',
@@ -127,6 +129,9 @@
reg_lbl_field_realname: 'Real name:',
reg_lbl_field_captcha: 'Visual confirmation',
reg_lbl_field_captcha_code: 'Code:',
+ reg_lbl_field_tou: 'I agree to abide by the terms and conditions stated above',
+
+ reg_btn_create_account: 'Create my account',
reg_coppa_title: 'Before you can register, please tell us your age.',
reg_coppa_link_atleast13: 'I was born <b>on or before</b> %yo13_date% and am <b>at least</b> 13 years of age',
--- a/plugins/SpecialAdmin.php Thu Jan 03 18:39:19 2008 -0500
+++ b/plugins/SpecialAdmin.php Wed Jan 16 13:55:49 2008 -0500
@@ -266,6 +266,8 @@
setConfig('pw_strength_minimum', $strength);
}
+ setConfig('register_tou', RenderMan::preprocess_text($_POST['register_tou'], true, false));
+
// Account lockout policy
if ( preg_match('/^[0-9]+$/', $_POST['lockout_threshold']) )
setConfig('lockout_threshold', $_POST['lockout_threshold']);
@@ -517,6 +519,27 @@
</td>
</tr>
+ <!-- Terms of Use -->
+
+ <tr>
+ <th class="subhead" colspan="2">
+ <?php echo $lang->get('acpgc_heading_tou'); ?>
+ </th>
+ </tr>
+
+ <tr>
+ <td class="row2">
+ <b><?php echo $lang->get('acpgc_field_tou'); ?></b><br />
+ <small><?php echo $lang->get('acpgc_field_tou_hint'); ?></small>
+ </td>
+ <td class="row2">
+ <?php
+ $terms = getConfig('register_tou');
+ echo $template->tinymce_textarea('register_tou', $terms, 10, 40);
+ ?>
+ </td>
+ </tr>
+
<!-- Account lockout -->
<tr><th class="subhead" colspan="2"><?php echo $lang->get('acpgc_heading_lockout'); ?></th></tr>
--- a/plugins/SpecialUserFuncs.php Thu Jan 03 18:39:19 2008 -0500
+++ b/plugins/SpecialUserFuncs.php Wed Jan 16 13:55:49 2008 -0500
@@ -502,6 +502,8 @@
$email = '';
$realname = '';
+ $terms = getConfig('register_tou');
+
if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in ))
{
$s = ($session->user_level >= USER_LEVEL_ADMIN) ? '<p>' . $lang->get('user_reg_err_disabled_body_adminblurb', array( 'reg_link' => makeUrl($paths->page, 'IWannaPlayToo&coppa=no', true) )) . '</p>' : '';
@@ -527,6 +529,10 @@
{
$s = 'Invalid COPPA input';
}
+ else if ( !empty($terms) && !isset($_POST['tou_agreed']) )
+ {
+ $s = $lang->get('user_reg_err_accept_tou');
+ }
else
{
$coppa = ( isset($_POST['coppa']) && $_POST['coppa'] == 'yes' );
@@ -723,10 +729,44 @@
</td>
</tr>
+ <!-- FIELD: TOU -->
+
+ <?php
+ if ( !empty($terms) ):
+ ?>
+
+ <tr>
+ <td class="row1" colspan="3">
+ <?php
+ echo $lang->get('user_reg_msg_please_read_tou');
+ ?>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="row3" colspan="3">
+ <div style="border: 1px solid #000000; height: 75px; width: 60%; clip: rect(0px,auto,auto,0px); overflow: auto; background-color: #FFF; margin: 0 auto; padding: 4px;">
+ <?php
+ echo RenderMan::render($terms);
+ ?>
+ </div>
+ <p style="text-align: center;">
+ <label>
+ <input type="checkbox" name="tou_agreed" />
+ <b><?php echo $lang->get('user_reg_lbl_field_tou'); ?></b>
+ </label>
+ </p>
+ </td>
+ </tr>
+
+ <?php
+ endif;
+ ?>
+
<!-- FIELD: submit button -->
<tr>
<th class="subhead" colspan="3" style="text-align: center;">
- <input tabindex="7" type="submit" name="submit" value="Create my account" />
+ <input tabindex="7" type="submit" name="submit" value="<?php echo $lang->get('user_reg_btn_create_account'); ?>" />
</td>
</tr>
--- a/upgrade.php Thu Jan 03 18:39:19 2008 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,811 +0,0 @@
-<?php
-
-/*
- * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0.3 (Dyrad)
- * upgrade.php - upgrade script
- * Copyright (C) 2006-2007 Dan Fuhry
- *
- * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- */
-
-define('IN_ENANO_INSTALL', 'true');
-define('IN_ENANO_UPGRADE', 'true');
-
-if(!defined('scriptPath')) {
- $sp = dirname($_SERVER['REQUEST_URI']);
- if($sp == '/' || $sp == '\\') $sp = '';
- define('scriptPath', $sp);
-}
-
-if(!defined('contentPath')) {
- $sp = dirname($_SERVER['REQUEST_URI']);
- if($sp == '/' || $sp == '\\') $sp = '';
- define('contentPath', $sp);
-}
-
-global $this_page, $sideinfo;
-
-function microtime_float()
-{
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-
-global $_starttime;
-$_starttime = microtime_float();
-
-// Determine directory (special case for development servers)
-if ( strpos(__FILE__, '/repo/') && file_exists('.enanodev') )
-{
- $filename = str_replace('/repo/', '/', __FILE__);
-}
-else
-{
- $filename = __FILE__;
-}
-
-define('ENANO_ROOT', dirname($filename));
-
-require(ENANO_ROOT.'/includes/constants.php');
-
-if(defined('ENANO_DEBUG'))
-{
- require_once(ENANO_ROOT.'/includes/debugger/debugConsole.php');
-}
-else
-{
- function dc_here($m) { return false; }
- function dc_dump($a, $g) { return false; }
- function dc_watch($n) { return false; }
- function dc_start_timer($u) { return false; }
- function dc_stop_timer($m) { return false; }
-}
-
-// SCRIPT CONFIGURATION
-// Everything related to versions goes here!
-
-// Valid versions to upgrade from
-$valid_versions = Array('1.0b1', '1.0b2', '1.0b3', '1.0b4', '1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.1.1', '1.0.2b1', '1.0.2', '1.0.3', 'Stable1.0ToUnstable1.1');
-
-// Basically a list of dependencies, which should be resolved automatically
-// If, for example, upgrading from 1.0b1 to 1.0RC1 requires one extra query that would not
-// normally be required (for whatever reason) then you would add a custom version number to the array under key '1.0b1'.
-$deps_list = Array(
- '1.0b1' => Array('1.0b2'),
- '1.0b2' => Array('1.0b3'),
- '1.0b3' => Array('1.0b4'),
- '1.0b4' => Array('1.0RC1'),
- '1.0RC1' => Array('1.0RC2'),
- '1.0RC2' => Array('1.0RC3'),
- '1.0RC3' => Array('1.0'),
- '1.0' => Array('1.0.1'),
- '1.0.1' => Array('1.0.1.1'),
- '1.0.1.1' => Array('1.0.2b1'),
- '1.0.2b1' => Array('1.0.2'),
- '1.0.2' => Array('Stable1.0ToUnstable1.1'),
- 'Stable1.0ToUnstable1.1' => Array('1.1.1')
- );
-$this_version = '1.1.1';
-$func_list = Array(
- '1.0' => Array('u_1_0_1_update_del_votes'),
- '1.0b4' => Array('u_1_0_RC1_update_user_ids', 'u_1_0_RC1_add_admins_to_group', 'u_1_0_RC1_alter_files_table', 'u_1_0_RC1_destroy_session_cookie', 'u_1_0_RC1_set_contact_email', 'u_1_0_RC1_update_page_text'), // ,
- // '1.0RC2' => Array('u_1_0_populate_userpage_comments')
- '1.0RC3' => Array('u_1_0_RC3_make_users_extra'),
- '1.0.2b1' => Array('u_1_0_2_nuke_template_cache', 'u_1_0_2_rebuild_search_index')
- );
-
-if(!isset($_GET['mode']))
-{
- $_GET['mode'] = 'login';
-}
-
-function err($t)
-{
- global $template;
- echo $t;
- $template->footer();
- exit;
-}
-
-require(ENANO_ROOT.'/includes/template.php');
-
-// Initialize the session manager
-require(ENANO_ROOT.'/includes/functions.php');
-require(ENANO_ROOT.'/includes/dbal.php');
-require(ENANO_ROOT.'/includes/paths.php');
-require(ENANO_ROOT.'/includes/sessions.php');
-require(ENANO_ROOT.'/includes/plugins.php');
-require(ENANO_ROOT.'/includes/rijndael.php');
-require(ENANO_ROOT.'/includes/render.php');
-require(ENANO_ROOT.'/includes/search.php');
-$db = new mysql();
-$db->connect();
-
-$plugins = new pluginLoader();
-
-if(!defined('ENANO_CONFIG_FETCHED'))
-{
- // Select and fetch the site configuration
- $e = $db->sql_query('SELECT config_name, config_value FROM '.table_prefix.'config;');
- if ( !$e )
- {
- $db->_die('Some critical configuration information could not be selected.');
- }
- else
- {
- define('ENANO_CONFIG_FETCHED', ''); // Used in die_semicritical to figure out whether to call getConfig() or not
- }
-
- $enano_config = Array();
- while($r = $db->fetchrow())
- {
- $enano_config[$r['config_name']] = $r['config_value'];
- }
- $db->free_result();
-}
-
-$v = enano_version();
-if(in_array($v, Array(false, '', '1.0b3', '1.0b4')))
-{
- $ul_admin = 2;
- $ul_mod = 1;
- $ul_member = 0;
- $ul_guest = -1;
-}
-else
-{
- $ul_admin = USER_LEVEL_ADMIN;
- $ul_mod = USER_LEVEL_MOD;
- $ul_member = USER_LEVEL_MEMBER;
- $ul_guest = USER_LEVEL_GUEST;
-}
-
-$_GET['title'] = 'unset';
-
-$session = new sessionManager();
-$paths = new pathManager();
-$session->start();
-
-$template = new template_nodb();
-$template->load_theme('oxygen', 'bleu', false);
-
-$modestrings = Array(
- 'login' => 'Administrative login',
- 'welcome' => 'Welcome',
- 'setversion' => 'Select Enano version',
- 'confirm' => 'Confirm upgrade',
- 'upgrade' => 'Database installation',
- 'finish' => 'Upgrade complete'
- );
-
-$sideinfo = '';
-$vars = $template->extract_vars('elements.tpl');
-$p = $template->makeParserText($vars['sidebar_button']);
-foreach ( $modestrings as $id => $str )
-{
- if ( $_GET['mode'] == $id )
- {
- $flags = 'style="font-weight: bold; text-decoration: underline;"';
- $this_page = $str;
- }
- else
- {
- $flags = '';
- }
- $p->assign_vars(Array(
- 'HREF' => '#',
- 'FLAGS' => $flags . ' onclick="return false;"',
- 'TEXT' => $str
- ));
- $sideinfo .= $p->run();
-}
-
-$template->init_vars();
-
-function upg_assign_vars($schema)
-{
- $schema = str_replace('{{SITE_NAME}}', mysql_real_escape_string(getConfig('site_name')), $schema);
- $schema = str_replace('{{SITE_DESC}}', mysql_real_escape_string(getConfig('site_desc')), $schema);
- $schema = str_replace('{{COPYRIGHT}}', mysql_real_escape_string(getConfig('copyright_notice')), $schema);
- $schema = str_replace('{{TABLE_PREFIX}}', table_prefix, $schema);
- if(getConfig('wiki_mode')=='1') $schema = str_replace('{{WIKI_MODE}}', '1', $schema);
- else $schema = str_replace('{{WIKI_MODE}}', '0', $schema);
- return $schema;
-}
-
-/* Version-specific functions */
-
-function u_1_0_RC1_update_user_ids()
-{
- global $db;
- // First, make sure this hasn't already been done
- $q = $db->sql_query('SELECT username FROM '.table_prefix.'users WHERE user_id=1;');
- if ( !$q )
- $db->_die();
- $row = $db->fetchrow();
- if ( $row['username'] == 'Anonymous' )
- return true;
- // Find the first unused user ID
- $used = Array();
- $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users;');
- if ( !$q )
- $db->_die();
- $notfirst = false;
- while ( $row = $db->fetchrow() )
- {
- $i = intval($row['user_id']);
- $used[$i] = true;
- if ( !isset($used[$i - 1]) && $notfirst )
- {
- $id = $i - 1;
- break;
- }
- $notfirst = true;
- }
- if ( !isset($id) )
- $id = $i + 1;
- if ( $id == 0 )
- $id = 2;
- $db->free_result();
-
- $q = $db->sql_query('UPDATE '.table_prefix.'users SET user_id=' . $id . ' WHERE user_id=1;');
- if(!$q)
- $db->_die();
- $q = $db->sql_query('UPDATE '.table_prefix.'users SET user_id=1 WHERE user_id=-1 AND username=\'Anonymous\';');
- if(!$q)
- $db->_die();
-
-}
-
-function u_1_0_RC1_add_admins_to_group()
-{
- global $db;
- $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE user_level=' . USER_LEVEL_ADMIN . ';');
- if ( !$q )
- $db->_die();
- $base = 'INSERT INTO '.table_prefix.'group_members(group_id,user_id) VALUES';
- $blocks = Array();
- while ( $row = $db->fetchrow($q) )
- {
- $blocks[] = '(2,' . $row['user_id'] . ')';
- }
- $blocks = implode(',', $blocks);
- $sql = $base . $blocks . ';';
- if(!$db->sql_query($sql))
- $db->_die();
-}
-
-function u_1_0_RC1_alter_files_table()
-{
- global $db;
- if(!is_dir(ENANO_ROOT.'/files'))
- @mkdir(ENANO_ROOT . '/files');
- if(!is_dir(ENANO_ROOT.'/files'))
- die('ERROR: Couldn\'t create files directory');
- $q = $db->sql_unbuffered_query('SELECT * FROM '.table_prefix.'files;', $db->_conn);
- if(!$q) $db->_die();
- while ( $row = $db->fetchrow() )
- {
- $file_data = base64_decode($row['data']);
- $path = ENANO_ROOT . '/files/' . md5( $row['filename'] . '_' . $file_data ) . '_' . $row['time_id'] . $row['file_extension'];
- @unlink($path);
- $handle = @fopen($path, 'w');
- if(!$handle)
- die('fopen failed');
- fwrite($handle, $file_data);
- fclose($handle);
-
- }
-
- $q = $db->sql_query('ALTER TABLE '.table_prefix.'files DROP PRIMARY KEY, ADD COLUMN file_id int(12) NOT NULL auto_increment FIRST, ADD PRIMARY KEY (file_id), ADD COLUMN file_key varchar(32) NOT NULL;');
- if(!$q) $db->_die();
-
- $list = Array();
- $q = $db->sql_unbuffered_query('SELECT * FROM '.table_prefix.'files;', $db->_conn);
- if(!$q) $db->_die();
- while ( $row = $db->fetchrow($q) )
- {
- $file_data = base64_decode($row['data']);
- $key = md5( $row['filename'] . '_' . $file_data );
- $list[] = 'UPDATE '.table_prefix.'files SET file_key=\'' . $key . '\' WHERE file_id=' . $row['file_id'] . ';';
- }
-
- foreach ( $list as $sql )
- {
- if(!$db->sql_query($sql)) $db->_die();
- }
-
- if(!$db->sql_query('ALTER TABLE '.table_prefix.'files DROP data')) $db->_die();
-
-}
-
-function u_1_0_RC1_destroy_session_cookie()
-{
- unset($_COOKIE['sid']);
- setcookie('sid', '', time()-3600*24, scriptPath);
- setcookie('sid', '', time()-3600*24, scriptPath.'/');
-}
-
-function u_1_0_RC1_set_contact_email()
-{
- global $db;
- $q = $db->sql_query('SELECT email FROM '.table_prefix.'users WHERE user_level='.USER_LEVEL_ADMIN.' ORDER BY user_level ASC LIMIT 1;');
- if(!$q)
- $db->_die();
- $row = $db->fetchrow();
- setConfig('contact_email', $row['email']);
-}
-
-function u_1_0_RC1_update_page_text()
-{
- global $db;
- $q = $db->sql_unbuffered_query('SELECT page_id,namespace,page_text,char_tag FROM '.table_prefix.'page_text');
- if (!$q)
- $db->_die();
-
- $qs = array();
-
- while ( $row = $db->fetchrow($q) )
- {
- $row['page_text'] = str_replace(Array(
- "{QUOT:{$row['char_tag']}}",
- "{APOS:{$row['char_tag']}}",
- "{SLASH:{$row['char_tag']}}"
- ), Array(
- '"', "'", '\\'
- ), $row['page_text']);
- $qs[] = 'UPDATE '.table_prefix.'page_text SET page_text=\'' . mysql_real_escape_string($row['page_text']) . '\'
- WHERE page_id=\'' . mysql_real_escape_string($row['page_id']) . '\' AND
- namespace=\'' . mysql_real_escape_string($row['namespace']) . '\';';
- }
-
- foreach($qs as $query)
- {
- if(!$db->sql_query($query))
- $db->_die();
- }
-}
-
-function u_1_0_1_update_del_votes()
-{
- global $db;
- $q = $db->sql_query('SELECT urlname, namespace, delvote_ips FROM '.table_prefix.'pages;');
- if ( !$q )
- $db->_die();
-
- while ( $row = $db->fetchrow($q) )
- {
- $ips = strval($row['delvote_ips']);
- if ( is_array( @unserialize($ips) ) )
- continue;
- $ips = explode('|', $ips);
- $new = array(
- 'ip' => array(),
- 'u' => array()
- );
- $i = 0;
- $prev = '';
- $prev_is_ip = false;
- foreach ( $ips as $ip )
- {
- $i++;
- $current_is_ip = is_valid_ip($ip);
- if ( $current_is_ip && $prev_is_ip )
- {
- $i++;
- $new['u'][] = $prev;
- }
- if ( $current_is_ip )
- {
- $new['ip'][] = $ip;
- }
- else
- {
- $new['u'][] = $ip;
- }
- $prev = $ip;
- $prev_is_ip = $current_is_ip;
- }
- if ( $i % 2 == 1 && $prev_is_ip )
- {
- $new['u'][] = $ip;
- }
- $new = serialize($new);
- $e = $db->sql_query('UPDATE '.table_prefix.'pages SET delvote_ips=\'' . $db->escape($new) . '\' WHERE urlname=\'' . $db->escape($row['urlname']) . '\' AND namespace=\'' . $db->escape($row['namespace']) . '\';');
- if ( !$e )
- $db->_die();
- }
- $db->free_result($q);
-}
-
-function u_1_0_RC3_make_users_extra()
-{
- global $db;
- $q = $db->sql_query('SELECT user_id FROM '.table_prefix.'users WHERE user_id > 0;');
- if ( !$q )
- $db->_die();
-
- $ids = array();
- while ( $row = $db->fetchrow() )
- {
- $ids[] = intval($row['user_id']);
- }
-
- $ids = '(' . implode('),(', $ids) . ')';
- if ( $ids == '' )
- return false;
- $sql = "INSERT INTO " . table_prefix . "users_extra(user_id) VALUES$ids;";
-
- if ( !$db->sql_query($sql) )
- $db->_die();
-}
-
-function u_1_0_2_nuke_template_cache()
-{
- $dir = @opendir(ENANO_ROOT . '/cache');
- if ( !$dir )
- {
- return false;
- }
- while ( ($fname = @readdir($dir)) )
- {
- if ( preg_match('/\.tpl\.php$/', $fname) )
- {
- unlink( ENANO_ROOT . '/cache/' . $fname );
- }
- }
-}
-
-function u_1_0_2_rebuild_search_index()
-{
- global $paths;
- @set_time_limit(0);
- $paths->rebuild_search_index();
-}
-
-switch($_GET['mode'])
-{
- case "login":
- if ( $session->user_logged_in && $session->user_level < $ul_admin )
- {
- $template->header();
- echo '<p>Your user account does not have permission to perform an upgrade of Enano. Return to the <a href="index.php">index page</a>.</p>';
- $template->footer();
- exit;
- }
- if($session->user_logged_in && $session->user_level >= $ul_admin)
- {
- if(isset($_POST['login']))
- {
- $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, $ul_admin);
- if($session->sid_super)
- {
- header('Location: upgrade.php?mode=welcome&auth='.$session->sid_super);
- exit;
- }
- }
- $template->header();
- ?>
- <form action="upgrade.php?mode=login" method="post">
- <table border="0" style="margin-left: auto; margin-right: auto; margin-top: 5px;" cellspacing="1" cellpadding="4">
- <tr>
- <th colspan="2">You must re-authenticate to perform this upgrade.</th>
- </tr>
- <?php
- if(isset($_POST['login']))
- {
- echo '<tr><td colspan="2"><p style="color: red;">Login failed: '. $result['error'] . '</p></td></tr>';
- }
- ?>
- <tr>
- <td>Username:</td><td><input type="text" name="username" size="30" /></td>
- </tr>
- <tr>
- <td>Password:</td><td><input type="password" name="password" size="30" /></td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center;"><input type="submit" name="login" value="Log in" />
- </tr>
- </table>
- </form>
- <?php
- }
- else
- {
- if(isset($_POST['login']))
- {
- $result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, $ul_member);
- if($result == 'success')
- {
- header('Location: upgrade.php');
- exit;
- }
- }
- $template->header();
- ?>
- <form action="upgrade.php?mode=login" method="post">
- <table border="0" style="margin-left: auto; margin-right: auto; margin-top: 5px;" cellspacing="1" cellpadding="4">
- <tr>
- <th colspan="2">Please log in to continue with this upgrade.</th>
- </tr>
- <?php
- if(isset($_POST['login']))
- {
- echo '<tr><td colspan="2"><p style="color: red;">Login failed. Bad password?</p></td></tr>';
- }
- ?>
- <tr>
- <td>Username:</td><td><input type="text" name="username" size="30" /></td>
- </tr>
- <tr>
- <td>Password:</td><td><input type="password" name="password" size="30" /></td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center;"><input type="submit" name="login" value="Log in" />
- </tr>
- </table>
- </form>
- <?php
- }
- break;
- case "welcome":
- if(!$session->sid_super) { $template->header(); echo '<p>No admin session found! Please <a href="upgrade.php">restart the upgrade</a>.</p>'; $template->footer(); exit; }
-
- // Just show a simple welcome page to display version information
- $template->header();
- require('config.php');
-
- ?>
-
- <div style="text-align: center; margin-top: 10px;">
- <img alt="[ Enano CMS Project logo ]" src="images/enano-artwork/installer-greeting-blue.png" style="display: block; margin: 0 auto; padding-left: 134px;" />
- <h2>Welcome to the Enano upgrade wizard</h2>
- <?php
- if ( file_exists('./_nightly.php') )
- {
- echo '<div class="warning-box" style="text-align: left; margin: 10px auto; display: table; width: 60%;"><b>You are about to upgrade to a NIGHTLY BUILD of Enano.</b><br />Nightly builds CANNOT be re-upgraded to the final release. They may also contain serious flaws, security problems, or extraneous debugging information. Continuing this process on a production site is NOT recommended.</div>';
- }
- ?>
- </div>
- <div style="display: table; margin: 0 auto;">
- <p>You are about to upgrade Enano to version <b><?php echo $this_version; ?></b>. Before you continue, please ensure that:</p>
- <ul>
- <li>You have completely backed up your database (<b><?php echo "$dbhost:$dbname"; ?></b>)</li>
- <li>You have backed up the entire Enano directory (<b><?php echo ENANO_ROOT; ?></b>)</li>
- <li>You have reviewed the release notes for this version, and you<br />are comfortable with any known bugs or issues</li>
- <li>If you've configured Enano to work using a MySQL user with restricted<br />privileges, you need to enable ALTER, CREATE TABLE, and CREATE INDEX privileges<br />for this upgrade to work.</li>
- </ul>
- </div>
- <div style="text-align: center; margin-top: 10px;">
- <form action="upgrade.php?mode=setversion&auth=<?php echo $session->sid_super; ?>" method="post">
- <input type="submit" value="Continue with upgrade" />
- </form>
- </div>
-
- <?php
-
- break;
- case "setversion":
- if(!$session->sid_super) { $template->header(); echo '<p>No admin session found! Please <a href="upgrade.php">restart the upgrade</a>.</p>'; $template->footer(); exit; }
- $v = ( function_exists('enano_version') ) ? enano_version() : '';
- if(!in_array($v, $valid_versions) && $v != '')
- {
- $template->header();
- ?>
- <p>Your version of Enano (<?php echo $v; ?>) can't be upgraded to this version (<?php echo $this_version; ?>).</p>
- <?php
- break;
- }
- else if($v == '')
- {
- // OK, we don't know which version he's running. So we'll cheat ;-)
- $template->header();
- echo "<form action='upgrade.php?mode=confirm&auth={$session->sid_super}' method='post'>";
- ?>
- <p>Sorry, we couldn't detect which version of Enano you're running on your server. Please select which version of Enano you have below, and make absolutely sure that you're correct.</p>
- <p><select name="version"><?php
- foreach($valid_versions as $c)
- {
- echo "<option value='{$c}'>{$c}</option>";
- }
- ?></select></p>
- <p>
- <input type="submit" value="Continue" />
- </p>
- <?php
- echo `</form>`;
- break;
- }
- else
- {
- header('Location: upgrade.php?mode=confirm&auth='.$session->sid_super);
- }
- break;
- case "confirm":
- $enano_version = ( isset($_POST['version']) ) ? $_POST['version'] : enano_version();
-
- $template->header();
- if(!$session->sid_super) { echo '<p>No admin session found! Please <a href="upgrade.php">restart the upgrade</a>.</p>'; $template->footer(); exit; }
- ?>
- <form action="upgrade.php?mode=upgrade&auth=<?php echo $session->sid_super; ?>" method="post">
- <table border="0" style="margin-left: auto; margin-right: auto; margin-top: 5px;" cellspacing="1" cellpadding="4">
- <tr>
- <td colspan="2"><p><b>Are you sure you want to perform this upgrade?</b></p><p>You can still cancel the upgrade process now. If<br />the upgrade fails, you will need to roll back<br />any actions made using manual SQL queries.</p><p><b>Please clear your browser cache or<br />shift-reload after the upgrade.</b><br />If you fail to do so, some page elements may<br />be broken.</td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center;">
- <input type="hidden" name="enano_version" value="<?php echo $enano_version; ?>" />
- <input type="submit" name="doit" value="Upgrade Enano!" />
- </td>
- </tr>
- </table>
- </form>
- <?php
- break;
- case "upgrade":
- $template->header();
- if(!$session->sid_super) { echo '<p>No admin session found! Please <a href="upgrade.php">restart the upgrade</a>.</p>'; $template->footer(); exit; }
- if(!isset($_POST['enano_version'])) { echo '<p>Can\'t find the version information on the POST query, are you trying to do this upgrade directly? Please <a href="upgrade.php">restart the upgrade</a>.</p>'; break; }
- $enano_version = $_POST['enano_version'];
- echo '<p>Preparing for schema execution...';
- // Build an array of queries
- $schema = file_get_contents('upgrade.sql');
-
- // Strip out and process version blocks
- preg_match_all('#---BEGIN ([0-9A-z\.\-]*?)---'."\n".'((.*?)'."\n)?".'---END \\1---#is', $schema, $matches);
-
- $from_list =& $matches[1];
- $query_list =& $matches[3];
-
- foreach($matches[0] as $m)
- {
- $schema = str_replace($m, '', $schema);
- }
- $schema = explode("\n", $schema);
- foreach($schema as $k => $q)
- {
- if(substr($q, 0, 2) == '--' || $q == '')
- {
- unset($schema[$k]);
- //die('<pre>'.htmlspecialchars(print_r($schema, true)).'</pre>');
- }
- else
- {
- $schema[$k] = upg_assign_vars($schema[$k]);
- }
- }
-
- foreach($query_list as $k => $q)
- {
- $query_list[$k] = explode("\n", $query_list[$k]);
- foreach($query_list[$k] as $i => $s)
- {
- $tq =& $query_list[$k][$i];
- if(substr($s, 0, 2) == '--' || $s == '')
- {
- unset($query_list[$k][$i]);
- //die('<pre>'.htmlspecialchars(print_r($schema, true)).'</pre>');
- }
- else
- {
- $query_list[$k][$i] = upg_assign_vars($query_list[$k][$i]);
- }
- }
- $query_list[$k] = array_values($query_list[$k]);
- }
-
- $assoc_list = Array();
-
- foreach($from_list as $i => $v)
- {
- $assoc_list[$v] = $query_list[$i];
- }
-
- $schema = array_values($schema);
-
- $deps_resolved = false;
- $installing_versions = Array($enano_version);
-
- while(true)
- {
- $v = array_keys($deps_list);
- foreach($v as $i => $ver)
- {
- if(in_array($ver, $installing_versions))
- {
- // $ver is on the list of versions to be installed. Add its dependencies to the list of versions to install.
- foreach($deps_list[$ver] as $dep)
- {
- if(!in_array($dep, $installing_versions))
- {
- $installing_versions[] = $dep;
- }
- }
- }
- if($i == count($deps_list) - 1)
- {
- break 2;
- }
- }
- }
-
- foreach($installing_versions as $this_ver)
- {
- $schema = array_merge($schema, $assoc_list[$this_ver]);
- }
-
- // Time for some proper SQL syntax!
- // Also check queries for so-called injection attempts to make
- // sure that it doesn't fail during the upgrade process and
- // leave the user with a half-upgraded database
- foreach($schema as $s => $q)
- {
- if(substr($q, strlen($q)-1, 1) != ';')
- {
- $schema[$s] .= ';';
- }
- if ( !$db->check_query($schema[$s]) )
- {
- // Uh-oh, the check failed, bail out
- // The DBAL runs sanity checks on all queries for safety,
- // so if the check fails in mid-upgrade we are in deep
- // dodo doo-doo.
- echo 'Query failed sanity check, this should never happen and is a bug.</p><p>Query was:</p><pre>'.$schema[$s].'</pre>';
- break 2;
- }
- }
-
- $schema = array_values($schema);
-
- // Used extensively for debugging
- // echo '<pre>'.htmlspecialchars(print_r($schema, true)).'</pre>';
- // break;
-
- echo 'done!<br />Executing upgrade schema...';
-
- // OK, do the loop, baby!!!
- foreach($schema as $q)
- {
- if ( substr($q, 0, 1) == '@' )
- {
- // if the first character is @, don't fail on error
- $db->sql_query(substr($q, 1));
- }
- else
- {
- if ( !$db->sql_query($q) )
- {
- echo $db->get_error();
- break 2;
- }
- }
- }
-
- // Call any custom functions
- foreach ( $installing_versions as $ver )
- {
- if ( isset($func_list[$ver]) )
- {
- foreach($func_list[$ver] as $function)
- {
- @call_user_func($function);
- }
- }
- }
-
- // Log the upgrade
- $q = $db->sql_query('INSERT INTO '.table_prefix.'logs(log_type,action,time_id,date_string,author,page_text,edit_summary) VALUES(\'security\', \'upgrade_enano\', ' . time() . ', \'' . enano_date('d M Y h:i a') . '\', \'' . mysql_real_escape_string($session->username) . '\', \'' . mysql_real_escape_string($this_version) . '\', \'' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '\');');
-
- echo 'done!</p>';
- echo '<p>You will be redirected shortly. If you aren\'t redirected, <a href="index.php">click here</a>.</p>
- <script type="text/javascript">setTimeout("window.location=\'index.php\'", 2000)</script>';
- break;
-}
-$template->footer();
-
-?>