国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 line
1.7KB

  1. <?php
  2. /**
  3. * @version $Id: story_content_edit.php 1 9:02 2010年9月25日Z 蓝色随想 $
  4. * @package DedeCMS.Module.Book
  5. * @copyright Copyright (c) 2007 - 2020, DesDev, Inc.
  6. * @license http://help.dedecms.com/usersguide/license.html
  7. * @link http://www.dedecms.com
  8. */
  9. require_once(dirname(__FILE__). "/config.php");
  10. require_once(DEDEROOT. "/book/include/story.func.php");
  11. CheckPurview('story_Edit');
  12. if(!isset($action)) $action = '';
  13. if(empty($cid))
  14. {
  15. ShowMsg("参数错误!", "-1");
  16. exit();
  17. }
  18. //读取所有栏目
  19. $dsql->SetQuery("Select id,classname,pid,rank From #@__story_catalog order by rank asc");
  20. $dsql->Execute();
  21. $ranks = Array();
  22. $btypes = Array();
  23. $stypes = Array();
  24. while($row = $dsql->GetArray()){
  25. if($row['pid']==0) $btypes[$row['id']] = $row['classname'];
  26. else $stypes[$row['pid']][$row['id']] = $row['classname'];
  27. $ranks[$row['id']] = $row['rank'];
  28. }
  29. $lastid = $row['id'];
  30. $contents = $dsql->GetOne("SELECT * FROM #@__story_content WHERE id='$cid' ");
  31. $bookinfos = $dsql->GetOne("SELECT catid,bcatid,bookname,booktype FROM #@__story_books WHERE bid='{$contents['bookid']}' ");
  32. $catid = $bookinfos['catid'];
  33. $bcatid = $bookinfos['bcatid'];
  34. $bookname = $bookinfos['bookname'];
  35. $booktype = $bookinfos['booktype'];
  36. $bookid = $contents['bookid'];
  37. $dsql->SetQuery("SELECT id,chapnum,chaptername FROM #@__story_chapter WHERE bookid='{$contents['bookid']}' ORDER BY chapnum DESC");
  38. $dsql->Execute();
  39. $chapters = Array();
  40. $chapnums = Array();
  41. while($row = $dsql->GetArray()){
  42. $chapters[$row['id']] = $row['chaptername'];
  43. $chapnums[$row['id']] = $row['chapnum'];
  44. }
  45. require_once DedeInclude('/templets/story_content_edit.htm');
  46. //ClearAllLink();