示例#1
0
文件: art.php 项目: philum/cms
function template($p, $tpl)
{
    if (!$tpl) {
        $tpl = @$_SESSION['opts']['template'];
    }
    //article
    if (!$tpl) {
        $tpl = $_SESSION['prma']['template'];
    }
    //module
    if ($tpl) {
        $tmp = msql_read('users', $_SESSION['qb'] . '_template', $tpl);
        if (!$tmp) {
            $tmp = msql_read('', 'public_template', $tpl);
        }
    }
    if ($tpl == "pubart") {
        $tmp = rstr(55) && $tmp ? $tmp : template_pubart();
    } elseif ($tpl == "titles") {
        $tmp = rstr(65) && $tmp ? $tmp : template_titles();
    } elseif ($tpl == "tracks") {
        $tmp = rstr(66) && $tmp ? $tmp : template_tracks();
    } elseif ($tpl == "book") {
        $tmp = rstr(67) && $tmp ? $tmp : template_book();
    } elseif ($tpl == "products") {
        $tmp = $tmp ? $tmp : template_product();
    } elseif ($tpl == "fastart") {
        $tmp = $tmp ? $tmp : template_fastart();
    } elseif ($tpl == "weblink") {
        $tmp = $tmp ? $tmp : template_weblink();
    } elseif ($tpl == "read" && rstr(88)) {
        $tmp = $tmp ? $tmp : template_read();
    }
    //if($_SESSION['read'])$tmp=template_read();
    if (!$tmp) {
        $tmp = template_art();
    }
    return template_build($tmp, $p);
}
示例#2
0
文件: art.php 项目: philum/cms
function template($p, $tpl)
{
    if (!$tpl) {
        $tpl = @$_SESSION['opts']['template'];
    }
    //article
    if (!$tpl) {
        $tpl = $_SESSION['prma']['template'];
    }
    //module
    if (!$tpl) {
        $tmp = template_art();
    }
    if ($tpl == "pubart") {
        $tmp = rstr(55) ? template_u($tpl) : template_pubart();
    } elseif ($tpl == "pubart_j") {
        $tmp = rstr(55) ? template_u($tpl) : template_pubart_j();
    } elseif ($tpl == "pubart_b") {
        $tmp = rstr(55) ? template_u($tpl) : template_pubart_b();
    } elseif ($tpl == "titles") {
        $tmp = rstr(65) ? template_u($tpl) : template_titles();
    } elseif ($tpl == "tracks") {
        $tmp = rstr(66) ? template_u($tpl) : template_tracks();
    } elseif ($tpl == "book") {
        $tmp = rstr(67) ? template_u($tpl) : template_book();
    } elseif ($tpl == "products") {
        $tmp = template_product();
    } elseif ($tpl == "fastart") {
        $tmp = template_fastart();
    } elseif ($tpl == "weblink") {
        $tmp = template_weblink();
    } elseif ($tpl == "panart") {
        $tmp = template_panart();
    } elseif ($tpl == "read" && rstr(88)) {
        $tmp = template_u($tpl);
        if (!$tmp) {
            $tmp = template_read();
        }
    }
    if (!$tmp) {
        $tmp = template_art();
    }
    return template_build($tmp, $p);
}