<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>小说章节管理</title>
<link href="../member/images/member.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../images/js/j.js"></script>
<script language="javascript" type="text/javascript" src="../member/js/table_function.js"></script>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
<script language="javascript" type="text/javascript" src="js/story.js"></script>
<script language="javascript" type="text/javascript">
<!--
	$(function(){
		$("#selectall").click(function(){
			$(this).attr("checked") ? $("input[name='ids[]']").attr("checked","checked") :  $("input[name='ids[]']").attr("checked","");
		});
	});
	function DelStoryChapter(){
		if(window.confirm("删除章节会删除章节下的所有内容，你确实要删除么？")){
			$("input[name='action']").attr("value","delstorychapter");
			$("form[name='form2']").submit();
		}
	}
-->
</script>
</head>
<body>
<?php  include(DEDEMEMBER."/templets/head.htm"); ?>
<div class="wrapper lineT">
  <div class="mainBox">
    <div class="main">
      <?php  include(DEDEMEMBER."/templets/menu.php"); ?>
      <div class="dedeMain">
        <div class="location">《<?php echo $bookname;?>》<i>|</i><a href='../book/book.php?id=<?php echo $bookid; ?>' target='_blank'>查看</a></div>
        <div class="titleTabBar bgGreen lineTB">
          <ul>
            <li class="select"><a href="mybooks.php">小说书目</a></li>
            <li><a href="story_list_content.php">小说内容</a></li>
          </ul>
        </div>
        <form class="mL10 mR10 mTB10" name="form2" action="story_do.php" method="post">
          <div class="titleBar bgGrass lineB mB10">
            <div class="fLeft"><strong>书目章节</strong></div>
            <div class="fRight titSecondary white" style="margin-top:5px;"> <em class="mR10">
              <?php if($booktype == '1'){?>
              <a href='story_add_photo.php?bookid=<?php echo $bookid; ?>'>新增连载</a>
              <?php }else{?>
              <a href='story_add_content.php?bookid=<?php echo $bookid; ?>'>新增连载</a>
              <?php }?>
              </em> <em class="mR10"> <a href="story_list_content.php?bookid=<?php echo $bookid; ?>">连载内容</a> </em> <em class="mR10"> <a href="story_list_chapter.php?bookid=<?php echo $bookid; ?>">书目章节</a> </em> <em class="mR10"> <a href="story_edit.php?bookid=<?php echo $bookid;?>">书目资料</a> </em></div>
          </div>
          <input type="hidden" name="action" value="upChapterSort" />
          <table cellspacing="1" class="list">
            <thead>
              <tr>
                <th width="1%" ><input name="checkedClick" type="checkbox" value="" id="checkedClick"></th>
                <th width="15%">隶属图书</th>
                <th >章节名称 </th>
                <th width="10%">内容</th>
                <th width="5%">章节序号 </th>
              </tr>
            </thead>
            <tbody>
            
            {dede:datalist}
            <tr>
              <td><input type="checkbox" name="ids[]" id="ids<?php  echo $fields['id'];  ?>" value="<?php  echo $fields['id'];?>" /></td>
              <td align="center"><?php echo "<a href='story_list_content.php?bookid={$fields['bookid']}'>".$fields['bookname']."</a>"; ?></td>
              <td><input class="text" type="text" name="chaptername_<?php echo $fields['id']; ?>" value="<?php echo $fields['chaptername']; ?>" size="25" />
              </td>
              <td align="center"><a href='story_list_content.php?chapid=<?php echo $fields['id']; ?>&bookid=<?php echo $fields['bookid']; ?>'>浏览</a> (<?php echo $fields['postnum'];?>)</td>
              <td><input class="text" style="width:30px" type="text" name="chapnum_<?php echo $fields['id'];?>" value="<?php echo $fields['chapnum']; ?>" size="3" /></td>
            </tr>
            {/dede:datalist}
            </tbody>
            
            <tfoot>
              <tr>
                <td colspan="6"><div>
                    <div class="fLeft mTB10">
                      <button class="button5" type="submit">批量编辑</button>
                      <button class="button2 mL10" type="button" onclick="DelStoryChapter()">删除</button>
                    </div>
                    <div class="pages mTB10 fRight">{dede:pagelist listsize=5/}</div>
                  </div>
                  <div class="clear"> </div></td>
              </tr>
            </tfoot>
          </table>
        </form>
      </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
</div>
<?php  include(DEDEMEMBER."/templets/foot.htm"); ?>
</body>
</html>
