예제 #1
0
파일: browsniff.php 프로젝트: alx/blogsfera
function fs_pri_print_images()
{
    global $user_ID, $post, $comment;
    get_currentuserinfo();
    if (!$comment->comment_agent) {
        return;
    }
    echo fs_pri_browser_images($comment->comment_agent);
}
예제 #2
0
function fs_get_records_table()
{
    require_once dirname(__FILE__) . '/ip2country.php';
    $res = "";
    $entries = fs_getentries();
    if ($entries === false) {
        return fs_db_error();
    } else {
        if ($entries) {
            $i = 0;
            $res = '<table>
	<thead>
		<tr>
			<td class="records_table_row2">' . fs_r('IP') . '</td>
			<td class="records_table_row3">' . fs_r('TimeStamp') . '</td>
			<td class="records_table_row4">' . fs_r('URL') . '</td>
			<td class="records_table_row5">' . fs_r('Referrer') . '</td>
			<td class="records_table_row6">' . fs_r('Image') . '</td>
			<td class="records_table_row7">' . fs_r('UserAgent') . '</td>
		</tr>
	</thead>
	<tbody>';
            foreach ($entries as $entry) {
                $i++;
                $res .= '<tr' . ($i % 2 ? ' class="alternate"' : "") . '>
			<td class="records_table_row2">' . fs_get_whois_link($entry) . '</td>
			<td class="records_table_row3">' . $entry->timestamp . '</td>
			<td class="records_table_row4">' . fs_get_url_link($entry) . '</td>
			<td class="records_table_row5">' . fs_get_referer_link($entry) . '</td>
			<td class="records_table_row6">' . fs_pri_browser_images($entry->useragent) . fs_get_country_flag_url($entry->country_code, true) . '</td>
			<td class="records_table_row7">' . fs_prepare_string($entry->useragent, 50) . '</td>
		</tr>';
            }
            // for loop
        } else {
            $res .= fs_r('No data yet, go get some hits');
        }
    }
    $res .= '	</tbody>
</table>';
    return $res;
}
예제 #3
0
파일: api.php 프로젝트: alx/blogsfera
function fs_api_get_browser_and_os_images($useragent)
{
    require_once dirname(__FILE__) . '/browsniff.php';
    return fs_pri_browser_images($useragent);
}
예제 #4
0
function fs_add_comment_browser_os($link)
{
    global $comment;
    $ua = $comment->comment_agent;
    if (!$ua) {
        return $link;
    }
    $FS_PATH = fs_get_firestats_path();
    if (!$FS_PATH) {
        return;
    }
    require_once $FS_PATH . '/php/browsniff.php';
    return $link . ' ' . fs_pri_browser_images($ua);
}