Beispiel #1
0
 public function setMessageError($e)
 {
     if (strpos($e->getMessage(), "Error while registrating")) {
         self::$saveBookName = strip_tags(self::$saveBookName);
     }
     self::$bookNameID = $e->getMessage();
 }
Beispiel #2
0
<?php

/**
 * Enter description here...
 *
 * @author Administrator
 * @package defaultPackage
 * @rcsfile 	$RCSfile: search.php,v $
 * @revision 	$Revision: 1.1 $
 * @date 	$Date: 2009/08/04 04:06:24 $
 */
require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once dirname(__FILE__) . '/include/story.view.class.php';
$kws = array();
if (!empty($id)) {
    $kws['id'] = intval($id);
}
if (!empty($keyword)) {
    $kws['keyword'] = html2text($keyword);
}
if (!empty($author)) {
    $kws['author'] = html2text($author);
}
if (count($kws) == 0) {
    ParamError();
}
$bv = new BookView(0, 'search', $kws);
$bv->Display();
$bv->Close();
if (!$dsql->ExecuteNoneQuery($inQuery)) {
    ShowMsg("把数据保存到数据库时出错,请检查!" . str_repolace("'", "`", $dsql->GetError() . $inQuery), "-1");
    $dsql->Close();
    exit;
}
$arcID = $cid;
//生成HTML
//---------------------------------
//$artUrl = MakeArt($arcID,true);
if (empty($artcontentUrl)) {
    $artcontentUrl = "";
}
if ($artcontentUrl == "") {
    $artcontentUrl = $cfg_mainsite . $cfg_cmspath . "/book/show-photo.php?id={$arcID}&bookid={$bookid}&chapterid={$chapterid}";
}
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_photo_edit.php?cid={$cid}'><u>继续修改</u></a>\n&nbsp;&nbsp;\n<a href='{$artUrl}' target='_blank'><u>预览漫画</u></a>\n&nbsp;&nbsp;\n<a href='{$artcontentUrl}' target='_blank'><u>预览内容</u></a>\n&nbsp;&nbsp;\n<a href='story_list_content.php?bookid={$bookid}'><u>管理所有内容</u></a>\n&nbsp;&nbsp;\n<a href='story_books.php'><u>管理所有图书</u></a>\n";
$wintitle = "成功修改内容!";
$wecome_info = "连载管理::修改漫画内容";
$win = new OxWindow();
$win->AddTitle("成功发布漫画:");
$win->AddMsgItem($msg);
$winform = $win->GetWindow("hand", "&nbsp;", false);
$win->Display();
//ClearAllLink();
        $addquery .= " And bid<='{$endid}' ";
    }
    if (!empty($catid)) {
        $addquery .= " And (catid='{$catid}' Or bcatid='{$catid}') ";
    }
    if (empty($makenum)) {
        $makenum = 50;
    }
    $dsql->SetQuery("Select SQL_CALC_FOUND_ROWS bid From #@__story_books where {$addquery} limit {$start},{$makenum} ");
    $dsql->Execute();
    $n = 0;
    $row = $dsql->GetOne("SELECT FOUND_ROWS() as dd ");
    $limitrow = $row['dd'];
    while ($row = $dsql->GetObject()) {
        $start++;
        $bv = new BookView($row->bid, 'book');
        $artUrl = $bv->MakeHtml(false);
        //echo "更新: <a href='$artUrl' target='_blank'>{$bv->Fields['bookname']}</a> OK!<br />\r\n";
        //echo $row->bid." - ";
    }
    if ($start >= $limitrow) {
        ShowMsg("完成所有HTML的更新!", "javascript:;");
    } else {
        $hasMake = $limitrow - $start;
        if ($limitrow > 0) {
            $proportion = 100 - ceil($hasMake / $limitrow * 100);
        }
        ShowMsg("已更新至:{$proportion}% 继续更新其它内容...", "makehtml_story.php?start={$start}&action=make&startid={$startid}&endid={$endid}&catid={$catid}&makenum={$makenum}");
    }
    exit;
}