Update the login.php page.
This commit is contained in:
parent
f624cd1d09
commit
e805aff9d8
201
login.php
201
login.php
|
|
@ -26,106 +26,117 @@
|
||||||
include "root.php";
|
include "root.php";
|
||||||
require_once "includes/require.php";
|
require_once "includes/require.php";
|
||||||
|
|
||||||
$path = check_str($_GET["path"]);
|
//get the http values and set as variables
|
||||||
$msg = check_str($_GET["msg"]);
|
$path = check_str($_GET["path"]);
|
||||||
|
$msg = check_str($_GET["msg"]);
|
||||||
|
|
||||||
include "includes/header.php";
|
//set a default login url
|
||||||
echo "<br><br>";
|
//if (strlen($_SESSION['login']['url']['text']) == 0) {
|
||||||
echo "<div align='center'>";
|
// $_SESSION['login']['url']['text'] = PROJECT_PATH."/index2.php";
|
||||||
if (strlen($msg) > 0) {
|
//}
|
||||||
echo "<div align='center'>\n";
|
|
||||||
echo "<table width='50%'>\n";
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<th align='left'>Message</th>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td class='row_style1'>\n";
|
|
||||||
|
|
||||||
switch ($msg) {
|
//add the header
|
||||||
case "username required":
|
include "includes/header.php";
|
||||||
echo "<strong>Please provide a username.</strong>";
|
|
||||||
break;
|
//show the message
|
||||||
case "incorrect account information":
|
if (strlen($msg) > 0) {
|
||||||
echo "<strong>The username or password was incorrect. Please try again.</strong>";
|
echo "<br><br>";
|
||||||
break;
|
echo "<div align='center'>\n";
|
||||||
case "install complete":
|
echo "<table width='50%'>\n";
|
||||||
echo "<br />\n";
|
echo "<tr>\n";
|
||||||
echo "Installation is complete. <br />";
|
echo "<th align='left'>Message</th>\n";
|
||||||
echo "<br /> ";
|
echo "</tr>\n";
|
||||||
echo "<strong>Getting Started:</strong><br /> ";
|
echo "<tr>\n";
|
||||||
echo "<ul><li>There are two levels of admins 1. superadmin 2. admin.<br />";
|
echo "<td class='row_style1'>\n";
|
||||||
echo "<br />\n";
|
|
||||||
echo "username: <strong>superadmin</strong> <br />password: <strong>fusionpbx</strong> <br />\n";
|
switch ($msg) {
|
||||||
echo "<br />\n";
|
case "username required":
|
||||||
echo "username: <strong>admin</strong> <br />password: <strong>fusionpbx</strong> <br/><br/>\n";
|
echo "<strong>Please provide a username.</strong>";
|
||||||
echo "</li>\n";
|
break;
|
||||||
echo "<li>\n";
|
case "incorrect account information":
|
||||||
echo "The database connection settings have been saved to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php.<br />\n";
|
echo "<strong>The username or password was incorrect. Please try again.</strong>";
|
||||||
echo "</li>\n";
|
break;
|
||||||
echo "</ul>\n";
|
case "install complete":
|
||||||
echo "<strong>\n";
|
echo "<br />\n";
|
||||||
break;
|
echo "Installation is complete. <br />";
|
||||||
|
echo "<br /> ";
|
||||||
|
echo "<strong>Getting Started:</strong><br /> ";
|
||||||
|
echo "<ul><li>There are two levels of admins 1. superadmin 2. admin.<br />";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo "username: <strong>superadmin</strong> <br />password: <strong>fusionpbx</strong> <br />\n";
|
||||||
|
echo "<br />\n";
|
||||||
|
echo "username: <strong>admin</strong> <br />password: <strong>fusionpbx</strong> <br/><br/>\n";
|
||||||
|
echo "</li>\n";
|
||||||
|
echo "<li>\n";
|
||||||
|
echo "The database connection settings have been saved to ".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/includes/config.php.<br />\n";
|
||||||
|
echo "</li>\n";
|
||||||
|
echo "</ul>\n";
|
||||||
|
echo "<strong>\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "</div>\n";
|
||||||
|
echo "<br /><br />\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//show the content
|
||||||
|
echo "<br><br>";
|
||||||
|
echo "<form name='login' METHOD=\"POST\" action=\"".PROJECT_PATH."/index2.php."\">\n";
|
||||||
|
echo "<input type='hidden' name='path' value='$path'>\n";
|
||||||
|
echo "<table width='200' border='0'>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left'>\n";
|
||||||
|
echo " <strong>UserName:</strong>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td>\n";
|
||||||
|
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"username\">\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left'>\n";
|
||||||
|
echo " <strong>Password:</strong>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td align='left'>\n";
|
||||||
|
echo " <input type=\"password\" style='width: 150px;' class='formfld' name=\"password\">\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
|
||||||
|
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align='left'>\n";
|
||||||
|
echo " <strong>Domain:</strong>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td>\n";
|
||||||
|
if (count($_SESSION['login']['domain_name']) > 0) {
|
||||||
|
echo " <select style='width: 150px;' class='formfld' name='domain_name'>\n";
|
||||||
|
echo " <option value=''></option>\n";
|
||||||
|
foreach ($_SESSION['login']['domain_name'] as &$row) {
|
||||||
|
echo " <option value='$row'>$row</option>\n";
|
||||||
|
}
|
||||||
|
echo " </select>\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"domain_name\">\n";
|
||||||
|
}
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td align=\"right\">\n";
|
||||||
|
echo " <input type=\"submit\" class='btn' value=\"Login\">\n";
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "</div>\n";
|
echo "</form>";
|
||||||
echo "<br /><br />\n\n";
|
echo "</div>";
|
||||||
}
|
|
||||||
|
|
||||||
echo "<form name='login' METHOD=\"POST\" action=\"".PROJECT_PATH."/index2.php\">\n";
|
//add the footer
|
||||||
echo "<input type='hidden' name='path' value='$path'>\n";
|
include "includes/footer.php";
|
||||||
echo "<table width='200' border='0'>\n";
|
?>
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td align='left'>\n";
|
|
||||||
echo " <strong>UserName:</strong>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"username\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td align='left'>\n";
|
|
||||||
echo " <strong>Password:</strong>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td align='left'>\n";
|
|
||||||
echo " <input type=\"password\" style='width: 150px;' class='formfld' name=\"password\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td align='left'>\n";
|
|
||||||
echo " <strong>Domain:</strong>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
if (count($_SESSION['login']['domain_name']) > 0) {
|
|
||||||
echo " <select style='width: 150px;' class='formfld' name='domain_name'>\n";
|
|
||||||
echo " <option value=''></option>\n";
|
|
||||||
foreach ($_SESSION['login']['domain_name'] as &$row) {
|
|
||||||
echo " <option value='$row'>$row</option>\n";
|
|
||||||
}
|
|
||||||
echo " </select>\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"domain_name\">\n";
|
|
||||||
}
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<tr>\n";
|
|
||||||
echo "<td>\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "<td align=\"right\">\n";
|
|
||||||
echo " <input type=\"submit\" class='btn' value=\"Login\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
echo "</table>\n";
|
|
||||||
echo "</form>";
|
|
||||||
echo "</div>";
|
|
||||||
|
|
||||||
include "includes/footer.php";
|
|
||||||
?>
|
|
||||||
Loading…
Reference in New Issue