<?php
require('../class/connect.php'); //引入数据库配置文件和公共函数文件 require('../class/db_sql.php'); //引入数据库操作文件 require('../data/dbcache/class.php'); //引入栏目缓存文件 $link=db_connect(); //连接MYSQL $empire=new mysqlquery(); //声明数据库操作类 $editor=1; //声明目录层次 $tid=$_GET[tid]; $page=$_GET[page]; $offset=$page*10; $sql2=$empire->query("select * from {$dbtbpre}enewsztinfo where ztid=".$tid." order by newstime desc limit $offset,10"); ?> <div class="list-d"> <?php while($ra=$empire->fetch($sql2)) //循环获取查询记录 { $sql=$empire->query("select * from {$dbtbpre}ecms_news where id=".$ra[id].""); $r=$empire->fetch($sql); $titleurl=sys_ReturnBqTitleLink($r); //标题链接 ?> <div class="box"> <dl> <a href="<?=$titleurl?>"> <dt><img src="<?=$r[titlepic]?>"> <div class="tags"></div> </dt> <dd> <h2><?=esub(stripslashes($r[title]),32)?></h2> <p><?=esub(stripslashes($r[smalltext]),40)?></p> </dd> </a> </dl> </div> <?php } ?> </div>