function bad_dirs($bad_dirs, $test_dir, $install) { install_html_start(); if ($install) { $titre = _T('directories_setup_start'); } else { $titre = _T('directories_setup_problem'); } $bad_url = "lcm_test_dirs.php"; if ($test_dir) { $bad_url .= '?test_dir=' . $test_dir; } echo "<h3>" . $titre . "</h3>\n"; echo "<div align='right'>" . menu_languages('var_lang_lcm') . "</div>\n"; echo "<div class='box_error'>\n"; echo "<p>" . _T('directories_bad_rights') . "</p>\n"; echo "<ul>" . $bad_dirs . "</ul>\n"; echo "<p>" . _T('directories_bad_rights_cause') . lcm_help('install_permissions') . "</p>\n"; echo "</div>\n"; echo "<p>" . _T('directories_continue') . "</p>\n"; echo "<form action='{$bad_urls}' method='get'>\n"; echo "<div align='right'><button class='fondl' name='Validate'>" . _T('button_reload_page') . "</button></div>"; echo "</form>"; install_html_end(); }
function install_step_1() { install_html_start('AUTO', '', 1); echo "<h3><small>" . _T('install_step_one') . "</small> " . _T('install_title_sql_connection') . "</h3>\n"; echo show_all_errors($_SESSION['errors']); echo "<p class='simple_text'>" . _T('install_info_sql_connection') . " " . lcm_help("install_database") . "</p>\n"; $db_address = _session('db_address', 'localhost'); $db_login = _session('db_login'); $db_password = _session('db_password'); $db_choice = _session('db_choice'); // Fetch the previous configuration data to make things easier (if possible) $lcm_config_prefix = isset($_SERVER['LcmConfigDir']) ? $_SERVER['LcmConfigDir'] : 'inc/config'; if (@file_exists($lcm_config_prefix . '/inc_connect_install.php')) { $s = @join('', @file($lcm_config_prefix . '/inc_connect_install.php')); if (ereg("mysql_connect\\([\"'](.*)[\"'],[\"'](.*)[\"'],[\"'](.*)[\"']\\)", $s, $regs)) { $db_address = $regs[1]; $db_login = $regs[2]; } else { if (ereg("lcm_connect_db\\('(.*)','(.*)','(.*)','(.*)','(.*)'\\)", $s, $regs)) { $db_address = $regs[1]; if ($port_db = $regs[2]) { $db_address .= ':' . $port_db; } $db_login = $regs[3]; } } } echo "<form action='install.php' method='post'>\n"; echo "<input type='hidden' name='step' value='2' />\n"; echo "<fieldset class='fs_box'>\n"; echo "<div><label for='db_address'><strong>" . f_err_star('address') . _T('install_database_address') . "</strong></label></div>\n"; echo "<input type='text' id='db_address' name='db_address' value=\"{$db_address}\" size='40' class='txt_lmnt' />\n"; echo "<br />\n"; echo "<br />\n"; echo "<div><label for='db_login'><strong>" . f_err_star('login') . _T('install_connection_login') . "</strong></label></div>\n"; echo "<input type='text' id='db_login' name='db_login' value=\"{$db_login}\" size='40' class='txt_lmnt' />\n"; echo "<br />\n"; echo "<br />\n"; echo "<div><label for='db_password'><strong>" . f_err_star('password') . _T('install_connection_password') . "</strong></label></div>\n"; echo "<input type='password' id='db_password' name='db_password' value=\"{$db_password}\" size='40' class='txt_lmnt' />\n"; // Afaik, there is no way to get a list of databases in PgSQL // without logging in first, and to login, you must provide DBname if (preg_match("/^PostgreSQL/", lcm_sql_server_info())) { echo "<br />\n"; echo "<br />\n"; echo "<div><label for='db_choice'><strong>" . f_err_star('dbname') . "Database name" . "</strong></label></div>\n"; // TRAD echo "<input type='text' id='db_choice' name='db_choice' value=\"{$db_choice}\" size='40' class='txt_lmnt' />\n"; } echo "</fieldset>\n"; echo "<div align='" . $GLOBALS['lcm_lang_right'] . "'>" . "<button type='submit' name='Next'>" . _T('button_next') . " >></button> " . "</div>\n"; echo "</form>\n"; install_html_end(); }
function show_page_subtitle($subtitle, $help_code = '', $help_target = '') { echo '<div class="prefs_column_menu_head">'; if ($help_code) { echo '<div class="help_icon">' . lcm_help($help_code, $help_target) . "</div>"; } echo $subtitle; echo "</div>\n"; }