'.__('Successfully deleted old events').''; } else { echo '

'.__('Error deleting old events').'

'; } } # End of get parameters block echo "

".__('Database maintenance')." » ".__('Event database cleanup')."

"; $row = get_db_row_sql ("SELECT COUNT(*) AS total, MIN(timestamp) AS first_date, MAX(timestamp) AS latest_date FROM tevento"); $table->data = array (); $table->cellpadding = 4; $table->cellspacing = 4; $table->class = "databox"; $table->width = 300; $table->data[0][0] = ''.__('Total').':'; $table->data[0][1] = $row["total"].' '.__('Records'); $table->data[1][0] = ''.__('First date').':'; $table->data[1][1] = $row["first_date"]; $table->data[2][0] = ''.__('Latest data').':'; $table->data[2][1] = $row["latest_date"]; print_table ($table); unset ($table); echo '

'.__('Purge data').'

'; echo '
'; echo '
'; $time = get_system_time (); $fields = array (); $fields[$time - 7776000] = __('Purge event data over 90 days'); $fields[$time - 2592000] = __('Purge event data over 30 days'); $fields[$time - 1209600] = __('Purge event data over 14 days'); $fields[$time - 604800] = __('Purge event data over 7 days'); $fields[$time - 259200] = __('Purge event data over 3 days'); $fields[$time - 86400] = __('Purge event data over 1 day'); $fields[$time] = __('Purge all event data'); print_select ($fields, "date_purge", '', '', '', '0', false, false, false, "w255"); echo ''; print_submit_button (__('Do it!'),'purgedb', false, 'class="sub wand" onClick="if (!confirm(\''.__('Are you sure?').'\')) return false;"'); echo '
'; ?>