示例#1
0
    $total_B_YESTERDAY_HITS = 0;
    $total_TOTAL_HITS = 0;
    $total_PERIOD_HITS = 0;
    while ($ar = $searchers->Fetch()) {
        $i++;
        $total_TODAY_HITS += $ar["TODAY_HITS"];
        $total_YESTERDAY_HITS += $ar["YESTERDAY_HITS"];
        $total_B_YESTERDAY_HITS += $ar["B_YESTERDAY_HITS"];
        $total_TOTAL_HITS += $ar["TOTAL_HITS"];
        $total_PERIOD_HITS += $ar["PERIOD_HITS"];
        if ($i <= COption::GetOptionInt("statistic", "STAT_LIST_TOP_SIZE")) {
            ?>
	<tr>
		<td>
			<?php 
            $dynamic_days = CSearcher::DynamicDays($ar["ID"]);
            if ($dynamic_days >= 2 && function_exists("ImageCreate")) {
                ?>
				<a href="<?php 
                echo hrefHtml("searcher_graph_list.php", "lang", LANGUAGE_ID, "find_searchers[]", $ar["ID"], "set_filter", "Y");
                ?>
" title="<?php 
                echo GetMessage("STAT_SEARCHER_GRAPH");
                ?>
"><?php 
                echo htmlspecialcharsex($ar["NAME"]);
                ?>
</a>
			<?php 
            } else {
                ?>
示例#2
0
$b_yesterday = GetTime(time() - 172800);
$headers = array(array("id" => "ID", "content" => "ID", "sort" => "s_id", "default" => true), array("id" => "NAME", "content" => GetMessage("STAT_NAME"), "sort" => "s_name", "default" => true), array("id" => "USER_AGENT", "content" => UserAgent, "sort" => "s_user_agent", "default" => true), array("id" => "TODAY_HITS", "content" => GetMessage("STAT_TODAY_HITS") . " {$today}", "sort" => "s_today_hits", "default" => true, "align" => "right"), array("id" => "YESTERDAY_HITS", "content" => GetMessage("STAT_YESTERDAY_HITS") . " {$yesterday}", "sort" => "s_yesterday_hits", "default" => true, "align" => "right"), array("id" => "B_YESTERDAY_HITS", "content" => GetMessage("STAT_B_YESTERDAY_HITS") . " {$b_yesterday}", "sort" => "s_b_yesterday_hits", "default" => true, "align" => "right"));
if (strlen($arFilter["DATE1_PERIOD"]) > 0) {
    $headers[] = array("id" => "PERIOD_HITS", "content" => GetMessage("STAT_PERIOD_HITS") . " " . htmlspecialcharsex($arFilter["DATE1_PERIOD"]) . " " . htmlspecialcharsex($arFilter["DATE2_PERIOD"]), "sort" => "s_period_hits", "default" => true, "align" => "right");
}
$headers[] = array("id" => "TOTAL_HITS", "content" => GetMessage("STAT_TOTAL_HITS"), "sort" => "s_total_hits", "default" => true, "align" => "right");
$headers[] = array("id" => "DATE_LAST", "content" => GetMessage("STAT_LAST_DATE"), "sort" => "s_date_last", "default" => true);
$lAdmin->AddHeaders($headers);
$total_TODAY_COUNTER = 0;
$total_YESTERDAY_COUNTER = 0;
$total_B_YESTERDAY_COUNTER = 0;
$total_PERIOD_COUNTER = 0;
$total_TOTAL_COUNTER = 0;
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes);
    $dynamic_days = CSearcher::DynamicDays($f_ID);
    $total_TODAY_COUNTER += intval($f_TODAY_HITS);
    $total_YESTERDAY_COUNTER += intval($f_YESTERDAY_HITS);
    $total_B_YESTERDAY_COUNTER += intval($f_B_YESTERDAY_HITS);
    $total_PERIOD_COUNTER += intval($f_PERIOD_HITS);
    $total_TOTAL_COUNTER += intval($f_TOTAL_HITS);
    if ($dynamic_days >= 2 && function_exists("ImageCreate")) {
        $txt = "<a title=\"" . GetMessage("STAT_GRAPH_ALT") . "\" href=\"searcher_graph_list.php?lang=" . LANGUAGE_ID . "&find_searchers[]={$f_ID}&set_filter=Y\">{$f_NAME}</a>";
        $row->AddViewField("NAME", $txt);
    }
    if ($f_TODAY_HITS > 0) {
        $txt = "<a title=\"" . GetMessage("STAT_HITS_SHOW") . "\" href=\"hit_searcher_list.php?lang=" . LANGUAGE_ID . "&find_searcher_id={$f_ID}&find_searcher_id_exact_match=Y&find_date1={$today}&set_filter=Y\">{$f_TODAY_HITS}</a>";
        $row->AddViewField("TODAY_HITS", $txt);
    }
    if ($f_YESTERDAY_HITS > 0) {
        $txt = "<a title=\"" . GetMessage("STAT_HITS_SHOW") . "\" href=\"hit_searcher_list.php?lang=" . LANGUAGE_ID . "&find_searcher_id={$f_ID}&find_searcher_id_exact_match=Y&find_date1={$yesterday}&find_date2={$yesterday}&set_filter=Y\">{$f_YESTERDAY_HITS}</a>";