Exemplo n.º 1
0
 } else {
     $SQL = " yz=1 ";
 }
 if ($type == 'com') {
     $SQL .= " AND levels=1 ";
     $ORDER = ' list ';
 } elseif ($type == 'hot') {
     $ORDER = ' hits ';
 } elseif ($type == 'new') {
     $ORDER = ' list ';
 } elseif ($type == 'lastview') {
     $ORDER = ' lastview ';
 }
 $SQL = " WHERE {$SQL} ORDER BY {$ORDER} DESC LIMIT {$rows}";
 $which = '*';
 $listdb = list_special($SQL, $which, $leng);
 foreach ($listdb as $key => $rs) {
     $target = $rs[target] ? '_blank' : '_self';
     $show .= "<div>·<A target='{$target}' HREF='{$webdb['www_url']}/do/showsp.php?fid={$rs['fid']}&id={$rs['id']}' title='{$rs['full_title']}'>{$rs['title']}</A></div>";
 }
 if (!$show) {
     $show = "暂无...";
 }
 //真静态
 if ($webdb[NewsMakeHtml] == 1 || $gethtmlurl) {
     $show = make_html($show, $pagetype = 'N');
 } elseif ($webdb[NewsMakeHtml] == 2) {
     $show = fake_html($show);
 }
 if ($webdb[RewriteUrl] == 1) {
     //全站伪静态
Exemplo n.º 2
0
function ListThisSp($rows, $leng = 50)
{
    global $page, $fid, $fidDB, $webdb;
    if ($page < 1) {
        $page = 1;
    }
    $min = ($page - 1) * $rows;
    $DESC = 'DESC';
    $ORDER = 'list';
    $SQL = "WHERE fid={$fid} AND yz=1 ORDER BY {$ORDER} {$DESC} LIMIT {$min},{$rows}";
    $which = '*';
    $listdb = list_special($SQL, $which, $leng);
    return $listdb;
}