コード例 #1
0
/**
 * Theme Main Site footer class
 * Separates classes with a single space, collates classes for element
 * uses return and not echo because it is being called in an echo statement
 * and would result in double echo
 *
 * @param array $class CSS Classes for element.
 * @return string
 */
function site_footer_class($class = '')
{
    $classes = join(' ', get_css_class($class, 'site_footer_class'));
    return 'class="' . esc_attr($classes) . '"';
}
コード例 #2
0
function display_hn_security($orign_data, $data)
{
    $size = sizeof($data);
    for ($i = 0; $i < $size; $i++) {
        $tr_class = $i % 2 == 0 ? "" : "special";
        $other_class = $i % 2 == 0 ? "other" : "other_special";
        $class = get_css_class($data[$i]["change"]);
        // CE or FL
        if ($orign_data[$i]["last_price"] == $orign_data[$i]["ceiling"]) {
            $more_change = "<span class='ce'>CE</span>";
        } elseif ($orign_data[$i]["last_price"] == $orign_data[$i]["floor"]) {
            $more_change = "<span class='fl'>FL</span>";
        } else {
            $more_change = "";
        }
        // get highlight
        if (!empty($_SESSION["data_hn"][$i])) {
            $highlight = get_highlight($data[$i], $_SESSION["data_hn"][$i]);
        }
        $html .= "<tr class='" . $tr_class . "'>";
        $html .= "<td class='order'>" . ($i + 1) . "</td>";
        $html .= "<td style='text-align: left;'><a href='' title='" . $data[$i]["securityname"] . "'>" . $data[$i]["stocksymbol"] . "</a></td>";
        $html .= "<td>" . $data[$i]["priorcloseprice"] . "</td>";
        $html .= "<td>" . $data[$i]["ceiling"] . "</td>";
        $html .= "<td>" . $data[$i]["floor"] . "</td>";
        $html .= "<td class='" . $other_class . "'><span class='" . get_class_change($orign_data[$i]["highestprice"], $orign_data[$i]["priorcloseprice"]) . "'>" . $data[$i]["highestprice"] . "</span></td>";
        $html .= "<td class='" . $other_class . " style='border-right:2px solid #9aa3ba;'><span class='" . get_class_change($orign_data[$i]["lowestprice"], $orign_data[$i]["priorcloseprice"]) . "'>" . $data[$i]["lowestprice"] . "</span></td>";
        // ======= Best Bid =======
        $html .= "<td class='" . $highlight["best3bid"] . "'><span class='" . get_class_change($orign_data[$i]["best3bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best3bid"] . "</span></td>";
        $html .= "<td class='" . $highlight["best3bidvolume"] . "'><span class='" . get_class_change($orign_data[$i]["best3bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best3bidvolume"] . "</td>";
        $html .= "<td class='" . $highlight["best2bid"] . "'><span class='" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best2bid"] . "</span></td>";
        $html .= "<td class='" . $highlight["best2bidvolume"] . "'><span class='" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best2bidvolume"] . "</td>";
        $html .= "<td class='" . $highlight["best1bid"] . "'><span class='" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best1bid"] . "</span></td>";
        $html .= "<td class='" . $highlight["best1bidvolume"] . "' style='border-right:2px solid #9aa3ba;'><span class='" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best1bidvolume"] . "</td>";
        // ======= Change =======
        if ($highlight["last_price"] == "") {
            $highlight["last_price"] = $other_class;
        }
        if ($highlight["last_change"] == "") {
            $highlight["last_change"] = $other_class;
        }
        if ($highlight["last_volume"] == "") {
            $highlight["last_volume"] = $other_class;
        }
        if ($highlight["totaltradingquantity"] == "") {
            $highlight["totaltradingquantity"] = $other_class;
        }
        $html .= "<td class='" . $highlight["last_price"] . "'><span class='" . $class["change"] . "'>" . $data[$i]["last_price"] . "</td>";
        $html .= "<td class='" . $highlight["last_change"] . "'>" . $more_change . "<span class='" . $class["fit"] . "'>" . $data[$i]["last_change"] . "</td>";
        $html .= "<td class='" . $highlight["last_volume"] . "'><span class='" . $class["change"] . "'>" . $data[$i]["last_volume"] . "</td>";
        $html .= "<td class='" . $highlight["totaltradingquantity"] . "' style='border-right:2px solid #9aa3ba;'><span class='" . $class["change"] . "'>" . $data[$i]["totaltradingquantity"] . "</td>";
        // ======= Best Offer =======
        $html .= "<td class='" . $highlight["best1offer"] . "'><span class='" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best1offer"] . "</span></td>";
        $html .= "<td class='" . $highlight["best1offervolume"] . "'><span class='" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best1offervolume"] . "</td>";
        $html .= "<td class='" . $highlight["best2offer"] . "'><span class='" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best2offer"] . "</span></td>";
        $html .= "<td class='" . $highlight["best2offervolume"] . "'><span class='" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best2offervolume"] . "</td>";
        $html .= "<td class='" . $highlight["best3offer"] . "'><span class='" . get_class_change($orign_data[$i]["best3offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best3offer"] . "</span></td>";
        $html .= "<td class='" . $highlight["best3offervolume"] . "' style='border-right:2px solid #9aa3ba;'><span class='" . get_class_change($orign_data[$i]["best3offer"], $data[$i]["priorcloseprice"]) . "'>" . $data[$i]["best3offervolume"] . "</td>";
        $html .= "<td>" . $data[$i]["fbuy"] . "</td>";
        $html .= "<td>" . $data[$i]["fsell"] . "</td>";
        $html .= "<td>" . $data[$i]["currentroom"] . "</td>";
        $html .= "</tr>";
    }
    return $html;
}
コード例 #3
0
function display_hn_security($orign_data, $data, $start, $end)
{
    for ($i = $start; $i < $end; $i++) {
        $tr_class = $i % 2 == 0 ? "" : "special";
        $class = get_css_class($data[$i]["change"]);
        // CE or FL
        if ($orign_data[$i]["last_price"] == $orign_data[$i]["ceiling"]) {
            $more_change = "<span class=\"ce\">CE</span>";
        } elseif ($orign_data[$i]["last_price"] == $orign_data[$i]["floor"]) {
            $more_change = "<span class=\"fl\">FL</span>";
        } else {
            $more_change = "";
        }
        // get highlight
        if (!empty($_SESSION["data_hn"][$i])) {
            $highlight = get_highlight($data[$i], $_SESSION["data_hn"][$i]);
        }
        $html .= "<tr class='" . $tr_class . "'>";
        $html .= "<td class=\"order\">" . ($i + 1) . "</td>";
        $html .= "<td><label class=\"" . $class["icon"] . "\">" . "<a href=\"\" onMouseOver=\"return overlib('" . $data[$i]["securityname"] . "');\" onMouseOut=\"return nd();\">" . $data[$i]["stocksymbol"] . "</a></label></td>";
        $html .= "<td>" . $data[$i]["priorcloseprice"] . "</td>";
        $html .= "<td>" . $data[$i]["ceiling"] . "</td>";
        $html .= "<td>" . $data[$i]["floor"] . "</td>";
        $html .= "<td><span class=\"" . get_class_change($orign_data[$i]["highestprice"], $orign_data[$i]["priorcloseprice"]) . "\">" . $data[$i]["highestprice"] . "</span></td>";
        $html .= "<td style=\"border-right:2px solid #9aa3ba;\"><span class=\"" . get_class_change($orign_data[$i]["lowestprice"], $orign_data[$i]["priorcloseprice"]) . "\">" . $data[$i]["lowestprice"] . "</span></td>";
        // ======= Best Bid =======
        $html .= "<td class=\"" . $highlight["best3bid"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best3bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best3bid"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best3bidvolume"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best3bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best3bidvolume"] . "</td>";
        $html .= "<td class=\"" . $highlight["best2bid"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best2bid"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best2bidvolume"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best2bidvolume"] . "</td>";
        $html .= "<td class=\"" . $highlight["best1bid"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best1bid"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best1bidvolume"] . "\" style=\"border-right:2px solid #9aa3ba;\"><span class=\"" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best1bidvolume"] . "</td>";
        // ======= Change =======
        $html .= "<td class=\"" . $highlight["last_price"] . "\"><span class=\"" . $class["change"] . "\">" . $data[$i]["last_price"] . "</td>";
        $html .= "<td class=\"" . $highlight["last_change"] . "\">" . $more_change . "<span class=\"" . $class["fit"] . "\">" . $data[$i]["last_change"] . "</td>";
        $html .= "<td class=\"" . $highlight["last_volume"] . "\"><span class=\"" . $class["change"] . "\">" . $data[$i]["last_volume"] . "</td>";
        $html .= "<td class=\"" . $highlight["totaltradingquantity"] . "\" style=\"border-right:2px solid #9aa3ba;\"><span class=\"" . $class["change"] . "\">" . $data[$i]["totaltradingquantity"] . "</td>";
        // ======= Best Offer =======
        $html .= "<td class=\"" . $highlight["best1offer"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best1offer"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best1offervolume"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best1offervolume"] . "</td>";
        $html .= "<td class=\"" . $highlight["best2offer"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best2offer"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best2offervolume"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best2offervolume"] . "</td>";
        $html .= "<td class=\"" . $highlight["best3offer"] . "\"><span class=\"" . get_class_change($orign_data[$i]["best3offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best3offer"] . "</span></td>";
        $html .= "<td class=\"" . $highlight["best3offervolume"] . "\" style=\"border-right:2px solid #9aa3ba;\"><span class=\"" . get_class_change($orign_data[$i]["best3offer"], $data[$i]["priorcloseprice"]) . "\">" . $data[$i]["best3offervolume"] . "</td>";
        $html .= "<td>" . $data[$i]["fbuy"] . "</td>";
        $html .= "<td>" . $data[$i]["fsell"] . "</td>";
        $html .= "<td>" . $data[$i]["currentroom"] . "</td>";
        $html .= "</tr>";
    }
    return $html;
}
コード例 #4
0
function display_hn_security($orign_data, $data)
{
    $size = sizeof($data);
    for ($i = 0; $i < $size; $i++) {
        $tr_class = $i % 2 == 0 ? "" : "special";
        $class = get_css_class($data[$i]["change"]);
        // get highlight
        if (!empty($_SESSION["data_hn"][$i])) {
            $highlight = get_highlight($data[$i], $_SESSION["data_hn"][$i]);
        }
        $html .= "<tr class='" . $tr_class . "'>";
        $html .= "<td class='order'>" . ($i + 1) . "</td>";
        $html .= "<td style=\"text-align: left;\">" . $data[$i]["stocksymbol"] . "</td>";
        $html .= "<td>" . $data[$i]["priorcloseprice"] . "</td>";
        // ======= Best Bid =======
        if ($orign_data[$i]["best2bid"] == $orign_data[$i]["ceiling"]) {
            $color = "#990066";
        } else {
            if ($orign_data[$i]["best2bid"] == $orign_data[$i]["floor"]) {
                $color = "#66ccff";
            } else {
                $color = "";
            }
        }
        $html .= "<td class='" . $highlight["best2bid"] . "'><span class='" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best2bid"] . "</span></td>";
        $html .= "<td class='" . $highlight["best2bidvolume"] . "'><span class='" . get_class_change($orign_data[$i]["best2bid"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best2bidvolume"] . "</td>";
        if ($orign_data[$i]["best1bid"] == $orign_data[$i]["ceiling"]) {
            $color = "#990066";
        } else {
            if ($orign_data[$i]["best1bid"] == $orign_data[$i]["floor"]) {
                $color = "#66ccff";
            } else {
                $color = "";
            }
        }
        $html .= "<td class='" . $highlight["best1bid"] . "'><span class='" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best1bid"] . "</span></td>";
        $html .= "<td class='" . $highlight["best1bidvolume"] . "' style='border-right:2px solid #9aa3ba;'><span class='" . get_class_change($orign_data[$i]["best1bid"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best1bidvolume"] . "</td>";
        if ($orign_data[$i]["last_price"] == $orign_data[$i]["ceiling"]) {
            $color = "#990066";
        } else {
            if ($orign_data[$i]["last_price"] == $orign_data[$i]["floor"]) {
                $color = "#66ccff";
            } else {
                $color = "";
            }
        }
        // ======= Change =======
        $html .= "<td class='" . $highlight["last_price"] . "'><span class='" . $class["change"] . "' style=\"color: " . $color . ";\">" . $data[$i]["last_price"] . "</td>";
        $html .= "<td class='" . $highlight["last_change"] . "'>" . $more_change . "<span class='" . $class["fit"] . "' style=\"color: " . $color . ";\">" . $data[$i]["last_change"] . "</td>";
        $html .= "<td class='" . $highlight["totaltradingquantity"] . "' style='border-right:2px solid #9aa3ba;'><span class='" . $class["change"] . "' style=\"color: " . $color . ";\">" . $data[$i]["totaltradingquantity"] . "</td>";
        // ======= Best Offer =======
        if ($orign_data[$i]["best1offer"] == $orign_data[$i]["ceiling"]) {
            $color = "#990066";
        } else {
            if ($orign_data[$i]["best1offer"] == $orign_data[$i]["floor"]) {
                $color = "#66ccff";
            } else {
                $color = "";
            }
        }
        $html .= "<td class='" . $highlight["best1offer"] . "'><span class='" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best1offer"] . "</span></td>";
        $html .= "<td class='" . $highlight["best1offervolume"] . "'><span class='" . get_class_change($orign_data[$i]["best1offer"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best1offervolume"] . "</td>";
        if ($orign_data[$i]["best2offer"] == $orign_data[$i]["ceiling"]) {
            $color = "#990066";
        } else {
            if ($orign_data[$i]["best2offer"] == $orign_data[$i]["floor"]) {
                $color = "#66ccff";
            } else {
                $color = "";
            }
        }
        $html .= "<td class='" . $highlight["best2offer"] . "'><span class='" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best2offer"] . "</span></td>";
        $html .= "<td class='" . $highlight["best2offervolume"] . "'><span class='" . get_class_change($orign_data[$i]["best2offer"], $data[$i]["priorcloseprice"]) . "' style=\"color: " . $color . ";\">" . $data[$i]["best2offervolume"] . "</td>";
        $html .= "<td>" . $data[$i]["fbuy"] . "</td>";
        $html .= "<td>" . $data[$i]["fsell"] . "</td>";
        $html .= "</tr>";
    }
    return $html;
}