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,3 +1,16 @@
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> 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.

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 $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"; $query1 = "SELECT COUNT(*) FROM tusuario";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $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 $lang_label["there_are"] . $row[0] . ' ' . $lang_label["user_defined"];
echo '<br /><br />'; echo '</span>';
$query1 = "SELECT COUNT(*) FROM tagente"; $query1 = "SELECT COUNT(*) FROM tagente";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $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 $lang_label["there_are"] . $row[0] .' ' . $lang_label["agent_defined"];
echo '<br /><br />'; echo '</span>';
$query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos"; $query1 = "SELECT COUNT(id_agente_datos) FROM tagente_datos";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $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 $lang_label["there_are"] . $row[0] . ' ' . $lang_label["data_harvested"];
echo '<br /><br />'; echo '</span>';
$query1 = "SELECT COUNT(*) FROM talerta_agente_modulo"; $query1 = "SELECT COUNT(*) FROM talerta_agente_modulo";
$result = mysql_query ($query1); $result = mysql_query ($query1);
$row = mysql_fetch_array ($result); $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 $lang_label["there_are"] . $row[0] .' ' . $lang_label["alert_defined"];
echo '<br /><br />'; echo "</span>";
$query1 = "SELECT * FROM tagente_estado ORDER BY timestamp DESC"; echo '<span class="time">';
$query1 = "SELECT timestamp FROM tagente_estado ORDER BY timestamp DESC";
$result = mysql_query($query1); $result = mysql_query($query1);
$row = mysql_fetch_array($result); if($row = mysql_fetch_array($result)!='') { // Take the first element only
// Take the first element only
echo '<img src="images/time.gif" align="middle" alt="">&nbsp;&nbsp;';
echo $lang_label["data_timestamp"] . $row["timestamp"]; echo $lang_label["data_timestamp"] . $row["timestamp"];
} else {
echo 'No data received yet!';
}
echo '</span>';
echo '</div>'; echo '</div>';
?> ?>

View File

@ -441,3 +441,27 @@ div#install_box {
margin-top: 10px; margin-top: 10px;
width: 350px; 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 // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA // 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 //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` ( CREATE TABLE `tagente_datos_string` (
`id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment, `id_tagente_datos_string` bigint(20) unsigned NOT NULL auto_increment,
`id_agente_modulo` int(10) unsigned NOT NULL default '0', `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', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`id_agente` bigint(4) unsigned NOT NULL default '0', `id_agente` bigint(4) unsigned NOT NULL default '0',
`utimestamp` mediumint(12) unsigned NOT NULL default '0', `utimestamp` mediumint(12) unsigned NOT NULL default '0',
PRIMARY KEY (`id_tagente_datos_string`), PRIMARY KEY (`id_tagente_datos_string`),
KEY `data_string_index_1` (`id_agente_modulo`), KEY `data_string_index_1` (`id_agente_modulo`),
KEY `data_string_index_2` (`id_agente`), KEY `data_string_index_2` (`id_agente`)
) TYPE=InnoDB; ) TYPE=InnoDB;
# Database: pandora # Database: pandora
@ -165,7 +165,7 @@ CREATE TABLE `talerta_agente_modulo` (
`id_alerta` int(10) unsigned NOT NULL default '0', `id_alerta` int(10) unsigned NOT NULL default '0',
`al_campo1` varchar(255) default '', `al_campo1` varchar(255) default '',
`al_campo2` varchar(255) default '', `al_campo2` varchar(255) default '',
`al_campo3` mediumtext default '', `al_campo3` mediumtext,
`descripcion` varchar(255) default '', `descripcion` varchar(255) default '',
`dis_max` int(8) default NULL, `dis_max` int(8) default NULL,
`dis_min` 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_agente` int(10) unsigned NOT NULL default '0',
`id_usuario` varchar(60) NOT NULL default '0', `id_usuario` varchar(60) NOT NULL default '0',
`id_grupo` int(10) unsigned 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', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`evento` varchar(255) NOT NULL default '', `evento` varchar(255) NOT NULL default '',
PRIMARY KEY (`id_evento`), PRIMARY KEY (`id_evento`),