[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup manageheader.php,1.33,1.34
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup manageheader.php,1.33,1.34 |
Date: |
Sat, 06 Apr 2002 23:11:52 -0500 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv13049
Modified Files:
manageheader.php
Log Message:
Converted header management to use lang() and templates -- TRANSLATORS, SEE
lang/newheaderlangs FILE...
Index: manageheader.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/manageheader.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** manageheader.php 4 Mar 2002 02:55:53 -0000 1.33
--- manageheader.php 7 Apr 2002 04:11:50 -0000 1.34
***************
*** 31,39 ****
if (! $GLOBALS['HTTP_POST_VARS']['setting']['config_pass'])
{
! $errors .= "<br>You didn't enter a config password";
}
if (!
$GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
{
! $errors .= "<br>You didn't enter a header admin
password";
}
--- 31,39 ----
if (! $GLOBALS['HTTP_POST_VARS']['setting']['config_pass'])
{
! $errors .= '<br>' . lang("You didn't enter a config
password");
}
if (!
$GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
{
! $errors .= '<br>' . lang("You didn't enter a header
admin password");
}
***************
*** 58,81 ****
'T_login_main' => 'login_main.tpl',
'T_login_stage_header' => 'login_stage_header.tpl',
! 'T_setup_main' => 'setup_main.tpl',
! 'T_setup_db_blocks' => 'setup_db_blocks.tpl'
));
$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');
switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
{
case '1':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Create your header.inc.php';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'You have
not created your header.inc.php yet!<br> You can create it now.';
break;
case '2':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Your header admin password is NOT set. Please set it now!';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'Your
header admin password is NOT set. Please set it now!';
break;
case '3':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Your header.inc.php needs upgrading.';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = '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']['HeaderLoginMSG'] =
'Your header.inc.php needs upgrading.';
if (!$GLOBALS['phpgw_setup']->auth('Header'))
{
--- 58,81 ----
'T_login_main' => 'login_main.tpl',
'T_login_stage_header' => 'login_stage_header.tpl',
! 'T_setup_manage' => 'manageheader.tpl'
));
$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');
+ /* Detect current mode */
switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
{
case '1':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
lang('Create your header.inc.php');
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('You
have not created your header.inc.php yet!<br> You can create it now.');
break;
case '2':
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
lang('Your header admin password is NOT set. Please set it now!');
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your
header admin password is NOT set. Please set it now!');
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']['HeaderLoginMSG'] =
lang('Your header.inc.php needs upgrading.');
if (!$GLOBALS['phpgw_setup']->auth('Header'))
{
***************
*** 94,99 ****
exit;
}
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
'Edit your header.inc.php';
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = 'Edit your
existing header.inc.php';
break;
}
--- 94,99 ----
exit;
}
! $GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] =
lang('Edit your header.inc.php');
! $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Edit
your existing header.inc.php');
break;
}
***************
*** 104,111 ****
--- 104,115 ----
check_form_values();
$header_template =
CreateObject('phpgwapi.Template','../');
+ $b = CreateObject('phpgwapi.browser');
+
$b->content_header('header.inc.php','application/octet-stream');
+ /*
header('Content-disposition: attachment;
filename="header.inc.php"');
header('Content-type: application/octet-stream');
header('Pragma: no-cache');
header('Expires: 0');
+ */
$newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
echo $newheader;
***************
*** 115,127 ****
$header_template =
CreateObject('phpgwapi.Template','../');
$GLOBALS['phpgw_setup']->html->show_header('Generated
header.inc.php', False, 'header');
! echo '<br>Save this text as contents of your
header.inc.php<br><hr>';
$newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
echo '<pre>';
echo htmlentities($newheader);
echo '</pre><hr>';
! echo '<form action="index.php" method=post>';
! echo '<br> After retrieving the file put it into place
as the header.inc.php, then click continue.<br>';
! echo '<input type=hidden name="FormLogout"
value="header">';
! echo '<input type=submit name="junk" value="continue">';
echo '</form>';
echo '</body></html>';
--- 119,131 ----
$header_template =
CreateObject('phpgwapi.Template','../');
$GLOBALS['phpgw_setup']->html->show_header('Generated
header.inc.php', False, 'header');
! echo '<br>' . lang('Save this text as contents of your
header.inc.php') . '<br><hr>';
$newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
echo '<pre>';
echo htmlentities($newheader);
echo '</pre><hr>';
! echo '<form action="index.php" method="post">';
! echo '<br>' . lang('After retrieving the file, put it
into place as the header.inc.php. Then, click "continue".') . '<br>';
! echo '<input type="hidden" name="FormLogout"
value="header">';
! echo '<input type="submit" name="junk"
value="continue">';
echo '</form>';
echo '</body></html>';
***************
*** 130,134 ****
check_form_values();
$header_template =
CreateObject('phpgwapi.Template','../');
! if(is_writeable ('../header.inc.php')|| (!file_exists
('../header.inc.php') && is_writeable ('../')))
{
$newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
--- 134,138 ----
check_form_values();
$header_template =
CreateObject('phpgwapi.Template','../');
! if(is_writeable('../header.inc.php') ||
(!file_exists('../header.inc.php') && is_writeable('../')))
{
$newheader =
$GLOBALS['phpgw_setup']->html->generate_header();
***************
*** 137,144 ****
fclose($fsetup);
$GLOBALS['phpgw_setup']->html->show_header('Saved header.inc.php', False,
'header');
! echo '<form action="index.php" method=post>';
echo '<br>Created header.inc.php! ';
! echo '<input type=hidden name="FormLogout"
value="header">';
! echo '<input type=submit name="junk"
value="continue">';
echo '</form>';
echo '</body></html>';
--- 141,148 ----
fclose($fsetup);
$GLOBALS['phpgw_setup']->html->show_header('Saved header.inc.php', False,
'header');
! echo '<form action="index.php" method="post">';
echo '<br>Created header.inc.php! ';
! echo '<input type="hidden" name="FormLogout"
value="header">';
! echo '<input type="submit" name="junk"
value="continue">';
echo '</form>';
echo '</body></html>';
***************
*** 148,153 ****
{
$GLOBALS['phpgw_setup']->html->show_header('Error generating header.inc.php',
False, 'header');
! echo 'Could not open header.inc.php for
writing!<br>' . "\n";
! echo 'Please check read/write permissions on
directories or back up and use another option.<br>';
echo '</td></tr></table></body></html>';
}
--- 152,157 ----
{
$GLOBALS['phpgw_setup']->html->show_header('Error generating header.inc.php',
False, 'header');
! echo lang('Could not open header.inc.php for
writing!') . '<br>' . "\n";
! echo lang('Please check read/write permissions
on directories, or back up and use another option.') . '<br>';
echo '</td></tr></table></body></html>';
}
***************
*** 155,200 ****
default:
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['HeaderFormMSG'],
False, 'header');
! echo $GLOBALS['phpgw_info']['setup']['PageMSG'];
! /*
! echo '<table border="0" width="100%" cellspacing="0"
cellpadding="2">';
! echo ' <tr><td align="center" WIDTH="20%"
bgcolor="486591" colspan=2><font color="fefefe">Analysis</td></tr>';
! echo '</table>';
! */
! echo '<table border="0" width="100%" cellspacing="0"
cellpadding="2">';
! echo '<tr bgcolor="486591"><td align="center"
colspan=2><font color="fefefe"> Analysis </font></td></tr><tr><td colspan=2>';
! // Hardly try to find what DB-support is compiled in
! // this dont work with PHP 3.0.10 and lower !
$supported_db = array();
if (extension_loaded('mysql') ||
function_exists('mysql_connect'))
{
! echo 'You appear to have MySQL support
enabled<br>' . "\n";
$supported_db[] = 'mysql';
}
else
{
! echo 'No MySQL support found. Disabling<br>' .
"\n";
}
if (extension_loaded('pgsql') ||
function_exists('pg_connect'))
{
! echo 'You appear to have Postgres-DB support
enabled<br>' . "\n";
$supported_db[] = 'pgsql';
}
else
{
! echo 'No Postgres-DB support found.
Disabling<br>' . "\n";
}
if (extension_loaded('mssql') ||
function_exists('mssql_connect'))
{
! echo 'You appear to have Microsoft SQL Server
support enabled<br>' . "\n";
$supported_db[] = 'mssql';
}
else
{
! echo 'No Microsoft SQL Server support found.
Disabling<br>' . "\n";
}
if (extension_loaded('oci8'))
{
! echo 'You appear to have Oracle V8 (OCI)
support enabled<br>' . "\n";
$supported_db[] = 'oracle';
}
--- 159,198 ----
default:
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['HeaderFormMSG'],
False, 'header');
!
! $detected = $GLOBALS['phpgw_info']['setup']['PageMSG'];
! $detected .= '<table border="0" width="100%"
cellspacing="0" cellpadding="2">';
! $detected .= '<tr bgcolor="486591"><td align="center"
colspan="2"><font color="fefefe">' . lang('Analysis') .
'</font></td></tr><tr><td colspan="2">';
$supported_db = array();
if (extension_loaded('mysql') ||
function_exists('mysql_connect'))
{
! $detected .= lang('You appear to have MySQL
support enabled') . '<br>' . "\n";
$supported_db[] = 'mysql';
}
else
{
! $detected .= lang('No MySQL support found.
Disabling') . '<br>' . "\n";
}
if (extension_loaded('pgsql') ||
function_exists('pg_connect'))
{
! $detected .= lang('You appear to have
Postgres-DB support enabled') . '<br>' . "\n";
$supported_db[] = 'pgsql';
}
else
{
! $detected .= lang('No Postgres-DB support
found. Disabling') . '<br>' . "\n";
}
if (extension_loaded('mssql') ||
function_exists('mssql_connect'))
{
! $detected .= lang('You appear to have Microsoft
SQL Server support enabled') . '<br>' . "\n";
$supported_db[] = 'mssql';
}
else
{
! $detected .= lang('No Microsoft SQL Server
support found. Disabling') . '<br>' . "\n";
}
if (extension_loaded('oci8'))
{
! $detected .= lang('You appear to have Oracle V8
(OCI) support enabled') . '<br>' . "\n";
$supported_db[] = 'oracle';
}
***************
*** 203,217 ****
if(extension_loaded('oracle'))
{
! echo 'You appear to have Oracle support
enabled<br>' . "\n";
$supported_db[] = 'oracle';
}
else
{
! echo 'No Oracle-DB support found.
Disabling<br>' . "\n";
}
}
if(!count($supported_db))
{
! echo '<b><p align=center><font size=+2
color=red>did not found any valid DB support !<br>try to configure your php to
support one of the above mentioned dbs or install phpgroupware by hand
</font></p></b><td></tr></table></body></html>';
exit;
}
--- 201,220 ----
if(extension_loaded('oracle'))
{
! $detected .= lang('You appear to have
Oracle support enabled') . '<br>' . "\n";
$supported_db[] = 'oracle';
}
else
{
! $detected .= lang('No Oracle-DB support
found. Disabling') . '<br>' . "\n";
}
}
if(!count($supported_db))
{
! $detected .= '<b><p align="center"><font
size="+2" color="red">'
! . lang('Did not find any valid DB
support!')
! . '<br>'
! . lang('Try to configure your php to
support one of the above mentioned DBMS, or install phpGroupWare by hand.')
! .
'</font></p></b><td></tr></table></body></html>';
! echo $detected;
exit;
}
***************
*** 219,256 ****
if (floor(phpversion()) == 3)
{
! echo 'You appear to be using PHP3. Disabling
PHP4 sessions support<br>' . "\n";
$supported_sessions_type[] = 'db';
}
else
{
! echo 'You appear to be using PHP4. Enabling
PHP4 sessions support<br>' . "\n";
$supported_sessions_type[] = 'db';
$supported_sessions_type[] = 'php4';
}
! $no_guess = false;
if(file_exists('../header.inc.php') &&
is_file('../header.inc.php'))
{
! echo 'Found existing configuration file.
Loading settings from the file...<br>' . "\n";
$GLOBALS['phpgw_info']['flags']['noapi'] = True;
include('../header.inc.php');
$no_guess = true;
! /* This code makes sure the newer
multi-domain supporting header.inc.php is being used */
! if (!isset($phpgw_domain))
{
! echo 'Your using an old configuration
file format...<br>' . "\n";
! echo 'Importing old settings into the
new format....<br>' . "\n";
}
else
{
! if
($GLOBALS['phpgw_info']['server']['header_version'] !=
$GLOBALS['phpgw_info']['server']['current_header_version'])
{
! echo 'Your using an old
header.inc.php version...<br>' . "\n";
! echo 'Importing old settings
into the new format....<br>' . "\n";
}
reset($phpgw_domain);
$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'];
--- 222,271 ----
if (floor(phpversion()) == 3)
{
! $detected .= lang('You appear to be using PHP3.
Disabling PHP4 sessions support') . '<br>' . "\n";
$supported_sessions_type[] = 'db';
}
else
{
! $detected .= lang('You appear to be using PHP4.
Enabling PHP4 sessions support') . '<br>' . "\n";
$supported_sessions_type[] = 'db';
$supported_sessions_type[] = 'php4';
}
! /*
! if (extension_loaded('xml') ||
function_exists('xml_parser_create'))
! {
! $detected .= lang('You appear to have XML
support enabled') . '<br>' . "\n";
! $xml_enabled = 'True';
! }
! else
! {
! $detected .= lang('No XML support found.
Disabling') . '<br>' . "\n";
! }
! */
!
! $no_guess = False;
if(file_exists('../header.inc.php') &&
is_file('../header.inc.php'))
{
! $detected .= lang('Found existing configuration
file. Loading settings from the file...') . '<br>' . "\n";
$GLOBALS['phpgw_info']['flags']['noapi'] = True;
include('../header.inc.php');
$no_guess = true;
! /* This code makes sure the newer multi-domain
supporting header.inc.php is being used */
! if(!isset($phpgw_domain))
{
! $detected .= lang("You're using an old
configuration file format...") . '<br>' . "\n";
! $detected .= lang('Importing old
settings into the new format....') . '<br>' . "\n";
}
else
{
!
if($GLOBALS['phpgw_info']['server']['header_version'] !=
$GLOBALS['phpgw_info']['server']['current_header_version'])
{
! $detected .= lang("You're using
an old header.inc.php version...") . '<br>' . "\n";
! $detected .= lang('Importing
old settings into the new format....') . '<br>' . "\n";
}
reset($phpgw_domain);
$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'];
***************
*** 265,273 ****
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT;
}
! elseif
(!isset($GLOBALS['phpgw_info']['server']['include_root']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
}
! elseif
(!isset($GLOBALS['phpgw_info']['server']['header_version']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
--- 280,288 ----
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT;
}
!
elseif(!isset($GLOBALS['phpgw_info']['server']['include_root']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
}
!
elseif(!isset($GLOBALS['phpgw_info']['server']['header_version']) &&
$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
{
$GLOBALS['phpgw_info']['server']['include_root'] =
$GLOBALS['phpgw_info']['server']['server_root'];
***************
*** 276,280 ****
else
{
! echo 'sample configuration not found. using
built in defaults<br>' . "\n";
$GLOBALS['phpgw_info']['server']['server_root']
= '/path/to/phpgroupware';
$GLOBALS['phpgw_info']['server']['include_root'] = '/path/to/phpgroupware';
--- 291,295 ----
else
{
! $detected .= lang('Sample configuration not
found. using built in defaults') . '<br>' . "\n";
$GLOBALS['phpgw_info']['server']['server_root']
= '/path/to/phpgroupware';
$GLOBALS['phpgw_info']['server']['include_root'] = '/path/to/phpgroupware';
***************
*** 300,306 ****
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L',
!
'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
! for ($i=0; $i<30; $i++)
{
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .=
$random_char[rand(1,count($random_char))];
--- 315,322 ----
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
'w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L',
!
'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
! );
! for($i=0; $i<30; $i++)
{
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .=
$random_char[rand(1,count($random_char))];
***************
*** 311,315 ****
if(!$no_guess)
{
! echo 'Now guessing better values for defaults
<br>' . "\n";
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace('/setup','',$this_dir);
--- 327,331 ----
if(!$no_guess)
{
! $detected .= lang('Now guessing better values
for defaults...') . '<br>' . "\n";
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace('/setup','',$this_dir);
***************
*** 317,430 ****
$GLOBALS['phpgw_info']['server']['include_root'] = $updir;
}
! ?>
! </td></tr>
! <tr bgcolor="486591"><th colspan="2"><font
color="fefefe">Settings</font></th></tr>
! <form action="manageheader.php" method="post">
! <input type="hidden" name="setting[write_config]" value="true">
! <tr><td colspan="2"><b>Server Root</b><br><input type="text"
name="setting[server_root]" size="80" value="<?php echo
$GLOBALS['phpgw_info']['server']['server_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Include Root (this should be the same as
Server Root unless you know what you are doing)</b><br><input type="text"
name="setting[include_root]" size="80" value="<?php echo
$GLOBALS['phpgw_info']['server']['include_root'] ?>"></td></tr>
! <tr><td colspan="2"><b>Admin password to header manager
</b><br><input type="text" name="setting[HEADER_ADMIN_PASSWORD]" size="80"
value="<?php echo $GLOBALS['phpgw_info']['server']['header_admin_password']
?>"></td></tr>
! <br><br>
! <tr><td><b>DB Host</b><br><input type="text" name="setting[db_host]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_host']
?>"></td><td>Hostname/IP of Databaseserver</td></tr>
! <tr><td><b>DB Name</b><br><input type="text" name="setting[db_name]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_name'] ?>"></td><td>Name
of Database</td></tr>
! <tr><td><b>DB User</b><br><input type="text" name="setting[db_user]"
value="<?php echo $GLOBALS['phpgw_info']['server']['db_user'] ?>"></td><td>Name
of DB User as phpgroupware has to connect as</td></tr>
! <tr><td><b>DB Password</b><br><input type="text"
name="setting[db_pass]" value="<?php echo
$GLOBALS['phpgw_info']['server']['db_pass'] ?>"></td><td>Password of DB
User</td></tr>
! <tr><td><b>DB Type</b><br><select name="setting[db_type]">
! <?php
! $selected = '';
! $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 = '';
}
! print '<option ' . $selected . ' value="' . $v . '">' .
$v . "\n";
! }
! ?>
! </select>
! </td><td>What Database do you want to use with PHPGroupWare?</td></tr>
!
! <tr><td><b>Configuration Password</b><br><input type=text
name="setting[config_pass]" value="<?php echo
$GLOBALS['phpgw_info']['server']['config_passwd'] ?>"></td><td>Password needed
for configuration</td></tr>
! <tr><td><b>Persistent connection</b><br>
! <select type="checkbox" name="setting[db_persistent]">
! <option value="True"<?php echo
($GLOBALS['phpgw_info']['server']['db_persistent']?' selected':'');
?>>True</option>
! <option value="False"<?php echo (!
$GLOBALS['phpgw_info']['server']['db_persistent']?' selected':'');
?>>False</option>
! </select></td>
! <td>Do you want persistent connections (higher performance, but eats
memory)</td></tr>
!
! <tr><td><b>Sessions Type</b><br><select name="setting[sessions_type]">
! <?php
! $selected = '';
! while(list($k,$v) = each($supported_sessions_type))
! {
! if($v ==
$GLOBALS['phpgw_info']['server']['sessions_type'])
{
! $selected = ' selected ';
}
else
{
! $selected = '';
}
- print '<option ' . $selected . ' value="' . $v . '">' .
$v . "\n";
- }
- ?>
- </select>
- </td><td>What sessions management type do you want to use (PHP4
session management often performs better)?</td></tr>
- <tr><td colspan=2><b>Enable MCrypt</b><br>
- <select name="setting[enable_mcrypt]">
- <?php if($GLOBALS['phpgw_info']["server"]["mcrypt_enabled"] == True)
{ ?>
- <option value="True" selected>True
- <option value="False">False
- <?php } else { ?>
- <option value="True">True
- <option value="False" selected>False
- <?php } ?>
- </select>
- </td></tr>
- <tr><td><b>MCrypt version</b><br><input type="text"
name="setting[mcrypt_version]" value="<?php echo
$GLOBALS['phpgw_info']['server']['versions']['mcrypt'] ?>"></td><td>Set this to
"old" for versions < 2.4, otherwise the exact mcrypt version you
use</td></tr>
- <tr><td><b>MCrypt initilazation vector</b><br><input type="text"
name="setting[mcrypt_iv]" value="<?php echo
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] ?>" size="30"></td><td>It should
be around 30 bytes in length.<br>Note: The default has been randomly
generated.</td></tr>
- <tr><td><b>Domain select box on login</b><br>
- <select name="setting[domain_selectbox]">
- <option value="True"<?php echo
($GLOBALS['phpgw_info']['server']['domain_selectbox']?' selected':'');
?>>True</option>
- <option value="False"<?php echo (!
$GLOBALS['phpgw_info']['server']['domain_selectbox']?' selected':'');
?>>False</option>
- </select></td><td> </td>
- </tr>
- </table>
- <?php
- if(!$found_dbtype)
- {
- echo '<br><font color=red>Warning!<br>The db_type in
defaults ('.$GLOBALS['phpgw_info']['server']['db_type'].') is not supported on
this server. using first supported type.</font>';
- }
- echo "<br>";
! if(is_writeable ('../header.inc.php')|| (!file_exists
('../header.inc.php') && is_writeable ('../')))
! {
! echo '<input type=submit name="action" value="write
config">';
! echo ' or <input type=submit name="action"
value="download"> or <input type=submit name="action" value="view"> the
file.</form>';
! }
! else
! {
! echo 'Cannot create the header.inc.php due to file
permission restrictions.<br> Instead you can ';
! echo '<input type=submit name="action"
value="download">or <input type=submit name="action" value="view"> the
file.</form>';
! }
! echo '<form action="index.php" method=post>';
! echo '<br> After retrieving the file put it into place as the
header.inc.php, then click continue.<br>';
! echo '<input type=hidden name="FormLogout" value="header">';
! //echo '<input type=hidden name="FormLogout" value="config">';
! //echo '<input type=hidden name="ConfigLogin" value="Login">';
! //echo '<input type=hidden name="FormPW"
value="'.$phpgw_domain[$GLOBALS['phpgw_info']["server"]["default_domain"]]["config_passwd"].'">';
! //echo '<input type=hidden name="FormDomain"
value="'.$GLOBALS['phpgw_info']["server"]["default_domain"].'">';
! echo '<input type=submit name="junk" value="continue">';
! echo '</form>';
! echo '</body>';
! echo '</html>';
! break; // ending the switch default
}
?>
--- 333,464 ----
$GLOBALS['phpgw_info']['server']['include_root'] = $updir;
}
!
! $setup_tpl->set_var('detected',$detected);
! /* End of detected settings, now display the form with
the detected or prior values */
!
!
$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'])
{
! $setup_tpl->set_var('db_persistent_yes','
selected');
}
else
{
! $setup_tpl->set_var('db_persistent_no','
selected');
}
!
! $selected = '';
! $session_type_option = '';
! while(list($k,$v) = each($supported_sessions_type))
{
! if($v ==
$GLOBALS['phpgw_info']['server']['sessions_type'])
! {
! $selected = ' selected ';
! }
! else
! {
! $selected = '';
! }
! $session_options .= '<option ' . $selected . '
value="' . $v . '">' . $v . "\n";
! }
! $setup_tpl->set_var('session_options',$session_options);
!
! if($GLOBALS['phpgw_info']['server']['mcrypt_enabled'])
! {
! $setup_tpl->set_var('mcrypt_enabled_yes','
selected');
}
else
{
! $setup_tpl->set_var('mcrypt_enabled_no','
selected');
}
!
$setup_tpl->set_var('mcrypt',$GLOBALS['phpgw_info']['server']['versions']['mcrypt']);
!
$setup_tpl->set_var('mcrypt_iv',$GLOBALS['phpgw_info']['server']['mcrypt_iv']);
!
! if($GLOBALS['phpgw_info']['server']['domain_selectbox'])
! {
! $setup_tpl->set_var('domain_selectbox_yes','
selected');
! }
! else
! {
! $setup_tpl->set_var('domain_selectbox_no','
selected');
! }
!
! $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') ||
! (!file_exists('../header.inc.php') &&
is_writeable('../')))
! {
! $errors .= '<br><input type="submit"
name="action" value="write config"> '
! . lang('or') . ' <input
type="submit" name="action" value="download"> '
! . lang('or') . ' <input
type=submit name="action" value="view"> the file.</form>';
! }
! else
! {
! $errors .= '<br>'
! . lang('Cannot create the
header.inc.php due to file permission restrictions.<br> Instead you can x the
file.',
! '<input type="submit" name="action"
value="download">' . lang('or') . ' <input type="submit" name="action"
value="view">')
! . '</form>';
! }
! $setup_tpl->set_var('errors',$errors);
!
! $setup_tpl->set_var('lang_settings',lang('Settings'));
! $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_dbname',lang('DB Name'));
! $setup_tpl->set_var('lang_dbuser',lang('DB User'));
! $setup_tpl->set_var('lang_dbpass',lang('DB Password'));
! $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'));
! $setup_tpl->set_var('lang_passforconfig',lang('Password
needed for configuration'));
! $setup_tpl->set_var('lang_persist',lang('Persistent
connections'));
! $setup_tpl->set_var('lang_persistdescr',lang('Do you
want persistent connections (higher performance, but consumes more
resources)'));
! $setup_tpl->set_var('lang_sesstype',lang('Sessions
Type'));
! $setup_tpl->set_var('lang_sesstypedescr',lang('What
type of sessions management do you want to use (PHP4 session management may
perform better)?'));
! $setup_tpl->set_var('lang_enablemcrypt',lang('Enable
MCrypt'));
! $setup_tpl->set_var('lang_mcryptversion',lang('MCrypt
version'));
! $setup_tpl->set_var('lang_mcryptversiondescr',lang('Set
this to "old" for versions < 2.4, otherwise the exact mcrypt version you
use.'));
! $setup_tpl->set_var('lang_mcryptiv',lang('MCrypt
initialization vector'));
! $setup_tpl->set_var('lang_mcryptivdescr',lang('This
should be around 30 bytes in length.<br>Note: The default has been randomly
generated.'));
! $setup_tpl->set_var('lang_domselect',lang('Domain
select box on login'));
! $setup_tpl->set_var('lang_finaldescr',lang('After
retrieving the file, put it into place as the header.inc.php. Then, click
"continue".'));
! $setup_tpl->pfp('out','T_setup_manage');
! break; // ending the switch default
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup manageheader.php,1.33,1.34,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup/templates/default manageheader.tpl,NONE,1.1
- Next by Date:
[Phpgroupware-cvs] CVS: setup/lang newheaderlangs,NONE,1.1 phpgw_en.lang,1.19,1.20
- Previous by thread:
[Phpgroupware-cvs] CVS: setup/templates/default manageheader.tpl,NONE,1.1
- Next by thread:
[Phpgroupware-cvs] CVS: setup/lang newheaderlangs,NONE,1.1 phpgw_en.lang,1.19,1.20
- Index(es):