国内流行的内容管理系统(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.

99 lines
2.8KB

  1. <?php
  2. /**
  3. * @version $Id: story_edit_action.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. CheckPurview('story_New');
  11. require_once(DEDEINC. "/image.func.php");
  12. require_once(DEDEINC. "/oxwindow.class.php");
  13. require_once(DEDEADMIN. "/inc/inc_archives_functions.php");
  14. if(!isset($iscommend)) $iscommend = 0;
  15. if($catid==0)
  16. {
  17. ShowMsg("请指定图书所属栏目!","-1");
  18. exit();
  19. }
  20. //获得父栏目
  21. $nrow = $dsql->GetOne("SELECT * FROM #@__story_catalog WHERE id='$catid' ");
  22. $bcatid = $nrow['pid'];
  23. $booktype = $nrow['booktype'];
  24. $pubdate = GetMkTime($pubdate);
  25. $lastpost=time();
  26. $bookname = cn_substr($bookname,50);
  27. if($keywords!="") $keywords = trim(cn_substr($keywords, 60));
  28. //处理上传的缩略图
  29. if($litpic !="") $litpic = GetDDImage('litpic', $litpic, 0);
  30. if($litpicname !="" && $litpic == "") $litpic = GetDDImage('litpic', $litpicname, 0);
  31. $adminID = $cuserLogin->getUserID();
  32. //自动摘要
  33. if($description=="" && $cfg_auot_description>0)
  34. {
  35. $description = stripslashes(cn_substr(html2text($body), $cfg_auot_description));
  36. $description = addslashes($description);
  37. }
  38. $upQuery = "
  39. Update `#@__story_books`
  40. set catid='$catid',
  41. bcatid='$bcatid',
  42. iscommend='$iscommend',
  43. click='$click',
  44. freenum='$freenum',
  45. arcrank='$arcrank',
  46. bookname='$bookname',
  47. author='$author',
  48. litpic='$litpic',
  49. pubdate='$pubdate',
  50. lastpost='$lastpost',
  51. description='$description',
  52. body='$body',
  53. keywords='$keywords',
  54. status='$status',
  55. ischeck='$ischeck'
  56. where bid='$bookid' ";
  57. if(!$dsql->ExecuteNoneQuery($upQuery))
  58. {
  59. ShowMsg("更新数据库时出错,请检查!".$dsql->GetError(),"-1");
  60. $dsql->Close();
  61. exit();
  62. }
  63. //生成HTML
  64. require_once(DEDEROOT. '/book/include/story.view.class.php');
  65. $bv = new BookView($bookid, 'book');
  66. $artUrl = $bv->MakeHtml();
  67. $bv->Close();
  68. //返回成功信息
  69. $msg = "
  70.   请选择你的后续操作:
  71. <a href='story_edit.php?bookid={$bookid}'><u>继续修改</u></a>
  72. &nbsp;&nbsp;
  73. <a href='story_add.php?catid={$catid}'><u>发布新图书</u></a>
  74. &nbsp;&nbsp;
  75. <a href='$artUrl' target='_blank'><u>预览图书</u></a>
  76. &nbsp;&nbsp;
  77. <a href='story_add_content.php?bookid={$bookid}'><u>增加图书内容</u></a>
  78. &nbsp;&nbsp;
  79. <a href='story_books.php'><u>管理图书</u></a>
  80. ";
  81. $wintitle = "成功修改图书!";
  82. $wecome_info = "连载管理::修改图书";
  83. $win = new OxWindow();
  84. $win->AddTitle("成功修改一本图书:");
  85. $win->AddMsgItem($msg);
  86. $winform = $win->GetWindow("hand", "&nbsp;", false);
  87. $win->Display();