} $addtime = time(); //本章最后一个小说的排列顺次序 $lrow = $dsql->GetOne("Select sortid From #@__story_content where bookid='{$bookid}' And chapterid='{$chapterid}' and mid='{$cfg_ml->M_ID}' order by sortid desc"); if (empty($lrow)) { $sortid = 1; } else { $sortid = $lrow['sortid'] + 1; } $inQuery = "\r\nINSERT INTO `#@__story_content`(`title`,`bookname`,`chapterid`,`catid`,`bcatid`,`bookid`,`booktype`,`sortid`,\r\n`mid`,`bigpic`,`body`,`addtime`)\r\nVALUES ('{$title}','{$bookname}', '{$chapterid}', '{$catid}','{$bcatid}', '{$bookid}','{$booktype}','{$sortid}', '{$cfg_ml->M_ID}', '' , '', '{$addtime}');"; if (!$dsql->ExecuteNoneQuery($inQuery)) { ShowMsg("把数据保存到数据库时出错,请检查!" . $dsql->GetError() . $inQuery, "-1"); exit; } $arcID = $dsql->GetLastID(); WriteBookText($arcID, addslashes($body)); //更新图书的内容数 $row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '{$bookid}' and mid='{$cfg_ml->M_ID}' "); $dsql->ExecuteNoneQuery("Update #@__story_books set postnum='{$row['dd']}',lastpost='{$addtime}' where id='{$bookid}' and mid='{$cfg_ml->M_ID}' "); //更新章节的内容数 $row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '{$bookid}' And chapterid='{$chapterid}' and mid='{$cfg_ml->M_ID}' "); $dsql->ExecuteNoneQuery("Update #@__story_chapter set postnum='{$row['dd']}' where id='{$chapterid}' and mid='{$cfg_ml->M_ID}' "); //生成HTML //$artUrl = MakeArt($arcID,true); if (!isset($artUrl) || $artUrl == "") { $artUrl = $cfg_cmspath . "/book/story.php?id={$arcID}"; } //返回成功信息 $msg = "\r\n 请选择你的后续操作:\r\n<a href='story_add_content.php?bookid={$bookid}'><u>继续发布</u></a>\r\n \r\n<a href='{$artUrl}' target='_blank'><u>预览内容</u></a>\r\n \r\n<a href='../book/book.php?id={$bookid}' target='_blank'><u>预览图书</u></a>\r\n \r\n<a href='story_list_content.php?bookid={$bookid}'><u>管理所有内容</u></a>\r\n \r\n<a href='mybooks.php'><u>管理所有图书</u></a>\r\n"; $wintitle = "成功发布文章!"; $wecome_info = "连载管理::发布文章";
$nrow = $dsql->GetOne("SELECT * FROM #@__story_catalog WHERE id='{$catid}' "); $bcatid = $nrow['pid']; $booktype = $nrow['booktype']; if (empty($bcatid)) { $bcatid = 0; } if (empty($booktype)) { $booktype = 0; } $addtime = time(); $inQuery = "\r\n UPDATE `#@__story_content` SET `title`='{$title}',`bookname`='{$bookname}',\r\n `chapterid`='{$chapterid}',`sortid`='{$sortid}',`body`=''\r\n WHERE id='{$cid}' AND mid = '{$cfg_ml->M_ID}'\r\n"; if (!$dsql->ExecuteNoneQuery($inQuery)) { ShowMsg("更新数据时出错,请检查!" . str_repolace("'", "`", $dsql->GetError() . $inQuery), "-1"); exit; } WriteBookText($cid, addslashes($body)); //生成HTML //$artUrl = MakeArt($arcID,true); //if($artUrl=="") $artUrl = $cfg_book_url."/story.php?id={$cid}"; if (!isset($artUrl) || $artUrl == "") { $artUrl = $cfg_cmspath . "/book/story.php?id={$cid}"; } //返回成功信息 $msg = "\r\n 请选择你的后续操作:\r\n<a href='story_content_edit.php?cid={$cid}'><u>继续编辑</u></a>\r\n \r\n<a href='{$artUrl}' target='_blank'><u>预览内容</u></a>\r\n \r\n<a href='../book/book.php?id={$bookid}' target='_blank'><u>预览图书</u></a>\r\n \r\n<a href='story_list_content.php?bookid={$bookid}'><u>本书所有内容</u></a>\r\n \r\n<a href='mybooks.php'><u>管理所有图书</u></a>\r\n"; $wintitle = "成功修改文章!"; $wecome_info = "连载管理::发布文章"; $win = new OxWindow(); $win->AddTitle("成功修改文章:"); $win->AddMsgItem($msg); $winform = $win->GetWindow("hand", " ", false); $win->Display();
$bcatid = $nrow['pid']; $booktype = $nrow['booktype']; if (empty($bcatid)) { $bcatid = 0; } if (empty($booktype)) { $booktype = 0; } $addtime = time(); $inQuery = "\n UPDATE `#@__story_content` SET `title`='{$title}',`bookname`='{$bookname}',\n `chapterid`='{$chapterid}',`sortid`='{$sortid}',`body`=''\n WHERE id='{$cid}'\n"; if (!$dsql->ExecuteNoneQuery($inQuery)) { ShowMsg("更新数据时出错,请检查!" . str_repolace("'", "`", $dsql->GetError() . $inQuery), "-1"); $dsql->Close(); exit; } WriteBookText($cid, $body); if (empty($artcontentUrl)) { $artcontentUrl = ""; } if ($artcontentUrl == "") { $artcontentUrl = $cfg_mainsite . $cfg_cmspath . "/book/story.php?id={$cid}"; } require_once DEDEROOT . "/book/include/story.view.class.php"; $bv = new BookView($bookid, 'book'); $artUrl = $bv->MakeHtml(); $bv->Close(); //--------------------------------- //返回成功信息 //---------------------------------- $msg = "\n 请选择你的后续操作:\n<a href='story_content_edit.php?cid={$cid}'><u>继续编辑</u></a>\n \n<a href='{$artUrl}' target='_blank'><u>预览小说</u></a>\n \n<a href='{$artcontentUrl}' target='_blank'><u>预览内容</u></a>\n \n<a href='story_list_content.php?bookid={$bookid}'><u>本书所有内容</u></a>\n \n<a href='story_books.php'><u>管理所有图书</u></a>\n"; $wintitle = "成功修改文章!";
//---------------------------------- $inQuery = " Update `#@__story_content` set `title`='$title',`bookname`='$bookname', `chapterid`='$chapterid',`sortid`='$sortid',`body`='' where id='$cid' "; if(!$dsql->ExecuteNoneQuery($inQuery)){ ShowMsg("更新数据时出错,请检查!".str_repolace("'","`",$dsql->GetError().$inQuery),"-1"); $dsql->Close(); exit(); } WriteBookText($cid,stripslashes($body)); $dsql->Close(); //生成HTML //--------------------------------- //$artUrl = MakeArt($arcID,true,true); if($artcontentUrl=="") $artcontentUrl = $cfg_book_url."/story.php?id={$cid}"; require_once(dirname(__FILE__).'/../../include/inc_arcbook_view.php'); $bv = new BookView($bookid,'book'); $artUrl = $bv->MakeHtml(); $bv->Close(); //---------------------------------
//---------------------------------- $inQuery = " INSERT INTO `#@__story_content`(`title`,`bookname`,`chapterid`,`catid`,`bcatid`,`bookid`,`booktype`,`sortid`, `memberid`,`bigpic`,`body`,`addtime`,`adminid` ) VALUES ('$title','$bookname', '$chapterid', '$catid','$bcatid', '$bookid','$booktype','$sortid', '0', '' , '', '$addtime','$adminID');"; if(!$dsql->ExecuteNoneQuery($inQuery)){ ShowMsg("把数据保存到数据库时出错,请检查!".$dsql->GetError().$inQuery,"-1"); $dsql->Close(); exit(); } $arcID = $dsql->GetLastID(); WriteBookText($arcID,stripslashes($body)); //更新图书的内容数 $row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '$bookid' "); $dsql->ExecuteNoneQuery("Update #@__story_books set postnum='{$row['dd']}',lastpost='".time()."' where id='$bookid' "); //更新章节的内容数 $row = $dsql->GetOne("Select count(id) as dd From #@__story_content where bookid = '$bookid' And chapterid='$chapterid' "); $dsql->ExecuteNoneQuery("Update #@__story_chapter set postnum='{$row['dd']}' where id='$chapterid' "); //生成HTML //--------------------------------- //$artUrl = MakeArt($arcID,true,true); if($artcontentUrl=="") $artcontentUrl = $cfg_book_path."/story.php?id=$arcID";
$adminID = $cuserLogin->getUserID(); //本章最后一个小说的排列顺次序 $lrow = $dsql->GetOne("SELECT sortid From #@__story_content WHERE bookid='{$bookid}' AND chapterid='{$chapterid}' ORDER BY sortid DESC"); if (empty($lrow)) { $sortid = 1; } else { $sortid = $lrow['sortid'] + 1; } $inQuery = "\r\nINSERT INTO `#@__story_content`(`title`,`bookname`,`chapterid`,`catid`,`bcatid`,`bookid`,`booktype`,`sortid`,\r\n`mid`,`bigpic`,`body`,`addtime`)\r\nVALUES ('{$title}','{$bookname}', '{$chapterid}', '{$catid}','{$bcatid}', '{$bookid}','{$booktype}','{$sortid}', '0', '' , '', '{$addtime}');"; if (!$dsql->ExecuteNoneQuery($inQuery)) { ShowMsg("把数据保存到数据库时出错,请检查!" . $dsql->GetError() . $inQuery, "-1"); $dsql->Close(); exit; } $arcID = $dsql->GetLastID(); WriteBookText($arcID, $body); //更新图书的内容数 $row = $dsql->GetOne("Select count(id) AS dd FROM #@__story_content WHERE bookid = '{$bookid}' "); $dsql->ExecuteNoneQuery("UPDATE #@__story_books SET postnum='{$row['dd']}',lastpost='" . time() . "' WHERE bid='{$bookid}' "); //更新章节的内容数 $row = $dsql->GetOne("SELECT count(id) AS dd FROM #@__story_content WHERE bookid = '{$bookid}' AND chapterid='{$chapterid}' "); $dsql->ExecuteNoneQuery("UPDATE #@__story_chapter SET postnum='{$row['dd']}' WHERE id='{$chapterid}' "); //生成HTML //$artUrl = MakeArt($arcID,true); if (empty($artcontentUrl)) { $artcontentUrl = ''; } if ($artcontentUrl == "") { $artcontentUrl = $cfg_cmspath . "/book/story.php?id={$arcID}"; } require_once DEDEROOT . '/book/include/story.view.class.php';