</td> </tr> <tr> <td colspan="2" class="config_cell"> <ul> <li> <?php fs_create_checkbox('save_excluded_records', fs_r('Save excluded records (not recommended)')); ?> </li> <li> <?php fs_e('Purge excluded records stored in the database'); ?> (<b id="num_excluded"><?php echo fs_get_num_excluded(); ?> </b>) <button class="button" onclick="sendRequest('action=purgeExcludedHits')"> <?php fs_e('Purge'); ?> </button> </li> </ul> </td> </tr> <tr> <!-- TODO : move style stuff to CSS --> <td class="config_cell" width="300"> <table> <thead>
function fs_ajax_purge_excluded_hits(&$response) { if (!fs_ajax_assert_admin($response)) { return; } if (fs_check_is_demo($response)) { return; } $res = fs_purge_excluded_entries(); if ($res === false) { ajax_error($response, sprintf(fs_r('Error purging excluded records: %s'), fs_db_error())); } else { $response['message'] = fs_r('Purged excluded records'); $response['fields']['num_excluded'] = fs_get_num_excluded(); } }