Exemplo n.º 1
0
function sys_ReturnBqClassUrl($r)
{
    global $public_r;
    //外部栏目
    if ($r[wburl]) {
        $classurl = $r[wburl];
    } elseif ($r['listdt']) {
        $rewriter = eReturnRewriteClassUrl($r['classid'], 1);
        $classurl = $rewriter['pageurl'];
    } elseif ($r['classurl']) {
        $classurl = $r['classurl'];
    } else {
        $classurl = $public_r['newsurl'] . $r['classpath'] . "/";
    }
    return $classurl;
}
Exemplo n.º 2
0
if ($totalnum < 1) {
    if ($yhadd) {
        $totalquery = "select count(*) as total from {$dbtbpre}ecms_" . $tbname . " where " . $yhadd . $add;
        $num = $empire->gettotal($totalquery);
    } else {
        $num = ReturnClassInfoNum($cr, 0);
    }
} else {
    $num = $totalnum;
}
$search .= '&totalnum=' . $num;
$query = "select " . ReturnSqlListF($mid) . " from {$dbtbpre}ecms_" . $tbname . " where " . $yhadd . $add;
$query .= " order by " . ReturnSetTopSql('list') . $addorder . " limit {$offset},{$line}";
$sql = $empire->query($query);
//伪静态
$pagefunr = eReturnRewriteClassUrl($classid, 0);
$pagefunr['repagenum'] = $cr['repagenum'];
$pagefunr['dolink'] = empty($class_r[$classid]['classurl']) ? $public_r['newsurl'] . $class_r[$classid]['classpath'] . '/' : $class_r[$classid]['classurl'] . '/';
$pagefunr['dofile'] = 'index';
$pagefunr['dotype'] = $class_r[$classid]['classtype'];
//分页
if ($pagefunr['rewrite'] == 1 || $pagefunr['repagenum']) {
    $listpage = InfoUsePage($num, $line, $page_line, $start, $page, $search, $pagefunr);
} else {
    $listpage = page1($num, $line, $page_line, $start, $page, $search);
}
//页面支持标签
if ($public_r['dtcanbq']) {
    $tempr[temptext] = DtNewsBq('list' . $tempid, $tempr[temptext], 0);
} else {
    if ($public_r['searchtempvar']) {
Exemplo n.º 3
0
function sys_ReturnBqClassname($r, $have_class = 0)
{
    global $public_r, $class_r;
    if ($have_class) {
        //moreport
        if (Moreport_ReturnMustDt()) {
            $class_r[$r[classid]][listdt] = 1;
        }
        //外部栏目
        if ($class_r[$r[classid]][wburl]) {
            $classurl = $class_r[$r[classid]][wburl];
        } elseif ($class_r[$r[classid]][listdt]) {
            $rewriter = eReturnRewriteClassUrl($r['classid'], 1);
            $classurl = $rewriter['pageurl'];
        } elseif ($class_r[$r[classid]][classurl]) {
            $classurl = $class_r[$r[classid]][classurl];
        } else {
            $classurl = $public_r[newsurl] . $class_r[$r[classid]][classpath] . "/";
        }
        if (empty($class_r[$r[classid]][bname])) {
            $classname = $class_r[$r[classid]][classname];
        } else {
            $classname = $class_r[$r[classid]][bname];
        }
        $myadd = "[<a href=" . $classurl . ">" . $classname . "</a>]";
        //只返回链接
        if ($have_class == 9) {
            $myadd = $classurl;
        }
    } else {
        $myadd = "";
    }
    return $myadd;
}