2006-03-27 05:37:27 +02:00
< ? php
2006-10-04 18:15:20 +02:00
2009-06-08 20:26:14 +02:00
// Pandora FMS - http://pandorafms.com
// ==================================================
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
// Please see http://pandorafms.org for full contribution list
2008-08-22 20:07:32 +02:00
2006-10-04 18:15:20 +02:00
// This program is free software; you can redistribute it and/or
2011-03-23 Raul Mateos <raulofpandora@gmail.com>
* extensions/ssh_console.php, extensions/vnc_view.php,
extensions/update_manager.php, extensions/users_connected.php,
extensions/extension_uploader.php, extensions/insert_data.php,
extensions/module_groups.php, extensions/plugin_registration.php,
extensions/agent_modules.php, extensions/resource_registration.php,
extensions/resource_exportation.php, extensions/dbmanager.php,
extensions/pandora_logs.php, general/*.php, ajax.php,
operation/search_*.php, operation/menu.php, operation/extensions.php,
godmode/menu.php, godmode/extensions.php, godmode/admin_access_logs.php:
CReverted unwanted license changes.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4126 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-23 17:13:28 +01:00
// modify it under the terms of the GNU General Public License
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
// as published by the Free Software Foundation; version 2
2006-10-04 18:15:20 +02:00
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
2011-03-17 Raul Mateos <raulofpandora@gmail.com>
* extensions/dbmanager.php, extensions/pandora_logs.php, general/*.php,
index.php, ajax.php, operation/search_*.php, operation/menu.php,
operation/extensions.php, godmode/menu.php, godmode/extensions.php,
admin_access_logs.php: Cleaned code and updated page disclaimers.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4108 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2011-03-17 23:01:01 +01:00
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2006-10-04 18:15:20 +02:00
// GNU General Public License for more details.
2009-01-07 11:42:38 +01:00
$url = '?login=1' ;
2008-12-23 22:41:05 +01:00
//These variables come from index.php
if ( ! empty ( $page ) && ! empty ( $sec )) {
foreach ( $_GET as $key => $value ) {
2010-08-18 13:35:42 +02:00
$url .= '&' . safe_url_extraclean ( $key ) . '=' . safe_url_extraclean ( $value );
2008-12-23 22:41:05 +01:00
}
2007-08-06 13:44:49 +02:00
}
2012-03-27 19:00:55 +02:00
echo '<img src="images/login_background.png" id="login_body">' ;
2007-08-06 13:44:49 +02:00
2011-07-06 13:57:27 +02:00
echo '<div class="databox_login" id="login">' ;
2009-12-04 13:12:04 +01:00
2011-07-06 19:16:16 +02:00
// echo "<h1>Put here your custom welcome message</h1>";
2009-12-04 13:12:04 +01:00
2011-07-06 13:57:27 +02:00
//echo '<br /><br /><br />';
2009-12-04 13:12:04 +01:00
echo '
2011-06-16 21:26:45 +02:00
< div id = " login_in " >
2012-03-27 19:00:55 +02:00
< form method = " post " action = " index.php'. $url .' " > ' ;
2008-12-23 22:41:05 +01:00
//TODO: Put branding in variables (external file) or database
/* CUSTOM BRANDING STARTS HERE */
2009-01-07 11:42:38 +01:00
// Replace the following with your own URL and logo.
// A mashup of the Pandora FMS logo and your companies highly preferred
2011-07-06 19:16:16 +02:00
echo ' <a href="http://pandorafms.org" title="Go to pandorafms.org...">' ;
2012-03-27 19:00:55 +02:00
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>' ;
2009-01-07 11:42:38 +01:00
// This prints the current pandora console version.
// For stable/live function it might be wise to comment it out
2012-03-27 19:00:55 +02:00
2008-12-23 22:41:05 +01:00
/* CUSTOM BRANDING ENDS HERE */
2012-03-27 19:00:55 +02:00
echo '<div style="text-align: center; height: 5px !important;"> </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 >
2006-03-27 05:37:27 +02:00
</ div >
2009-03-16 18:50:06 +01:00
</ div > ' ;
2012-01-27 13:48:18 +01:00
2012-03-27 19:00:55 +02:00
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 )) {
2012-04-12 11:26:51 +02:00
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; ">' ;
2012-03-27 19:00:55 +02:00
2012-04-27 20:21:26 +02:00
echo '<div id="error_login" style="margin-top: 20px">' ;
2012-04-18 10:08:04 +02:00
echo '<strong style="font-size: 10pt">' . $config [ " auth_error " ] . '</strong>' ;
2012-04-12 11:26:51 +02:00
echo '</div>' ;
echo '<div id="error_login_icon">' ;
2012-04-27 20:21:26 +02:00
echo html_print_image ( 'images/error_login.png' , true , array ( " alt " => __ ( 'Login failed' ), " border " => 0 ));
2012-03-27 19:00:55 +02:00
echo '</div>' ;
2012-04-27 20:21:26 +02:00
2012-04-12 11:26:51 +02:00
echo '<div style="position:absolute; margin: 0 auto; top: 70px; left: 35%; ">' ;
2012-03-27 19:00:55 +02:00
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>' ;
}
2012-01-27 13:48:18 +01:00
ui_require_css_file ( 'dialog' );
ui_require_jquery_file ( 'ui.core' );
ui_require_jquery_file ( 'ui.dialog' );
2012-03-27 19:00:55 +02:00
ui_require_jquery_file ( 'ui.draggable' );
2012-01-27 13:48:18 +01:00
2012-03-27 19:00:55 +02:00
?>
2012-01-27 13:48:18 +01:00
2012-03-27 19:00:55 +02:00
< ? php
if ( ! isset ( $login_failed )) {
?>
2012-05-08 10:55:35 +02:00
<!-- [ 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 </ a ></ span >
</ div >
</ 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 </ a ></ span >
</ div >
</ 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 </ a ></ span >
</ div >
</ 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 </ a ></ span >
</ div >
</ 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 </ a ></ span >
</ div >
</ 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; " >
< ? php
echo '<a id="close-dialog-browser" href="#" style="text-decoration: none;">' . '<span style="color: #6495ED;">' . __ ( 'Continue despite this warning' ) . ' >>' . '</span></a>' ;
?>
</ div >
</ div >
2012-03-27 19:00:55 +02:00
<! [ endif ] -->
2012-05-08 10:55:35 +02:00
2012-03-27 19:00:55 +02:00
< ? php
}
?>
2012-01-27 13:48:18 +01:00
2009-03-16 18:50:06 +01:00
< script type = " text/javascript " language = " javascript " >
/* <![CDATA[ */
2012-01-27 13:48:18 +01:00
2012-05-08 10:55:35 +02:00
$ ( document ) . ready ( function () {
// IE9- modal warning window
2012-01-27 13:48:18 +01:00
$ ( function () {
$ ( " #dialog " ) . dialog ({
resizable : true ,
draggable : true ,
2012-03-27 19:00:55 +02:00
modal : true ,
2012-05-08 10:55:35 +02:00
height : 400 ,
width : 700 ,
2012-01-27 13:48:18 +01:00
overlay : {
opacity : 0.5 ,
background : " black "
},
bgiframe : jQuery . browser . msie
2012-05-08 10:55:35 +02:00
});
2012-01-27 13:48:18 +01:00
});
2012-05-08 10:55:35 +02:00
$ ( " #close-dialog-browser " ) . click ( function () {
2012-01-27 13:48:18 +01:00
$ ( " #dialog " ) . dialog ( 'close' )
});
2012-03-27 19:00:55 +02:00
$ ( function () {
$ ( " #login_failed " ) . dialog ({
resizable : true ,
draggable : true ,
modal : true ,
2012-04-12 11:26:51 +02:00
height : 150 ,
width : 350 ,
2012-03-27 19:00:55 +02:00
overlay : {
opacity : 0.5 ,
background : " black "
},
bgiframe : jQuery . browser . msie
});
});
$ ( " #submit-hide-login-error " ) . click ( function () {
$ ( " #login_failed " ) . dialog ( 'close' )
});
2012-01-27 13:48:18 +01:00
});
2009-03-16 18:50:06 +01:00
document . getElementById ( 'nick' ) . focus ();
2012-03-27 19:00:55 +02:00
2009-03-16 18:50:06 +01:00
/* ]]> */
2009-06-08 20:26:14 +02:00
</ script >