pandorafms/pandora_console/general/login_page.php

249 lines
8.5 KiB
PHP
Raw Normal View History

<?php
// Pandora FMS - http://pandorafms.com
// ==================================================
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
$url = '?login=1';
//These variables come from index.php
if (!empty ($page) && !empty ($sec)) {
foreach ($_GET as $key => $value) {
$url .= '&amp;'.safe_url_extraclean($key).'='.safe_url_extraclean($value);
}
}
echo '<img src="' . ui_get_full_url('images/login_background.png') . '" id="login_body">';
2011-07-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_html.php include/styles/dialog.css include/styles/pandora_blackmetal.css include/styles/menu.css include/styles/pandora_black.css include/styles/pandora.css include/functions_ui.php extensions/update_manager/main.php operation/visual_console/index.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.php operation/agentes/group_view.php operation/users/user_edit.php operation/events/events_list.php operation/messages/message.php operation/reporting/graph_viewer.php pandoradb.data.postgreSQL.sql pandoradb.data.oracle.sql images/agents_group.png images/application_double.png images/sitemap.png images/application_edit.png images/file.png images/page_white_text.png images/zoom.png images/page_refresh.png images/cog_del.png images/setup.png images/tag_red.png images/computer_error.png images/ok.png images/link_delete.png images/attachment.png images/god5.png images/god9.png images/down.png images/lightbulb.png images/help.png images/brick.png images/pill.png images/link_edit.png images/database_gear.png images/b_white.png images/wrench_orange.png images/up.png images/link_add.png images/chart_curve.png images/email_open.png images/page_white.png images/link2.png images/box.png images/clock.png images/note.png images/rss.png images/skin/skin_default/include/styles/pandora.css images/extensions.png images/flag_red.png images/database.png images/images.png images/cog.png images/b_yellow.png images/groups_small/clock.png images/groups_small/world.png images/groups_small/server_database.png images/groups_small/computer.png images/cancel.png images/add.png images/mouse.png images/server_database.png images/computer.png images/book_edit.png images/lupa.png images/heart.png images/database_lightning.png images/user.png images/link_break.png images/edit.png images/page_white_magnify.png images/normalscreen.png images/sitemap_color.png images/go.png images/config.png images/database_refresh.png images/link_go.png images/comments.png images/email.png images/lock.png images/os_icons/so_linux.png images/os_icons/android_small.png images/os_icons/android.png images/os_icons/so_linux_small.png images/error.png images/god3.png images/god7.png images/calendar_view_day.png images/data.png images/fullscreen.png images/server_web.png images/lupa_15x15.png images/lightning_go.png images/star.png images/user_suit.png images/upd.png images/application.png images/music_note.png images/lightbulb_off.png images/application_not_writable.png images/sort_down.png images/eye.png images/lightning.png images/header.jpg images/wrench.png images/mimetypes/unknown.png images/mimetypes/image.png images/mimetypes/zip.png images/mimetypes/directory.png images/mimetypes/text.png images/delete.png images/bricks.png images/world.png images/wand.png images/delete_modules.png images/disk.png images/group.png images/god8.png images/server.png images/bug.png images/page_lightning.png images/house.png images/log-out.png images/monitor.png images/information.png images/cross.png images/sort_up.png general/login_page.php general/logon_ok.php general/logoff.php godmode/groups/group_list.php godmode/admin_access_logs.php godmode/db/db_audit.php godmode/db/db_refine.php godmode/db/db_event.php godmode/agentes/agent_template.php godmode/agentes/module_manager_editor_common.php godmode/agentes/fields_manager.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/servers/modificar_server.php godmode/alerts/alert_list.list.php godmode/alerts/alert_templates.php godmode/alerts/alert_actions.php godmode/alerts/alert_commands.php godmode/snmpconsole/snmp_alert.php godmode/snmpconsole/snmp_filters.php godmode/users/user_list.php godmode/users/profile_list.php godmode/gis_maps/index.php godmode/massive/massive_operations.php godmode/modules/manage_network_templates.php godmode/modules/manage_network_components.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/reporting_builder.php godmode/reporting/graph_builder.preview.php godmode/tag/tag.php godmode/tag/edit_tag.php: Improved Css styles. * images/splash_pandora.png images/black_red_header.png images/black_background.png: Added images for new styles. *include/styles/pandora_red.css include/styles/pandora_width.css: Deleted old styles. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4514 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-06 13:57:27 +02:00
echo '<div class="databox_login" id="login">';
// echo "<h1>Put here your custom welcome message</h1>";
2011-07-06 Juan Manuel Ramon <juanmanuel.ramon@artica.es> * include/functions_html.php include/styles/dialog.css include/styles/pandora_blackmetal.css include/styles/menu.css include/styles/pandora_black.css include/styles/pandora.css include/functions_ui.php extensions/update_manager/main.php operation/visual_console/index.php operation/agentes/status_monitor.php operation/agentes/estado_ultimopaquete.php operation/agentes/alerts_status.php operation/agentes/estado_generalagente.php operation/agentes/estado_agente.php operation/agentes/gis_view.php operation/agentes/estado_monitores.php operation/agentes/ver_agente.php operation/agentes/graphs.php operation/agentes/group_view.php operation/users/user_edit.php operation/events/events_list.php operation/messages/message.php operation/reporting/graph_viewer.php pandoradb.data.postgreSQL.sql pandoradb.data.oracle.sql images/agents_group.png images/application_double.png images/sitemap.png images/application_edit.png images/file.png images/page_white_text.png images/zoom.png images/page_refresh.png images/cog_del.png images/setup.png images/tag_red.png images/computer_error.png images/ok.png images/link_delete.png images/attachment.png images/god5.png images/god9.png images/down.png images/lightbulb.png images/help.png images/brick.png images/pill.png images/link_edit.png images/database_gear.png images/b_white.png images/wrench_orange.png images/up.png images/link_add.png images/chart_curve.png images/email_open.png images/page_white.png images/link2.png images/box.png images/clock.png images/note.png images/rss.png images/skin/skin_default/include/styles/pandora.css images/extensions.png images/flag_red.png images/database.png images/images.png images/cog.png images/b_yellow.png images/groups_small/clock.png images/groups_small/world.png images/groups_small/server_database.png images/groups_small/computer.png images/cancel.png images/add.png images/mouse.png images/server_database.png images/computer.png images/book_edit.png images/lupa.png images/heart.png images/database_lightning.png images/user.png images/link_break.png images/edit.png images/page_white_magnify.png images/normalscreen.png images/sitemap_color.png images/go.png images/config.png images/database_refresh.png images/link_go.png images/comments.png images/email.png images/lock.png images/os_icons/so_linux.png images/os_icons/android_small.png images/os_icons/android.png images/os_icons/so_linux_small.png images/error.png images/god3.png images/god7.png images/calendar_view_day.png images/data.png images/fullscreen.png images/server_web.png images/lupa_15x15.png images/lightning_go.png images/star.png images/user_suit.png images/upd.png images/application.png images/music_note.png images/lightbulb_off.png images/application_not_writable.png images/sort_down.png images/eye.png images/lightning.png images/header.jpg images/wrench.png images/mimetypes/unknown.png images/mimetypes/image.png images/mimetypes/zip.png images/mimetypes/directory.png images/mimetypes/text.png images/delete.png images/bricks.png images/world.png images/wand.png images/delete_modules.png images/disk.png images/group.png images/god8.png images/server.png images/bug.png images/page_lightning.png images/house.png images/log-out.png images/monitor.png images/information.png images/cross.png images/sort_up.png general/login_page.php general/logon_ok.php general/logoff.php godmode/groups/group_list.php godmode/admin_access_logs.php godmode/db/db_audit.php godmode/db/db_refine.php godmode/db/db_event.php godmode/agentes/agent_template.php godmode/agentes/module_manager_editor_common.php godmode/agentes/fields_manager.php godmode/agentes/module_manager.php godmode/agentes/modificar_agente.php godmode/agentes/agent_manager.php godmode/servers/recon_script.php godmode/servers/plugin.php godmode/servers/manage_recontask.php godmode/servers/modificar_server.php godmode/alerts/alert_list.list.php godmode/alerts/alert_templates.php godmode/alerts/alert_actions.php godmode/alerts/alert_commands.php godmode/snmpconsole/snmp_alert.php godmode/snmpconsole/snmp_filters.php godmode/users/user_list.php godmode/users/profile_list.php godmode/gis_maps/index.php godmode/massive/massive_operations.php godmode/modules/manage_network_templates.php godmode/modules/manage_network_components.php godmode/reporting/reporting_builder.list_items.php godmode/reporting/reporting_builder.main.php godmode/reporting/visual_console_builder.data.php godmode/reporting/reporting_builder.php godmode/reporting/graph_builder.preview.php godmode/tag/tag.php godmode/tag/edit_tag.php: Improved Css styles. * images/splash_pandora.png images/black_red_header.png images/black_background.png: Added images for new styles. *include/styles/pandora_red.css include/styles/pandora_width.css: Deleted old styles. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4514 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-07-06 13:57:27 +02:00
//echo '<br /><br /><br />';
echo '
<div id="login_in">
<form method="post" action="' . ui_get_full_url('index.php'.$url) . '">';
//TODO: Put branding in variables (external file) or database
/* CUSTOM BRANDING STARTS HERE */
// Replace the following with your own URL and logo.
// A mashup of the Pandora FMS logo and your companies highly preferred
echo '&nbsp;&nbsp;<a href="http://pandorafms.org" title="Go to pandorafms.org...">';
if (defined ('PANDORA_ENTERPRISE')) {
html_print_image ("images/pandora_login_enterprise.png", false, array ("alt" => "logo", "border" => 0));
}
else {
html_print_image ("images/pandora_login.png", false, array ("alt" => "logo", "border" => 0));
}
echo '</a>';
// This prints the current pandora console version.
// For stable/live function it might be wise to comment it out
/* CUSTOM BRANDING ENDS HERE */
echo '<div style="text-align: center; height: 5px !important;">&nbsp;</div>';
if (!empty ($page) && !empty ($sec)) {
foreach ($_POST as $key => $value) {
html_print_input_hidden ($key, $value);
}
}
echo '<br />'.html_print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login"', true).
'<br>
<br />'.html_print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login"', true, true).
'<br>';
echo '<div style="float: right; margin-top: -70px; margin-right: 25px">';
html_print_input_image ("Login", "images/login_botton.png", 'Login');
echo '</div>';
echo '</form>
</div>
</div>';
echo '<div id="bottom_logo">';
if (defined('PANDORA_ENTERPRISE'))
echo html_print_image('images/bottom_logo_enterprise.png', true, array ("alt" => "logo", "border" => 0));
else
echo html_print_image('images/bottom_logo.png', true, array ("alt" => "logo", "border" => 0));
echo '</div>';
echo '<div id="ver_num">' . $pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '') . '</div>';
if (isset ($login_failed)) {
echo '<div id="login_failed" title="Login failed" style="">';
echo '<div style="position:absolute; top:0px; text-align: center; left:0%; right:0%; height:100px; width:330px; margin: 0 auto; ">';
echo '<div id="error_login" style="margin-top: 20px">';
echo '<strong style="font-size: 10pt">' . $config["auth_error"] . '</strong>';
echo '</div>';
echo '<div id="error_login_icon">';
echo html_print_image('images/error_login.png', true, array("alt" => __('Login failed'), "border" => 0));
echo '</div>';
echo '<div style="position:absolute; margin: 0 auto; top: 70px; left: 35%; ">';
html_print_submit_button("Ok", 'hide-login-error', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only" style="width:100px;"');
echo '</div>';
echo '</div>';
echo '</div>';
}
ui_require_css_file ('jquery-ui-1.10.0.custom');
ui_require_jquery_file('jquery-ui-1.10.0.custom');
?>
<?php
if (!isset ($login_failed)) {
?>
<!--[if lte IE 8]>
<div id="dialog" title="WARNING! You are using an outdated browser.">
<div style="position:absolute; top:20px; text-align: left; font-size: 9.5pt; line-height: 18px; left:0%; right:0%; margin: 0 auto; width:650px; border: 1px solid #FFF; ">
<?php
echo __("Pandora FMS frontend is built on advanced, modern technologies and does not support old browsers.");
echo "<br>" . __("It is highly recommended that you choose and install a modern browser. It is free of charge and only takes a couple of minutes.");
?>
</div>
<div style="position: relative; top: 90px; margin: 0 auto; width: 650px; border: 1px solid #FFF;">
<table style="width: 650px;">
<tr>
<td style="width: 20%;">
<a target="_blank" style="text-decoration: none; color: #6495ED;" href="https://www.google.com/chrome">
<img style="width: 60px;" src="images/google_chrome.png" />
<div style="position: relative; top: 11px;">
Google Chrome
<br />
<span style="text-decoration: underline;">Download page</span>
</div>
</a>
</td>
<td style="font-size: 10px; line-height: 15px; width: 20%;">
<a target="_blank" style="text-decoration: none; color: #6495ED;" href="http://www.mozilla.org/en-US/firefox/fx/">
<img style="width: 60px;" src="images/mozilla_firefox.png" />
<div style="position: relative; top: 5px;">
Mozilla Firefox
<br />
<span style="text-decoration: underline;">Download page</span>
</div>
</a>
</td>
<td style="width: 20%;">
<a target="_blank" style="text-decoration: none; color: #6495ED;" href="http://windows.microsoft.com/es-ES/internet-explorer/downloads/ie-9/worldwide-languages">
<img style="width: 63px;" src="images/iexplorer.jpeg" />
<div style="position: relative; top: 10px;">
Internet Explorer
<br />
<span style="text-decoration: underline;">Download page</span>
</div>
</a>
</td>
<td style="width: 20%;">
<a target="_blank" style="text-decoration: none; color: #6495ED;" href="http://www.opera.com/download/">
<img style="width: 50px;" src="images/opera_browser.png" />
<div style="position: relative; top: 16px;">
Opera browser
<br />
<span style="text-decoration: underline;">Download page</span>
</div>
</a>
</td>
<td style="width: 20%;">
<a target="_blank" style="text-decoration: none; color: #6495ED;" href="http://www.apple.com/es/safari/download/">
<img style="width: 60px;" src="images/safari_browser.jpeg" />
<div style="position: relative; top: 11px;">
Apple safari
<br />
<span style="text-decoration: underline;">Download page</span>
</div>
</a>
</td>
</tr>
</table>
</div>
<div style="position: relative; top:120px; width:650px; margin: 0 auto; text-align: left; border: 1px solid #FFF;">
<?php
echo '<span style="font-size: 10pt; color: #2E2E2E; font-weight: bold;">';
echo __('Why is it recommended to upgrade the web browser?');
echo '</span>';
echo '<span style="font-size: 9.5pt; line-height: 18px;">';
echo '<br><br>' .
__('New browsers usually come with support for new technologies, increasing web page speed, better privacy settings and so on. They also resolve security and functional issues.');
echo '</span>';
?>
</div>
<div style="float:right; margin-top:160px; margin-right: 50px; width: 200px;">
<a id="close-dialog-browser" href="#" style="text-decoration: none;">
<span style="color: #6495ED;">
<?php
echo __('Continue despite this warning');
?>
</span>
</a>
</div>
</div>
<![endif]-->
<?php
}
?>
<script type="text/javascript" language="javascript">
/* <![CDATA[ */
$(document).ready (function () {
// IE9- modal warning window
$(function() {
$( "#dialog" ).dialog({
resizable: true,
draggable: true,
modal: true,
height: 400,
width: 700,
overlay: {
opacity: 0.5,
background: "black"}
});
});
$("#close-dialog-browser").click (function () {
$("#dialog" ).dialog('close')
});
$(function() {
$( "#login_failed" ).dialog({
resizable: true,
draggable: true,
modal: true,
height: 150,
width: 350,
overlay: {
opacity: 0.5,
background: "black"}
});
});
$("#submit-hide-login-error").click (function () {
$("#login_failed" ).dialog('close')
});
});
document.getElementById('nick').focus();
/* ]]> */
</script>