Exemplo n.º 1
0
//]]>

</script>
<div id="fs_users_div">
	<!-- Use table for base layout -->
	<table>
		<tr>
			<td>
				<div id="fs_users_table_holder" class="fwrap">
					<h2><?php 
fs_e('Manage users');
?>
</h2>
					<div id="fs_users_table">
						<?php 
echo fs_get_users_manage_table();
?>
					</div>
				</div>
			</td>
			<td>
				<div id="fs_users_tab_help" class="fwrap">
					<h2><?php 
fs_e('Help');
?>
</h2>
					<?php 
fs_e('You can manage users here');
?>
				</div>
			</td>
Exemplo n.º 2
0
function fs_ajax_send_update(&$response)
{
    if (!isset($_POST['update'])) {
        return;
    }
    $update_blocks = explode(';', $_POST['update']);
    // if we have no more blocks return.
    if (count($update_blocks) == 0) {
        return;
    }
    // pop the first block.
    $update = array_shift($update_blocks);
    if (count($update_blocks) > 0) {
        // push the remaining items to the response, so the client will be able to send antoher request with the rest.
        $response['send_request'] = "action=updateFields&update=" . implode(";", $update_blocks);
    }
    $updates = explode(',', $update);
    foreach ($updates as $update) {
        switch ($update) {
            case 'popular_pages':
                $response['fields'][$update] = addslashes(fs_get_popular_pages_tree());
                break;
            case 'records_table':
                $response['fields'][$update] = fs_get_records_table();
                break;
            case 'countries_list':
                $response['fields'][$update] = fs_get_countries_list();
                break;
            case 'fs_recent_referers':
                $response['fields'][$update] = addslashes(fs_get_recent_referers_tree());
                $response['type'][$update] = 'tree';
                break;
            case 'fs_browsers_tree':
                $response['fields'][$update] = fs_get_browsers_tree();
                $response['type'][$update] = 'tree';
                break;
            case 'fs_os_tree':
                $response['fields'][$update] = fs_get_os_tree();
                $response['type'][$update] = 'tree';
                break;
            case 'fs_search_terms':
                $response['fields'][$update] = fs_get_search_terms_tree();
                $response['type'][$update] = 'tree';
                break;
            case 'botlist_placeholder':
                $response['fields']['botlist_placeholder'] = addslashes(fs_get_bot_list());
                break;
            case 'num_excluded':
                $response['fields']['num_excluded'] = fs_get_num_excluded();
                break;
            case 'stats_total_count':
                $response['fields']['stats_total_count'] = fs_get_hit_count();
                break;
            case 'stats_total_unique':
                $response['fields']['stats_total_unique'] = fs_get_unique_hit_count();
                break;
            case 'stats_total_count_last_day':
                $response['fields']['stats_total_count_last_day'] = fs_get_hit_count(1);
                break;
            case 'stats_total_unique_last_day':
                $response['fields']['stats_total_unique_last_day'] = fs_get_unique_hit_count(1);
                break;
            case 'fs_sites_table':
                $response['fields']['fs_sites_table'] = fs_get_sites_manage_table();
                break;
            case 'fs_users_table':
                $response['fields']['fs_users_table'] = fs_get_users_manage_table();
                break;
            case 'sites_filter_span':
                $response['fields']['sites_filter_span'] = fs_get_sites_list();
                break;
            case 'fs_archive_status':
                $response['fields']['fs_archive_status'] = sprintf(fs_r("%s days can be compacted, database size %s"), fs_get_num_old_days(), sprintf("%.1f MB", fs_get_database_size() / (1024 * 1024)));
                break;
            default:
                ajax_error($response, sprintf("AJAX:" . fs_r('Unkown field: %s'), $update));
        }
    }
}