日期:2014-05-17 浏览次数:20653 次
$sql_block = "select * from " . C('db_prefix') . "small_block order by ssort desc,bid desc,szone desc";
$query_block = mysql_query($sql_block);
$data_block = array();
$data_big = array();
$time1 = date("Y-m-d");
$time1 .= " 00:00:00";
$time2 = date("Y-m-d");
$time2 .= " 23:59:59";
while ($arr_block = mysql_fetch_array($query_block)) {
$data_block[] = $arr_block;
$bsql = "select * from " . C('db_prefix') . "big_block where id=" . $arr_block['bid'];
$barr = mysql_fetch_array(mysql_query($bsql));
$data_big[$arr_block['bid']] = $barr['bzone'];
${'zhuti' . $arr_block['id']} = mysql_num_rows(mysql_query("select * from " . C('db_prefix') . "talk where parentid=" . $arr_block['id']));
$this->assign("zhuti" . $arr_block['id'], ${'zhuti' . $arr_block['id']});
${'tiezi1' . $arr_block['id']} = mysql_num_rows(mysql_query("select * from " . C('db_prefix') . "talk where parentid=" . $arr_block['id']));
${'tiezi2' . $arr_block['id']} = mysql_num_rows(mysql_query("select * from " . C('db_prefix') . "reply where parentid2=" . $arr_block['id']));
${'tiezi' . $