2007-02-21 Raul Mateos <raulofpandora@gmail.com>

* pandoradb.sql: Solved small problems that caused some tables not 
	to be created.
	
	* operation/active_console/lib/db_functions.php: Remove ".." in include
	path for config file.
	
	* general/logon_ok.php: Use new styles and small check to show some text if
	no data.
	
	* include/styles/pandora.css: New styles.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@380 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2007-02-20 21:45:44 +00:00
parent 2d148cc0a5
commit 3aaa3a6b58
5 changed files with 506 additions and 466 deletions

View File

@ -1,6 +1,19 @@
2007-02-21 Raul Mateos <raulofpandora@gmail.com>
* pandoradb.sql: Solved small problems that caused some tables not
to be created.
* operation/active_console/lib/db_functions.php: Remove ".." in include
path for config file.
* general/logon_ok.php: Use new styles and small check to show some text if
no data.
* include/styles/pandora.css: New styles.
2007-02-20 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Upgraded SQL. Improved lenght for some fields.
* pandoradb.sql: Upgraded SQL. Improved lenght for some fields.
* index.php: Better permission checks
@ -13,7 +26,7 @@
* reporting/fgraph.php: MAJOR UPGRADE. Replacement for three main
graphics from agents now using Image Graph.
* reporting/stat_win.php: MAJOR UPGRADE.
* reporting/stat_win.php: MAJOR UPGRADE.
2007-02-19 Sancho Leren <slerena@openideas.info>

View File

@ -86,41 +86,45 @@ $query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7) AND I
echo $lang_label["new_message_ket"] . '</div>';
}
echo '<h2>' . $lang_label["stat_title"] . '</h2>';
echo '<h2 class="mgb25">' . $lang_label["stat_title"] . '</h2>';
$query1 = "SELECT COUNT(*) FROM tusuario";
$result = mysql_query ($query1);
$row = mysql_fetch_array ($result);
echo '<img src="images/usuarios.gif" align="middle" alt="">&nbsp;&nbsp;';
echo '<span class="users">';
echo $lang_label["there_are"] . $row[0] . ' ' . $lang_label["user_defined"];
echo '<br /><br />';
echo '</span>';
$query1 = "SELECT COUNT(*) FROM tagente";
$result = mysql_query ($query1);
$row = mysql_fetch_array ($result);
echo '<img src="images/agentes.gif" align="middle" alt="">&nbsp;&nbsp;';
echo '<span class="agents">';
echo $lang_label["there_are"] . $row[0] .' ' . $lang_label["agent_defined"];
echo '<br /><br />';
echo '</span>';
$query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos";
$result = mysql_query ($query1);
$row = mysql_fetch_array ($result);
echo '<img src="images/datos.gif" align="middle" alt="">&nbsp;&nbsp;';
echo '<span class="data">';
echo $lang_label["there_are"] . $row[0] . ' ' . $lang_label["data_harvested"];
echo '<br /><br />';
echo '</span>';
$query1 = "SELECT COUNT(*) FROM talerta_agente_modulo";
$result = mysql_query ($query1);
$row = mysql_fetch_array ($result);
echo '<img src="images/alertas.gif" align="middle" alt="">&nbsp;&nbsp;';
echo "<span class='alerts'>";
echo $lang_label["there_are"] . $row[0] .' ' . $lang_label["alert_defined"];
echo '<br /><br />';
$query1 = "SELECT * FROM tagente_estado ORDER BY timestamp DESC";
echo "</span>";
echo '<span class="time">';
$query1 = "SELECT timestamp FROM tagente_estado ORDER BY timestamp DESC";
$result = mysql_query($query1);
$row = mysql_fetch_array($result);
// Take the first element only
echo '<img src="images/time.gif" align="middle" alt="">&nbsp;&nbsp;';
echo $lang_label["data_timestamp"] . $row["timestamp"];
if($row = mysql_fetch_array($result)!='') { // Take the first element only
echo $lang_label["data_timestamp"] . $row["timestamp"];
} else {
echo 'No data received yet!';
}
echo '</span>';
echo '</div>';
?>
?>

View File

@ -1,443 +1,467 @@
/*
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// 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;
either version 2
// of the License, or (at your option) any later version.
// 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.
// You should have received a copy of the GNU General Public License
// along with this program;
if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@import url(op.css);
@import url(god.css);
@import url(link.css);
@import url(tip.css);
@import url(calendar.css);
* {
font-family: Verdana, sans-serif, Arial, Helvetica;
font-size: 11px;
}
select, textarea, input {
font-size: 12px;
}
textarea {
border: 1px solid #c0c0c0;
-moz-border-radius: 3%;
padding: 5px;
}
input {
border: 1px solid #c0c0c0;
-moz-border-radius: 1%;
padding: 2px 3px 4px 3px;
height: 23px;
}
option {
height: 16px;
}
h1, h2 {
color: #103a3a;
}
h3 {
color: #3c566d;
font-size: 13px;
}
h1 {
font-size: 16px;
}
h2 {
font-size: 15px;
}
a {
color: #486787;
text-decoration: none;
}
a:hover {
color: #003a3a;
text-decoration: underline;
}
p.center {
text-align: center;
}
h1#log {
border-bottom: 1px solid #778866;
padding-bottom: 3px;
margin-top: 5em;
width: 29em;
text-align: left;
}
h1#log_f, h1#db_fh1 {
color: #ff0000;
border-bottom: 1px solid #ff0000;
padding-bottom: 3px;
}
div#login {
text-align: left;
border: 1px solid #999999;
margin-top: 2em;
margin-bottom: -1em;
padding: 0.5em;
width: 40em;
background: url(../../images/backgrounds/background10.jpg);
}
div#login_f {
text-align: left;
margin: auto;
padding: 0.5em;
width: 48em;
margin-top: 5em;
}
div#db_f {
text-align: justify;
margin: auto;
padding: 0.5em;
width: 55em;
margin-top: 3em;
}
div#login_box {
float: right;
padding-right: 10px;
margin-top: 25px;
width: 140px;
}
div#logo_box {
margin-top: 25px;
padding-left: 5px;
}
div#noaccess {
width: 350px;
padding-left: 40px;
}
div#activity{
padding-top: 18px;
padding-bottom: 18px;
}
div#noa {
float: right;
padding-right: 50px;
margin-top: 25px;
}
div#db_ftxt {
float: right;
padding-top: 10px;
}
#page {
width: 960px;
}
#head {
border-bottom: 1px solid #708090;
text-align: right;
padding-bottom: 10px;
font-size: 10px;
width: 100%;
margin-bottom: 27px;
}
#main {
width: 780px;
float: right;
}
#menu {
width: 155px;
float: left;
}
#foot {
padding-top: 25px;
text-align: center;
clear: both;
}
div#page>div#menu {
width: 157px;
}
#ver {
margin-bottom: 25px;
}
#ip {
margin-top: 10px;
clear: both;
}
label {
display: block;
float: left;
padding-top: 4px;
}
th > label {
padding-top: 7px;
}
input:hover {
background-color: #d4dccd;
}
input.chk {
border: 0px none;
height: 14px;
}
input.datos {
background-color: #f5f5f5;
}
input.datos_readonly {
background-color: #050505;
}
input.login {
border-color: #778866;
background-color: #f5f5f5;
margin: 2px 0 8px;
width: 90px;
}
input.sub {
font-weight: bold;
border-bottom-color: #708090;
border-right-color: #708090;
-moz-border-radius: 5%;
font-size: 11px;
}
table, img {
border: 0px;
}
th, td.lb {
color: #ffffff;
background-color: #778866;
}
td.lb {
height: 16px;
padding-left: 3px;
font-weight: bold;
}
td.datos, td.datost, td.datosb, td.datos_id, td.datosf9,
td.datosf9i, td.datos_jus {
background-color: #f5f5f5;
}
td.w90datos, td.w135datos, td.w230datos {
background-color: #f5f5f5;
}
td.datos2, td.datos2t, td.datos2b, td.datos2_id, td.datos2f9,
td.datos2f9i, td.datos2_jus {
background-color: #fafbfc;
}
td.w90datos2, td.w135datos2, td.w230datos2 {
background-color: #fafbfc;
}
td.datos3 {
background-color: #e6e9cd;
}
td.datos_id {
color: #1a313a;
}
td.datos_jus, td.datos2_jus {
text-align: justify;
}
.bg , .bgt {
background-color: #4a6629;
}
.bg {
position: relative;
height: 20px;
width: 100%;
}
.f10, .w155f10, #ip {
font-size: 10px;
text-align: center;
}
.f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9,
td.datosf9i, td.datos2f9i {
font-size: 9px;
}
.f9i, .redi {
font-style: italic;
}
.f9l20 {
padding-left: 20px;
}
.f9l30, .f9l30t, .f9l30w17t {
padding-left: 30px;
}
.f9l30w17t {
line-height: 17px;
}
.jus {
text-align: justify;
}
.tit {
padding-top: 3px;
}
.tit, .titb {
font-weight: bold;
color: #ffffff;
text-align: center;
}
.error {
background: url(../../images/error.gif) no-repeat;
padding: 4px 1px 6px 30px;
}
.red , .redb, .redi, .error {
color: #ff0000;
}
.sep {
margin-left: 30px;
border-bottom: 1px solid #708090;
width: 100%;
}
.suc {
color: #5a8629;
background: url(../../images/suc.gif) no-repeat 1px;
padding: 4px 1px 6px 30px;
}
.green {
color: #5a8629;
}
.greenb {
color: #00aa00;
}
.grey {
color: #808080;
font-weight: bold;
}
.redb, .greenb, td.datos_id, td.datos2_id, f9b {
font-weight: bold;
}
.raya {
border-top: 1px solid #778866;
width: 100%;
}
.raya, .noraya {
margin-bottom: -10px;
}
.p10 {
padding-top: 1px;
padding-bottom: 0px;
}
.p21 {
padding-top: 2px;
padding-bottom: 1px;
}
.w30 {
width: 30px;
}
.w40 {
width: 40px;
}
.w45 {
width: 45px;
}
.w70 {
width: 70px;
}
.w80 {
width: 80px;
}
.w90datos {
width: 90px;
}
.w100 {
width: 100px;
}
.w120 {
width: 120px;
}
.w130 {
width: 130px;
}
.w135, .w135datos, .w35datos2 {
width: 135px;
}
.w140 {
width: 140px;
}
.w155, .w155f10 {
width: 155px;
}
.top, .bgt, .f9l30t, td.datost, td.datos2t {
vertical-align: top;
}
.bot, .titb, td.datosb {
vertical-align: bottom;
}
.w180 {
width: 180px;
}
.w200 {
width: 200px;
}
.w230datos, .w230datos2 {
width: 230px;
}
.w255 {
width: 255px;
}
.w540 {
width: 540px;
}
.w550 {
width: 550px;
}
.msg {
margin-top: 15px;
text-align: justify;
}
.mr40 {
margin-right: 40px;
}
ul.mn {
list-style: none;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
line-height: 24px;
}
.gr {
font-size: 10pt;
font-weight: bold;
}
a.mn, .gr {
font-family: Arial, Verdana, sans-serif, Helvetica;
}
.imgl {
position: absolute;
top: 0;
left: 0;
}
.imgr {
position: absolute;
top: 0;
right: -1;
}
div.imgr>img {
position:absolute;
top: 0;
right: 1;
}
div.nf {
background: url(../../images/info.gif) no-repeat;
color: #9a2f0a;
margin-left: 7px;
padding: 2px 1px 6px 25px;
}
div#wizard {
text-align: left;
border: 1px solid #999999;
margin-top: 3em;
margin-bottom: -1em;
padding: 20px;
width: 600px;
background-color: #fff;
background: url(../../images/background8.jpg);
}
.mt35 {
margin-top: 35px;
}
div#install_box {
float: right;
padding-right: 20px;
margin-top: 10px;
width: 350px;
/*
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnológicas S.L, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// 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;
either version 2
// of the License, or (at your option) any later version.
// 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.
// You should have received a copy of the GNU General Public License
// along with this program;
if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@import url(op.css);
@import url(god.css);
@import url(link.css);
@import url(tip.css);
@import url(calendar.css);
* {
font-family: Verdana, sans-serif, Arial, Helvetica;
font-size: 11px;
}
select, textarea, input {
font-size: 12px;
}
textarea {
border: 1px solid #c0c0c0;
-moz-border-radius: 3%;
padding: 5px;
}
input {
border: 1px solid #c0c0c0;
-moz-border-radius: 1%;
padding: 2px 3px 4px 3px;
height: 23px;
}
option {
height: 16px;
}
h1, h2 {
color: #103a3a;
}
h3 {
color: #3c566d;
font-size: 13px;
}
h1 {
font-size: 16px;
}
h2 {
font-size: 15px;
}
a {
color: #486787;
text-decoration: none;
}
a:hover {
color: #003a3a;
text-decoration: underline;
}
p.center {
text-align: center;
}
h1#log {
border-bottom: 1px solid #778866;
padding-bottom: 3px;
margin-top: 5em;
width: 29em;
text-align: left;
}
h1#log_f, h1#db_fh1 {
color: #ff0000;
border-bottom: 1px solid #ff0000;
padding-bottom: 3px;
}
div#login {
text-align: left;
border: 1px solid #999999;
margin-top: 2em;
margin-bottom: -1em;
padding: 0.5em;
width: 40em;
background: url(../../images/backgrounds/background10.jpg);
}
div#login_f {
text-align: left;
margin: auto;
padding: 0.5em;
width: 48em;
margin-top: 5em;
}
div#db_f {
text-align: justify;
margin: auto;
padding: 0.5em;
width: 55em;
margin-top: 3em;
}
div#login_box {
float: right;
padding-right: 10px;
margin-top: 25px;
width: 140px;
}
div#logo_box {
margin-top: 25px;
padding-left: 5px;
}
div#noaccess {
width: 350px;
padding-left: 40px;
}
div#activity{
padding-top: 18px;
padding-bottom: 18px;
}
div#noa {
float: right;
padding-right: 50px;
margin-top: 25px;
}
div#db_ftxt {
float: right;
padding-top: 10px;
}
#page {
width: 960px;
}
#head {
border-bottom: 1px solid #708090;
text-align: right;
padding-bottom: 10px;
font-size: 10px;
width: 100%;
margin-bottom: 27px;
}
#main {
width: 780px;
float: right;
}
#menu {
width: 155px;
float: left;
}
#foot {
padding-top: 25px;
text-align: center;
clear: both;
}
div#page>div#menu {
width: 157px;
}
#ver {
margin-bottom: 25px;
}
#ip {
margin-top: 10px;
clear: both;
}
label {
display: block;
float: left;
padding-top: 4px;
}
th > label {
padding-top: 7px;
}
input:hover {
background-color: #d4dccd;
}
input.chk {
border: 0px none;
height: 14px;
}
input.datos {
background-color: #f5f5f5;
}
input.datos_readonly {
background-color: #050505;
}
input.login {
border-color: #778866;
background-color: #f5f5f5;
margin: 2px 0 8px;
width: 90px;
}
input.sub {
font-weight: bold;
border-bottom-color: #708090;
border-right-color: #708090;
-moz-border-radius: 5%;
font-size: 11px;
}
table, img {
border: 0px;
}
th, td.lb {
color: #ffffff;
background-color: #778866;
}
td.lb {
height: 16px;
padding-left: 3px;
font-weight: bold;
}
td.datos, td.datost, td.datosb, td.datos_id, td.datosf9,
td.datosf9i, td.datos_jus {
background-color: #f5f5f5;
}
td.w90datos, td.w135datos, td.w230datos {
background-color: #f5f5f5;
}
td.datos2, td.datos2t, td.datos2b, td.datos2_id, td.datos2f9,
td.datos2f9i, td.datos2_jus {
background-color: #fafbfc;
}
td.w90datos2, td.w135datos2, td.w230datos2 {
background-color: #fafbfc;
}
td.datos3 {
background-color: #e6e9cd;
}
td.datos_id {
color: #1a313a;
}
td.datos_jus, td.datos2_jus {
text-align: justify;
}
.bg , .bgt {
background-color: #4a6629;
}
.bg {
position: relative;
height: 20px;
width: 100%;
}
.f10, .w155f10, #ip {
font-size: 10px;
text-align: center;
}
.f9, .f9i, .f9b, td.f9, td.f9i, td.datosf9, td.datos2f9,
td.datosf9i, td.datos2f9i {
font-size: 9px;
}
.f9i, .redi {
font-style: italic;
}
.f9l20 {
padding-left: 20px;
}
.f9l30, .f9l30t, .f9l30w17t {
padding-left: 30px;
}
.f9l30w17t {
line-height: 17px;
}
.jus {
text-align: justify;
}
.tit {
padding-top: 3px;
}
.tit, .titb {
font-weight: bold;
color: #ffffff;
text-align: center;
}
.error {
background: url(../../images/error.gif) no-repeat;
padding: 4px 1px 6px 30px;
}
.red , .redb, .redi, .error {
color: #ff0000;
}
.sep {
margin-left: 30px;
border-bottom: 1px solid #708090;
width: 100%;
}
.suc {
color: #5a8629;
background: url(../../images/suc.gif) no-repeat 1px;
padding: 4px 1px 6px 30px;
}
.green {
color: #5a8629;
}
.greenb {
color: #00aa00;
}
.grey {
color: #808080;
font-weight: bold;
}
.redb, .greenb, td.datos_id, td.datos2_id, f9b {
font-weight: bold;
}
.raya {
border-top: 1px solid #778866;
width: 100%;
}
.raya, .noraya {
margin-bottom: -10px;
}
.p10 {
padding-top: 1px;
padding-bottom: 0px;
}
.p21 {
padding-top: 2px;
padding-bottom: 1px;
}
.w30 {
width: 30px;
}
.w40 {
width: 40px;
}
.w45 {
width: 45px;
}
.w70 {
width: 70px;
}
.w80 {
width: 80px;
}
.w90datos {
width: 90px;
}
.w100 {
width: 100px;
}
.w120 {
width: 120px;
}
.w130 {
width: 130px;
}
.w135, .w135datos, .w35datos2 {
width: 135px;
}
.w140 {
width: 140px;
}
.w155, .w155f10 {
width: 155px;
}
.top, .bgt, .f9l30t, td.datost, td.datos2t {
vertical-align: top;
}
.bot, .titb, td.datosb {
vertical-align: bottom;
}
.w180 {
width: 180px;
}
.w200 {
width: 200px;
}
.w230datos, .w230datos2 {
width: 230px;
}
.w255 {
width: 255px;
}
.w540 {
width: 540px;
}
.w550 {
width: 550px;
}
.msg {
margin-top: 15px;
text-align: justify;
}
.mr40 {
margin-right: 40px;
}
ul.mn {
list-style: none;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
line-height: 24px;
}
.gr {
font-size: 10pt;
font-weight: bold;
}
a.mn, .gr {
font-family: Arial, Verdana, sans-serif, Helvetica;
}
.imgl {
position: absolute;
top: 0;
left: 0;
}
.imgr {
position: absolute;
top: 0;
right: -1;
}
div.imgr>img {
position:absolute;
top: 0;
right: 1;
}
div.nf {
background: url(../../images/info.gif) no-repeat;
color: #9a2f0a;
margin-left: 7px;
padding: 2px 1px 6px 25px;
}
div#wizard {
text-align: left;
border: 1px solid #999999;
margin-top: 3em;
margin-bottom: -1em;
padding: 20px;
width: 600px;
background-color: #fff;
background: url(../../images/background8.jpg);
}
.mt35 {
margin-top: 35px;
}
div#install_box {
float: right;
padding-right: 20px;
margin-top: 10px;
width: 350px;
}
span.users {
background: url(../../images/usuarios.gif) no-repeat;
}
span.agents {
background: url(../../images/agentes.gif) no-repeat;
}
span.data {
background: url(../../images/datos.gif) no-repeat;
}
span.alerts {
background: url(../../images/alertas.gif) no-repeat;
}
span.time {
background: url(../../images/time.gif) no-repeat;
}
span.users, span.agents, span.data, span.alerts, span.time {
margin-left: 4px;
margin-top: 10px;
padding: 4px 8px 12px 30px;
display: block;
}
.mgb25 {
margin-bottom: 25px;
}

View File

@ -16,8 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
include ("../../../include/config.php");
include "../../include/config.php";
//abrir y seleccionar la base de datos de pandora

View File

@ -72,13 +72,13 @@ CREATE TABLE `tagente_datos_inc` (
CREATE TABLE `tagente_datos_string` (
`id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment,
`id_agente_modulo` int(10) unsigned NOT NULL default '0',
`datos` tinytext NOT NULL default '',
`datos` tinytext NOT NULL,
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`id_agente` bigint(4) unsigned NOT NULL default '0',
`utimestamp` mediumint(12) unsigned NOT NULL default '0',
PRIMARY KEY (`id_tagente_datos_string`),
KEY `data_string_index_1` (`id_agente_modulo`),
KEY `data_string_index_2` (`id_agente`),
KEY `data_string_index_2` (`id_agente`)
) TYPE=InnoDB;
# Database: pandora
@ -165,7 +165,7 @@ CREATE TABLE `talerta_agente_modulo` (
`id_alerta` int(10) unsigned NOT NULL default '0',
`al_campo1` varchar(255) default '',
`al_campo2` varchar(255) default '',
`al_campo3` mediumtext default '',
`al_campo3` mediumtext,
`descripcion` varchar(255) default '',
`dis_max` int(8) default NULL,
`dis_min` int(8) default NULL,
@ -221,7 +221,7 @@ CREATE TABLE `tevento` (
`id_agente` int(10) unsigned NOT NULL default '0',
`id_usuario` varchar(60) NOT NULL default '0',
`id_grupo` int(10) unsigned NOT NULL default '0',
`estado` tynyint(4) unsigned NOT NULL default '0',
`estado` tinyint(4) unsigned NOT NULL default '0',
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`evento` varchar(255) NOT NULL default '',
PRIMARY KEY (`id_evento`),