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
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
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
|
|
|
|
// modify it under the terms of the GNU General Public License
|
2008-08-22 20:07:32 +02:00
|
|
|
// as published by the Free Software Foundation for 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
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// 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) {
|
2009-03-16 18:50:06 +01:00
|
|
|
$url .= '&'.$key.'='.$value;
|
2008-12-23 22:41:05 +01:00
|
|
|
}
|
2007-08-06 13:44:49 +02:00
|
|
|
}
|
|
|
|
|
2008-08-21 23:07:20 +02:00
|
|
|
echo '<div class="databox" id="login">
|
2009-02-17 19:20:04 +01:00
|
|
|
<h1 id="log">'.__('Pandora FMS Web Console').'</h1><br />
|
2008-08-21 23:07:20 +02:00
|
|
|
<div class="databox" id="login_in">
|
2008-12-23 22:41:05 +01:00
|
|
|
<form method="post" action="index.php'.$url.'">
|
2009-01-07 11:42:38 +01:00
|
|
|
<table cellpadding="4" cellspacing="1" width="400">';
|
|
|
|
|
|
|
|
if (isset ($login_failed)) {
|
|
|
|
echo '<tr><td colspan="3">';
|
2009-02-04 12:20:31 +01:00
|
|
|
echo '<h3 class="error">'.__('Login failed').': '.$config["auth_error"].'</h3>';
|
2009-01-07 11:42:38 +01:00
|
|
|
echo '</td></tr>';
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<tr><td rowspan="3" align="left" style="border-right: solid 1px #678;">';
|
|
|
|
|
|
|
|
if (!empty ($page) && !empty ($sec)) {
|
|
|
|
foreach ($_POST as $key => $value) {
|
2009-01-14 19:51:17 +01:00
|
|
|
print_input_hidden ($key, $value);
|
2009-01-07 11:42:38 +01:00
|
|
|
}
|
|
|
|
}
|
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
|
2009-02-17 19:20:04 +01:00
|
|
|
echo '<a href="http://pandorafms.org" title="Go to pandorafms.org...">';
|
|
|
|
print_image ("images/pandora_logo.png", false, array ("alt" => "logo", "border" => 0));
|
2009-01-07 11:42:38 +01:00
|
|
|
echo '</a><br />';
|
2008-12-23 22:41:05 +01:00
|
|
|
|
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
|
2008-12-23 22:41:05 +01:00
|
|
|
echo $pandora_version.(($develop_bypass == 1) ? ' '.__('Build').' '.$build_version : '');
|
|
|
|
|
|
|
|
/* CUSTOM BRANDING ENDS HERE */
|
|
|
|
|
|
|
|
echo '</td><td class="f9b">
|
2009-01-07 11:42:38 +01:00
|
|
|
'.__('Login').':<br />'.print_input_text_extended ("nick", '', "nick", '', '', '' , false, '', 'class="login"', true).'
|
|
|
|
</td></tr>
|
|
|
|
<tr><td class="f9b">
|
|
|
|
'.__('Password').':<br />'.print_input_text_extended ("pass", '', "pass", '', '', '' ,false, '', 'class="login"', true, true).'
|
|
|
|
</td></tr>
|
|
|
|
<tr><td align="center">
|
|
|
|
'.print_submit_button ("Login",'',false,'class="sub next"',true).'
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2006-03-27 05:37:27 +02:00
|
|
|
</div>
|
2009-03-16 18:50:06 +01:00
|
|
|
<div id="ip">'.__('Your IP').': <b class="f10">'.$config["remote_addr"].'</b></div>
|
|
|
|
</div>';
|
2008-08-21 23:07:20 +02:00
|
|
|
?>
|
2009-03-16 18:50:06 +01:00
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
/* <![CDATA[ */
|
|
|
|
document.getElementById('nick').focus();
|
|
|
|
/* ]]> */
|
2009-06-08 20:26:14 +02:00
|
|
|
</script>
|