示例#1
0
function get_site_language()
{
    $setup = get_setup();
    return $setup['language'];
}
示例#2
0
function get_newinfo()
{
    global $DB_URI;
    $sql = "select * from info where open=1 and kind=" . INFO_RSS;
    $inst = DBConnection::getConnection($DB_URI);
    $ret = $inst->search_sql($sql);
    $list = array();
    if ($ret["count"]) {
        foreach ($ret["data"] as $val) {
            $item = get_setup(INFO_RSS, $val["info_id"]);
            if ($item["open"]) {
                $item["reg_date"] = $val["reg_date"];
                if ($kind) {
                    if ($kind == $item["kind"]) {
                        $list[$item["rss_date"]] = $item;
                    }
                } else {
                    $list[$item["rss_date"]] = $item;
                }
            }
        }
    }
    // 並べ替え
    $rss = array();
    if ($list) {
        krsort($list);
        foreach ($list as $val) {
            $val["rss_date"] = substr($val["rss_date"], 0, 4) . "/" . substr($val["rss_date"], 5, 2) . "/" . substr($val["rss_date"], 8, 2);
            $rss[] = $val;
        }
    }
    return $rss;
}