forked from extern/egroupware
Manageheader now handles editing of multiple domains
This commit is contained in:
parent
3be9e05fa3
commit
3c8fffb1e7
@ -23,16 +23,14 @@
|
||||
define('PHPGW_INCLUDE_ROOT','{INCLUDE_ROOT}');
|
||||
$GLOBALS['phpgw_info']['server']['header_admin_password'] = '{HEADER_ADMIN_PASSWORD}';
|
||||
|
||||
$GLOBALS['phpgw_domain']['default'] = array (
|
||||
'db_host' => '{DB_HOST}',
|
||||
'db_name' => '{DB_NAME}',
|
||||
'db_user' => '{DB_USER}',
|
||||
'db_pass' => '{DB_PASS}',
|
||||
// Look at the README file
|
||||
'db_type' => '{DB_TYPE}',
|
||||
// This will limit who is allowed to make configuration modifcations
|
||||
'config_passwd' => '{CONFIG_PASS}'
|
||||
);
|
||||
/* phpGroupWare domain-specific db settings */{domains}
|
||||
/*
|
||||
** If you want to have your domains in a select box, change to True
|
||||
** If not, users will have to login as user@domain
|
||||
** Note: This is only for virtual domain support, default domain users can login only using
|
||||
** there loginid.
|
||||
*/
|
||||
$GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
|
||||
|
||||
$GLOBALS['phpgw_info']['server']['db_persistent'] = {DB_PERSISTENT};
|
||||
|
||||
@ -44,46 +42,25 @@
|
||||
*/
|
||||
$GLOBALS['phpgw_info']['server']['sessions_type'] = '{SESSIONS_TYPE}';
|
||||
|
||||
/*
|
||||
** If you want to have your domains in a select box, change to True
|
||||
** If not, users will have to login as user@domain
|
||||
** Note: This is only for virtual domian support, default domain users can login only using
|
||||
** there loginid.
|
||||
*/
|
||||
$GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = {DOMAIN_SELECTBOX};
|
||||
|
||||
/* Select which login template set you want, most people will use default */
|
||||
$GLOBALS['phpgw_info']['login_template_set'] = 'default';
|
||||
|
||||
/* This is used to control mcrypt's use */
|
||||
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
|
||||
/* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */
|
||||
/* Set this to 'old' for versions < 2.4, otherwise the exact mcrypt version you use. */
|
||||
$GLOBALS['phpgw_info']['server']['versions']['mcrypt'] = '{MCRYPT_VERSION}';
|
||||
|
||||
/*
|
||||
** This is a random string used as the initilazation vector for mcrypt
|
||||
** feel free to change it when setting up phpgroupware on a clean database,
|
||||
** This is a random string used as the initialization vector for mcrypt
|
||||
** feel free to change it when setting up phpgroupware on a clean database,
|
||||
** but you must not change it after that point!
|
||||
** It should be around 30 bytes in length.
|
||||
*/
|
||||
*/
|
||||
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
|
||||
|
||||
/* Uncomment this out and use this for supporting different domains using this single install */
|
||||
/* (ignore if you are only supporting a single domain)*/
|
||||
/*
|
||||
$GLOBALS['phpgw_domain']['domain2.com'] = array (
|
||||
'db_host' => 'localhost',
|
||||
'db_name' => 'phpgw_domain2',
|
||||
'db_user' => 'phpgroupware',
|
||||
'db_pass' => 'their_password',
|
||||
'db_type' => 'mysql',
|
||||
'config_passwd' => 'changeme'
|
||||
);
|
||||
*/
|
||||
|
||||
/* If you want phpGroupWare to be cached by proxy servers, uncomment the following */
|
||||
/* This is NOT recommended, but phpGroupWare should still work fine. */
|
||||
if (!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True)
|
||||
if(!isset($GLOBALS['phpgw_info']['flags']['nocachecontrol']) || !$GLOBALS['phpgw_info']['flags']['nocachecontrol'] == True)
|
||||
{
|
||||
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
|
||||
header('Pragma: no-cache'); // HTTP/1.0
|
||||
@ -101,12 +78,12 @@
|
||||
\**************************************************************************/
|
||||
define('PHPGW_API_INC',PHPGW_INCLUDE_ROOT.'/phpgwapi/inc');
|
||||
include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php');
|
||||
$GLOBALS['phpgw_info']["server"]["versions"]["phpgwapi"] = $setup_info['phpgwapi']['version'];
|
||||
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
|
||||
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
|
||||
unset($setup_info);
|
||||
$GLOBALS['phpgw_info']['server']['versions']['header'] = '1.20';
|
||||
$GLOBALS['phpgw_info']['server']['versions']['header'] = '1.21';
|
||||
/* This is a fix for NT */
|
||||
if (!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
|
||||
if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
|
||||
{
|
||||
include(PHPGW_API_INC . '/functions.inc.php');
|
||||
include(PHPGW_API_INC . '/xml_functions.inc.php');
|
||||
@ -116,4 +93,16 @@
|
||||
/*
|
||||
Leave off the final php closing tag, some editors will add
|
||||
a \n or space after which will mess up cookies later on
|
||||
*/
|
||||
*/<!-- BEGIN domain -->
|
||||
$GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array (
|
||||
'db_host' => '{DB_HOST}',
|
||||
'db_name' => '{DB_NAME}',
|
||||
'db_user' => '{DB_USER}',
|
||||
'db_pass' => '{DB_PASS}',
|
||||
// Look at the README file
|
||||
'db_type' => '{DB_TYPE}',
|
||||
// This will limit who is allowed to make configuration modifications
|
||||
'config_passwd' => '{CONFIG_PASS}'
|
||||
);
|
||||
|
||||
<!-- END domain -->
|
||||
|
@ -23,8 +23,27 @@
|
||||
function generate_header()
|
||||
{
|
||||
$GLOBALS['header_template']->set_file(array('header' => 'header.inc.php.template'));
|
||||
$GLOBALS['header_template']->set_block('header','domain','domain');
|
||||
$var = Array();
|
||||
|
||||
@reset($GLOBALS['HTTP_POST_VARS']['domains']);
|
||||
while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['domains']))
|
||||
{
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['deletedomain'][$v]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$dom = $GLOBALS['HTTP_POST_VARS']["setting_$v"];
|
||||
$GLOBALS['header_template']->set_var('DB_DOMAIN',$v);
|
||||
while(list($x,$y) = @each($dom))
|
||||
{
|
||||
$GLOBALS['header_template']->set_var(strtoupper($x),$y);
|
||||
}
|
||||
$GLOBALS['header_template']->fp('domains','domain',True);
|
||||
}
|
||||
|
||||
$GLOBALS['header_template']->set_var('domain','');
|
||||
|
||||
while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['setting']))
|
||||
{
|
||||
$var[strtoupper($k)] = $v;
|
||||
|
@ -15,7 +15,7 @@
|
||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['version'] = '0.9.15.002';
|
||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.20';
|
||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.21';
|
||||
$setup_info['phpgwapi']['enable'] = 3;
|
||||
$setup_info['phpgwapi']['app_order'] = 1;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
add a domain setup en Add a domain
|
||||
admin password to header manager setup en Admin password to header manager
|
||||
after retrieving the file, put it into place as the header.inc.php. then, click "continue". setup en After retrieving the file, put it into place as the header.inc.php. Then, click "continue".
|
||||
analysis setup en Analysis
|
||||
@ -17,10 +18,14 @@ edit your existing header.inc.php setup en Edit your existing header.inc.php
|
||||
edit your header.inc.php setup en Edit your header.inc.php
|
||||
enable mcrypt setup en Enable MCrypt
|
||||
found existing configuration file. loading settings from the file... setup en Found existing configuration file. Loading settings from the file...
|
||||
hostname/ip of database server setup en Hostname/IP of database server
|
||||
importing old settings into the new format.... setup en Importing old settings into the new format....
|
||||
include root (this should be the same as server root unless you know what you are doing) setup en Include Root (this should be the same as Server Root unless you know what you are doing)
|
||||
mcrypt initialization vector setup en MCrypt initialization vector
|
||||
mcrypt version setup en MCrypt version
|
||||
name of database setup en Name of database
|
||||
name of db user phpGroupWare uses to connect setup en Name of db user phpGroupWare uses to connect
|
||||
new setup en New
|
||||
no microsoft sql server support found. disabling setup en No Microsoft SQL Server support found. Disabling
|
||||
no mysql support found. disabling setup en No MySQL support found. Disabling
|
||||
no oracle-db support found. disabling setup en No Oracle-DB support found. Disabling
|
||||
@ -29,6 +34,7 @@ no xml support found. disabling setup en No XML support found. Disabling
|
||||
now guessing better values for defaults... setup en Now guessing better values for defaults...
|
||||
or setup en or
|
||||
password needed for configuration setup en Password needed for configuration
|
||||
password of db user setup en Password of db user
|
||||
persistent connections setup en Persistent connections
|
||||
please check read/write permissions on directories, or back up and use another option. setup en Please check read/write permissions on directories, or back up and use another option.
|
||||
sample configuration not found. using built in defaults setup en Sample configuration not found. using built in defaults
|
||||
@ -51,11 +57,11 @@ you appear to have oracle support enabled setup en You appear to have Oracle sup
|
||||
you appear to have oracle v8 (oci) support enabled setup en You appear to have Oracle V8 (OCI) support enabled
|
||||
you appear to have postgres-db support enabled setup en You appear to have Postgres-DB support enabled
|
||||
you appear to have xml support enabled setup en You appear to have XML support enabled
|
||||
you didn't enter a config password setup en You didn't enter a config password
|
||||
you didn't enter a config password for domain x setup en You didn't enter a config password for domain %1
|
||||
you didn't enter a header admin password setup en You didn't enter a header admin password
|
||||
you have not created your header.inc.php yet!<br> you can create it now. setup en You have not created your header.inc.php yet!<br> You can create it now.
|
||||
your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
|
||||
your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
|
||||
your header.inc.php needs upgrading.<br><blink><font color=cc0000><b>warning!</b></font></blink><br>if you are using virtual domain support, this will <b>not</b> copy those domains over. you will need to do this manually, <b>make backups!</b> setup en Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br>If you are using virtual domain support, this will <b>NOT</b> copy those domains over. You will need to do this manually, <b>MAKE BACKUPS!</b>
|
||||
you're using an old configuration file format... setup en You're using an old configuration file format...
|
||||
you're using an old header.inc.php version... setup en You're using an old header.inc.php version...
|
||||
your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
|
||||
your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
|
||||
your header.inc.php needs upgrading.<br><blink><font color=cc0000><b>warning!</b></font></blink><br><b>make backups!</b> setup en Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br><b>MAKE BACKUPS!</b>
|
||||
|
@ -1,6 +1,7 @@
|
||||
(account deletion in SQL Only) setup en (account deletion in SQL Only)
|
||||
<br><center>Import has been completed! Click <a href="index.php">here</a> to return to setup </center> setup en <br><center>Import has been completed! Click <a href="index.php">here</a> to return to setup </center>
|
||||
actions setup en Actions
|
||||
add a domain setup en Add a domain
|
||||
add auto-created users to this group ('Default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.)
|
||||
admin first name setup en Admin first name
|
||||
admin last name setup en Admin last name
|
||||
@ -108,6 +109,7 @@ has a version mismatch setup en has a version mismatch
|
||||
hooks deregistered setup en hooks deregistered
|
||||
hooks registered setup en hooks registered
|
||||
host information setup en Host information
|
||||
hostname/ip of database server setup en Hostname/IP of database server
|
||||
however, the application is otherwise installed setup en However, the application is otherwise installed
|
||||
if no ACL records for user or any group the user is a member of setup en If no ACL records for user or any group the user is a member of
|
||||
if the application has no defined tables, selecting upgrade should remedy the problem setup en If the application has no defined tables, selecting upgrade should remedy the problem
|
||||
@ -153,7 +155,10 @@ minimum account id (e.g. 500 or 100, etc.) setup en Minimum account id (e.g. 500
|
||||
modify an existing ldap account store for use with phpgroupware (for a new install using ldap accounts) setup en Modify an existing LDAP account store for use with phpGroupWare (for a new install using LDAP accounts)
|
||||
multi-language support setup setup en Multi-Language support setup
|
||||
mysqlinstr setup en Instructions for creating the database in MySQL:<br>Login to mysql -<br><i>[user@server user]# mysql -u root -p</i><br>Create the empty database and grant user permissions -<br><i>mysql> create database phpgroupware;</i><br><i>mysql> grant all on phpgroupware.* to phpgroupware@localhost identified by 'password';</i>
|
||||
name of database setup en Name of database
|
||||
name of db user phpGroupWare uses to connect setup en Name of db user phpGroupWare uses to connect
|
||||
never setup en never
|
||||
new setup en New
|
||||
no setup en No
|
||||
no algorithms available setup en no algorithms available
|
||||
no microsoft sql server support found. disabling setup en No Microsoft SQL Server support found. Disabling
|
||||
@ -175,6 +180,7 @@ only add languages that are not in the database already setup en Only add langua
|
||||
only add new phrases setup en Only add new phrases
|
||||
or setup en or
|
||||
password needed for configuration setup en Password needed for configuration
|
||||
password of db user setup en Password of db user
|
||||
passwords did not match, please re-enter setup en Passwords did not match, please re-enter
|
||||
path information setup en Path information
|
||||
persistent connections setup en Persistent connections
|
||||
@ -283,7 +289,7 @@ you appear to have oracle v8 (oci) support enabled setup en You appear to have O
|
||||
you appear to have postgres-db support enabled setup en You appear to have Postgres-DB support enabled
|
||||
you appear to have xml support enabled setup en You appear to have XML support enabled
|
||||
you are ready for this stage, but this stage is not yet written.<br> setup en You are ready for this stage, but this stage is not yet written.<br>
|
||||
you didn't enter a config password setup en You didn't enter a config password
|
||||
you didn't enter a config password for domain x setup en You didn't enter a config password for domain %1
|
||||
you didn't enter a header admin password setup en You didn't enter a header admin password
|
||||
you do not have any languages installed. please install one now <br> setup en You do not have any languages installed. Please install one now <br>
|
||||
you have not created your header.inc.php yet!<br> you can create it now. setup en You have not created your header.inc.php yet!<br> You can create it now.
|
||||
@ -297,7 +303,7 @@ your database does not exist setup en Your database does not exist
|
||||
your database is working, but you dont have any applications installed setup en Your database is working, but you dont have any applications installed
|
||||
your header admin password is not set. please set it now! setup en Your header admin password is NOT set. Please set it now!
|
||||
your header.inc.php needs upgrading. setup en Your header.inc.php needs upgrading.
|
||||
your header.inc.php needs upgrading.<br><blink><font color=cc0000><b>warning!</b></font></blink><br>if you are using virtual domain support, this will <b>not</b> copy those domains over. you will need to do this manually, <b>make backups!</b> setup en Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br>If you are using virtual domain support, this will <b>NOT</b> copy those domains over. You will need to do this manually, <b>MAKE BACKUPS!</b>
|
||||
your header.inc.php needs upgrading.<br><blink><font color=cc0000><b>warning!</b></font></blink><br><b>make backups!</b> setup en Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br><b>MAKE BACKUPS!</b>
|
||||
your tables are current setup en Your tables are current
|
||||
your tables may be altered and you may lose data setup en Your tables may be altered and you may lose data.
|
||||
your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data !!
|
||||
|
@ -26,18 +26,32 @@
|
||||
unset($setup_info);
|
||||
#include('../version.inc.php');
|
||||
|
||||
if($GLOBALS['HTTP_POST_VARS']['adddomain'])
|
||||
{
|
||||
}
|
||||
|
||||
function check_form_values()
|
||||
{
|
||||
if (! $GLOBALS['HTTP_POST_VARS']['setting']['config_pass'])
|
||||
@reset($GLOBALS['HTTP_POST_VARS']['domains']);
|
||||
while(list($k,$v) = @each($GLOBALS['HTTP_POST_VARS']['domains']))
|
||||
{
|
||||
$errors .= '<br>' . lang("You didn't enter a config password");
|
||||
if(isset($GLOBALS['HTTP_POST_VARS']['deletedomain'][$v]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$dom = $GLOBALS['HTTP_POST_VARS']["setting_$v"];
|
||||
if(!$dom['config_pass'])
|
||||
{
|
||||
$errors .= '<br>' . lang("You didn't enter a config password for domain x",$v);
|
||||
}
|
||||
}
|
||||
if (! $GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
|
||||
|
||||
if(!$GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
|
||||
{
|
||||
$errors .= '<br>' . lang("You didn't enter a header admin password");
|
||||
}
|
||||
|
||||
if ($errors)
|
||||
if($errors)
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->html->show_header('Error',True);
|
||||
echo $errors;
|
||||
@ -61,6 +75,7 @@
|
||||
));
|
||||
$setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain');
|
||||
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
|
||||
$setup_tpl->set_block('T_setup_manage','domain','domain');
|
||||
|
||||
/* Detect current mode */
|
||||
switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
|
||||
@ -75,7 +90,7 @@
|
||||
break;
|
||||
case '3':
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.');
|
||||
$GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br>If you are using virtual domain support, this will <b>NOT</b> copy those domains over. You will need to do this manually, <b>MAKE BACKUPS!</b>');
|
||||
$GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.<br><blink><font color=CC0000><b>WARNING!</b></font></blink><br><b>MAKE BACKUPS!</b>');
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.');
|
||||
if (!$GLOBALS['phpgw_setup']->auth('Header'))
|
||||
{
|
||||
@ -267,12 +282,47 @@
|
||||
$default_domain = each($phpgw_domain);
|
||||
$GLOBALS['phpgw_info']['server']['default_domain'] = $default_domain[0];
|
||||
unset($default_domain); // we kill this for security reasons
|
||||
$GLOBALS['phpgw_info']['server']['db_host'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_host'];
|
||||
$GLOBALS['phpgw_info']['server']['db_name'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_name'];
|
||||
$GLOBALS['phpgw_info']['server']['db_user'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_user'];
|
||||
$GLOBALS['phpgw_info']['server']['db_pass'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_pass'];
|
||||
$GLOBALS['phpgw_info']['server']['db_type'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['db_type'];
|
||||
$GLOBALS['phpgw_info']['server']['config_passwd'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['config_passwd'];
|
||||
|
||||
if($GLOBALS['HTTP_POST_VARS']['adddomain'])
|
||||
{
|
||||
$phpgw_domain[lang('new')] = array();
|
||||
}
|
||||
|
||||
reset($phpgw_domain);
|
||||
while(list($key,$val) = each($phpgw_domain))
|
||||
{
|
||||
$setup_tpl->set_var('lang_domain',lang('Domain'));
|
||||
$setup_tpl->set_var('lang_delete',lang('Delete'));
|
||||
$setup_tpl->set_var('db_domain',$key);
|
||||
$setup_tpl->set_var('db_host',$phpgw_domain[$key]['db_host']);
|
||||
$setup_tpl->set_var('db_name',$phpgw_domain[$key]['db_name']);
|
||||
$setup_tpl->set_var('db_user',$phpgw_domain[$key]['db_user']);
|
||||
$setup_tpl->set_var('db_pass',$phpgw_domain[$key]['db_pass']);
|
||||
$setup_tpl->set_var('db_type',$phpgw_domain[$key]['db_type']);
|
||||
$setup_tpl->set_var('config_pass',$phpgw_domain[$key]['config_passwd']);
|
||||
|
||||
$selected = '';
|
||||
$db_type_option = '';
|
||||
$found_dbtype = False;
|
||||
while(list($k,$v) = each($supported_db))
|
||||
{
|
||||
if($v == $phpgw_domain[$key]['db_type'])
|
||||
{
|
||||
$selected = ' selected ';
|
||||
$found_dbtype = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
$dbtype_options .= '<option ' . $selected . ' value="' . $v . '">' . $v . "\n";
|
||||
}
|
||||
$setup_tpl->set_var('dbtype_options',$dbtype_options);
|
||||
|
||||
$setup_tpl->fp('domains','domain',True);
|
||||
}
|
||||
$setup_tpl->set_var('domain','');
|
||||
}
|
||||
if (defined('PHPGW_SERVER_ROOT'))
|
||||
{
|
||||
@ -297,15 +347,30 @@
|
||||
$GLOBALS['phpgw_info']['flags']['htmlcompliant'] = True;
|
||||
|
||||
/* These are the settings for the database system */
|
||||
$GLOBALS['phpgw_info']['server']['db_host'] = 'localhost';
|
||||
$GLOBALS['phpgw_info']['server']['db_name'] = 'phpgroupware';
|
||||
$GLOBALS['phpgw_info']['server']['db_user'] = 'phpgroupware';
|
||||
$GLOBALS['phpgw_info']['server']['db_pass'] = 'your_password';
|
||||
$GLOBALS['phpgw_info']['server']['db_type'] = 'mysql'; //mysql, pgsql (for postgresql), or oracle
|
||||
$setup_tpl->set_var('lang_domain',lang('Domain'));
|
||||
$setup_tpl->set_var('lang_delete',lang('Delete'));
|
||||
$setup_tpl->set_var('db_domain','default');
|
||||
$setup_tpl->set_var('db_host','localhost');
|
||||
$setup_tpl->set_var('db_name','phpgroupware');
|
||||
$setup_tpl->set_var('db_user','phpgroupware');
|
||||
$setup_tpl->set_var('db_pass','your_password');
|
||||
$setup_tpl->set_var('db_type','mysql');
|
||||
$setup_tpl->set_var('config_pass','changeme');
|
||||
|
||||
while(list($k,$v) = each($supported_db))
|
||||
{
|
||||
$dbtype_options .= '<option value="' . $v . '">' . $v . "\n";
|
||||
}
|
||||
$setup_tpl->set_var('dbtype_options',$dbtype_options);
|
||||
|
||||
$setup_tpl->fp('domains','domain',True);
|
||||
$setup_tpl->set_var('domain','');
|
||||
|
||||
$setup_tpl->set_var('comment_l','<!-- ');
|
||||
$setup_tpl->set_var('comment_r',' -->');
|
||||
|
||||
/* These are a few of the advanced settings */
|
||||
$GLOBALS['phpgw_info']['server']['db_persistent'] = True;
|
||||
$GLOBALS['phpgw_info']['server']['config_passwd'] = 'changeme';
|
||||
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = False;
|
||||
$GLOBALS['phpgw_info']['server']['mcrypt_version'] = '2.6.3';
|
||||
|
||||
@ -339,30 +404,6 @@
|
||||
$setup_tpl->set_var('server_root',$GLOBALS['phpgw_info']['server']['server_root']);
|
||||
$setup_tpl->set_var('include_root',$GLOBALS['phpgw_info']['server']['include_root']);
|
||||
$setup_tpl->set_var('header_admin_password',$GLOBALS['phpgw_info']['server']['header_admin_password']);
|
||||
$setup_tpl->set_var('db_host',$GLOBALS['phpgw_info']['server']['db_host']);
|
||||
$setup_tpl->set_var('db_name',$GLOBALS['phpgw_info']['server']['db_name']);
|
||||
$setup_tpl->set_var('db_user',$GLOBALS['phpgw_info']['server']['db_user']);
|
||||
$setup_tpl->set_var('db_pass',$GLOBALS['phpgw_info']['server']['db_pass']);
|
||||
|
||||
$selected = '';
|
||||
$db_type_option = '';
|
||||
$found_dbtype = False;
|
||||
while(list($k,$v) = each($supported_db))
|
||||
{
|
||||
if($v == $GLOBALS['phpgw_info']['server']['db_type'])
|
||||
{
|
||||
$selected = ' selected ';
|
||||
$found_dbtype = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
$dbtype_options .= '<option ' . $selected . ' value="' . $v . '">' . $v . "\n";
|
||||
}
|
||||
$setup_tpl->set_var('dbtype_options',$dbtype_options);
|
||||
|
||||
$setup_tpl->set_var('config_passwd',$GLOBALS['phpgw_info']['server']['config_passwd']);
|
||||
|
||||
if($GLOBALS['phpgw_info']['server']['db_persistent'])
|
||||
{
|
||||
@ -413,9 +454,11 @@
|
||||
$errors = '';
|
||||
if(!$found_dbtype)
|
||||
{
|
||||
/*
|
||||
$errors .= '<br><font color="red">' . lang('Warning!') . '<br>'
|
||||
. lang('The db_type in defaults (x) is not supported on this server. using first supported type.',$GLOBALS['phpgw_info']['server']['db_type'])
|
||||
. '</font>';
|
||||
*/
|
||||
}
|
||||
|
||||
if(is_writeable('../header.inc.php') ||
|
||||
@ -435,13 +478,18 @@
|
||||
$setup_tpl->set_var('errors',$errors);
|
||||
|
||||
$setup_tpl->set_var('lang_settings',lang('Settings'));
|
||||
$setup_tpl->set_var('lang_adddomain',lang('Add a domain'));
|
||||
$setup_tpl->set_var('lang_serverroot',lang('Server Root'));
|
||||
$setup_tpl->set_var('lang_includeroot',lang('Include Root (this should be the same as Server Root unless you know what you are doing)'));
|
||||
$setup_tpl->set_var('lang_adminpass',lang('Admin password to header manager'));
|
||||
$setup_tpl->set_var('lang_dbhost',lang('DB Host'));
|
||||
$setup_tpl->set_var('lang_dbhostdescr',lang('Hostname/IP of database server'));
|
||||
$setup_tpl->set_var('lang_dbname',lang('DB Name'));
|
||||
$setup_tpl->set_var('lang_dbnamedescr',lang('Name of database'));
|
||||
$setup_tpl->set_var('lang_dbuser',lang('DB User'));
|
||||
$setup_tpl->set_var('lang_dbuserdescr',lang('Name of db user phpGroupWare uses to connect'));
|
||||
$setup_tpl->set_var('lang_dbpass',lang('DB Password'));
|
||||
$setup_tpl->set_var('lang_dbpassdescr',lang('Password of db user'));
|
||||
$setup_tpl->set_var('lang_dbtype',lang('DB Type'));
|
||||
$setup_tpl->set_var('lang_whichdb',lang('Which database type do you want to use with phpGroupWare?'));
|
||||
$setup_tpl->set_var('lang_configpass',lang('Configuration Password'));
|
||||
|
@ -1,11 +1,14 @@
|
||||
<!-- BEGIN manageheader -->
|
||||
{detected}
|
||||
<tr bgcolor="486591"><th colspan="2"><font color="fefefe">{lang_settings}</font></th></tr>
|
||||
<tr bgcolor="486591">
|
||||
<th colspan="2"><font color="fefefe">{lang_settings}</font></th>
|
||||
</tr>
|
||||
<form action="manageheader.php" method="post">
|
||||
<input type="hidden" name="setting[write_config]" value="true">
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>{lang_serverroot}</b>
|
||||
<br><input type="text" name="setting[server_root]" size="80" value="{server_root}"></td>
|
||||
<br><input type="text" name="setting[server_root]" size="80" value="{server_root}">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>{lang_includeroot}</b><br><input type="text" name="setting[include_root]" size="80" value="{include_root}"></td>
|
||||
@ -13,31 +16,7 @@
|
||||
<tr>
|
||||
<td colspan="2"><b>{lang_adminpass}</b><br><input type="text" name="setting[HEADER_ADMIN_PASSWORD]" size="80" value="{header_admin_password}"></td>
|
||||
</tr>
|
||||
<br><br>
|
||||
<tr>
|
||||
<td><b>{lang_dbhost}</b><br><input type="text" name="setting[db_host]" value="{db_host}"></td><td>Hostname/IP of database server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbname}</b><br><input type="text" name="setting[db_name]" value="{db_name}"></td><td>Name of database</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbuser}</b><br><input type="text" name="setting[db_user]" value="{db_user}"></td><td>Name of db user phpGroupWare uses to connect</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbpass}</b><br><input type="text" name="setting[db_pass]" value="{db_pass}"></td><td>Password of db user</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbtype}</b><br>
|
||||
<select name="setting[db_type]">
|
||||
{dbtype_options}
|
||||
</select>
|
||||
</td>
|
||||
<td>{lang_whichdb}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_configpass}</b><br><input type="text" name="setting[config_pass]" value="{config_passwd}"></td>
|
||||
<td>{lang_passforconfig}</td>
|
||||
</tr>
|
||||
<br><br>
|
||||
<tr>
|
||||
<td><b>{lang_persist}</b><br>
|
||||
<select type="checkbox" name="setting[db_persistent]">
|
||||
@ -64,7 +43,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_mcryptversion}</b><br><input type="text" name="setting[mcrypt_version]" value="{mcrypt"></td>
|
||||
<td><b>{lang_mcryptversion}</b><br><input type="text" name="setting[mcrypt_version]" value="{mcrypt}"></td>
|
||||
<td>{lang_mcryptversiondescr}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -79,6 +58,10 @@
|
||||
</select></td><td>
|
||||
</td>
|
||||
</tr>
|
||||
{domains}{comment_l}
|
||||
<tr bgcolor="486500">
|
||||
<td colspan="2"><input type="submit" name="adddomain" value="{lang_adddomain}"></td>
|
||||
</tr>{comment_r}
|
||||
</table>
|
||||
{errors}
|
||||
{formend}
|
||||
@ -93,3 +76,34 @@
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<!-- END manageheader -->
|
||||
|
||||
<!-- BEGIN domain -->
|
||||
<tr bgcolor="486500">
|
||||
<td><b><font color="fefefe">{lang_domain}</font></b>:</td> <td><input name="domains[{db_domain}]" value="{db_domain}"> <input type="checkbox" name="deletedomain[{db_domain}]"> <font color="fefefe">{lang_delete}</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbhost}</b><br><input type="text" name="setting_{db_domain}[db_host]" value="{db_host}"></td><td>{lang_dbhostdescr}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbname}</b><br><input type="text" name="setting_{db_domain}[db_name]" value="{db_name}"></td><td>{lang_dbnamedescr}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbuser}</b><br><input type="text" name="setting_{db_domain}[db_user]" value="{db_user}"></td><td>{lang_dbuserdescr}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbpass}</b><br><input type="text" name="setting_{db_domain}[db_pass]" value="{db_pass}"></td><td>{lang_dbpassdescr}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_dbtype}</b><br>
|
||||
<select name="setting_{db_domain}[db_type]">
|
||||
{dbtype_options}
|
||||
</select>
|
||||
</td>
|
||||
<td>{lang_whichdb}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>{lang_configpass}</b><br><input type="text" name="setting_{db_domain}[config_pass]" value="{config_pass}"></td>
|
||||
<td>{lang_passforconfig}</td>
|
||||
</tr>
|
||||
<!-- END domain -->
|
||||
|
Loading…
Reference in New Issue
Block a user