connect(); if (is_int($id)) {die ("非法操作!");} //判断$id值是否合法。 ?>
首页 -> 新闻频道
query($strQuery); if ($db->num_rows()!=0) { $db->next_record(); list($zhuanti_name)=$db->Record; } //取出专题标题结束 //取出专题头条开始 $strQuery="select * from bginfo where zhuanti_id=$zhuanti_id and flag='Y' order by id desc limit 0,1"; $db->query($strQuery); if ($db->num_rows()!=0) { $db->next_record(); list($id,$zhuanti_id,$img_name,$img_pos,$bginfo,$title_id)=$db->Record; } if (trim($img_name)!="") { $strBginfo="
"; } else {echo $zhuanti_name; } ?>
query($strQuery); while ($db->next_record()) { list($id,$column_name)=$db->Record; $column_list[$id]=$column_name; } ?> "; $j=0; while (list($k,$v)=each($column_list)) { if ($j%2==0) { ?>
 

query($strQuery); //===取出数据=== if ($zhuanti_id==128) { $i=0; while ($db->next_record() && $i<10) { list($id,$title,$post_time,$fromto)=$db->Record; $show_time=substr($post_time,5,5); // $show_time=date("m-d",$post_time); echo "· [$fromto] $title [$show_time]
"; $i++; } } else { $i=0; while ($db->next_record() && $i<10) { list($id,$title,$post_time)=$db->Record; $show_time=substr($post_time,5,5); // $show_time=date("m-d",$post_time); echo "· $title [$show_time]
"; $i++; } } if ($db->num_rows()>10){echo "

更多...
";} $j++; ?>
 

query($strQuery); // echo $strQuery; //===取出数据=== if ($zhuanti_id==128) { $i=0; while ($db->next_record() && $i<10) { list($id,$title,$post_time,$fromto)=$db->Record; $show_time=substr($post_time,5,5); // $show_time=date("m-d",$post_time); // echo"$fromto"; echo "· [$fromto] $title [$show_time]
"; $i++; } } else { $i=0; while ($db->next_record() && $i<10) { list($id,$title,$post_time)=$db->Record; $show_time=substr($post_time,5,5); // $show_time=date("m-d",$post_time); echo "· $title [$show_time]
"; $i++; } } if ($db->num_rows()>10){echo "

更多...
";} $j++; ?>
Query($strQuery); ?>