" . __('Pandora audit') . " » " .__('Review Logs') . ""; $offset = get_parameter ("offset", 0); $tipo_log = get_parameter ("tipo_log", 'all'); echo ''; echo ""; echo ""; $filter = ''; if ($tipo_log != 'all') { $filter = sprintf (" WHERE accion = '%s'", $tipo_log); } $sql = "SELECT COUNT(*) FROM tsesion ".$filter; $count = get_db_sql ($sql); $url = "index.php?sec=godmode&sec2=godmode/admin_access_logs&tipo_log=".$tipo_log; echo "
"; echo '

'.__('Filter').'

'; echo "
"; if ($config['flash_charts']) { echo graphic_user_activity (300, 140); } else { echo ''; } $rows = get_db_all_rows_sql ("SELECT DISTINCT(accion) FROM tsesion"); if (empty ($rows)) { $rows = array (); } $actions = array (); foreach ($rows as $row) { $actions[$row["accion"]] = $row["accion"]; } echo "
"; echo '
'; echo __('Action').': '; echo "
"; print_select ($actions, 'tipo_log', $tipo_log, 'this.form.submit();', __('All'), 'all'); echo '
'; echo ''; echo "
"; pagination ($count, $url); echo "
"; $sql = sprintf ("SELECT * FROM tsesion%s ORDER BY fecha DESC LIMIT %d, %d", $filter, $offset, $config["block_size"]); $result = get_db_all_rows_sql ($sql); if (empty ($result)) { $result = array (); } $table->cellpadding = 4; $table->cellspacing = 4; $table->width = 750; $table->class = "databox"; $table->size = array (); $table->data = array (); $table->head = array (); $table->head[0] = __('User'); $table->head[1] = __('Action'); $table->head[2] = __('Date'); $table->head[3] = __('Source IP'); $table->head[4] = __('Comments'); $table->size[0] = 80; $table->size[2] = 130; $table->size[3] = 100; $table->size[4] = 200; $rowPair = true; $iterator = 0; // Get data foreach ($result as $row) { if ($rowPair) $table->rowclass[$iterator] = 'rowPair'; else $table->rowclass[$iterator] = 'rowOdd'; $rowPair = !$rowPair; $iterator++; $data = array (); $data[0] = $row["ID_usuario"]; $data[1] = $row["accion"]; $data[2] = $row["fecha"]; $data[3] = $row["IP_origen"]; $data[4] = $row["descripcion"]; array_push ($table->data, $data); } print_table ($table); ?>