<?php 
require_once('fun/funsql.php'); 
require_once('fun/funlogic.php');
require_once('fun/funhtml.php');

$fp=openfile("cache/config.txt");
$fps=explode(",,",$fp);
$newsfp=openfile("cache/newsconfig.txt");
$newsfps=explode(",,",$newsfp);

$id=@floatval(funstr($_GET["id"]));
$page=@floatval(funstr($_GET["page"]));
if($page==''){$page=0;}
if($page<0){$page=0;}

$sql=query("select * from ".$dbz."class where id=$id");
if($row=fetch($sql)){
  $htmlstr=new htmlstr($dbz,"");
  if($row["lists"]=='0'){
    if ($fps[5]==1){header("location:newslist/$id.htm");}else{echo $htmlstr->classstr($id);}
  }
  else{
    if ($fps[5]==1){header("location:newslist/$id.htm");}else{echo $htmlstr->liststr($id,$page);}
  }
  
}
else{
  echo "参数必须为整型";
}

mysql_close();
?>