2010-09-22 Miguel de Dios <miguel.dedios@artica.es>
* ChangeLog: fixed previous commit of jobmate that erase some lines of ChangeLog. * index.php: cleaned source code style. * mobile/include/style/main.css: added style for the login mobile page. * mobile/include/user.class.php: the "loginShow" function have a nice login box with some style. * mobile/images/transparent_pixel.gif, mobile/images/key.gif: added image files for the login page. The key image is created for "barretr" in http://www.openclipart.org/detail/3330. * mobile/index.php: changes for to show logout and new login box. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3275 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d2ff833921
commit
9419f38fda
|
@ -1,8 +1,102 @@
|
|||
2010-09-22 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* ChangeLog: fixed previous commit of jobmate that erase some lines of
|
||||
ChangeLog.
|
||||
|
||||
* index.php: cleaned source code style.
|
||||
|
||||
* mobile/include/style/main.css: added style for the login mobile page.
|
||||
|
||||
* mobile/include/user.class.php: the "loginShow" function have a nice
|
||||
login box with some style.
|
||||
|
||||
* mobile/images/transparent_pixel.gif, mobile/images/key.gif: added image
|
||||
files for the login page. The key image is created for "barretr" in
|
||||
"http://www.openclipart.org/detail/3330", thanks.
|
||||
|
||||
* mobile/index.php: changes for to show logout and new login box.
|
||||
|
||||
2010-09-22 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* godmode/reporting/visual_console_builder.elements.php,
|
||||
godmode/reporting/visual_console_builder.editor.php: Fixed bug
|
||||
#3073239: bad intervals in combo for period selection.
|
||||
|
||||
2010-09-22 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_modules.php: Fixed bad call to
|
||||
enterprise function
|
||||
|
||||
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_html.php: in function "print_select_groups" and function
|
||||
"print_select_from_sql" added source code to check $config['text_char_long']
|
||||
for show small text in this widgets.
|
||||
|
||||
* include/functions.php: in function "get_event_types" and "get_priorities"
|
||||
added source code to check $config['text_char_long'] for show small text in
|
||||
this widgets. And in function "get_priority_class" cleaned source code.
|
||||
|
||||
* operation/agentes/status_monitor.php, operation/events/events.php: cleaned
|
||||
source code style.
|
||||
|
||||
* images/pandora.ico.gif: added image file for to use in the mobile footer.
|
||||
|
||||
* mobile/operation/agents/monitor_status.php,
|
||||
mobile/operation/agents/view_agents.php,
|
||||
mobile/operation/agents/tactical.php,
|
||||
mobile/operation/agents/group_view.php, mobile/operation/events/events.php,
|
||||
mobile/include/style/main.css, mobile/include/functions_web.php,
|
||||
mobile/index.php, general/footer.php: continued the develop, yep the
|
||||
Pandora Console Mobile is complete (only rest the bugs).
|
||||
|
||||
2010-09-21 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_db.php
|
||||
godmode/agentes/modificar_agente.php: Added the calls
|
||||
to enterprise to delete an agent to all their policies
|
||||
when we delete it for bug 3072471
|
||||
|
||||
2010-09-21 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_html.php: fixed the width by default in the function
|
||||
"print_table", now there isn't a default width (before it was 80%).
|
||||
|
||||
* include/pchart_graph.php: fixed in the function "add_events" when tryed
|
||||
to add a event out the data.
|
||||
|
||||
* include/fgraph.php: check the user with the mobile methods.
|
||||
|
||||
* include/functions_db.php: in function "check_login" check the user with
|
||||
the mobile methods.
|
||||
|
||||
* images/status_sets/default/severity_warning_pixel.png,
|
||||
images/status_sets/default/severity_normal_pixel.png,
|
||||
images/status_sets/default/severity_informational_pixel.png,
|
||||
images/status_sets/default/severity_maintenance_pixel.png,
|
||||
images/status_sets/default/severity_critical_pixel.png: added the image
|
||||
files for to show in the event mobile's page.
|
||||
|
||||
* mobile/operation/agents/view_agents.php,
|
||||
mobile/operation/agents/tactical.php,
|
||||
mobile/operation/agents/view_alerts.php, mobile/operation/events/events.php,
|
||||
mobile/operation/servers/view_servers.php, mobile/include/user.class.php,
|
||||
mobile/include/system.class.php: changed the style the some pages to show
|
||||
more clearly the pages in old m$-mobiles.
|
||||
|
||||
2010-09-21 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* godmode/massive/massive_add_action_alerts.php,
|
||||
godmode/massive/massive_delete_action_alerts.php: Fixed
|
||||
addition/deletion for compound alerts does not work.
|
||||
|
||||
* include/functions_alerts.php: To fix above problem, added a function,
|
||||
delete_alert_compound_action().
|
||||
|
||||
2010-09-20 Raúl Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* operation/agentes/customfields.php: Add code to show text when no
|
||||
fields defined.
|
||||
|
||||
2010-09-20 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
|
@ -12252,3 +12346,4 @@ svn co
|
|||
translation.
|
||||
|
||||
* include/languages/index.pot: Updated po template.
|
||||
|
|
@ -147,13 +147,15 @@ if (! isset ($config['id_user']) && isset ($_GET["loginhash"])) {
|
|||
logon_db ($loginhash_user, $_SERVER['REMOTE_ADDR']);
|
||||
$_SESSION['id_usuario'] = $loginhash_user;
|
||||
$config["id_user"] = $loginhash_user;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
require_once ('general/login_page.php');
|
||||
audit_db ("system", $_SERVER['REMOTE_ADDR'], "Logon Failed (loginhash", "");
|
||||
while (@ob_end_flush ());
|
||||
exit ("</html>");
|
||||
}
|
||||
} elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
|
||||
}
|
||||
elseif (! isset ($config['id_user']) && isset ($_GET["login"])) {
|
||||
// Login process
|
||||
|
||||
$config["auth_error"] = ""; //Set this to the error message from the authorization mechanism
|
||||
|
@ -186,7 +188,8 @@ if (! isset ($config['id_user']) && isset ($_GET["loginhash"])) {
|
|||
$l10n = new gettext_reader (new CachedFileReader ('./include/languages/'.$config["language"].'.mo'));
|
||||
$l10n->load_tables();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// User not known
|
||||
$login_failed = true;
|
||||
require_once ('general/login_page.php');
|
||||
|
@ -194,7 +197,8 @@ if (! isset ($config['id_user']) && isset ($_GET["loginhash"])) {
|
|||
while (@ob_end_flush ());
|
||||
exit ("</html>");
|
||||
}
|
||||
} elseif (! isset ($config['id_user'])) {
|
||||
}
|
||||
elseif (! isset ($config['id_user'])) {
|
||||
// There is no user connected
|
||||
require_once ('general/login_page.php');
|
||||
while (@ob_end_flush ());
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 B |
|
@ -92,6 +92,120 @@ tr.rowOdd:hover {
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
/*----------------INI-LOGIN---------------------------------------------------*/
|
||||
#center_div {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
#negative_position_div {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -335px;
|
||||
}
|
||||
|
||||
#style_div #shadow {
|
||||
display: block;
|
||||
border: 0px;
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 235px;
|
||||
background: #036A3A;
|
||||
|
||||
width: 200px;
|
||||
height: 120px;
|
||||
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#style_div #shadow p {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
#style_div #shadow * {
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
#style_div #version {
|
||||
color: #036A3A;
|
||||
}
|
||||
|
||||
#style_div #login_box {
|
||||
background: url("../../../images/pandora_logo.png") bottom left no-repeat #fff;
|
||||
|
||||
display: block;
|
||||
border: 2px solid #6DC62D;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 220px;
|
||||
|
||||
width: 200px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
#style_div #text-user {
|
||||
width: 60px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
#style_div #password-password {
|
||||
width: 60px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 45px;
|
||||
}
|
||||
|
||||
#style_div .login_button {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: url('../../images/key.gif') #fff center no-repeat;
|
||||
border: outset 5px #A3A3A3;
|
||||
position: absolute;
|
||||
left: 120px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
#style_div .login_button:hover {
|
||||
border: outset 5px #E9E9E9;
|
||||
}
|
||||
|
||||
/*STYLE FOR IEXPLOTER MOBILE, MAY BE ANY DAY ERASE THIS LINES*/
|
||||
#form_table td {
|
||||
background: url('../../images/transparent_pixel.gif');
|
||||
}
|
||||
|
||||
#table_version #text-user {
|
||||
width: 60px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
#table_version #password-password {
|
||||
width: 60px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
#table_version .login_button {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: url('../../images/key.gif') #fff center no-repeat;
|
||||
border: outset 5px #A3A3A3;
|
||||
}
|
||||
|
||||
#table_version_negative_position_div {
|
||||
/*margin-left: -120px;*/
|
||||
}
|
||||
|
||||
/*----------------END-LOGIN---------------------------------------------------*/
|
||||
|
||||
|
||||
/*----------------INI-MENU----------------------------------------------------*/
|
||||
#top_menu {
|
||||
background: #3F4E2F;
|
||||
|
|
|
@ -54,7 +54,7 @@ class User {
|
|||
$password = $this->system->getRequest('password', null);
|
||||
}
|
||||
|
||||
if (process_user_login($user, $password)) {
|
||||
if (process_user_login($user, $password) !== false) {
|
||||
$this->logged = true;
|
||||
$this->user = $user;
|
||||
}
|
||||
|
@ -70,13 +70,93 @@ class User {
|
|||
$this->logged = false;
|
||||
}
|
||||
|
||||
public function login() {
|
||||
echo "<form method='post'>";
|
||||
public function showLogin($text = '') {
|
||||
global $pandora_version;
|
||||
|
||||
echo "<form action='index.php' method='post'>";
|
||||
print_input_hidden('action', 'login');
|
||||
print_input_text('user', $this->user, __('User'), 10, 20);
|
||||
print_input_password('password', '', __('Password'), 10, 20);
|
||||
print_submit_button(__('Login'), 'login', false, 'class="sub next"');
|
||||
echo "</form>";
|
||||
?>
|
||||
<div id="center_div">
|
||||
<div id="table_version_negative_position_div">
|
||||
<table cellspacing="0" style="margin: 10px;" id="table_version">
|
||||
<tr>
|
||||
<td style="height: 120px; width: 200px; background: #fff; width: 200px; height: 120px;" colspan="2" rowspan="2">
|
||||
<table id="form_table" cellspacing="0" style="border: 2px solid #6DC62D; width: 100%; height: 100%; background: url('../images/pandora_logo.png') bottom left no-repeat #fff;">
|
||||
<tr>
|
||||
<td style="color: #036A3A; height: 20px;" colspan="2" valign="top" align="left"><?php echo $pandora_version;?> <?php echo $text;?></td>
|
||||
<td style="width: 80px; height: 80px;" valign="bottom" align="left" rowspan="4">
|
||||
<?php
|
||||
print_submit_button(__(''), 'login', false, 'class="login_button" alt="' . __('Login') . '" title="' . __('Login') . '"');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20px; height: 25px;"> </td>
|
||||
<td valign="top" align="left"><?php print_input_text('user', $this->user, __('User'), 10, 20);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20px; height: 15px;"> </td>
|
||||
<td valign="top" align="left"><?php print_input_password('password', '', __('Password'), 10, 20);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height: 20px;"> </td>
|
||||
<td style="height: 20px;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="height: 15px; width: 15px; background: #fff;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 15px; height: 90px; background: #036A3A;"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height: 15px; width: 15px; background: #fff;"> </td>
|
||||
<td style="width: 200px; height: 15px; background: #036A3A; color: #fff; font-size: 9px; text-align: right;" colspan="2">
|
||||
<?php echo '<b style="font-size: 9px;">' . __('Your IP').':</b>' . $this->system->getConfig("remote_addr") . ' ';?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background: white; height: 0px;"> </td>
|
||||
<td style="background: white; height: 0px;"> </td>
|
||||
<td style="background: white; height: 0px;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
echo "</form>";
|
||||
|
||||
/*
|
||||
?>
|
||||
<div id="center_div">
|
||||
<div id="negative_position_div">
|
||||
<div id="style_div">
|
||||
<div id="shadow">
|
||||
<p>
|
||||
<?php
|
||||
echo '<b>' . __('Your IP').':</b>' . $this->system->getConfig("remote_addr");
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
echo "<form id='login_box' method='post' style=''>";
|
||||
echo "<div id='version'>" . $pandora_version . "</div>";
|
||||
print_input_hidden('action', 'login');
|
||||
print_input_text('user', $this->user, __('User'), 10, 20);
|
||||
print_input_password('password', '', __('Password'), 10, 20);
|
||||
print_submit_button(__(''), 'login', false, 'onclick="javascript: click();" class="login_button" alt="' . __('Login') . '" title="' . __('Login') . '"');
|
||||
echo "</form>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
*/
|
||||
}
|
||||
|
||||
public function getIdUser() {
|
||||
|
|
|
@ -39,7 +39,6 @@ $user->hackinjectConfig();
|
|||
<title>Pandora FMS - <?php echo __('the Flexible Monitoring System (mobile version)'); ?></title>
|
||||
<link rel="stylesheet" href="include/style/main.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../include/styles/tip.css" type="text/css" />
|
||||
<script type="text/javascript" src="../include/javascript/jquery.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
@ -50,29 +49,35 @@ $user->hackinjectConfig();
|
|||
switch ($action) {
|
||||
case 'login':
|
||||
if (!$user->checkLogin()) {
|
||||
$user->login();
|
||||
$user->showLogin();
|
||||
}
|
||||
else {
|
||||
$user->hackinjectConfig();
|
||||
menu();
|
||||
|
||||
if (! give_acl($system->getConfig('id_user'), 0, "AR")) {
|
||||
audit_db($system->getConfig('id_user'), $_SERVER['REMOTE_ADDR'], "ACL Violation",
|
||||
"Trying to access Agent Data view");
|
||||
require ("../general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$tactical = new Tactical();
|
||||
$tactical->show();
|
||||
if ($user->isLogged()) {
|
||||
$user->hackinjectConfig();
|
||||
menu();
|
||||
|
||||
if (! give_acl($system->getConfig('id_user'), 0, "AR")) {
|
||||
audit_db($system->getConfig('id_user'), $_SERVER['REMOTE_ADDR'], "ACL Violation",
|
||||
"Trying to access Agent Data view");
|
||||
require ("../general/noaccess.php");
|
||||
return;
|
||||
}
|
||||
|
||||
$tactical = new Tactical();
|
||||
$tactical->show();
|
||||
}
|
||||
else {
|
||||
$user->showLogin();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'logout':
|
||||
$user->logout();
|
||||
$user->showLogin('<span style="color: red; font-weight: bolder; float: right;">' . __('LOGOUT') . '</span>');
|
||||
break;
|
||||
default:
|
||||
if (!$user->isLogged()) {
|
||||
$user->login();
|
||||
$user->showLogin();
|
||||
}
|
||||
else {
|
||||
menu();
|
||||
|
@ -80,7 +85,8 @@ $user->hackinjectConfig();
|
|||
switch ($page) {
|
||||
case 'reports':
|
||||
if ($enterpriseHook !== ENTERPRISE_NOT_HOOK) {
|
||||
$enterprise = new Enterprise($page);
|
||||
$enterprise = new Enterprise($page);
|
||||
$enterprise->show();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue