home *** CD-ROM | disk | FTP | other *** search
Wrap
<?php /* Copyright Intermesh 2003 Author: Merijn Schering <mschering@intermesh.nl> Version: 1.0 Release date: 08 July 2003 This program is free software; you can redistribute it 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 function creates a Group-Office.php file from the template Group-Office.tpl and fills it with values from a $GO_CONFIG object */ function save_config($config) { $fp = fopen($config->root_path.'Group-Office.tpl', 'r'); $config_data = fread($fp, filesize($config->root_path.'Group-Office.tpl')); fclose($fp); $config_data = str_replace('%title%', $config->title, $config_data); $config_data = str_replace('%slash%', $config->slash, $config_data); $config_data = str_replace('%host%', $config->host, $config_data); $config_data = str_replace('%full_url%', $config->full_url, $config_data); $config_data = str_replace('%root_path%', $config->root_path, $config_data); $config_data = str_replace('%language%', $config->language, $config_data); $timezone = (isset($config->timezone_offset) && $config->timezone_offset != '') ? $config->timezone_offset : '0'; $config_data = str_replace('%timezone_offset%', $timezone, $config_data); $first_weekday = (isset($config->first_weekday) && $config->first_weekday != '') ? $config->first_weekday : '0'; $config_data = str_replace('%first_weekday%', $first_weekday, $config_data); $config_data = str_replace('%tmpdir%', $config->tmpdir, $config_data); $config_data = str_replace('%theme%', $config->theme, $config_data); $allow_themes = ($config->allow_themes === true) ? 'true' : 'false'; $config_data = str_replace('%allow_themes%', $allow_themes, $config_data); $allow_password_change = ($config->allow_password_change === true) ? 'true' : 'false'; $config_data = str_replace('%allow_password_change%', $allow_password_change, $config_data); $enable_system_accounts = ($config->enable_system_accounts === true) ? 'true' : 'false'; $config_data = str_replace('%enable_system_accounts%', $enable_system_accounts, $config_data); $enable_samba_accounts = ($config->enable_samba_accounts === true) ? 'true' : 'false'; $config_data = str_replace('%enable_samba_accounts%', $enable_samba_accounts, $config_data); $config_data = str_replace('%smtp_server%', $config->smtp_server, $config_data); $config_data = str_replace('%smtp_port%', $config->smtp_port, $config_data); $config_data = str_replace('%max_attachment_size%', $config->max_attachment_size, $config_data); $config_data = str_replace('%inmail_host%', $config->inmail_host, $config_data); $config_data = str_replace('%inmail_port%', $config->inmail_port, $config_data); $config_data = str_replace('%inmail_type%', $config->inmail_type, $config_data); $config_data = str_replace('%inmail_root%', $config->inmail_root, $config_data); $config_data = str_replace('%local_email_host%', $config->local_email_host, $config_data); $config_data = str_replace('%file_storage_path%', $config->file_storage_path, $config_data); $config_data = str_replace('%email_connectstring_options%', $config->email_connectstring_options, $config_data); if (!is_string($config->create_mode)) { $config->create_mode = decoct((string)$config->create_mode); } if (strlen($config->create_mode) == 3) { $config->create_mode = '0'.$config->create_mode; } $config_data = str_replace('%create_mode%', $config->create_mode, $config_data); $config_data = str_replace('%max_file_size%', $config->max_file_size, $config_data); $config_data = str_replace('%webmaster_email%', $config->webmaster_email, $config_data); $config_data = str_replace('%db_type%', $config->db_type, $config_data); $config_data = str_replace('%db_host%', $config->db_host, $config_data); $config_data = str_replace('%db_name%', $config->db_name, $config_data); $config_data = str_replace('%db_user%', $config->db_user, $config_data); $config_data = str_replace('%db_pass%', $config->db_pass, $config_data); $config_data = str_replace('%auth_db_type%', $config->auth_db_type, $config_data); $config_data = str_replace('%auth_db_host%', $config->auth_db_host, $config_data); $config_data = str_replace('%auth_db_user%', $config->auth_db_user, $config_data); $config_data = str_replace('%auth_db_pass%', $config->auth_db_pass, $config_data); $config_data = str_replace('%auth_db_ldap_um%', $config->auth_db_ldap_um, $config_data); $config_data = str_replace('%auth_db_ldap_basedn%', $config->auth_db_ldap_basedn, $config_data); $config_data = str_replace('%auth_db_ldap_peopledn%', $config->auth_db_ldap_peopledn, $config_data); $config_data = str_replace('%auth_db_ldap_groupsdn%', $config->auth_db_ldap_groupsdn, $config_data); if (!$fp = fopen($config->root_path.'Group-Office.php', 'w+')) { exit("Failed to open config file"); }elseif(!fwrite($fp, $config_data)) { exit("Failed to write to config file"); }else { return fclose($fp); } } /* This function gets all queries from an SQL dump file in an array */ function get_sql_queries($file) { $sql =''; $queries=array(); if($handle = fopen ($file, "r")) { while (!feof ($handle)) { $buffer = trim(fgets($handle, 4096)); if($buffer != '' && strpos($buffer, '#') === false) { $sql .= $buffer; } } fclose ($handle); }else { die("could not read SQL dump file $file!"); } $length = strlen($sql); $in_string=false; $start = 0; $escaped = false; for ($i=0;$i<$length;$i++) { $char = $sql[$i]; if ($char == '\'' && !$escaped) { $in_string = !$in_string; } if ($char == ';' && !$in_string) { $offset = $i - $start; $queries[] = substr($sql, $start, $offset); $start = $i+1; } if ($char == '\\') { $escaped = true; }else { $escaped = false; } } return $queries; } function print_head() { echo '<html><head><title>Group-Office Installation</title></head><body style="font-family: Arial,Helvetica">'; echo '<form method="post" action="install.php">'; echo '<table style="background: buttonface;border-width: 1px;border-color: black;border-style: solid;font-family: Arial,Helvetica; font-size: 12px; width: 500px;"><tr><td>'; echo '<table style="border-width: 0px;padding: 20px;font-family: Arial,Helvetica; width: 500px;font-weight: normal; font-size: 12px;"><tr><td><b><h2>Group-Office installation</h2>'; } function print_foot() { echo '</td></tr></table></td></tr></table></form> <script type="text/javascript"> function delete_database() { if (confirm("Are you sure you want to delete all Group-Office users and data?")) { document.forms[0].upgrade.value="false"; document.forms[0].submit(); } } function change_port() { if (document.forms[0].inmail_type.value == "imap") { document.forms[0].inmail_port.value = "143"; }else { document.forms[0].inmail_port.value = "110"; } } </script> </body></html>'; } //destroy session when user closes browser ini_set('session.cookie_lifetime','0'); //@session_start(); //get the path of this script if ($_SERVER['SCRIPT_FILENAME'] != '') { $script_path = stripslashes($_SERVER['SCRIPT_FILENAME']); }else { $script_path = stripslashes($_SERVER['PATH_TRANSLATED']); } if ($script_path == '') { print_head(); echo '<b>Fatal error:</b> Could not get the path of the this script. The server variable \'SCRIPT_FILENAME\' and \'PATH_TRANSLATED\' are not set.'; echo '<br /><br />Correct this and refresh this page. If you are not able to correct this try the manual installation described in the file \'INSTALL\''; print_foot(); exit(); } //the root_path of Group-Office is the path of this script without install.php $root_path = str_replace('install.php', '',$script_path); //check ifconfig exists and if the config file is writable $config_exists = file_exists('Group-Office.php'); if ($config_exists && !is_writable('Group-Office.php')) { print_head(); echo 'The configuration file Group-Office.php exists in '.$root_path.' but is not writable. If you wish to make changes then you have to make Group-Office.php writable during the configuration process.'; echo '<br /><br />Correct this and refresh this page.'; echo '<br /><br /><font color="#003399"><i>$ chmod 777 '.$root_path.'Group-Office.php<br /></i></font>'; print_foot(); exit(); }elseif(!$config_exists && !is_writable($root_path)) { print_head(); echo 'Can\'t create configuration file in '.$root_path.'. If you wish to install Group-Office you have to make '.$root_path.' temporarily writable.'; echo '<br /><br />Correct this and refresh this page.'; echo '<br /><br /><font color="#003399"><i>$ chmod 777 '.$root_path.'<br /></i></font>'; print_foot(); exit(); } //if we can write and config file doesn't exist create a default config file if (!$config_exists) { $tpl_file = str_replace('install.php', 'Group-Office.tpl',$script_path); $GO_CONFIG_file = str_replace('install.php', 'Group-Office.php',$script_path); $fp = fopen($tpl_file, 'r'); $config_data = fread($fp, filesize($tpl_file)); fclose($fp); $config_data = str_replace('%title%', 'Group-Office', $config_data); $config_data = str_replace('%slash%', '/', $config_data); $host= substr(str_replace($_SERVER['DOCUMENT_ROOT'],"",$root_path),0,-1); $full_url = 'http://'.$_SERVER['HTTP_HOST'].$host; $config_data = str_replace('%host%', $host, $config_data); $config_data = str_replace('%full_url%', $full_url, $config_data); $config_data = str_replace('%root_path%', addslashes($root_path), $config_data); $config_data = str_replace('%language%', 'Nederlands', $config_data); $timezone_offset = "0"; $config_data = str_replace('%timezone_offset%', $timezone_offset, $config_data); $config_data = str_replace('%first_weekday%', '1', $config_data); $config_data = str_replace('%tmpdir%', '/tmp/', $config_data); $config_data = str_replace('%theme%', 'crystal', $config_data); $config_data = str_replace('%allow_themes%', 'true', $config_data); $config_data = str_replace('%allow_password_change%', 'true', $config_data); $config_data = str_replace('%enable_system_accounts%', 'false', $config_data); $config_data = str_replace('%enable_samba_accounts%', 'false', $config_data); $config_data = str_replace('%smtp_server%', '', $config_data); $config_data = str_replace('%smtp_port%', '', $config_data); $config_data = str_replace('%max_attachment_size%', '10000000', $config_data); $config_data = str_replace('%inmail_host%', 'example.com', $config_data); $config_data = str_replace('%inmail_port%', '143', $config_data); $config_data = str_replace('%inmail_type%', 'imap', $config_data); $config_data = str_replace('%inmail_root%', '', $config_data); $config_data = str_replace('%local_email_host%', 'localhost', $config_data); $config_data = str_replace('%email_connectstring_options%', '', $config_data); $config_data = str_replace('%file_storage_path%', '/home/groupoffice', $config_data); $config_data = str_replace('%create_mode%', '0755', $config_data); $config_data = str_replace('%max_file_size%', '100000000', $config_data); $config_data = str_replace('%webmaster_email%', 'webmaster@example.com', $config_data); $config_data = str_replace('%db_type%', 'mysql', $config_data); $config_data = str_replace('%db_host%', 'localhost', $config_data); $config_data = str_replace('%db_name%', 'groupoffice', $config_data); $config_data = str_replace('%db_user%', 'groupoffice', $config_data); $config_data = str_replace('%db_pass%', '', $config_data); $config_data = str_replace('%auth_db_type%', 'sql', $config_data); $config_data = str_replace('%auth_db_host%', 'localhost', $config_data); $config_data = str_replace('%auth_db_user%', 'groupoffice', $config_data); $config_data = str_replace('%auth_db_pass%', 'groupoffice', $config_data); $config_data = str_replace('%auth_db_ldap_um%', '0', $config_data); $config_data = str_replace('%auth_db_ldap_basedn%', 'dc=group-office,dc=sourceforge,dc=net', $config_data); $config_data = str_replace('%auth_db_ldap_peopledn%', 'ou=People,dc=group-office,dc=sourceforge,dc=net', $config_data); $config_data = str_replace('%auth_db_ldap_groupsdn%', 'ou=Groups,dc=group-office,dc=sourceforge,dc=net', $config_data); if (!$fp = fopen($GO_CONFIG_file, 'w+')) { exit("Failed to open config file"); }elseif(!fwrite($fp, $config_data)) { exit("Failed to write to config file"); }else { fclose($fp); } } //config file exists now so require it to get the properies. require('Group-Office.php'); @session_start(); if ($_SERVER['REQUEST_METHOD'] =='POST') { switch($_POST['task']) { case 'administrator': $pass1=trim($_POST['pass1']); $pass2=trim($_POST['pass2']); $email=trim($_POST['email']); if ($pass1 == '') { $feedback = '<font color="red">Please enter a password!</font>'; }elseif( strlen($pass1) < 4) { $feedback = '<font color="red">Password can\'t be shorter then 4 characters!</font>'; }elseif($pass1 != $pass2) { $feedback = '<font color="red">Passwords did not match!</font>'; }elseif(!eregi("^([a-z0-9]+)([._-]([a-z0-9]+))*[@]([a-z0-9]+)([._-]([a-z0-9]+))*[.]([a-z0-9]){2}([a-z0-9])?$", $email)) { $feedback = '<font color="red">Invalid E-mail address!</font>'; }else { require_once($GO_CONFIG->class_path.'users.class.inc'); $users = new users(); $users->get_users(); $acl_id = $GO_SECURITY->get_new_acl($email); if ($acl_id != -1) { $authcode = $users->random_password(); $new_user_id = $users->add_user( 'administrator', // Username $pass1, // Password '', // First Name '', // Middle Name '', // Last Name '', // Initials '', // Title 'M', // Sex '', // Birthday $email, // eMail Address $authcode, // Authcode '', // Work Phone '', // Home Phone '', // Fax '', // Cellular '', // Country '', // State '', // City '', // ZIP '', // Address '', // Company '', // Work Country '', // Work State '', // Work City '', // Work ZIP '', // Work Address '', // Work Fax '', // Homepage '', // Department '', // Function '', // Language '', // Theme $acl_id // ACL-ID ); $old_umask = umask(000); mkdir($GO_CONFIG->file_storage_path.'administrator', $GO_CONFIG->create_mode); umask($old_umask); require_once($GO_CONFIG->class_path."groups.class.inc"); $groups = new groups(); $groups->query("DELETE FROM db_sequence WHERE seq_name='groups'"); $groups->query("DELETE FROM groups"); $group_id = $groups->add_group($new_user_id, 'Admins'); $groups->add_user_to_group($new_user_id,$group_id); $group_id = $groups->add_group($new_user_id, 'Everyone'); $groups->add_user_to_group($new_user_id,$group_id); $GO_SECURITY->add_group_to_acl($group_id, $acl_id); $_SESSION['completed']['administrator'] = true; }else { $feedback = '<p><font color="red">Error while creating administrator</font></p>'; } } break; case 'license': $_SESSION['completed']['license'] = true; break; case 'release_notes': $_SESSION['completed']['release_notes'] = true; break; case 'database_connection': $db = new db(); $db->Halt_On_Error = 'no'; if(@$db->connect($_POST['db_name'], $_POST['db_host'], $_POST['db_user'], $_POST['db_pass'])) { $GO_CONFIG->db_host = $_POST['db_host']; $GO_CONFIG->db_name = $_POST['db_name']; $GO_CONFIG->db_user = $_POST['db_user']; $GO_CONFIG->db_pass = $_POST['db_pass']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['database_connection'] = true; } }else { $feedback ='<font color="red">Failed to connect to database</font>'; } break; case 'database_structure': $db = new db(); $db->Halt_On_Error = 'no'; if (!$db->connect($GO_CONFIG->db_name, $GO_CONFIG->db_host, $GO_CONFIG->db_user, $GO_CONFIG->db_pass)) { print_head(); echo 'Can\'t connect to database!'; echo '<br /><br />Correct this and refresh this page.'; print_foot(); exit(); }else { if($_POST['upgrade'] == 'true') { $old_version = intval(str_replace('.', '', $_POST['db_version'])); $new_version = intval(str_replace('.', '', $GO_CONFIG->version)); require('lib/updates.inc'); if (!isset($updates[$old_version])) { //invalid version, abort upgrade $feedback = '<font color="red">The version number you entered is invalid</font>'; }else { for ($cur_ver=$old_version;$cur_ver<$new_version;$cur_ver++) { if (isset($updates[$cur_ver])) { while($query = array_shift($updates[$cur_ver])) { //echo $query.'<br />'; @$db->query($query); } } if (file_exists($GO_CONFIG->root_path.'lib/scripts/'.$cur_ver.'.inc')) { echo 'Running special update script for version '.$cur_ver.'...<br>'; require_once($GO_CONFIG->root_path.'lib/scripts/'.$cur_ver.'.inc'); } } $db_version = $GO_CONFIG->version; $_SESSION['completed']['database_structure'] = true; //store the version number for future upgrades $GO_CONFIG->save_setting('version', $GO_CONFIG->version); //Upgrade completed } }else { //delete all existing users require_once($GO_CONFIG->class_path.'users.class.inc'); $users = new users(); $delete=new users(); $users->get_users(); while($users->next_record()) { $delete->delete_user($users->f('id')); } //create new empty database //table is empty create the structure $queries = get_sql_queries("lib/sql/groupoffice.sql"); while ($query = array_shift($queries)) { $db->query($query); } $queries = get_sql_queries("lib/sql/filetypes.sql"); while ($query = array_shift($queries)) { $db->query($query); } $queries = get_sql_queries("lib/sql/settings.sql"); while ($query = array_shift($queries)) { $db->query($query); } $queries = get_sql_queries("lib/sql/wiki.sql"); while ($query = array_shift($queries)) { $db->query($query); } //store the version number for future upgrades $GO_CONFIG->save_setting('version', $GO_CONFIG->version); $db_version = $GO_CONFIG->version; $_SESSION['completed']['database_structure'] = true; } } break; case 'userdir': if (!is_writable($_POST['userdir'])) { $feedback = '<font color="red">The path you entered is not writable.<br />Please correct this and try again.</font>'; }else { if (substr($_POST['userdir'], -1) != '/') $_POST['userdir'] = $_POST['userdir'].'/'; $GO_CONFIG->file_storage_path=$_POST['userdir']; $GO_CONFIG->create_mode=$_POST['create_mode']; $GO_CONFIG->max_file_size=$_POST['max_file_size']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['userdir'] = true; } } break; case 'tmpdir': $tmpdir=$_POST['tmpdir']; if (!is_writable($tmpdir)) { $feedback = '<font color="red">The path you entered is not writable.<br />Please correct this and try again.</font>'; }else { if (substr($tmpdir, -1) != '/') $tmpdir = $tmpdir.'/'; $GO_CONFIG->tmpdir=$tmpdir; if (save_config($GO_CONFIG)) { $_SESSION['completed']['tmpdir'] = true; } } break; case 'title': if ($_POST['title'] == '') { $feedback = 'You dind\'t enter a title.'; }elseif(!eregi("^([a-z0-9]+)([._-]([a-z0-9]+))*[@]([a-z0-9]+)([._-]([a-z0-9]+))*[.]([a-z0-9]){2}([a-z0-9])?$", $_POST['webmaster_email'])) { $feedback = 'You entered an invalid e-mail address.'; }else { $GO_CONFIG->webmaster_email = $_POST['webmaster_email']; $GO_CONFIG->title = $_POST['title']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['title'] = true; } } break; case 'url': $host = trim($_POST['host']); $full_url = trim($_POST['full_url']); if ($host != '' && $full_url != '') { if ($_POST['host'] != '/') { if (substr($_POST['host'] , -1) != '/') $_POST['host'] = $_POST['host'].'/'; if (substr($_POST['host'] , 0, 1) != '/') $_POST['host'] = '/'.$_POST['host']; } $GO_CONFIG->host = $_POST['host']; $GO_CONFIG->full_url = $_POST['full_url']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['url'] = true; } }else { $feedback = '<font color="red">You dind\'t enter both fields.</font>'; } break; case 'theme': $GO_CONFIG->theme = $_POST['theme']; $GO_CONFIG->allow_themes = ($_POST['allow_themes'] == 'true') ? true : false; if (save_config($GO_CONFIG)) { $_SESSION['completed']['theme'] = true; } break; case 'language': $GO_CONFIG->language = $_POST['language']; $GO_CONFIG->timezone_offset = $_POST['timezone_offset']; $GO_CONFIG->first_weekday = $_POST['first_weekday']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['language'] = true; } break; case 'authentication_type': $GO_CONFIG->auth_db_type = $_POST['auth_db_type']; $GO_CONFIG->allow_password_change = ($_POST['allow_password_change'] == 'true') ? true : false; if ($GO_CONFIG->auth_db_type != "ldap" ) { $GO_CONFIG->auth_db_host = $GO_CONFIG->db_host; $GO_CONFIG->auth_db_user = $GO_CONFIG->db_user; $GO_CONFIG->auth_db_pass = $GO_CONFIG->db_pass; if (save_config($GO_CONFIG)) { $_SESSION['completed']['authentication_type'] = true; $_SESSION['completed']['authentication_ldap'] = true; } }else { if (save_config($GO_CONFIG)) { $_SESSION['completed']['authentication_type'] = true; } } break; case 'authentication_ldap': $ldap = @ldap_connect($_POST['auth_db_host']); if($ldap) { $bind = @ldap_bind( $ldap, $_POST['auth_db_user'], $_POST['auth_db_pass']); if( $bind ) { @ldap_unbind($bind); $GO_CONFIG->auth_db_host = $_POST['auth_db_host']; $GO_CONFIG->auth_db_user = $_POST['auth_db_user']; $GO_CONFIG->auth_db_pass = $_POST['auth_db_pass']; $GO_CONFIG->auth_db_ldap_um = $_POST['auth_db_ldap_um']; $GO_CONFIG->auth_db_ldap_basedn = $_POST['auth_db_ldap_basedn']; $GO_CONFIG->auth_db_ldap_peopledn = $_POST['auth_db_ldap_peopledn']; $GO_CONFIG->auth_db_ldap_groupsdn = $_POST['auth_db_ldap_groupsdn']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['authentication_ldap'] = true; } }else { $feedback ='<font color="red">Failed to bind to LDAP server</font>'; } @ldap_close( $ldap ); }else { $feedback ='<font color="red">Failed to connect to LDAP directory</font>'; } break; case 'system_accounts': $GO_CONFIG->enable_system_accounts = ($_POST['enable_system_accounts'] == 'true') ? true : false; if (!$GO_CONFIG->enable_system_accounts) { //these options don't apply without system accounts and should be set //to false. They are skipped by the installer now $GO_CONFIG->enable_samba_accounts = false; $GO_CONFIG->enable_system_control = false; } if (save_config($GO_CONFIG)) { $_SESSION['completed']['system_accounts'] = true; } break; case 'samba_accounts': $GO_CONFIG->enable_samba_accounts = ($_POST['enable_samba_accounts'] == 'true') ? true : false; if (save_config($GO_CONFIG)) { $_SESSION['completed']['samba_accounts'] = true; } break; case 'smtp': $GO_CONFIG->smtp_port = $_POST['smtp_port']; $GO_CONFIG->smtp_server= $_POST['smtp_server']; $GO_CONFIG->max_attachment_size= $_POST['max_attachment_size']; $GO_CONFIG->email_connectstring_options = $_POST['email_connectstring_options']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['smtp'] = true; } break; case 'local_email': $GO_CONFIG->inmail_host = $_POST['inmail_host']; $GO_CONFIG->inmail_port = $_POST['inmail_port']; $GO_CONFIG->inmail_root = $_POST['inmail_root']; $GO_CONFIG->local_email_host = $_POST['local_email_host']; $GO_CONFIG->inmail_type = $_POST['inmail_type']; if (save_config($GO_CONFIG)) { $_SESSION['completed']['local_email'] = true; } break; case 'send_info': if ($_REQUEST['info'] != 'no') { $body = "Group-Office title: ".$GO_CONFIG->title."\r\n"; $body .= "Usage: ".$_REQUEST['info']."\r\n"; $body .= "Users: ".$_REQUEST['users']."\r\n"; $body .= "Host: ".$GO_CONFIG->full_url."\r\n"; $body .= "Webmaster: ".$GO_CONFIG->webmaster_email."\r\n"; if ($_REQUEST['email'] != '') { $body .= "Contact about Group-Office Professional at: ".$_REQUEST['email']."\r\n"; $body .= "Name: ".$_REQUEST['name']."\r\n"; } sendmail('notify@intermesh.nl', $GO_CONFIG->webmaster_email, $GO_CONFIG->title, "Group-Office usage information", $body); } $_SESSION['completed']['send_info'] = true; break; } }else { unset($_SESSION); } //Store all options in config array during install $_SESSION['completed'] = isset($_SESSION['completed']) ? $_SESSION['completed'] : array(); if (!isset($_SESSION['completed']['license'])) { if(file_exists('LICENSE.GPL')) { $license = 'LICENSE.GPL'; }else { $license = 'LICENSE.PRO'; } print_head(); echo '<input type="hidden" name="task" value="license" />'; echo 'Do you agree to the terms of the license agreement?<br /><br />'; echo '<iframe style="width: 670; height: 250; background: #ffffff;" src="'.$license.'"></iframe>'; echo '<br /><br /><input type="submit" value="I agree to these terms" />'; print_foot(); exit(); } if (!isset($_SESSION['completed']['release_notes'])) { print_head(); echo '<input type="hidden" name="task" value="release_notes" />'; echo 'Please read the release notes<br /><br />'; echo '<iframe style="width: 670; height: 250; background: #ffffff;" src="RELEASE"></iframe>'; echo '<br /><br /><input type="submit" value="Continue" />'; print_foot(); exit(); } //Get the database parameters first //if option database_connection is set then we have succesfully set up database if (!isset($_SESSION['completed']['database_connection'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="database_connection" /> Create a database now and fill in the values to connect to your database.<br /> The database user should have permission to perform select-, insert-, update- and delete queries. It must also be able to lock tables. <br /><br /><font color="#003399"><i> $ mysql -u root -p<br /> $ mysql> CREATE DATABASE 'groupoffice'; </i></font> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> Host: </td> <td> <input type="text" size="40" name="db_host" value="<?php echo $GO_CONFIG->db_host; ?>" /> </td> </tr> <tr> <td> Database: </td> <td> <input type="text" size="40" name="db_name" value="<?php echo $GO_CONFIG->db_name; ?>" /> </td> </tr> <tr> <td> Username: </td> <td> <input type="text" size="40" name="db_user" value="<?php echo $GO_CONFIG->db_user; ?>" /> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" size="40" name="db_pass" value="<?php echo $GO_CONFIG->db_pass; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //database connection is setup now //next step isto check if the table structure is present. if(!isset($_SESSION['completed']['database_structure'])) { $db = new db(); $db->Halt_On_Error = 'no'; if (!@$db->connect($GO_CONFIG->db_name, $GO_CONFIG->db_host, $GO_CONFIG->db_user, $GO_CONFIG->db_pass)) { print_head(); echo 'Can\'t connect to database!'; echo '<br /><br />Correct this and refresh this page.'; print_foot(); exit(); }else { $db->query("SHOW TABLES"); if ($db->num_rows() > 0) { //structure exists see if the settings table exists $settings_exist = false; while ($db->next_record()) { if ($db->f(0) == 'settings') { $settings_exist = true; break; } } if ($settings_exist) { $db->query("SELECT value FROM settings WHERE name='version'"); if ($db->next_record()) { $db_version=str_replace('.','', $db->f('value')); require('lib/updates.inc'); if (!isset($updates[$db_version])) { $db_version = false; } }else { $db_version = false; } } print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="database_structure" /> <input type="hidden" name="upgrade" value="true" /> Group-Office has detected a previous installation of Group-Office. Do you wish to keep the existing data and perform an upgrade? <?php if (!$db_version) { echo '<br /><br />Group-Office was unable to detect your old Group-Office version. The installer needs you old version number to determine updates that might apply.<br />'; echo 'Please enter the version number below if you wish to perform an upgrade.'; } ?> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <?php if (!$db_version) { echo '<tr><td>Version:</td><td>'; $db_version = isset($db_version) ? $db_version : $GO_CONFIG->db_version; echo '<input type="text" size="4" maxlength="4" name="db_version" value="'.$db_version.'" /></td></tr>'; }else { echo '<input type="hidden" name="db_version" value="'.$db_version.'" />'; } ?> <tr> <td colspan="2"> <input type="submit" value="Yes" /> <input type="button" onclick="delete_database()" value="No" /> </td> </tr> </table> <?php print_foot(); exit(); }else { //table is empty create the structure $queries = get_sql_queries("lib/sql/groupoffice.sql"); while ($query = array_shift($queries)) { $db->query($query); } $queries = get_sql_queries("lib/sql/filetypes.sql"); while ($query = array_shift($queries)) { $db->query($query); } $queries = get_sql_queries("lib/sql/settings.sql"); while ($query = array_shift($queries)) { $db->query($query); } $_SESSION['completed']['database_structure'] = true; } } } //database structure exists now and is up to date //now we get the userdir if (!isset($_SESSION['completed']['userdir'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="userdir" /> Group-Office needs a place to store user data. Create a writable path for this purpose now and enter it in the box below.<br /> The path should be have 0777 permissions or should be owned by the webserver user. You probably need to be root to do the last. <br />Also enter a maximum number of bytes to upload and a valid ocatal value for the file permissions. <br /><br /> <font color="#003399"><i> $ su<br /> $ mkdir /home/groupoffice<br /> $ chown apache:apache /home/groupoffice<br /> </i></font> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td colspan="2">User home directory:</td> </tr> <tr> <?php $userdir = isset($_POST['userdir']) ? $_POST['userdir'] : $GO_CONFIG->file_storage_path; ?> <td colspan="2"><input type="text" size="50" name="userdir" value="<?php echo $userdir; ?>" /></td> </tr> <tr> <td> Maximum upload size: </td> </tr> <td> <input type="text" size="50" name="max_file_size" value="<?php echo $GO_CONFIG->max_file_size; ?>" /> </td> </tr> <tr> <td> Create mode: </td> </tr> <tr> <td> <?php $create_mode_string = decoct((string)$GO_CONFIG->create_mode); if (strlen($create_mode_string) == 3) { $create_mode_string = '0'.$create_mode_string; } ?> <input type="text" size="4" name="create_mode" value="<?php echo $create_mode_string; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //database structure exists now and is up to date //now we get the tempdir if (!isset($_SESSION['completed']['tmpdir'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="tmpdir" /> Group-Office needs a place to store temporarily data such as session data or file uploads. Create a writable path for this purpose now and enter it in the box below.<br /> The /tmp directory is a good option. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Temporarily files directory:</td> </tr> <tr> <?php $tmpdir = isset($_POST['tmpdir']) ? $_POST['tmpdir'] : $GO_CONFIG->tmpdir; ?> <td><input type="text" size="50" name="tmpdir" value="<?php echo $tmpdir; ?>" /></td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['url'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="url" /> Enter a relative and an absolute url.<br /><br /> <font color="#003399"><i> Example:<br /> Relative URL: /groupoffice/<br /> Absolute URL: http://www.intermesh.nl/groupoffice/</i> </font> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> Relative URL: </td> <td> <?php $host = isset($_POST['host']) ? $_POST['host'] : $GO_CONFIG->host; ?> <input type="text" size="40" name="host" value="<?php echo $host; ?>" /> </td> </tr> <tr> <td>Absolute URL:</td> <td> <?php $full_url = isset($_POST['full_url']) ? $_POST['full_url'] : $GO_CONFIG->full_url; ?> <input type="text" size="40" name="full_url" value="<?php echo $full_url; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //the title of Group-Office if (!isset($_SESSION['completed']['title'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="title" /> Enter a title for your Group-Office and webmaster email address for your application.<br /> The email address will recieve information about new registered users. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Title:</td> </tr> <tr> <?php $title = isset($_POST['title']) ? $_POST['title'] : $GO_CONFIG->title; $webmaster_email = isset($_POST['webmaster_email']) ? $_POST['webmaster_email'] : $GO_CONFIG->webmaster_email; ?> <td><input type="text" size="50" name="title" value="<?php echo $title; ?>" /></td> </tr> <tr> <td> Webmaster E-mail: </td> </tr> <tr> <td> <input type="text" size="50" name="webmaster_email" value="<?php echo $webmaster_email; ?>" /> </td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //theme if (!isset($_SESSION['completed']['theme'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="theme" /> Select the default theme for Group-Office and whether users are allowed to change the theme or not. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Default theme:</td> <td> <?php $themes = $GO_THEME->get_themes(); $dropbox = new dropbox(); $dropbox->add_arrays($themes, $themes); $dropbox->print_dropbox("theme", $GO_CONFIG->theme); ?> </td> </tr> <tr> <td>Allow:</td> <td> <?php $allow_themes = isset($allow_themes) ? $allow_themes : $GO_CONFIG->allow_themes; $allow_themes = $allow_themes ? 'true' : 'false'; $dropbox = new dropbox(); $dropbox->add_value('true', 'yes'); $dropbox->add_value('false', 'no'); $dropbox->print_dropbox('allow_themes', $allow_themes); ?> </td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //language if (!isset($_SESSION['completed']['language'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="language" /> Select the default language for Group-Office. This language will be selected when autodetection fails. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Default language:</td> <td> <?php $languages = $GO_LANGUAGE->get_languages(); $dropbox = new dropbox(); $dropbox->add_arrays($languages, $languages); $dropbox->print_dropbox("language", $GO_CONFIG->language); ?> </td> </tr> <tr> <td>Default timezone offset:</td> <td> <?php $dropbox = new dropbox(); $dropbox->add_value('8','+8 GMT'); $dropbox->add_value('7','+7 GMT'); $dropbox->add_value('6','+6 GMT'); $dropbox->add_value('5','+5 GMT'); $dropbox->add_value('4','+4 GMT'); $dropbox->add_value('3','+3 GMT'); $dropbox->add_value('2','+2 GMT'); $dropbox->add_value('1','+1 GMT'); $dropbox->add_value('0','GMT'); $dropbox->add_value('-1','-1 GMT'); $dropbox->add_value('-2','-2 GMT'); $dropbox->add_value('-3','-3 GMT'); $dropbox->add_value('-4','-4 GMT'); $dropbox->add_value('-5','-5 GMT'); $dropbox->add_value('-6','-6 GMT'); $dropbox->add_value('-7','-7 GMT'); $dropbox->add_value('-8','-8 GMT'); $dropbox->print_dropbox("timezone_offset", $GO_CONFIG->timezone_offset); ?> </td> </tr> <tr> <td>First day of the week:</td> <td> <?php $dropbox = new dropbox(); $dropbox->add_value('0','Sunday'); $dropbox->add_value('1','Monday'); $dropbox->print_dropbox("first_weekday", $GO_CONFIG->first_weekday); ?> </td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //Find out if we use Group-Office database or LDAP for Authentication... //if option authentication is set then we have succesfully set it up if (!isset($_SESSION['completed']['authentication_type'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="authentication_type" /> You can select if you want to use the Group-Office database or an LDAP directory server as authentication source.<br /> Please note that if Group-Office fails to authenticate the user at the LDAP or mail server it will fall back on the Group-Office database.<br /> If you are going to use authentication on a mail server you will have to specify the mail servers Group-Office is allowed to use in the file 'auth_mail_servers.inc'. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> Source: </td> <td> <?php $dropbox = new dropbox(); $dropbox->add_value('sql', 'Group-Office'); $dropbox->add_value('ldap', 'LDAP (Experimental)'); $dropbox->add_value('mail', 'Mail server (Experimental)'); $dropbox->print_dropbox('auth_db_type', $GO_CONFIG->auth_db_type); ?> </td> </tr> <tr> <td colspan="2">Allow users to change thier password? (Only applies Group-Office authentication):</td> <td> <?php $allow_password_change = $GO_CONFIG->allow_password_change ? 'true' : 'false'; $dropbox = new dropbox(); $dropbox->add_value('true', 'Yes'); $dropbox->add_value('false', 'No'); $dropbox->print_dropbox('allow_password_change', $allow_password_change); ?> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['authentication_ldap'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="authentication_ldap" /> Please specify your LDAP database.<br /> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> Host: </td> <td> <input type="text" size="40" name="auth_db_host" value="<?php echo $GO_CONFIG->auth_db_host; ?>" /> </td> </tr> <tr> <td> Username: </td> <td> <input type="text" size="40" name="auth_db_user" value="<?php echo $GO_CONFIG->auth_db_user; ?>" /> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" size="40" name="auth_db_pass" value="<?php echo $GO_CONFIG->auth_db_pass; ?>" /> </td> </tr> <tr> <td> Base-DN: </td> <td> <input type="text" size="40" name="auth_db_ldap_basedn" value="<?php echo $GO_CONFIG->auth_db_ldap_basedn; ?>" /> </td> </tr> <tr> <td> User-DN: </td> <td> <input type="text" size="40" name="auth_db_ldap_peopledn" value="<?php echo $GO_CONFIG->auth_db_ldap_peopledn; ?>" /> </td> </tr> <tr> <td> Group-DN: </td> <td> <input type="text" size="40" name="auth_db_ldap_groupsdn" value="<?php echo $GO_CONFIG->auth_db_ldap_groupsdn; ?>" /> </td> </tr> <tr> <td> enable LDAP User Management (not finished yet): </td> <td> <?php $dropbox = new dropbox(); $dropbox->add_value('true', 'yes'); $dropbox->add_value('false', 'no'); $dropbox->print_dropbox('auth_db_ldap_um', $auth_db_ldap_um); ?> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['system_accounts'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="system_accounts" /> When this option is selected a system user will be created identical to the Group-Office users.<br /> If you wish to enable this you need <a href="http://www.courtesan.com/sudo/" target="_blank">Sudo</a> to be installed and enter the data from 'lib/sudoers' into '/etc/sudoers'.<br /> Keep in mind that if you do this the webserver can now: <ul> <li>add/remove users</li> <li>change passwords</li> <li>reboot and halt the machine</li> </ul> So this is genaraly a BAD idea on a public webserver <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Enable system accounts:</td> <td> <?php $enable_system_accounts = isset($enable_system_accounts) ? $enable_system_accounts : $GO_CONFIG->enable_system_accounts; $enable_system_accounts = $enable_system_accounts ? 'true' : 'false'; $dropbox = new dropbox(); $dropbox->add_value('true', 'yes'); $dropbox->add_value('false', 'no'); $dropbox->print_dropbox('enable_system_accounts', $enable_system_accounts); ?> </td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['samba_accounts']) && ($GO_CONFIG->enable_system_accounts == true)) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="samba_accounts" /> With system accounts enabled Group-Office can synchronise Samba users. <br /> Make sure <a target="_blank" href="http://expect.nist.gov/">Expect</a> is installed and copy 'lib/auto_smbadduser.exp' and lib/auto_smbpasswd.exp' to folder '/usr/sbin'.<br /> Do you wish to use Samba accounts? <br /> <br /> <font color="#003399"><i> $ cp lib/scripts/auto_smbadduser.exp lib/scripts/auto_smbadduser.exp /usr/sbin/<br /> $ chown root:root /usr/sbin/auto_smbadduser.exp /usr/sbin/auto_smbadduser.exp<br /> $ chmod 0440 /usr/sbin/auto_smbadduser.exp /usr/sbin/auto_smbadduser.exp<br /> </i></font> <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Enable Samba accounts:</td> <td> <?php $enable_samba_accounts = isset($enable_samba_accounts) ? $enable_samba_accounts : $GO_CONFIG->enable_samba_accounts; $enable_samba_accounts = $enable_samba_accounts ? 'true' : 'false'; $dropbox = new dropbox(); $dropbox->add_value('true', 'yes'); $dropbox->add_value('false', 'no'); $dropbox->print_dropbox('enable_samba_accounts', $enable_samba_accounts); ?> </td> </tr> <tr> <td> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['smtp'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="smtp" /> Group-Office has the ability to send and recieve e-mail. Please configure your SMTP server. <br /> Leave this blank to use local sendmail. <br /> <br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> SMTP server: </td> <td> <input type="text" size="40" name="smtp_server" value="<?php echo $GO_CONFIG->smtp_server; ?>" /> </td> </tr> <tr> <td> SMTP port: </td> <td> <input type="text" size="40" name="smtp_port" value="<?php echo $GO_CONFIG->smtp_port; ?>" /> </td> </tr> <tr> <td> Maximum size of attachments: </td> <td> <input type="text" size="40" name="max_attachment_size" value="<?php echo $GO_CONFIG->max_attachment_size; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <b> Some servers require some connection string options when connecting to an IMAP or POP-3 server using the PHP IMAP extension. For example most Redhat systems require '/notls' or '/novalidate-cert'. If you are not sure then leave this field blank. </b> <br /><br /> </td> </tr> <tr> <td> Connection options: </td> <td> <input type="text" size="40" name="email_connectstring_options" value="<?php echo $GO_CONFIG->email_connectstring_options; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } if (!isset($_SESSION['completed']['local_email']) && ($GO_CONFIG->enable_system_accounts === true)) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="local_email" /> With system accounts enabled Group-Office can create automatically add accounts if local IMAP or POP3 is enabled. <br /> The local hostname is the name of this machine and optionally you can add the same options as you can add to the PHP imap_open function like /notls for a Redhat bug.<br /> Leave blank if you wish to disable automatic email creation. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>Local e-mail domain name:</td> <td> <input type="text" size="30" name="inmail_host" value="<?php echo $GO_CONFIG->inmail_host; ?>" /> </td> </tr> <tr> <td>Local hostname:</td> <td> <input type="text" size="30" name="local_email_host" value="<?php echo $GO_CONFIG->local_email_host; ?>" /> </td> </tr> <tr> <td>Local server protocol:</td> <td> <?php $imap = ($GO_CONFIG->inmail_type == "imap") ? 'selected' : ''; ?> <select name="inmail_type" onchange="change_port()"> <option value="pop3">POP3</option> <option value="imap" <?php echo $imap; ?>>IMAP</option> </select> </td> </tr> <tr> <td>Local server port:</td> <td> <input type="text" size="4" name="inmail_port" value="<?php echo $GO_CONFIG->inmail_port; ?>" /> </td> </tr> <tr> <td>Local root folder:</td> <td> <input type="text" size="30" name="inmail_root" value="<?php echo $GO_CONFIG->inmail_root; ?>" /> </td> </tr> <tr> <td colspan="2"> <br /> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } //check if we need to add the administrator account if(!isset($_SESSION['completed']['administrator'])) { require_once($GO_CONFIG->class_path.'users.class.inc'); $users = new users(); if (!$users->get_user(1)) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="administrator" /> Group-Office needs an administrator account. The username will be 'administrator'. Please create a password for 'administrator'. <br /><br /> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> Password: </td> <td> <input type="password" name="pass1" /> </td> </tr> <tr> <td> Confirm password: </td> <td> <input type="password" name="pass2" /> </td> </tr> <tr> <td> E-mail: </td> <td> <?php $email = isset($email)? $email : $GO_CONFIG->webmaster_email;?> <input type="text" size="40" name="email" value="<?php echo $email; ?>" /> </td> </tr> <tr> <td colspan="2"> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } } if(!isset($_SESSION['completed']['send_info'])) { print_head(); if (isset($feedback)) { echo $feedback.'<br /><br />'; } ?> <input type="hidden" name="task" value="send_info" /> Intermesh would like to know that you are using Group-Office to find out how many people are using Group-Office. Please select an Option. (If you already sent information before, please select 'No'). <br /><br /> <table cellpadding="10" style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td> <?php $info = isset($_REQUEST['info']) ? $_REQUEST['info'] : 'no'; $users = isset($_REQUEST['users']) ? $_REQUEST['users'] : '< 5'; $radio_list = new radio_list('info', $info); $radio_list->add_option('no', 'no', ""); echo "No, Don't send information to Intermesh <br />"; $radio_list->add_option('business', 'business', ""); echo "Yes, tell Intermesh that I'm using Group-Office for business purpose.<br />"; $radio_list->add_option('personal', 'personal', ""); echo "Yes, tell Intermesh that I'm using Group-Office for personal use or I'm just testing."; ?> </td> </tr> <tr> <td> How many users do you have in Group-Office? <?php $dropbox = new dropbox(); $dropbox->add_value('< 5', '< 5'); $dropbox->add_value('20-30', '20-30'); $dropbox->add_value('30-50', '30-50'); $dropbox->add_value('50-75', '50-75'); $dropbox->add_value('75-100', '75-100'); $dropbox->add_value('100-150', '100-150'); $dropbox->add_value('150-200', '150-200'); $dropbox->add_value('300-400', '300-400'); $dropbox->add_value('> 400', '> 400'); $dropbox->print_dropbox('users', $users); ?> </td> </tr> <tr> <td> If you would like to recieve information about Group-Office Professional please fill in a name and an e-mail address where Intermesh may contact you:<br /> <?php $email = isset($email)? $email : $GO_CONFIG->webmaster_email; $name = isset($name)? $name : ''; ?> <table style="border-width: 0px;font-family: Arial,Helvetica; font-size: 12px;"> <tr> <td>E-mail:</td> <td><input type="text" size="50" name="email" value="<?php echo $email; ?>" /></td> </tr> <tr> <td>Name:</td> <td><input type="text" size="50" name="name" value="<?php echo $name; ?>" /></td> </tr> </table> </td> </tr> <tr> <td> <input type="submit" value="Continue" /> </td> </tr> </table> <?php print_foot(); exit(); } print_head(); ?> Installation complete!<br /> <br /> Please make sure Group-Office.php is not writable anymore now.<br /> <br /> <font color="#003399"><i> $ chown -R someuser:someuser <?php echo $GO_CONFIG->root_path; ?><br /> $ chmod -R 755 <?php echo $GO_CONFIG->root_path; ?> </i></font> <br /> <br /> You may want to edit /etc/php.ini to configure file uploads.<br /> When you are done log in to Group-Office with the administrator account.<br /> <ul> <li>Navigate to the menu: administrator -> configuration -> modules, select the modules you wish to use and click at the 'save' button</li> <li>Navigate to the menu: administrator -> configuration -> menu's, select the menu's you wish to use and click at the 'save' button</li> <li>Navigate to the menu: administrator -> users and add new users.</li> </ul> <br /> <br /> For further troubleshooting please consult the <a target="_blank" href="FAQ">FAQ</a> included with the package. If that doesn't help post on the <a target="_blank" href="http://sourceforge.net/forum/?group_id=76359">forums</a>.<br /> Developers should take a look at modules/example/index.php <br /><br /> <a href="<?php echo $GO_CONFIG->host; ?>">Click here to start Group-Office!</a> <?php print_foot(); session_destroy(); ?>