[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] setup/manageheader.php, 1.48
From: |
nomail |
Subject: |
[Phpgroupware-cvs] setup/manageheader.php, 1.48 |
Date: |
Thu, 30 Dec 2004 09:43:15 +0100 |
Update of /setup
Modified Files:
Branch:
manageheader.php
date: 2004/12/30 08:43:15; author: skwashd; state: Exp; lines: +74 -27
Log Message:
adding missing files to new HEAD
=====================================================================
Index: setup/manageheader.php
diff -u setup/manageheader.php:1.47 setup/manageheader.php:1.48
--- setup/manageheader.php:1.47 Sun May 18 22:06:01 2003
+++ setup/manageheader.php Thu Dec 30 08:43:15 2004
@@ -42,8 +42,8 @@
{
continue;
}
- $dom = get_var('setting_'.$k,Array('POST'));
- if(!$dom['config_pass'])
+ //$dom = get_var("settings['$k']", Array('POST'));
+ if(!$_POST['settings'][$k]['config_pass'])
{
$errors .= '<br>' . lang("You didn't enter a
config password for domain %1",$v);
}
@@ -81,6 +81,8 @@
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
$setup_tpl->set_block('T_setup_manage','manageheader','manageheader');
$setup_tpl->set_block('T_setup_manage','domain','domain');
+
+ $setup_tpl->set_var('HeaderLoginWarning', lang('Warning: All your
passwords (database, phpGroupWare admin,...)<br> will be shown in plain text
after you log in for header administration.'));
/* Detect current mode */
switch($GLOBALS['phpgw_info']['setup']['stage']['header'])
@@ -95,7 +97,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><b>MAKE BACKUPS!</b>');
+ $GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your
header.inc.php needs upgrading.<br><blink><b
class="msg">WARNING!</b></blink><br><b>MAKE BACKUPS!</b>');
$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] =
lang('Your header.inc.php needs upgrading.');
if (!$GLOBALS['phpgw_setup']->auth('Header'))
{
@@ -118,7 +120,9 @@
break;
}
- switch(@get_var('action',Array('POST')))
+ $action = @get_var('action',Array('POST'));
+ list($action) = @each($action);
+ switch($action)
{
case 'download':
check_form_values();
@@ -146,11 +150,11 @@
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 '<input type="submit" name="junk"
value="'.lang('Continue').'">';
echo '</form>';
echo '</body></html>';
break;
- case 'write config':
+ case 'write':
check_form_values();
$header_template = CreateObject('setup.Template','../');
if(is_writeable('../header.inc.php') ||
(!file_exists('../header.inc.php') && is_writeable('../')))
@@ -163,7 +167,7 @@
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 '<input type="submit" name="junk"
value="'.lang('Continue').'">';
echo '</form>';
echo '</body></html>';
break;
@@ -179,13 +183,21 @@
default:
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['HeaderFormMSG'],
False, 'header');
- $detected = $GLOBALS['phpgw_info']['setup']['PageMSG'];
+ $detected = '';
- $detected .= '<p><b>Please consult the <a
href="../doc/en_US/html/admin/" target="manual">phpGroupWare Administration
Manual</a>.</b></p>';
- $detected .= '<b>If you running this the first time,
don\'t forget to manualy <a href="../doc/en_US/html/admin/x62.html#AEN134"
target="manual">Setup the database</a> !!!</b>';
+ if (!$ConfigLang)
+ {
+ $_POST['ConfigLang'] = 'en';
+ $detected .= '<br><form
action="manageheader.php" method="Post">Please Select your language
'.lang_select(True)."</form>\n";
+ }
+
+ $detected .= '<table border="0" width="100%"
cellspacing="0" cellpadding="0" style="{ border: 1px solid #000000; }">' . "\n";
+
+ $detected .= '<tr><td colspan="2"><p>' .
$GLOBALS['phpgw_info']['setup']['PageMSG'] . '<br /> </p></td></tr>';
+ $manual = '<a href="../doc/en_US/html/admin/"
target="manual">'.lang('phpGroupWare Administration Manual').'</a>';
+ $detected .= '<tr><td colspan="2"><p><b>'.lang('Please
consult the %1.',$manual).'</b><br> </td></tr>'. "\n";
- $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">';
+ $detected .= '<tr class="th"><td colspan="2">' .
lang('Analysis') . '</td></tr><tr><td colspan="2">'. "\n";
$supported_db = array();
if (extension_loaded('mysql') ||
function_exists('mysql_connect'))
@@ -232,21 +244,33 @@
$detected .= lang('No Oracle-DB support
found. Disabling') . '<br>' . "\n";
}
}
+ if (extension_loaded('odbc') ||
function_exists('odbc_connect'))
+ {
+ $detected .= lang('You appear to have
ODBC/SAPDB support enabled') . '<br />' . "\n";
+ $supported_db[] = 'sapdb';
+ }
+ else
+ {
+ $detected .= lang('No ODBC/SAPDB support found.
Disabling') . '<br />' . "\n";
+ }
if(!count($supported_db))
{
- $detected .= '<b><p align="center"><font
size="+2" color="red">'
+ $detected .= '<b><p align="center" class="msg">'
. lang('Did not find any valid DB
support!')
- . '<br>'
+ . "<br>\n"
. 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>';
+ .
'</p></b><td></tr></table></body></html>';
echo $detected;
exit;
}
- if (floor(phpversion()) == 3)
+ if (!function_exists('version_compare'))
{
- $detected .= lang('You appear to be using PHP3.
Disabling PHP4 sessions support') . '<br>' . "\n";
- $supported_sessions_type[] = 'db';
+ $detected .= '<b><p align="center" class="msg">'
+ . lang('You appear to be using PHP
earlier than 4.1.0. phpGroupWare now requires 4.1.0 or later'). "\n"
+ .
'</p></b><td></tr></table></body></html>';
+ echo $detected;
+ exit;
}
else
{
@@ -267,6 +291,15 @@
}
*/
+ if(extension_loaded('imap') ||
function_exists('imap_open'))
+ {
+ $detected .= lang('You appear to have IMAP
support enabled') . '<br>' . "\n";
+ }
+ else
+ {
+ $detected .= lang('No IMAP support found.
Disabling IMAP email access') . '<br>' . "\n";
+ }
+
$no_guess = False;
if(file_exists('../header.inc.php') &&
is_file('../header.inc.php') && is_readable('../header.inc.php'))
{
@@ -292,7 +325,7 @@
unset($default_domain); // we kill this
for security reasons
$GLOBALS['phpgw_info']['server']['config_passwd'] =
$GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['config_passwd'];
- if(@$adddomain)
+ if(@$_POST['adddomain'])
{
$GLOBALS['phpgw_domain'][lang('new')] = array();
}
@@ -350,8 +383,8 @@
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';
+ $GLOBALS['phpgw_info']['server']['server_root']
= realpath('../'); //'/path/to/phpgroupware';
+
$GLOBALS['phpgw_info']['server']['include_root'] =
realpath('../');//'/path/to/phpgroupware';
/* This is the basic include needed on each
page for phpGroupWare application compliance */
$GLOBALS['phpgw_info']['flags']['htmlcompliant'] = True;
@@ -402,7 +435,7 @@
{
$detected .= lang('Now guessing better values
for defaults...') . '<br>' . "\n";
$this_dir =
dirname($_SERVER['SCRIPT_FILENAME']);
- $updir = str_replace('/setup','',$this_dir);
+ $updir = realpath('../');
//str_replace('/setup','',$this_dir);
$GLOBALS['phpgw_info']['server']['server_root']
= $updir;
$GLOBALS['phpgw_info']['server']['include_root'] = $updir;
}
@@ -463,6 +496,15 @@
$setup_tpl->set_var('domain_selectbox_no','
selected');
}
+
if(@$GLOBALS['phpgw_info']['server']['domain_from_host'])
+ {
+ $setup_tpl->set_var('domain_from_host_yes','
selected');
+ }
+ else
+ {
+ $setup_tpl->set_var('domain_from_host_no','
selected');
+ }
+
$errors = '';
if(!$found_dbtype)
{
@@ -476,17 +518,18 @@
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>';
+ $errors .= '<br><input type="submit"
name="action[write]" value="'.lang('Write config').'"> '
+ . lang('or') . ' <input
type="submit" name="action[download]" value="'.lang('Download').'"> '
+ . lang('or') . ' <input
type=submit name="action[view]" value="'.lang('View').'"> '.lang('the
file').'.</form>';
}
else
{
$errors .= '<br>'
. lang('Cannot create the
header.inc.php due to file permission restrictions.<br> Instead you can %1 the
file.',
- '<input type="submit" name="action"
value="download">' . lang('or') . ' <input type="submit" name="action"
value="view">')
+ '<input type="submit"
name="action[download]" value="'.lang('Download').'">' . lang('or') .
' <input type="submit" name="action[view]" value="'.lang('View').'">')
. '</form>';
}
+
$setup_tpl->set_var('errors',$errors);
$setup_tpl->set_var('lang_settings',lang('Settings'));
@@ -516,9 +559,13 @@
$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_domain_from_host',
lang('Automatically detect domain from hostname'));
+ $setup_tpl->set_var('lang_note_domain_from_host',
lang('Note: This option will only work if show domain select box is off.'));
$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->set_var('lang_continue',lang('Continue'));
$setup_tpl->pfp('out','manageheader');
break; // ending the switch default
}
?>
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] setup/manageheader.php, 1.48,
nomail <=