echo '<div id="time_w">'; echo '<table border="0" cellpadding="0" cellspacing="0">'; echo '<tr align="center" valign="bottom">' . $tmp["main"] . '</tr>'; echo '<tr>' . $tmp["time"] . '</tr>'; echo '</table>'; echo '</div>'; } else { echo '<table>'; echo '<tr>'; echo '<th nowrap>時間</th>'; echo '<th nowrap>ユニーク</th>'; echo '<th nowrap>件数</th>'; echo '<th nowrap>グラフ</th>'; echo '</tr>'; for ($i = 0; $i < 24; $i++) { //ユニーク値 $uniq = intval($uniqs[$i]); if (!$uniq) { $uniq = 0; } //link $link = sel_link(query_edit("sel", $i), $i); echo '<tr id="bg_id' . $i . '" onmouseover="chBG(\'bg_id' . $i . '\', 1);" onmouseout="chBG(\'bg_id' . $i . '\', 0);">'; echo '<td align="right"> ' . $link . ' </td>'; echo '<td align="right"> <font color="#0000FF">' . $uniq . '</font> </td>'; echo '<td align="right"> <font color="#FF0000">' . $main[$i] . '</font> </td>'; echo '<td align="left"> ' . mk_graph2($main[$i], $main, $uniq, $uniqs, $max_val) . ' </td>'; echo '</tr>'; } echo '</table>'; }
} //ソート arsort($main[$k], SORT_NUMERIC); $tmp = ""; $i = 0; foreach ($main[$k] as $k2 => $v2) { if ($k2 == "total") { continue; } //link if ($k == $tmp) { $link = " "; } else { //icon $icon = isset($icon_path[strtolower($k)]) ? set_img($icondir . $icon_path[strtolower($k)], $k) . " " : set_img($icondir . "none.gif", $k) . " "; $link = $icon . sel_link(query_edit("sel", $k), $k); } $tmp = $k; echo '<tr id="bg_id' . $k . $i . '" onmouseover="chBG(\'bg_id' . $k . $i . '\', 1);" onmouseout="chBG(\'bg_id' . $k . $i . '\', 0);">'; echo '<td> ' . $link . ' </td>'; echo '<td> ' . $k2 . ' </td>'; echo '<td align="right"> ' . $v2 . ' </td>'; echo '<td> ' . mk_graph($v2, $main["total"], $max_val) . ' </td>'; echo '</tr>' . "\n"; $i++; } //合計 echo '<tr>'; echo '<td class="bg_total"> </td>'; echo '<td class="bg_total" align="right"> <b>合計:</b> </td>'; echo '<td class="bg_total" align="right"> <b>' . $main[$k]["total"] . '</b> </td>';
arsort($main, SORT_NUMERIC); echo '<table>'; echo '<tr>'; echo '<th nowrap>ISP</th>'; echo '<th nowrap>件数</th>'; echo '<th nowrap>グラフ</th>'; echo '</tr>'; $i = 0; foreach ($main as $k => $v) { $tmp["name"] = ereg_replace('(.+)(\\|\\|)(.+)', "\\1", $k); if (ereg('(.+)(\\|\\|)(.+)', $k, $regs)) { $tmp["com"] = "<br> (" . $regs[3] . ")"; } else { $tmp["com"] = ""; } //link $link = sel_link(query_edit("sel", $tmp["name"]), $tmp["name"]) . $tmp["com"]; echo '<tr id="bg_id' . $i . '" onmouseover="chBG(\'bg_id' . $i . '\', 1);" onmouseout="chBG(\'bg_id' . $i . '\', 0);">'; echo '<td> ' . $link . ' </td>'; echo '<td align="right"> <font color="#FF0000">' . $v . '</font> </td>'; echo '<td> ' . mk_graph($v, array_sum($main), max($main)) . ' </td>'; echo '</tr>'; $i++; } //合計 echo '<tr>'; echo '<td class="bg_total" align="right"> <b>合計:</b> </td>'; echo '<td class="bg_total" align="right"> <b>' . @array_sum($main) . '</b> </td>'; echo '<td class="bg_total"> </td>'; echo '</tr>' . "\n"; echo '</table>';
/*=========================================*/ /* メイン処理 */ /*=========================================*/ if (count($main)) { //ソート arsort($main, SORT_NUMERIC); echo '<table>'; echo '<tr>'; echo '<th nowrap>キーワード</th>'; echo '<th nowrap>件数</th>'; echo '<th nowrap>グラフ</th>'; echo '</tr>'; $i = 0; foreach ($main as $k => $v) { //link $link = sel_link(query_edit("sel", $k), $k); echo '<tr id="bg_id' . $i . '" onmouseover="chBG(\'bg_id' . $i . '\', 1);" onmouseout="chBG(\'bg_id' . $i . '\', 0);">'; echo '<td> ' . $link . ' </td>'; echo '<td align="right"> <font color="#FF0000">' . $v . '</font> </td>'; echo '<td> ' . mk_graph($v, array_sum($main), max($main)) . ' </td>'; echo '</tr>'; $i++; } //合計 echo '<tr>'; echo '<td class="bg_total" align="right"> <b>合計:</b> </td>'; echo '<td class="bg_total" align="right"> <b>' . @array_sum($main) . '</b> </td>'; echo '<td class="bg_total"> </td>'; echo '</tr>' . "\n"; echo '</table>'; } else {
/*=========================================*/ /* メイン処理 */ /*=========================================*/ echo '<table>'; echo '<tr>'; echo '<th nowrap>ページ</th>'; echo '<th nowrap>ユニーク</th>'; echo '<th nowrap>件数</th>'; echo '<th nowrap>グラフ</th>'; echo '</tr>'; foreach ($main as $k => $v) { if ($p_sel_icon) { $sel_path = '<a href="' . FILENAME . query_edit("p_sel", $k) . '">' . set_img(SELPATHMARK, "ページ指定") . '</a> '; } //ユニーク値 $uniq = intval($uniqs[$k]); //Pathタイトル変換 $path_title = ""; if (is_array($ch_path) && isset($ch_path[$k])) { $path_title = "[ " . $ch_path[$k] . " ]<br> "; } //link $link = $sel_path . $path_title . sel_link(query_edit("sel", $k), $k); echo '<tr id="bg_id' . $k . '" onmouseover="chBG(\'bg_id' . $k . '\', 1);" onmouseout="chBG(\'bg_id' . $k . '\', 0);">'; echo '<td> ' . $link . ' </td>'; echo '<td align="right"> <font color="#0000FF">' . $uniq . '</font> </td>'; echo '<td align="right"> <font color="#FF0000">' . $v . '</font> </td>'; echo '<td> ' . mk_graph2($v, $main, $uniq, $uniqs, $max_val) . ' </td>'; echo '</tr>'; } echo '</table>';
if ($flg_jump) { $jump = '<a href="redirect.php?redirect=' . $k . '" target="_blank">' . set_img(JUMPMARK) . '</a> '; } else { $jump = ""; } //ユニーク値 $uniq = intval($uniqs[$k]); //URLタイトル変換(グループ化なし) $url_title = ""; if (!$title_group && is_array($ch_url)) { foreach ($ch_url as $url => $title) { if (strstr($k, $url)) { $url_title = $title . "<br> "; break; } } } //link $link = $url_title . sel_link(query_edit("sel", $k), str_cut($k)); echo '<tr id="bg_id' . $k . '" onmouseover="chBG(\'bg_id' . $k . '\', 1);" onmouseout="chBG(\'bg_id' . $k . '\', 0);">'; echo '<td> ' . $jump . $link . ' </td>'; echo '<td align="right"> <font color="#0000FF">' . $uniq . '</font> </td>'; echo '<td align="right"> <font color="#FF0000">' . $v . '</font> </td>'; echo '<td> ' . mk_graph2($v, $main, $uniq, $uniqs, $max_val) . ' </td>'; echo '</tr>'; flush(); } echo '</table>'; } else { echo '<hr size="1"><div id="error">解析結果:0件</div>'; }
unset($tmp); foreach ($uniqs as $k => $v) { $tmp[$k] = count($uniqs[$k]); if ($max_val < $main[$k]) { $max_val = $main[$k]; } } $uniqs = $tmp; /*=========================================*/ /* メイン処理 */ /*=========================================*/ echo '<table>'; echo '<tr>'; echo '<th nowrap>曜日</th>'; echo '<th nowrap>ユニーク</th>'; echo '<th nowrap>件数</th>'; echo '<th nowrap>グラフ</th>'; echo '</tr>'; foreach ($main as $k => $v) { //ユニーク値 $uniq = intval($uniqs[$k]); //link $link = sel_link(query_edit("sel", $k), $youbi[$k]); echo '<tr id="bg_id' . $k . '" onmouseover="chBG(\'bg_id' . $k . '\', 1);" onmouseout="chBG(\'bg_id' . $k . '\', 0);">'; echo '<td align="center"> ' . $link . ' </td>'; echo '<td align="right"> <font color="#0000FF">' . $uniq . '</font> </td>'; echo '<td align="right"> <font color="#FF0000">' . $v . '</font> </td>'; echo '<td align="left"> ' . mk_graph2($v, $main, $uniq, $uniqs, $max_val) . ' </td>'; echo '</tr>'; } echo '</table>';