<?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
include("../class/functions.php");
include LoadLang("pub/fun.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
is_login($logininid,$loginin,$loginrnd);
$page=(int)$_GET['page'];
$start=(int)$_GET['start'];
$line=25;//每页显示条数
$page_line=12;//每页显示链接数
$offset=$start+$page*$line;//总偏移量
$like=",".$loginin.",";
$mid=(int)$_GET['mid'];
if(!$mid)
{
	printerror("ErrorUrl","history.go(-1)");
}
$mr=$empire->fetch1("select mid,sonclass,tbname from {$dbtbpre}enewsmod where mid='$mid'");
if(!$mr[mid]||!$mr[tbname])
{
	printerror("ErrorUrl","history.go(-1)");
}
$where="(".ReturnClass($mr[sonclass]).")";
$query="select id,title,classid,newstime from {$dbtbpre}ecms_".$mr[tbname]." where checkuser like '%$like%' and !(docheckuser like '%$like%' or notdocheckuser like '%$like%') and ".$where;
$num=$empire->num($query);//取得总条数
$query=$query." order by id desc limit $offset,$line";
$sql=$empire->query($query);
$search="&mid=".$mid;
$returnpage=page1($num,$line,$page_line,$start,$page,$search);
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
<title>签发信息管理</title>
</head>

<body>
<table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
    <td height="25">位置：管理信息 -&gt; <a href="ListNewsQf.php?mid=<?=$mid?>">签发信息管理</a></td>
  </tr>
</table>

<form name="form1" method="post" action="">
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
    <tr class="header"> 
      <td width="5%"><div align="center"></div></td>
      <td width="8%" height="25"> <div align="center">ID</div></td>
      <td width="42%" height="25"> <div align="center">标题</div></td>
      <td width="22%"><div align="center">提交时间</div></td>
      <td width="23%" height="25"> <div align="center">操作</div></td>
    </tr>
    <?
  while($r=$empire->fetch($sql))
  {
  ?>
    <tr bgcolor="#FFFFFF"> 
      <td><div align="center"> 
          <input name="id" type="checkbox" id="id" value="<?=$r[id]?>">
        </div></td>
      <td height="25"> <div align="center"> 
          <?=$r[id]?>
        </div></td>
      <td height="25"> 
        <?=$r[title]?>
      </td>
      <td><div align="center"><?=$r[newstime]?></div></td>
      <td height="25"> <div align="center">[<a href="enews.php?enews=ViewQfNews&classid=<?=$r[classid]?>&id=<?=$r[id]?>" target=_blank>查看内容</a>]&nbsp;&nbsp;&nbsp;[<a href="#ecms" onclick="window.open('DoNewsQf.php?classid=<?=$r[classid]?>&id=<?=$r[id]?>','','width=600,height=520,scrollbars=yes');">签发/退稿</a>]</div></td>
    </tr>
    <?
  }
  ?>
    <tr bgcolor="#FFFFFF"> 
      <td height="25"><div align="center"></div></td>
      <td height="25" colspan="4"> &nbsp;&nbsp; 
        <?=$returnpage?>
      </td>
    </tr>
  </table>
</form>
</body>
</html>
<?
db_close();
$empire=null;
?>
