Пример #1
0
} else {
    $myorder = "newstime";
}
//显示顺序
$orderby = (int) $_GET['orderby'];
if ($orderby) {
    $myorderby = "ASC";
} else {
    $myorderby = "DESC";
}
//优化
$yhadd = '';
if ($yhid) {
    $yhadd = ReturnYhSql($yhid, $yhvar);
}
$query = "select " . ReturnSqlListF($mid) . " from {$dbtbpre}ecms_" . $tbname . ReturnYhAndSql($yhadd, $add, 1) . " order by " . $myorder . " " . $myorderby . " limit " . $public_r['rssnum'];
$sublen = $public_r['rsssub'];
$sql = $empire->query($query);
//显示文件
$type = $_GET['type'];
if ($type == "xml") {
    $webfilename = "xml.php";
} elseif ($type == "atom") {
    $webfilename = "atom.php";
} elseif ($type == "rss1") {
    $webfilename = "rss10.php";
} else {
    $webfilename = "rss20.php";
}
require $webfilename;
db_close();
Пример #2
0
    $yhadd = ReturnYhSql($yhid, $yhvar);
}
//总数
$totalnum = (int) $_GET['totalnum'];
if ($totalnum < 1) {
    $totalquery = "select count(*) as total from {$dbtbpre}ecms_" . $tbname . ReturnYhAndSql($yhadd, $add, 1);
    $num = $empire->gettotal($totalquery);
} else {
    $num = $totalnum;
}
$search .= '&totalnum=' . $num;
//置顶
if ($public_r['fieldandtop']) {
    $addorder = 'istop desc,' . $addorder;
}
$query = "select " . ReturnSqlListF($mid) . " from {$dbtbpre}ecms_" . $tbname . ReturnYhAndSql($yhadd, $add, 1);
$query .= " order by " . $addorder . " limit {$offset},{$line}";
$sql = $empire->query($query);
//分页
$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']) {
        $tempr[temptext] = ReplaceTempvar($tempr[temptext]);
    }
}
$listtemp = $tempr[temptext];
$rownum = $tempr[rownum];
if (empty($rownum)) {