<?php
define('EmpireCMSAdmin','1');
require("../class/connect.php");
require("../class/db_sql.php");
require("../class/functions.php");
require("../class/dpfun.php");
require("../data/dbcache/class.php");
$link=db_connect();
$empire=new mysqlquery();
//验证用户
$lur=is_login();
$logininid=$lur['userid'];
$loginin=$lur['username'];
$loginrnd=$lur['rnd'];
$loginlevel=$lur['groupid'];
$loginadminstyleid=$lur['adminstyleid'];

$enews=$_GET['enews'];
$classid=(int)$_GET['classid'];
$bookid=(int)$_GET['bookid'];
$vid=(int)$_GET['vid'];
$bk=GetBN($bookid);
$bindex=$empire->fetch1("select checked from {$dbtbpre}ecms_bookname_index where id=$bookid limit 1");
//验证权限
$doselfinfo=CheckLevel($logininid,$loginin,$classid,"news");
$fun_r['AdminBook']='管理书籍';
$r=array();
//初始化数据
$r[myorder]=0;
//附件验证码
if($enews=="AddVolume")
{
	if(!$bindex[checked]){//验证书籍审核状态
		printerror("EmptyCk","history.go(-1)");
	}
	if(!$doselfinfo['doaddinfo'])//增加权限
	{
		printerror("NotAddInfoLevel","history.go(-1)");
	}
	$filepass=time();
	$word='增加分卷';
	$ecmsfirstpost=1;
}
elseif($enews=="EV")
{
	if(!$doselfinfo['doeditinfo'])//编辑权限
	{
		printerror("NotEditInfoLevel","history.go(-1)");
	}
	$filepass=$id;
	$word='修改分卷';
	$ecmsfirstpost=0;
	$r=$empire->fetch1("select * from {$dbtbpre}enewsvolume where vid='$vid' limit 1");
}
else{
	printerror("ErrorUrl","history.go(-1)");
}
//导航
$url=AdminReturnBookClass($classid).'&nbsp;>&nbsp;<a href="ListBookData.php?bookid='.$bookid.'&classid='.$classid.$addecmscheck.'">《'.$bk[title].'》</a>&nbsp;>&nbsp;'.$word;


?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><?=$word?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" type="text/css">
<link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/tab.winclassic.css" disabled="disabled" /> 
<!-- the id is not needed. It is used here to be able to change css file at runtime -->
<style type="text/css"> 
   .dynamic-tab-pane-control .tab-page { 
          width:                100%;
 } 
  .dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page { 
         height:                150px; 
 } 
  form { 
         margin:        0; 
         padding:        0; 
 } 
  /* over ride styles from webfxlayout */ 
  .dynamic-tab-pane-control h2 { 
         font-size:12px;
		 font-weight:normal;
		 text-align:        center; 
         width:                auto;
		 height:            20; 
 } 
   .dynamic-tab-pane-control h2 a { 
         display:        inline; 
         width:                auto; 
 } 
  .dynamic-tab-pane-control a:hover { 
         background: transparent; 
 } 
  </style>

</head>

<body bgcolor="#FFFFFF" text="#000000" onload="document.add.title.focus();">
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr> 
    <td width="62%" height="25">位置： 
      <?=$url?>
    </td>
    <td width="38%"><div align="right">
      </div></td>
  </tr>
</table>

<form name="add" method="post" action="ecmsbookdata.php">
    <input name="classid" type="hidden" value="<?=$classid?>">
    <input name="bookid" type="hidden" value="<?=$bookid?>">
	<input name="enews" type="hidden" value="<?=$enews?>">
	<input name="vid" type="hidden" value="<?=$r[vid]?>">
	<table width='100%' align=center cellpadding=3 cellspacing=1 bgcolor='#DBEAF5'>
	  <tr>
	    <td width='16%' height=25 bgcolor='ffffff'>卷名</td>
	    <td height="25" bgcolor="#FFFFFF">	
		<input type=text name=vname value="<?=ehtmlspecialchars(stripSlashes($r[vname]))?>" size="45"> 
		<a href="ListVolume.php?bookid=<?=$bookid?>">管理分卷</a>
	    </td>
	  </tr>
	  <tr>
	    <td width='16%' height=25 bgcolor='ffffff'>排序</td>
	    <td height="25" bgcolor="#FFFFFF">	
		<input type=text name=myorder value="<?=$r[myorder]?>" size="10"> 
	    </td>
	  </tr>
	</table>

  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr>
      <td width="16%">&nbsp;</td>
      <td><input type="submit" name="submit" value=" 提 交 "></td>
    </tr>
  </table>
</form>
<?=$copyclassidshowiframe?>
</body>
</html>
<?php
db_close();
$empire=null;
?>