コード例 #1
0
ファイル: os.php プロジェクト: aim-web-projects/ann-cosme
    $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>&nbsp;' . $link . '&nbsp;</td>';
        echo '<td>&nbsp;' . $k2 . '&nbsp;</td>';
        echo '<td align="right">&nbsp;' . $v2 . '&nbsp;</td>';
        echo '<td>&nbsp;' . mk_graph($v2, $main["total"], $max_val) . '&nbsp;</td>';
        echo '</tr>' . "\n";
        $i++;
    }
    //合計
    echo '<tr>';
    echo '<td class="bg_total">&nbsp;</td>';
    echo '<td class="bg_total" align="right">&nbsp;<b>合計:</b>&nbsp;</td>';
    echo '<td class="bg_total" align="right">&nbsp;<b>' . $main[$k]["total"] . '</b>&nbsp;</td>';
    echo '<td class="bg_total">&nbsp;</td>';
    echo '</tr>' . "\n";
}
echo '</table>';
コード例 #2
0
ファイル: isp.php プロジェクト: aim-web-projects/ann-cosme
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>&nbsp;(" . $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>&nbsp;' . $link . '&nbsp;</td>';
    echo '<td align="right">&nbsp;<font color="#FF0000">' . $v . '</font>&nbsp;</td>';
    echo '<td>&nbsp;' . mk_graph($v, array_sum($main), max($main)) . '&nbsp;</td>';
    echo '</tr>';
    $i++;
}
//合計
echo '<tr>';
echo '<td class="bg_total" align="right">&nbsp;<b>合計:</b>&nbsp;</td>';
echo '<td class="bg_total" align="right">&nbsp;<b>' . @array_sum($main) . '</b>&nbsp;</td>';
echo '<td class="bg_total">&nbsp;</td>';
echo '</tr>' . "\n";
echo '</table>';