2008-06-26 Esteban Sanchez <estebans@artica.es>
* general/logon_ok.php: Use pandora functions to show last sessions. * index.php: Tab and blankspaces style correction. * godmode/reporting/map_builder.php: Fixed field name when inserting a layout_data. Fixed group icon on list. * operation/visual_console/render_view.php: Deleted firebug debug which was causing not to work on browsers without that extension. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@900 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bd237a1a82
commit
13699fb3df
|
@ -1,3 +1,15 @@
|
||||||
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* general/logon_ok.php: Use pandora functions to show last sessions.
|
||||||
|
|
||||||
|
* index.php: Tab and blankspaces style correction.
|
||||||
|
|
||||||
|
* godmode/reporting/map_builder.php: Fixed field name when inserting a
|
||||||
|
layout_data. Fixed group icon on list.
|
||||||
|
|
||||||
|
* operation/visual_console/render_view.php: Deleted firebug debug
|
||||||
|
which was causing not to work on browsers without that extension.
|
||||||
|
|
||||||
2008-06-26 Esteban Sanchez <estebans@artica.es>
|
2008-06-26 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* ajax.php: Sed id_user in config array.
|
* ajax.php: Sed id_user in config array.
|
||||||
|
|
|
@ -158,44 +158,36 @@ echo "</table>";
|
||||||
echo "<div id='activity'>";
|
echo "<div id='activity'>";
|
||||||
// Show last activity from this user
|
// Show last activity from this user
|
||||||
echo "<h2>" . $lang_label["user_last_activity"] . "</h2>";
|
echo "<h2>" . $lang_label["user_last_activity"] . "</h2>";
|
||||||
// Show table header
|
|
||||||
echo '<table cellpadding="4" cellspacing="4" width="700" class="databox"><tr>';
|
|
||||||
echo '<th>' . $lang_label["user"] . '</th>';
|
|
||||||
echo '<th>' . $lang_label["action"] . '</th>';
|
|
||||||
echo '<th width="130px">' . $lang_label["date"] . '</th>';
|
|
||||||
echo '<th>' . $lang_label["src_address"] . '</th>';
|
|
||||||
echo '<th width="200px">' . $lang_label["comments"] . '</th></tr>';
|
|
||||||
|
|
||||||
// Skip offset records
|
|
||||||
$query1="SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7)
|
|
||||||
AND ID_usuario = '" . $nick . "' ORDER BY fecha DESC limit 15";
|
|
||||||
|
|
||||||
$result = mysql_query ($query1);
|
|
||||||
$contador = 5; // Max items
|
|
||||||
$color = 1;
|
$color = 1;
|
||||||
while ($row = mysql_fetch_array ($result) && $contador > 0) {
|
|
||||||
|
|
||||||
if ($color == 1){
|
$table->width = '700px';
|
||||||
$tdcolor = "datos";
|
$table->data = array ();
|
||||||
$color = 0;
|
$table->size = array ();
|
||||||
} else {
|
$table->size[2] = '130px';
|
||||||
$tdcolor = "datos2";
|
$table->size[4] = '200px';
|
||||||
$color = 1;
|
$table->head = array ();
|
||||||
|
$table->head[0] = lang_string ('user');
|
||||||
|
$table->head[1] = lang_string ('action');
|
||||||
|
$table->head[2] = lang_string ('date');
|
||||||
|
$table->head[3] = lang_string ('src_address');
|
||||||
|
$table->head[4] = lang_string ('comments');
|
||||||
|
|
||||||
|
$sql = sprintf ('SELECT * FROM tsesion WHERE (TO_DAYS(fecha) > TO_DAYS(NOW()) - 7)
|
||||||
|
AND ID_usuario = "%s" ORDER BY fecha DESC LIMIT 5', $nick);
|
||||||
|
$sessions = get_db_all_rows_sqlfree ($sql);
|
||||||
|
foreach ($sessions as $session) {
|
||||||
|
$data = array ();
|
||||||
|
|
||||||
|
$data[0] = '<strong>'.$session['ID_usuario'].'</strong>';
|
||||||
|
$data[1] = $session['accion'];
|
||||||
|
$data[2] = $session['fecha'];
|
||||||
|
$data[3] = $session['IP_origen'];
|
||||||
|
$data[4] = $session['descripcion'];
|
||||||
|
|
||||||
|
array_push ($table->data, $data);
|
||||||
}
|
}
|
||||||
|
print_table ($table);
|
||||||
$usuario = $row["ID_usuario"];
|
|
||||||
echo '<tr>';
|
|
||||||
echo '<td class="' . $tdcolor . 'f9"><b>' . $usuario . '</b></td>';
|
|
||||||
echo '<td class="' . $tdcolor . 'f9">' . $row["accion"]. '</td>';
|
|
||||||
echo '<td class="' . $tdcolor . 'f9">' . $row["fecha"]. '</td>';
|
|
||||||
echo '<td class="' . $tdcolor . 'f9">' . $row["IP_origen"]. '</td>';
|
|
||||||
echo '<td class="' . $tdcolor . 'f9">' . $row["descripcion"]. '</td>';
|
|
||||||
echo '</tr>';
|
|
||||||
|
|
||||||
$contador--;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</table>";
|
|
||||||
echo "</div>"; // activity
|
echo "</div>"; // activity
|
||||||
|
|
||||||
echo '</div>'; // class "jus"
|
echo '</div>'; // class "jus"
|
||||||
|
|
|
@ -147,7 +147,7 @@ if ($create_layout_data) {
|
||||||
$layout_data_map_linked = (int) get_parameter ("map_linked");
|
$layout_data_map_linked = (int) get_parameter ("map_linked");
|
||||||
|
|
||||||
$sql = sprintf ('INSERT INTO tlayout_data (id_layout, label, id_layout_linked,
|
$sql = sprintf ('INSERT INTO tlayout_data (id_layout, label, id_layout_linked,
|
||||||
label_color, image, type, id_agente_modulo, parent_item, period, link_color)
|
label_color, image, type, id_agente_modulo, parent_item, period, no_link_color)
|
||||||
VALUES (%d, "%s", %d, "%s", "%s", %d, %d, %d, %d, 1)',
|
VALUES (%d, "%s", %d, "%s", "%s", %d, %d, %d, %d, 1)',
|
||||||
$id_layout, $layout_data_label,
|
$id_layout, $layout_data_label,
|
||||||
$layout_data_map_linked,
|
$layout_data_map_linked,
|
||||||
|
@ -259,7 +259,7 @@ if (! $edit_layout && ! $id_layout) {
|
||||||
$data = array ();
|
$data = array ();
|
||||||
|
|
||||||
$data[0] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'">'.$map['name'].'</a>';
|
$data[0] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'">'.$map['name'].'</a>';
|
||||||
$data[1] = '<img src="images/'.dame_grupo_icono ($map['id_group']).'" /> ';
|
$data[1] = '<img src="images/'.dame_grupo_icono ($map['id_group']).'.png" /> ';
|
||||||
$data[1] .= dame_nombre_grupo ($map['id_group']);
|
$data[1] .= dame_nombre_grupo ($map['id_group']);
|
||||||
$data[2] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">
|
$data[2] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/map_builder&id_layout='.$map['id'].'&delete_layout=1">
|
||||||
<img src="images/cross.png"></a>';
|
<img src="images/cross.png"></a>';
|
||||||
|
|
|
@ -124,7 +124,7 @@ require "include/functions_db.php";
|
||||||
$REMOTE_ADDR = getenv ("REMOTE_ADDR");
|
$REMOTE_ADDR = getenv ("REMOTE_ADDR");
|
||||||
|
|
||||||
// Login process
|
// Login process
|
||||||
if ( (! isset ($_SESSION['id_usuario'])) AND (isset ($_GET["login"]))) {
|
if ( (! isset ($_SESSION['id_usuario'])) && (isset ($_GET["login"]))) {
|
||||||
$nick = get_parameter_post ("nick");
|
$nick = get_parameter_post ("nick");
|
||||||
$pass = get_parameter_post ("pass");
|
$pass = get_parameter_post ("pass");
|
||||||
|
|
||||||
|
@ -179,8 +179,6 @@ require "include/functions_db.php";
|
||||||
} else {
|
} else {
|
||||||
// There is session for id_usuario
|
// There is session for id_usuario
|
||||||
$config["id_user"] = $_SESSION["id_usuario"];
|
$config["id_user"] = $_SESSION["id_usuario"];
|
||||||
//$id_usuario = entrada_limpia ($_SESSION["id_usuario"]);
|
|
||||||
//$id_user = entrada_limpia ($_SESSION["id_usuario"]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Log off
|
// Log off
|
||||||
|
|
|
@ -120,7 +120,6 @@ $(document).ready (function () {
|
||||||
<?php if ($refr) : ?>
|
<?php if ($refr) : ?>
|
||||||
t = new Date();
|
t = new Date();
|
||||||
t.setTime (t.getTime() + <?=$refr * 1000?>);
|
t.setTime (t.getTime() + <?=$refr * 1000?>);
|
||||||
console.log (t);
|
|
||||||
$.countdown.setDefaults($.countdown.regional["<?=$config['language']?>"]);
|
$.countdown.setDefaults($.countdown.regional["<?=$config['language']?>"]);
|
||||||
$("#countdown").countdown({until: t, format: 'MS', description: '<?=lang_string ("Until refresh")?>'});
|
$("#countdown").countdown({until: t, format: 'MS', description: '<?=lang_string ("Until refresh")?>'});
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue