mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-22 16:38:28 +00:00
Fun Stuff: http://pasteboard.co/1ormWYp.png
Login: Add settings to style Reset Password (and related) text links, add (disabled) settings to display domain name field. Theme: Add settings to control login box border size, color, radius and padding. Explicitly defined placeholder text color/opacity (where possible).
This commit is contained in:
@@ -9,7 +9,22 @@ if ($domains_processed == 1) {
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = generate_password('20', '4');
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Reset Password link visible on login page when populated and enabled.';
|
||||
$array[$x]['default_setting_description'] = 'Display a Reset Password link on the login box (requires smtp_host be defined).';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'login';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_name_visible';
|
||||
$array[$x]['default_setting_name'] = 'boolean';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Displays a domain input or select box (if domain_name array defined) on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'login';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_name';
|
||||
$array[$x]['default_setting_name'] = 'array';
|
||||
$array[$x]['default_setting_value'] = 'pbx1.yourdomain.com';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Domain select option displayed on the login box.';
|
||||
$x++;
|
||||
|
||||
//iterate and add each, if necessary
|
||||
foreach ($array as $index => $default_settings) {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
//generate reset link
|
||||
$key = encrypt($_SESSION['login']['password_reset_key']['text'], $result['username'].'|'.$_SESSION['domain_uuid'].'|'.$result['password']);
|
||||
$reset_link = "https://".$_SESSION['domain_name'].PROJECT_PATH."/login.php?action=define&key=".urlencode($key);
|
||||
$eml_body = "<a href='".$reset_link."'>".$reset_link."</a>";
|
||||
$eml_body = "<a href='".$reset_link."' class='login_link'>".$reset_link."</a>";
|
||||
//send reset link
|
||||
if (!send_email($email, $text['label-reset_link'], $eml_body)) {
|
||||
$_SESSION["message_mood"] = 'negative';
|
||||
@@ -192,7 +192,8 @@
|
||||
//show the content
|
||||
echo "<script>";
|
||||
echo " var speed = 350;";
|
||||
echo " function toggle_password_reset(hide_id, show_id, focus_id = '') {";
|
||||
echo " function toggle_password_reset(hide_id, show_id, focus_id) {";
|
||||
echo " if (focus_id == undefined) { focus_id = ''; }";
|
||||
echo " $('#'+hide_id).slideToggle(speed, function() {";
|
||||
echo " $('#'+show_id).slideToggle(speed, function() {";
|
||||
echo " if (focus_id != '') {";
|
||||
@@ -212,23 +213,27 @@
|
||||
echo "<input type='hidden' name='path' value='".$path."'>\n";
|
||||
echo "<input type='text' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='username' id='username' placeholder=\"".$text['label-username']."\"><br />\n";
|
||||
echo "<input type='password' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='password' placeholder=\"".$text['label-password']."\"><br />\n";
|
||||
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
|
||||
if ($_SESSION['login']['domain_name_visible']['boolean'] == "true") {
|
||||
if (count($_SESSION['login']['domain_name']) > 0) {
|
||||
echo "<select style='width: 200px; margin-bottom: 8px;' class='formfld' name='domain_name'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
echo "<select name='domain_name' class='formfld' style='color: #999999; width: 200px; text-align: center; text-align-last: center; margin-bottom: 8px;' onclick=\"this.style.color='#000000';\" onchange=\"this.style.color='#000000';\">\n";
|
||||
echo " <option value='' disabled selected hidden>".$text['label-domain']."</option>\n";
|
||||
sort($_SESSION['login']['domain_name']);
|
||||
foreach ($_SESSION['login']['domain_name'] as &$row) {
|
||||
echo " <option value='$row'>$row</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<br />";
|
||||
echo "</select><br />\n";
|
||||
}
|
||||
else {
|
||||
echo "<input type='text' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='domain_name' placeholder=\"".$text['label-domain']."\"><br />\n";
|
||||
echo "<input type='text' name='domain_name' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' placeholder=\"".$text['label-domain']."\"><br />\n";
|
||||
}
|
||||
}
|
||||
echo "<input type='submit' class='btn' style='width: 100px; margin-top: 15px;' value='".$text['button-login']."'>\n";
|
||||
if ($_SESSION['login']['password_reset_key']['text'] != '' && function_exists('mcrypt_encrypt')) {
|
||||
echo "<br><br><a class='login_box_link' onclick=\"toggle_password_reset('login_form','request_form','email');\">".$text['label-reset_password']."</a>";
|
||||
if (
|
||||
function_exists('mcrypt_encrypt') &&
|
||||
$_SESSION['login']['password_reset_key']['text'] != '' &&
|
||||
$_SESSION['email']['smtp_host']['var'] != ''
|
||||
) {
|
||||
echo "<br><br><a class='login_link' onclick=\"toggle_password_reset('login_form','request_form','email');\">".$text['label-reset_password']."</a>";
|
||||
}
|
||||
echo "</form>";
|
||||
echo "<script>document.getElementById('username').focus();</script>";
|
||||
@@ -239,7 +244,7 @@
|
||||
echo "<input type='hidden' name='action' value='request'>\n";
|
||||
echo "<input type='text' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='email' id='email' placeholder=\"".$text['label-email_address']."\"><br />\n";
|
||||
echo "<input type='submit' class='btn' style='width: 100px; margin-top: 15px;' value='".$text['button-reset']."'>\n";
|
||||
echo "<br><br><a class='login_box_link' onclick=\"toggle_password_reset('request_form','login_form','username');\">".$text['label-cancel']."</a>";
|
||||
echo "<br><br><a class='login_link' onclick=\"toggle_password_reset('request_form','login_form','username');\">".$text['label-cancel']."</a>";
|
||||
echo "</form>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -254,7 +259,7 @@
|
||||
echo "<input type='password' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='password_new' autocomplete='off' placeholder=\"".$text['label-new_password']."\"><br />\n";
|
||||
echo "<input type='password' class='formfld' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='password_repeat' autocomplete='off' placeholder=\"".$text['label-repeat_password']."\"><br />\n";
|
||||
echo "<input type='submit' class='btn' style='width: 100px; margin-top: 15px;' value='".$text['button-save']."'>\n";
|
||||
echo "<br><br><a class='login_box_link' onclick=\"document.location.href='login.php';\">".$text['label-cancel']."</a>";
|
||||
echo "<br><br><a class='login_link' onclick=\"document.location.href='login.php';\">".$text['label-cancel']."</a>";
|
||||
echo "</form>";
|
||||
echo "<script>document.getElementById('username').focus();</script>";
|
||||
echo "</span>";
|
||||
|
||||
@@ -65,20 +65,6 @@ if ($domains_processed == 1) {
|
||||
$array[$x]['default_setting_description'] = 'Set a secondary background color, for a gradient effect.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_background_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(255,255,255,0.3)';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the background color for the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_shadow_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(140,140,140,0.3)';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the shadow color of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'domain_visible';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'true';
|
||||
@@ -897,7 +883,77 @@ if ($domains_processed == 1) {
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the size of text in the form rows.';
|
||||
$x++;
|
||||
|
||||
/* login box */
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_background_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(255,255,255,0.3)';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the background color for the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_shadow_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'rgba(140,140,140,0.3)';
|
||||
$array[$x]['default_setting_enabled'] = 'true';
|
||||
$array[$x]['default_setting_description'] = 'Set the shadow color of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_padding';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '30px';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the padding of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_border_radius';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '4px';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the border radius of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_border_size';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '1px';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the border size of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_border_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#ffffff';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the border color (and opacity) of the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_link_text_color';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#004083';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the color (and opacity) of text links on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_link_text_color_hover';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '#5082ca';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the hover color (and opacity) of text links on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_link_text_size';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = '11px';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the size of text links on the login box.';
|
||||
$x++;
|
||||
$array[$x]['default_setting_category'] = 'theme';
|
||||
$array[$x]['default_setting_subcategory'] = 'login_link_text_font';
|
||||
$array[$x]['default_setting_name'] = 'text';
|
||||
$array[$x]['default_setting_value'] = 'Arial';
|
||||
$array[$x]['default_setting_enabled'] = 'false';
|
||||
$array[$x]['default_setting_description'] = 'Set the font of text links on the login box.';
|
||||
$x++;
|
||||
|
||||
//get an array of the default settings
|
||||
$sql = "select * from v_default_settings ";
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
<?php
|
||||
echo ($_SESSION['theme']['menu_main_border_color']['text'] == '' && $_SESSION['theme']['menu_main_border_size']['text'] == '') ? "border: 0;\n" : null;
|
||||
echo ($_SESSION['theme']['menu_main_border_color']['text'] != '') ? 'border-color: '.$_SESSION['theme']['menu_main_border_color']['text'].";\n" : null;
|
||||
echo ($_SESSION['theme']['menu_main_border_size']['text'] != '') ? 'border-size: '.$_SESSION['theme']['menu_main_border_size']['text'].";\n" : null;
|
||||
echo ($_SESSION['theme']['menu_main_border_size']['text'] != '') ? 'border-width: '.$_SESSION['theme']['menu_main_border_size']['text'].";\n" : null;
|
||||
switch ($_SESSION['theme']['menu_style']['text']) {
|
||||
case 'inline': $default_radius = '4px'; break;
|
||||
case 'static': $default_radius = '0 0 4px 4px'; break;
|
||||
@@ -312,7 +312,7 @@
|
||||
<?php
|
||||
echo ($_SESSION['theme']['menu_sub_border_color']['text'] == '' && $_SESSION['theme']['menu_sub_border_size']['text'] == '') ? "border: 0;\n" : null;
|
||||
echo ($_SESSION['theme']['menu_sub_border_color']['text'] != '') ? 'border-color: '.$_SESSION['theme']['menu_sub_border_color']['text'].";\n" : null;
|
||||
echo ($_SESSION['theme']['menu_sub_border_size']['text'] != '') ? 'border-size: '.$_SESSION['theme']['menu_sub_border_size']['text'].";\n" : null;
|
||||
echo ($_SESSION['theme']['menu_sub_border_size']['text'] != '') ? 'border-width: '.$_SESSION['theme']['menu_sub_border_size']['text'].";\n" : null;
|
||||
?>
|
||||
background: <?php echo ($_SESSION['theme']['menu_sub_background_color']['text'] != '') ? $_SESSION['theme']['menu_sub_background_color']['text'] : 'rgba(0,0,0,0.90)'; ?>;
|
||||
-webkit-box-shadow: <?php echo ($_SESSION['theme']['menu_sub_shadow_color']['text'] != '') ? '0 0 5px '.$_SESSION['theme']['menu_sub_shadow_color']['text'] : 'none';?>;
|
||||
@@ -549,7 +549,7 @@
|
||||
|
||||
#default_login {
|
||||
display: inline-block;
|
||||
padding: 30px;
|
||||
padding: <?php echo ($_SESSION['theme']['login_padding']['text'] != '') ? $_SESSION['theme']['login_padding']['text'] : '30px'; ?>;
|
||||
margin-bottom: 28px;
|
||||
<?php
|
||||
if (
|
||||
@@ -558,20 +558,29 @@
|
||||
$_SESSION['theme']['background_color'][1] != ''
|
||||
) { ?>
|
||||
background: <?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? $_SESSION['theme']['login_background_color']['text'] : "rgba(255,255,255,0.35)"; ?>;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none';?>;
|
||||
-moz-box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none';?>;
|
||||
box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none';?>;
|
||||
-webkit-border-radius: <?php echo ($_SESSION['theme']['login_border_radius']['text'] != '') ? $_SESSION['theme']['login_border_radius']['text'] : '4px'; ?>;
|
||||
-moz-border-radius: <?php echo ($_SESSION['theme']['login_border_radius']['text'] != '') ? $_SESSION['theme']['login_border_radius']['text'] : '4px'; ?>;
|
||||
border-radius: <?php echo ($_SESSION['theme']['login_border_radius']['text'] != '') ? $_SESSION['theme']['login_border_radius']['text'] : '4px'; ?>;
|
||||
<?php if ($_SESSION['theme']['login_border_size']['text'] != '' || $_SESSION['theme']['login_border_color']['text'] != '') { echo "border-style: solid;\n"; } ?>
|
||||
<?php echo ($_SESSION['theme']['login_border_size']['text'] != '') ? 'border-width: '.$_SESSION['theme']['login_border_size']['text'].";\n" : null; ?>
|
||||
<?php echo ($_SESSION['theme']['login_border_color']['text'] != '') ? 'border-color: '.$_SESSION['theme']['login_border_color']['text'].";\n" : null; ?>
|
||||
-webkit-box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none'; ?>;
|
||||
-moz-box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none'; ?>;
|
||||
box-shadow: <?php echo ($_SESSION['theme']['login_shadow_color']['text'] != '') ? '0 1px 20px '.$_SESSION['theme']['login_shadow_color']['text'] : 'none'; ?>;
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
a.login_box_link {
|
||||
font-size: 11px;
|
||||
text-shadow: 0 0 2px <?php echo ($_SESSION['theme']['login_background_color']['text'] != '') ? $_SESSION['theme']['login_background_color']['text'] : "#ffffff"; ?>;
|
||||
a.login_link {
|
||||
color: <?php echo ($_SESSION['theme']['login_link_text_color']['text'] != '') ? $_SESSION['theme']['login_link_text_color']['text'] : '#004083'; ?>;
|
||||
font-size: <?php echo ($_SESSION['theme']['login_link_text_size']['text'] != '') ? $_SESSION['theme']['login_link_text_size']['text'] : '11px'; ?>;
|
||||
font-family: <?php echo ($_SESSION['theme']['login_link_text_font']['text'] != '') ? $_SESSION['theme']['login_link_text_font']['text'] : 'Arial'; ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.login_link:hover {
|
||||
color: <?php echo ($_SESSION['theme']['login_link_text_color_hover']['text'] != '') ? $_SESSION['theme']['login_link_text_color_hover']['text'] : '#5082ca'; ?>;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
@@ -630,12 +639,14 @@
|
||||
}
|
||||
|
||||
a {
|
||||
color: <?php echo ($_SESSION['theme']['text_link_color']['text'] != '') ? $_SESSION['theme']['text_link_color']['text'] : '#004083'; ?>;
|
||||
width: 100%;
|
||||
color: <?php echo ($_SESSION['theme']['text_link_color']['text'] != '') ? $_SESSION['theme']['text_link_color']['text'] : '#004083'; ?>;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: <?php echo ($_SESSION['theme']['text_link_color_hover']['text'] != '') ? $_SESSION['theme']['text_link_color_hover']['text'] : '#5082ca'; ?>;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
form {
|
||||
@@ -761,6 +772,13 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* style placeholder text (for browsers that support the attribute) - note: can't stack, each must be seperate */
|
||||
::-webkit-input-placeholder { color: #999999; opacity: 1.0; } /* chrome/opera/safari */
|
||||
::-moz-placeholder { color: #999999; opacity: 1.0; } /* ff 19+ */
|
||||
:-moz-placeholder { color: #999999; opacity: 1.0; } /* ff 18- */
|
||||
:-ms-input-placeholder { color: #999999; opacity: 1.0; } /* ie 10+ */
|
||||
::placeholder { color: #999999; opacity: 1.0; } /* official standard */
|
||||
|
||||
/* TABLES *****************************************************************/
|
||||
|
||||
table {
|
||||
@@ -1852,59 +1870,60 @@
|
||||
<tr>
|
||||
<td width='100%' style='padding-right: 15px;' align='right' valign='middle'>
|
||||
<?php
|
||||
// login form
|
||||
if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/core/install/install.php" && !$default_login) {
|
||||
if (strlen($_SESSION["username"]) == 0) {
|
||||
//add multi-lingual support
|
||||
require_once "core/user_settings/app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
//set a default login destination
|
||||
if (strlen($_SESSION['login']['destination']['url']) == 0) {
|
||||
$_SESSION['login']['destination']['url'] = PROJECT_PATH."/core/user_settings/user_dashboard.php";
|
||||
}
|
||||
//login form
|
||||
echo "<div align='right'>\n";
|
||||
echo " <form name='login' METHOD=\"POST\" action=\"".$_SESSION['login']['destination']['url']."\">\n";
|
||||
echo " <input type='hidden' name='path' value='".$_GET['path']."'>\n";
|
||||
echo " <table width='200' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input type='text' class='formfld' style='min-width: 150px; width: 105px; text-align: center;' name='username' placeholder=\"".$text['label-username']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input type='password' class='formfld' style='min-width: 150px; width: 105px; text-align: center;' name='password' placeholder=\"".$text['label-password']."\">\n";
|
||||
echo " </td>\n";
|
||||
// login form
|
||||
if ($_SERVER['PHP_SELF'] != PROJECT_PATH."/core/install/install.php" && !$default_login) {
|
||||
if (strlen($_SESSION["username"]) == 0) {
|
||||
//add multi-lingual support
|
||||
require_once "core/user_settings/app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
//set a default login destination
|
||||
if (strlen($_SESSION['login']['destination']['url']) == 0) {
|
||||
$_SESSION['login']['destination']['url'] = PROJECT_PATH."/core/user_settings/user_dashboard.php";
|
||||
}
|
||||
//login form
|
||||
echo "<div align='right'>\n";
|
||||
echo " <form name='login' METHOD=\"POST\" action=\"".$_SESSION['login']['destination']['url']."\">\n";
|
||||
echo " <input type='hidden' name='path' value='".$_GET['path']."'>\n";
|
||||
echo " <table width='200' border='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td>\n";
|
||||
echo " <input type='text' class='formfld' style='min-width: 150px; width: 105px; text-align: center;' name='username' placeholder=\"".$text['label-username']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " <td align='left'>\n";
|
||||
echo " <input type='password' class='formfld' style='min-width: 150px; width: 105px; text-align: center;' name='password' placeholder=\"".$text['label-password']."\">\n";
|
||||
echo " </td>\n";
|
||||
|
||||
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
|
||||
echo " <td align='left'>\n";
|
||||
echo " <strong>".$text['label-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";
|
||||
if ($_SESSION['login']['domain_name_visible']['boolean'] == "true") {
|
||||
echo " <td align='left'>\n";
|
||||
echo " <strong>".$text['label-domain'].":</strong>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td>\n";
|
||||
if (count($_SESSION['login']['domain_name']) > 0) {
|
||||
echo " <select name='domain_name' class='formfld' style='color: #999999; width: 150px; text-align: center; text-align-last: center;' onclick=\"this.style.color='#000000';\" onchange=\"this.style.color='#000000';\">\n";
|
||||
echo " <option value='' disabled selected hidden>".$text['label-domain']."</option>\n";
|
||||
sort($_SESSION['login']['domain_name']);
|
||||
foreach ($_SESSION['login']['domain_name'] as &$row) {
|
||||
echo " <option value='$row'>$row</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
else {
|
||||
echo " <input type='text' name='domain_name' class='formfld' style='text-align: center; min-width: 150px; width: 150px;' placeholder=\"".$text['label-domain']."\">\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
else {
|
||||
echo " <input type='text' style='min-width: 150px; width: 150px;' class='formfld' name='domain_name'>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
|
||||
echo " <td align='right'>\n";
|
||||
echo " <input type='submit' class='btn' style='margin-left: 5px;' value=\"".$text['button-login']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " </form>";
|
||||
echo "</div>";
|
||||
echo " <td align='right'>\n";
|
||||
echo " <input type='submit' class='btn' style='margin-left: 5px;' value=\"".$text['button-login']."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo " </form>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1940,7 +1959,7 @@
|
||||
<tr>
|
||||
<td align='center' valign='middle'>
|
||||
<span id='default_login'>
|
||||
<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' width='250'></a><br />
|
||||
<a href='<?php echo PROJECT_PATH; ?>/'><img src='<?php echo $logo; ?>' style='width: 250px; height: auto;'></a><br />
|
||||
<!--{body}-->
|
||||
</span>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user