include($path_to_root . "/includes/system_tests.inc");
include($path_to_root . "/admin/db/maintenance_db.inc");
include($path_to_root . "/includes/packages.inc");
include($path_to_root . "/includes/system_tests.inc");
include($path_to_root . "/admin/db/maintenance_db.inc");
include($path_to_root . "/includes/packages.inc");
//-------------------------------------------------------------------------------------------------
function subpage_title($txt)
{
global $path_to_root;
//-------------------------------------------------------------------------------------------------
function subpage_title($txt)
{
global $path_to_root;
$db = db_create_db($conn);
if (!$db) {
display_error(_("Cannot connect to database. User or password is invalid or you have no permittions to create database."));
$db = db_create_db($conn);
if (!$db) {
display_error(_("Cannot connect to database. User or password is invalid or you have no permittions to create database."));
+ 'port' => $con['port'],
+ 'dbname' => $con['dbname'],
+ 'collation' => $con['collation'],
+ 'tbpref' => $table_prefix,
'dbuser' => $con['dbuser'],
'dbpassword' => $con['dbpassword'],
'dbuser' => $con['dbuser'],
'dbpassword' => $con['dbpassword'],
update_company_prefs(array('coy_name'=>$con['name']));
$admin = get_user_by_login('admin');
update_user_prefs($admin['id'], array(
update_company_prefs(array('coy_name'=>$con['name']));
$admin = get_user_by_login('admin');
update_user_prefs($admin['id'], array(
'user_id' => $con['admin']));
if (!copy($path_to_root. "/config.default.php", $path_to_root. "/config.php")) {
'user_id' => $con['admin']));
if (!copy($path_to_root. "/config.default.php", $path_to_root. "/config.php")) {
else {
$_SESSION['inst_set'] = array_merge($_SESSION['inst_set'], array(
'host' => $_POST['host'],
else {
$_SESSION['inst_set'] = array_merge($_SESSION['inst_set'], array(
'host' => $_POST['host'],
'dbuser' => $_POST['dbuser'],
'dbpassword' => $_POST['dbpassword'],
'dbname' => $_POST['dbname'],
'tbpref' => $_POST['tbpref'] ? '0_' : '',
'sel_langs' => check_value('sel_langs'),
'sel_coas' => check_value('sel_coas'),
'dbuser' => $_POST['dbuser'],
'dbpassword' => $_POST['dbpassword'],
'dbname' => $_POST['dbname'],
'tbpref' => $_POST['tbpref'] ? '0_' : '',
'sel_langs' => check_value('sel_langs'),
'sel_coas' => check_value('sel_coas'),
// check company settings
if (get_post('name')=='') {
display_error(_('Company name cannot be empty.'));
// check company settings
if (get_post('name')=='') {
display_error(_('Company name cannot be empty.'));
'pass' => $_POST['pass'],
'name' => $_POST['name'],
'admin' => $_POST['admin'],
'pass' => $_POST['pass'],
'name' => $_POST['name'],
'admin' => $_POST['admin'],
- text_row_ex(_("Server Host:"), 'host', 30);
+ text_row_ex(_("Server Host:"), 'host', 30, 60);
+ text_row_ex(_("Server Port:"), 'port', 30, 60);
+ text_row_ex(_("Database Name:"), 'dbname', 30);
text_row_ex(_("Database User:"), 'dbuser', 30);
text_row_ex(_("Database Password:"), 'dbpassword', 30);
text_row_ex(_("Database User:"), 'dbuser', 30);
text_row_ex(_("Database Password:"), 'dbpassword', 30);
yesno_list_row(_("Use '0_' Table Prefix:"), 'tbpref', 1, _('Yes'), _('No'), false);
check_row(_("Install Additional Language Packs from FA Repository:"), 'sel_langs');
check_row(_("Install Additional COAs from FA Repository:"), 'sel_coas');
end_table(1);
yesno_list_row(_("Use '0_' Table Prefix:"), 'tbpref', 1, _('Yes'), _('No'), false);
check_row(_("Install Additional Language Packs from FA Repository:"), 'sel_langs');
check_row(_("Install Additional COAs from FA Repository:"), 'sel_coas');
end_table(1);
- display_note(_('Use table prefix if you share selected database for more than one FA company.'));
+ display_note(_("Select collation you want to use. If you are unsure or you will use various languages, select unicode collation."));
+ display_note(_("Use table prefix if you share selected database for more than one FA company using the same collation."));
submit_center_first('back', _('<< Back'));
submit_center_last('db_test', _('Continue >>'));
break;
submit_center_first('back', _('<< Back'));
submit_center_last('db_test', _('Continue >>'));
break;
subpage_title(_('Company Settings'));
start_table(TABLESTYLE);
text_row_ex(_("Company Name:"), 'name', 30);
subpage_title(_('Company Settings'));
start_table(TABLESTYLE);
text_row_ex(_("Company Name:"), 'name', 30);
languages_list_row(_("Select Default Language:"), 'lang');
end_table(1);
submit_center_first('back', _('<< Back'));
languages_list_row(_("Select Default Language:"), 'lang');
end_table(1);
submit_center_first('back', _('<< Back'));