|
<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/style.css" rel="stylesheet">
<?php
include("../conn/conn.php");
%包含数据库连接文件
$state=$_POST[state];
%获取“是否审核”的状态
$type=$_POST[type];
%获取“信息类别”
if($_POST[type]==""){
$state=$_GET[state];
$type=$_GET[type];
%若没有设置审核状态和信息类别,则采用默认值
}
if($state=="all"){
$sql1=mysql_query("select count(*) as total from tb_info where type='$type' order by edate");
%若选择“全部”,则显示所有的信息
}else{
$sql1=mysql_query("select count(*) as total from tb_info where type='$type' and checkstate=$state order by edate");
%否则,显示相应状态的信息
}
$minfo=mysql_fetch_array($sql1);
%获得结果
$total=$minfo[total];
%获取结果总数
$pagesize=10;
%一页显示的条数
if($total<=$pagesize){
$pagecount=1;
%如果总数不大于每页的显示数,那么总页数为1
}
if(($total%$pagesize)!=0){
$pagecount=intval($total/$pagesize)+1;
%如果不能整除,则向上取整
}else{
$pagecount=$total/$pagesize;
%能整除,就直接取整数
}
if(($_GET |
|
|