function install_display_db_form
Search API
7.x install.php | install_display_db_form($msg = "") |
6.x install.php | install_display_db_form($msg = "") |
4.x install.php | install_display_db_form($msg = "") |
5.x install.php | install_display_db_form($msg = "") |
Displays the form to let a user set up a new database
1 call to install_display_db_form()
- install_perform_install in ./
install.php - Actually performs the installation of FlightPath
File
- ./
install.php, line 414 - This is the initial installation file for FlightPath.
Code
function install_display_db_form($msg = "") {
global $lang;
$db_name = $_POST ["db_name"];
$db_host = $_POST ["db_host"];
$db_port = $_POST ["db_port"];
$db_user = $_POST ["db_user"];
$db_pass = $_POST ["db_pass"];
$admin_pass = $_POST ["admin_pass"];
$admin_pass2 = $_POST ["admin_pass2"];
$admin_name = $_POST ["admin_name"];
$pC = "";
$pC .= "<h2 class='title'>" . st("Setup Database and Admin") . "</h2>$msg
<p>" . st("You should have already set up a database and database user
(with all privileges except Grant) for FlightPath. Please
enter that information below.") . "</p>
<hr>
<form action='install.php?lang=$lang' method='POST'>
<input type='hidden' name='perform_action' value='install'>
<table border='0' cellpadding='3' style='margin-left: 20px;'>
<tr>
<td colspan='2'><b>" . st("FlightPath administrator information") . "</b></td>
</tr>
<tr>
<td valign='top'>" . st("Admin Username:") . "</td>
<td valign='top'><input type='text' name='admin_name' value='$admin_name' size='15' maxlength='50'> Ex: admin</td>
</tr>
<tr>
<td valign='top'>" . st("Admin Password:") . "</td>
<td valign='top'><input type='password' name='admin_pass' value='$admin_pass' size='20'></td>
</tr>
<tr>
<td valign='top'>" . st("Re-enter Password:") . "</td>
<td valign='top'><input type='password' name='admin_pass2' value='$admin_pass2' size='20'></td>
</tr>
<tr>
<td colspan='2'><hr>
<b>" . st("Database information") . "</b></td>
</tr>
<tr>
<td valign='top'>" . st("Database Name:") . "</td>
<td valign='top'><input type='text' name='db_name' value='$db_name' size='50'></td>
</tr>
<tr>
<td valign='top'>" . st("Database Host/IP:") . "</td>
<td valign='top'><input type='text' name='db_host' value='$db_host' size='50'></td>
</tr>
<tr>
<td valign='top'>" . st("Database Port:") . "</td>
<td valign='top'><input type='text' name='db_port' value='$db_port' size='10'> Ex: 3306</td>
</tr>
<tr>
<td valign='top'>" . st("Database Username:") . "</td>
<td valign='top'><input type='text' name='db_user' value='$db_user' size='50'></td>
</tr>
<tr>
<td valign='top'>" . st("Database Password:") . "</td>
<td valign='top'><input type='password' name='db_pass' value='$db_pass' size='50'></td>
</tr>
</table>
<br><br>
<input type='submit' value='" . st("Install") . "'>
<br>
<b>" . st("Please click only once. May take several seconds to install.") . "
</form>";
// Display the screen
$page_content = $pC;
$page_title = "Install FlightPath";
$page_hide_report_error = TRUE;
include ("themes/classic/fp_template.php");
}