Changes to allow register_globals to be off

This commit is contained in:
Miles Lott 2001-08-21 18:48:50 +00:00
parent dddf896338
commit e0db915670
14 changed files with 434 additions and 320 deletions

View File

@ -109,18 +109,23 @@
//var_dump($setup_info);exit;
@ksort($setup_info);
if ($cancel)
if ($HTTP_POST_VARS['cancel'])
{
Header("Location: index.php");
exit;
}
if ($submit)
if ($HTTP_POST_VARS['submit'])
{
$phpgw_setup->show_header(lang('Application Management'),False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')');
$setup_tpl->set_var('description',lang('App install/remove/upgrade') . ':');
$setup_tpl->pparse('out','header');
$appname = $HTTP_POST_VARS['appname'];
$remove = $HTTP_POST_VARS['remove'];
$install = $HTTP_POST_VARS['install'];
$upgrade = $HTTP_POST_VARS['upgrade'];
while (list($appname,$key) = @each($remove))
{
$terror = array();
@ -202,8 +207,9 @@
$phpgw_setup->show_header(lang('Application Management'),False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')');
}
if($detail)
if($HTTP_GET_VARS['detail'])
{
$detail = $HTTP_GET_VARS['detail'];
@ksort($setup_info[$detail]);
@reset($setup_info[$detail]);
$setup_tpl->set_var('description',lang('App details') . ':');
@ -238,8 +244,11 @@
$setup_tpl->pparse('out','footer');
exit;
}
elseif ($resolve)
elseif ($HTTP_GET_VARS['resolve'])
{
$resolve = $HTTP_GET_VARS['resolve'];
$version = $HTTP_GET_VARS['version'];
$notables = $HTTP_GET_VARS['notables'];
$setup_tpl->set_var('description',lang('Problem resolution'). ':');
$setup_tpl->pparse('out','header');
if ($badinstall)

View File

@ -52,7 +52,7 @@
$current_config['temp_dir'] = '/path/to/temp/dir';
}
if ($cancel)
if ($HTTP_POST_VARS['cancel'])
{
Header('Location: index.php');
exit;
@ -69,13 +69,15 @@
$configtbl = 'phpgw_config';
}
if ($submit && $newsettings)
if ($HTTP_POST_VARS['submit'] && $HTTP_POST_VARS['newsettings'])
{
$phpgw_setup->db->transaction_begin();
/* This is only temp: */
$phpgw_setup->db->query("DELETE FROM $configtbl WHERE config_name='useframes'");
$phpgw_setup->db->query("INSERT INTO $configtbl (config_app,config_name, config_value) values ('phpgwapi','useframes','never')");
$newsettings = $HTTP_POST_VARS['newsettings'];
while (list($setting,$value) = @each($newsettings))
{
// echo '<br>Updating: ' . $setting . '=' . $value;

View File

@ -307,7 +307,8 @@
if ($DEBUG) { echo '<br>AlterColumn: calling _GetFieldSQL for ' . $sNewColumnName; }
if ($oProc->_GetFieldSQL($aTables[$sTableName]["fd"][$sColumnName], $sNewColumnSQL))
{
return !!($oProc->m_odb->query("ALTER TABLE $sTableName MODIFY $sColumnName " . $sNewColumnSQL));
/* return !!($oProc->m_odb->query("ALTER TABLE $sTableName MODIFY $sColumnName " . $sNewColumnSQL)); */
return !!($oProc->m_odb->query("ALTER TABLE $sTableName CHANGE $sColumnName $sColumnName " . $sNewColumnSQL));
}
return false;

View File

@ -27,21 +27,29 @@
*/
function loaddb()
{
global $phpgw_info, $phpgw_domain, $ConfigDomain;
/* Database setup */
if (!isset($phpgw_info["server"]["api_inc"]))
{
$phpgw_info["server"]["api_inc"] = PHPGW_SERVER_ROOT . "/phpgwapi/inc";
}
include($phpgw_info["server"]["api_inc"] . "/class.db_".$phpgw_domain[$ConfigDomain]["db_type"].".inc.php");
$this->db = new db;
$this->db->Host = $phpgw_domain[$ConfigDomain]["db_host"];
$this->db->Type = $phpgw_domain[$ConfigDomain]["db_type"];
$this->db->Database = $phpgw_domain[$ConfigDomain]["db_name"];
$this->db->User = $phpgw_domain[$ConfigDomain]["db_user"];
$this->db->Password = $phpgw_domain[$ConfigDomain]["db_pass"];
global $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
//$phpgw_schema_proc = new phpgw_schema_proc($phpgw_domain[$ConfigDomain]["db_type"]);
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ? $HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
if(empty($ConfigDomain))
{
/* This is to fix the reading of this value immediately after the cookie was set on login */
$ConfigDomain = $HTTP_POST_VARS['FormDomain'];
}
$phpgw_domain = $GLOBALS['phpgw_domain'];
$phpgw_info = $GLOBALS['phpgw_info'];
/* Database setup */
if (!isset($phpgw_info['server']['api_inc']))
{
$phpgw_info['server']['api_inc'] = PHPGW_SERVER_ROOT . '/phpgwapi/inc';
}
include($phpgw_info['server']['api_inc'] . '/class.db_'.$phpgw_domain[$ConfigDomain]['db_type'].'.inc.php');
$this->db = new db;
$this->db->Host = $phpgw_domain[$ConfigDomain]['db_host'];
$this->db->Type = $phpgw_domain[$ConfigDomain]['db_type'];
$this->db->Database = $phpgw_domain[$ConfigDomain]['db_name'];
$this->db->User = $phpgw_domain[$ConfigDomain]['db_user'];
$this->db->Password = $phpgw_domain[$ConfigDomain]['db_pass'];
}
/*!
@ -51,7 +59,21 @@
*/
function auth($auth_type = "Config")
{
global $phpgw_domain, $phpgw_info, $HTTP_POST_VARS, $FormLogout, $ConfigLogin, $HeaderLogin, $FormDomain, $FormPW, $ConfigDomain, $ConfigPW, $HeaderPW, $ConfigLang;
global $HTTP_POST_VARS, $HTTP_GET_VARS, $HTTP_COOKIE_VARS;
$phpgw_domain = $GLOBALS['phpgw_domain'];
$phpgw_info = $GLOBALS['phpgw_info'];
$FormLogout = $HTTP_GET_VARS['FormLogout'];
$ConfigLogin = $HTTP_POST_VARS['ConfigLogin'] ? $HTTP_POST_VARS['ConfigLogin'] : $HTTP_COOKIE_VARS['ConfigLogin'];
$HeaderLogin = $HTTP_POST_VARS['HeaderLogin'] ? $HTTP_POST_VARS['HeaderLogin'] : $HTTP_COOKIE_VARS['HeaderLogin'];
$FormDomain = $HTTP_POST_VARS['FormDomain'];
$FormPW = $HTTP_POST_VARS['FormPW'];
$ConfigDomain = $HTTP_POST_VARS['ConfigDomain'] ? $HTTP_POST_VARS['ConfigDomain'] : $HTTP_COOKIE_VARS['ConfigDomain'];
$ConfigPW = $HTTP_POST_VARS['ConfigPW'] ? $HTTP_POST_VARS['ConfigPW'] : $HTTP_COOKIE_VARS['ConfigPW'];
$HeaderPW = $HTTP_POST_VARS['HeaderPW'];
$ConfigLang = $HTTP_POST_VARS['ConfigLang'] ? $HTTP_POST_VARS['ConfigLang'] : $HTTP_COOKIE_VARS['ConfigLang'];
if (isset($FormLogout))
{
if ($FormLogout == 'config' ||

View File

@ -52,7 +52,7 @@
function show_header($title = '',$nologoutbutton = False, $logoutfrom = 'config', $configdomain = '')
{
global $phpgw_info, $setup_tpl, $PHP_SELF;
global $phpgw_info, $setup_tpl, $HTTP_SERVER_VARS;
$setup_tpl->set_var('lang_charset',lang('charset'));
if ($nologoutbutton)
@ -61,7 +61,7 @@
}
else
{
$btn_logout = '<a href="'.$PHP_SELF.'?FormLogout='.$logoutfrom.'" class="link">'.lang('Logout').'</a>';
$btn_logout = '<a href="'.basename($HTTP_SERVER_VARS['REQUEST_URI']).'?FormLogout='.$logoutfrom.'" class="link">'.lang('Logout').'</a>';
}
$setup_tpl->set_var('lang_setup', lang('setup'));
@ -82,7 +82,7 @@
function show_footer()
{
global $phpgw_info, $setup_tpl, $PHP_SELF;
global $phpgw_info, $setup_tpl;
$setup_tpl->pparse('out','T_footer');
unset($setup_tpl);
@ -90,7 +90,7 @@
function show_alert_msg($alert_word='Setup alert',$alert_msg='setup alert (generic)')
{
global $phpgw_info, $setup_tpl, $PHP_SELF;
global $phpgw_info, $setup_tpl;
$setup_tpl->set_var('V_alert_word',$alert_word);
$setup_tpl->set_var('V_alert_msg',$alert_msg);
@ -100,7 +100,7 @@
function make_frm_btn_simple($pre_frm_blurb='',$frm_method='POST',$frm_action='',$input_type='submit',$input_value='',$post_frm_blurb='')
{
// are these golbals necessary?
global $phpgw_info, $setup_tpl, $PHP_SELF;
global $phpgw_info, $setup_tpl;
// a simple form has simple components
$simple_form =
@ -115,7 +115,7 @@
function make_href_link_simple($pre_link_blurb='',$href_link='',$href_text='default text',$post_link_blurb='')
{
// are these golbals necessary?
global $phpgw_info, $setup_tpl, $PHP_SELF;
global $phpgw_info, $setup_tpl;
// a simple href link has simple components
$simple_link =
@ -127,7 +127,7 @@
function login_form()
{
global $phpgw_info, $phpgw_domain, $setup_tpl, $PHP_SELF;
global $phpgw_info, $phpgw_domain, $setup_tpl;
// begin use TEMPLATE login_main.tpl
$setup_tpl->set_var('ConfigLoginMSG',$phpgw_info['setup']['ConfigLoginMSG']);

View File

@ -34,7 +34,11 @@
*/
function init_process()
{
global $phpgw_domain,$ConfigDomain;
global $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
$ConfigDomain = $HTTP_COOKIE_VARS['ConfigDomain'] ? $HTTP_COOKIE_VARS['ConfigDomain'] : $HTTP_POST_VARS['ConfigDomain'];
$phpgw_domain = $GLOBALS['phpgw_domain'];
$phpgw_info = $GLOBALS['phpgw_info'];
$this->oProc = CreateObject('setup.schema_proc',$phpgw_domain[$ConfigDomain]['db_type']);
//$this->oProc = CreateObject('setup.schema_proc','pgsql');

View File

@ -32,7 +32,52 @@
define('PHPGW_INCLUDE_ROOT','..');
}
function CreateObject($classname, $constructor_param = "")
function CreateObject($class,
$p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_',
$p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_',
$p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_',
$p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_')
{
global $phpgw_info, $phpgw, $phpgw_domain;
/* error_reporting(0); */
list($appname,$classname) = explode(".", $class);
if (!isset($GLOBALS['phpgw_info']['flags']['included_classes'][$classname]) ||
!$GLOBALS['phpgw_info']['flags']['included_classes'][$classname])
{
$GLOBALS['phpgw_info']['flags']['included_classes'][$classname] = True;
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
}
if ($p1 == '_UNDEF_' && $p1 != 1)
{
eval('$obj = new ' . $classname . ';');
}
else
{
$input = array($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16);
$i = 1;
$code = '$obj = new ' . $classname . '(';
while (list($x,$test) = each($input))
{
if (($test == '_UNDEF_' && $test != 1 ) || $i == 17)
{
break;
}
else
{
$code .= '$p' . $i . ',';
}
$i++;
}
$code = substr($code,0,-1) . ');';
eval($code);
}
/* error_reporting(E_ERROR | E_WARNING | E_PARSE); */
return $obj;
}
function oldCreateObject($classname, $constructor_param = "")
{
global $phpgw, $phpgw_info, $phpgw_domain;
$classpart = explode (".", $classname);
@ -42,7 +87,6 @@
{
$phpgw_info["flags"]["included_classes"][$classname] = True;
include(PHPGW_INCLUDE_ROOT."/".$appname."/inc/class.".$classname.".inc.php");
// include("/var/www/phpgroupware/".$appname."/inc/class.".$classname.".inc.php");
}
if ($constructor_param == "")
{

View File

@ -52,7 +52,7 @@
$phpgw_info['setup']['stage']['header'] = $phpgw_setup->check_header();
if ($phpgw_info['setup']['stage']['header'] != '10')
{
Header("Location: manageheader.php");
Header('Location: manageheader.php');
exit;
}
elseif (!$phpgw_setup->auth('Config'))
@ -145,7 +145,7 @@
$setup_tpl->set_var('notcomplete',lang('not complete'));
$setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly'));
$setup_tpl->set_var('createdb',lang('Or we can attempt to create the database for you:'));
switch ($phpgw_domain[$ConfigDomain]["db_type"])
switch ($phpgw_domain[$ConfigDomain]['db_type'])
{
case 'mysql':
$setup_tpl->set_var('instr',lang('mysqlinstr'));
@ -197,24 +197,24 @@
// FIXME : CAPTURE THIS OUTPUT
$phpgw_setup->db->Halt_On_Error = 'report';
switch ($phpgw_info["setup"]["currentver"]["phpgwapi"])
switch ($phpgw_info['setup']['currentver']['phpgwapi'])
{
case "dbcreate":
case 'dbcreate':
$phpgw_setup->db->create_database($db_root, $db_pass);
break;
case "drop":
case 'drop':
$setup_info = $phpgw_setup->get_versions($setup_info);
$setup_info = $phpgw_setup->process_droptables($setup_info);
break;
case "new":
case 'new':
$setup_info = $phpgw_setup->process_pass($setup_info,'new',$DEBUG);
$included = True;
include('lang.php');
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion";
$phpgw_info['setup']['currentver']['phpgwapi'] = 'oldversion';
break;
case "oldversion":
case 'oldversion':
$setup_info = $phpgw_setup->process_pass($setup_info,'upgrade',$DEBUG);
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion";
$phpgw_info['setup']['currentver']['phpgwapi'] = 'oldversion';
break;
}
@ -246,7 +246,7 @@
// Config Section
$setup_tpl->set_var('config_step_text',lang('Step 2 - Configuration'));
$phpgw_info["setup"]["stage"]["config"] = $phpgw_setup->check_config();
$phpgw_info['setup']['stage']['config'] = $phpgw_setup->check_config();
// begin DEBUG code
//$phpgw_info['setup']['stage']['config'] = 10;

View File

@ -42,8 +42,10 @@
$submit = True;
}
if ($submit)
if ($HTTP_POST_VARS['submit'])
{
$lang_selected = $HTTP_POST_VARS['lang_selected'];
$upgrademethod = $HTTP_POST_VARS['upgrademethod'];
$phpgw_setup->db->transaction_begin();
if (count($lang_selected))
{
@ -134,13 +136,13 @@
}
else
{
if ($cancel)
if ($HTTP_POST_VARS['cancel'])
{
Header("Location: index.php");
exit;
}
if (! $included)
if (!$included)
{
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);

View File

@ -310,11 +310,25 @@
$acl->delete('phpgw_group',$thisacctid,1);
$acl->add('phpgw_group',$thisacctid,1);
// Now add the acl to let them change their password
/* Now add the acl to let them change their password */
$acl->delete('preferences','changepassword',1);
$acl->add('preferences','changepassword',1);
$acl->save_repository();
/* Add prefs for selected apps here, since they are per-user.
App access is added below.
*/
$pref = CreateObject('phpgwapi.preferences',$tmpid);
$pref->db = $phpgw_setup->db;
$pref->account_id = intval($tmpid);
$pref->read_repository();
@reset($s_apps);
while (list($key,$app) = each($s_apps))
{
$phpgw->common->hook_single('add_def_pref',$app);
}
$pref->save_repository();
}
}
/* Now give this group some rights */

View File

@ -11,21 +11,21 @@
/* $Id$ */
$phpgw_info['flags'] = array(
$phpgw_info['flags'] = array(
'noheader' => True,
'nonavbar' => True,
'currentapp' => "home",
'currentapp' => 'home',
'noapi' => True
);
include('./inc/functions.inc.php');
include('./inc/functions.inc.php');
include('../phpgwapi/setup/setup.inc.php');
$phpgw_info['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
#include("../version.inc.php");
include('../phpgwapi/setup/setup.inc.php');
$phpgw_info['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
#include('../version.inc.php');
function check_form_values()
{
function check_form_values()
{
global $setting, $phpgw_setup;
if (! $setting['config_pass'])
@ -43,15 +43,15 @@ function check_form_values()
echo $errors;
exit;
}
}
}
/* authentication phase */
$phpgw_info["setup"]["stage"]["header"] = $phpgw_setup->check_header();
$phpgw_info['setup']['stage']['header'] = $phpgw_setup->check_header();
// added these to let the app work, need to templatize still
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$setup_tpl->set_file(array(
'T_head' => 'head.tpl',
'T_footer' => 'footer.tpl',
'T_alert_msg' => 'msg_alert_msg.tpl',
@ -60,11 +60,11 @@ $setup_tpl->set_file(array(
'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');
$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($phpgw_info['setup']['stage']['header'])
{
switch($phpgw_info['setup']['stage']['header'])
{
case '1':
$phpgw_info['setup']['HeaderFormMSG'] = 'Create your header.inc.php';
$phpgw_info['setup']['PageMSG'] = 'You have not created your header.inc.php yet!<br> You can create it now.';
@ -94,10 +94,10 @@ switch($phpgw_info['setup']['stage']['header'])
$phpgw_info['setup']['HeaderFormMSG'] = 'Edit your header.inc.php';
$phpgw_info['setup']['PageMSG'] = 'Edit your existing header.inc.php';
break;
}
}
switch($action)
{
switch($action)
{
case 'download':
check_form_values();
$header_template = new Template('../');
@ -279,7 +279,8 @@ switch($action)
$phpgw_info['server']['mcrypt_version'] = '2.6.3';
srand((double)microtime()*1000000);
$random_char = array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',
$random_char = array(
'0','1','2','3','4','5','6','7','8','9','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','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');
@ -295,62 +296,62 @@ switch($action)
{
echo 'Now guessing better values for defaults <br>' . "\n";
$this_dir = dirname($SCRIPT_FILENAME);
$updir = ereg_replace("/setup",'',$this_dir);
$updir = ereg_replace('/setup','',$this_dir);
$phpgw_info['server']['server_root'] = $updir;
$phpgw_info['server']['include_root'] = $updir;
}
?>
</td></tr>
<tr bgcolor=486591><th colspan=2><font color="fefefe">Settings</font></th></tr>
<form action="<?php echo $PHP_SELF ?>" 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 $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 $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 $phpgw_info["server"]["header_admin_password"] ?>"></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 $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 $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 $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 $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 $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 $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 $phpgw_info["server"]["db_pass"] ?>"></td><td>Password of DB User</td></tr>
<tr><td><b>DB Host</b><br><input type="text" name="setting[db_host]" value="<?php echo $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 $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 $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 $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 = "";
$selected = '';
$found_dbtype = false;
while(list($k,$v) = each($supported_db))
{
if($v == $phpgw_info["server"]["db_type"])
if($v == $phpgw_info['server']['db_type'])
{
$selected = " selected ";
$selected = ' selected ';
$found_dbtype = true;
}
else
{
$selected = "";
$selected = '';
}
print "<option $selected value=\"$v\">$v\n";
print '<option ' . $selected . ' value="' . $v . '">' . $v . "\n";
}
?>
</select>
</td><td>What Database do you want to use with PHPGroupWare?
<tr><td><b>Configuration Password</b><br><input type=text name="setting[config_pass]" value="<?php echo $phpgw_info["server"]["config_passwd"] ?>"></td><td>Password needed for configuration</td></tr>
<tr><td><b>Configuration Password</b><br><input type=text name="setting[config_pass]" value="<?php echo $phpgw_info['server']['config_passwd'] ?>"></td><td>Password needed for configuration</td></tr>
<tr><td colspan=2><b>Enable MCrypt</b><br>
<select name="setting[enable_mcrypt]">
<?php if($phpgw_info["server"]["mcrypt_enabled"] == True) { ?>
<option value=True selected>True
<option value=False>False
<option value="True" selected>True
<option value="False">False
<?php } else { ?>
<option value=True>True
<option value=False selected>False
<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 $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 $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>MCrypt version</b><br><input type="text" name="setting[mcrypt_version]" value="<?php echo $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 $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 ($phpgw_info["server"]["domain_selectbox"]?" selected":""); ?>>True</option>
<option value="False"<?php echo (! $phpgw_info["server"]["domain_selectbox"]?" selected":""); ?>>False</option>
<option value="True"<?php echo ($phpgw_info['server']['domain_selectbox']?' selected':''); ?>>True</option>
<option value="False"<?php echo (! $phpgw_info['server']['domain_selectbox']?' selected':''); ?>>False</option>
</select></td><td></td>
</tr>
</table>
@ -384,5 +385,5 @@ switch($action)
echo '</html>';
break; // ending the switch default
}
}
?>

View File

@ -21,6 +21,11 @@
$tpl_root = $phpgw_setup->setup_tpl_dir('setup');
$setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
$download = $HTTP_POST_VARS['download'] ? $HTTP_POST_VARS['download'] : $HTTP_GET_VARS['download'];
$submit = $HTTP_POST_VARS['submit'] ? $HTTP_POST_VARS['submit'] : $HTTP_GET_VARS['submit'];
$showall = $HTTP_POST_VARS['showall'] ? $HTTP_POST_VARS['showall'] : $HTTP_GET_VARS['showall'];
$appname = $HTTP_POST_VARS['appname'] ? $HTTP_POST_VARS['appname'] : $HTTP_GET_VARS['appname'];
if ($download)
{
$setup_tpl->set_file(array(

View File

@ -15,7 +15,7 @@
<tr bgcolor="e6e6e6">
<td {td_align}>
{select_box_desc}
<form action="lang.php">
<form method="POST" action="lang.php">
{hidden_var1}
<select name="lang_selected[]" multiple size="10">
{select_box_langs}

View File

@ -2,38 +2,48 @@ addressbook 0.9.13.002
admin 0.9.13.002
bookkeeping 0.4
bookmarks 0.8.1
brewer 0.0.1
calendar 0.9.13.002
cart 0.8.1
ccs 0.0.0
chat 0.0.0
chora 0.0.4
comic 0.0.1
developer_tools 0.8.1
dj 0.0.3
eldaptir 0.0.4
email 0.9.11
filemanager 0.9.11
forum 0.8.1
eldaptir 0.0.6
email 0.9.13.002
filemanager 0.9.13.002
forum 0.9.13.001
ftp 0.8.1
headlines 0.8.1
hr 0.8.1
infolog 0.9.11
inv 0.8.3.009
manual 0.0.0
mediadb 0.0.3
manual 0.9.13.002
mediadb 0.0.4
messenger 0.8.1
news_admin 0.0.1
nntp 0.9.11
myadmin 0.9.13.002
news_admin 0.8.1.002
nntp 0.9.13.002
notes 0.9.13.002
phpgwapi 0.9.13.002
phpwebhosting 0.9.13.001
phpsysinfo 1.7
phpwebhosting 0.9.13.005
polls 0.8.1
preferences 0.9.13.002
projects 0.8.5.001
skel 0.0.1.000
projects 0.8.5.004
qmailldap 0.0.1
registration 0.8.1
skel 0.0.1.001
soap 0.0.1
squirrelmail 0.8.1
stocks 0.8.1
timetrack 0.9.11
todo 0.9.13.002
transy 0.9.11
syncml-server 0.9.13.001
timetrack 0.9.13
todo 0.9.13.004
transy 0.9.13.002
transy3 0.9.13.002
transyold 0.9.13.002
tts 0.0.1
weather 0.0.0