本文整理汇总了PHP中jieqi_printfail函数的典型用法代码示例。如果您正苦于以下问题:PHP jieqi_printfail函数的具体用法?PHP jieqi_printfail怎么用?PHP jieqi_printfail使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了jieqi_printfail函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jieqi_uregister_iprepare
/**
* 用户接口,注册预处理
*
* @param array $params 参数数组
* 必须参数: $params['username'] - 用户名,$params['password'] - 密码,$params['email'] - 邮箱
* @access public
* @return int
*/
function jieqi_uregister_iprepare(&$params)
{
global $jieqiLang;
if (!isset($jieqiLang['system'])) {
jieqi_loadlang('users', 'system');
}
$params['uc_uid'] = uc_user_register($params['username'], $params['password'], $params['email']);
/*
-1 用户名不合法, -2 包含要允许注册的词语, -3 用户名已经存在, -4 Email 格式有误, -5 Email 不允许注册, -6 该 Email 已经被注册
*/
if ($params['uc_uid'] > 0) {
return true;
} else {
switch ($params['uc_uid']) {
case -1:
$params['error'] = $jieqiLang['system']['error_user_format'];
break;
case -2:
$params['error'] = $jieqiLang['system']['error_user_format'];
break;
case -3:
$params['error'] = $jieqiLang['system']['error_user_format'];
break;
case -4:
$params['error'] = $jieqiLang['system']['error_email_format'];
break;
case -5:
$params['error'] = $jieqiLang['system']['email_has_registered'];
break;
case -6:
$params['error'] = $jieqiLang['system']['email_has_registered'];
break;
default:
$params['error'] = $jieqiLang['system']['register_failure'];
break;
}
if ($params['return']) {
return false;
} else {
jieqi_printfail($params['error']);
}
}
}
示例2: jieqi_printfail
//关键字长度
if (!empty($jieqiConfigs['obook']['minsearchlen']) && strlen($_REQUEST['searchkey']) < intval($jieqiConfigs['obook']['minsearchlen'])) {
jieqi_printfail(sprintf($jieqiLang['obook']['search_minsize_limit'], $jieqiConfigs['obook']['minsearchlen']));
}
//检查时间,是否允许搜索
if (!empty($jieqiConfigs['obook']['minsearchtime']) && empty($_REQUEST['page'])) {
$jieqi_visit_time = jieqi_strtosary($_COOKIE['jieqiVisitTime']);
if (!empty($_SESSION['jieqiObooksearchTime'])) {
$logtime = $_SESSION['jieqiObooksearchTime'];
} elseif (!empty($jieqi_visit_time['jieqiObooksearchTime'])) {
$logtime = $jieqi_visit_time['jieqiObooksearchTime'];
} else {
$logtime = 0;
}
if ($logtime > 0 && JIEQI_NOW_TIME - $logtime < intval($jieqiConfigs['obook']['minsearchtime'])) {
jieqi_printfail(sprintf($jieqiLang['obook']['search_time_limit'], $jieqiConfigs['obook']['minsearchtime']));
}
$_SESSION['jieqiObooksearchTime'] = JIEQI_NOW_TIME;
$jieqi_visit_time['jieqiObooksearchTime'] = JIEQI_NOW_TIME;
setcookie("jieqiVisitTime", jieqi_sarytostr($jieqi_visit_time), JIEQI_NOW_TIME + 3600, '/', JIEQI_COOKIE_DOMAIN, 0);
}
$obook_static_url = empty($jieqiConfigs['obook']['staticurl']) ? $jieqiModules['obook']['url'] : $jieqiConfigs['obook']['staticurl'];
$obook_dynamic_url = empty($jieqiConfigs['obook']['dynamicurl']) ? $jieqiModules['obook']['url'] : $jieqiConfigs['obook']['dynamicurl'];
//搜索字段
if (!isset($_REQUEST['searchtype']) || $_REQUEST['searchtype'] != 'author') {
$_REQUEST['searchtype'] = 'obookname';
}
//页码
if (empty($_REQUEST['page']) || !is_numeric($_REQUEST['page'])) {
$_REQUEST['page'] = 1;
}
示例3: define
* @category jieqicms
* @package article
* @copyright Copyright (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi.com)
* @author $Author: juny $
* @version $Id: setgood.php 228 2008-11-27 06:44:31Z juny $
*/
define('JIEQI_MODULE_NAME', 'article');
require_once '../../../global.php';
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
jieqi_checkpower($jieqiPower['article']['manageallarticle'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
jieqi_loadlang('manage', JIEQI_MODULE_NAME);
if (empty($_REQUEST['id'])) {
jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
include_once $jieqiModules['article']['path'] . '/class/article.php';
$article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
$article = $article_handler->get($_REQUEST['id']);
if (!is_object($article)) {
jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
if ($_REQUEST['action'] == 'no') {
$article->setVar('toptime', 0);
} else {
$article->setVar('toptime', JIEQI_NOW_TIME);
}
$article_handler->insert($article);
if ($_REQUEST['action'] == 'no') {
jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['article_notgood_success']);
} else {
jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['article_setgood_success']);
}
示例4: jieqi_printfail
$errtext .= $jieqiLang['system']['system_userlink_ultitle'] . '<br />';
}
if (strlen($_POST['ulurl']) == 0) {
$errtext .= $jieqiLang['system']['system_userlink_ulurl'] . '<br />';
}
if (empty($errtext)) {
$newUserlink =& $userlink_handler->create();
$newUserlink->setVar('ultitle', $_POST['ultitle']);
$newUserlink->setVar('ulurl', $_POST['ulurl']);
$newUserlink->setVar('ulinfo', $_POST['ulinfo']);
$newUserlink->setVar('userid', $_SESSION['jieqiUserId']);
$newUserlink->setVar('username', $_SESSION['jieqiUserName']);
$newUserlink->setVar('addtime', JIEQI_NOW_TIME);
$userlink_handler->insert($newUserlink);
} else {
jieqi_printfail($errtext);
}
break;
case 'delete':
if (!empty($_REQUEST['ulid'])) {
$sql = "DELETE FROM " . jieqi_dbprefix('system_userlink') . " WHERE userid=" . intval($_SESSION['jieqiUserId']) . " AND ulid=" . intval($_REQUEST['ulid']);
$userlink_handler->db->query($sql);
}
break;
case 'top':
if (!empty($_REQUEST['ulid'])) {
$sql = "UPDATE " . jieqi_dbprefix('system_userlink') . " SET toptime=" . intval(JIEQI_NOW_TIME) . " WHERE userid=" . intval($_SESSION['jieqiUserId']) . " AND ulid=" . intval($_REQUEST['ulid']);
$userlink_handler->db->query($sql);
}
break;
case 'untop':
示例5: sprintf
$jieqiTpl->assign('egold', $_REQUEST['egold']);
$jieqiTpl->assign('egoldname', JIEQI_EGOLD_NAME);
$jieqiTpl->assign('money', sprintf('%0.2f', $money / 100));
$jieqiTpl->assign('merchant_id', $merchant_id);
$jieqiTpl->assign('orderid', $orderid);
$jieqiTpl->assign('paytype', $_REQUEST['paytype']);
//$jieqiPayset[JIEQI_PAY_TYPE]['paytype']
$jieqiTpl->assign('amount', $amount);
$jieqiTpl->assign('attach', $attach);
$jieqiTpl->assign('currency', $currency);
$jieqiTpl->assign('merchant_url', $merchant_url);
$jieqiTpl->assign('notify_url', $jieqiPayset[JIEQI_PAY_TYPE]['paynotify']);
$jieqiTpl->assign('commodity_info', $commodity_info);
$jieqiTpl->assign('pname', $pname);
$jieqiTpl->assign('pemail', $pemail);
$jieqiTpl->assign('merchant_param', $merchant_param);
$jieqiTpl->assign('isSupportDES', $isSupportDES);
$jieqiTpl->assign('pid_15173account', $pid_15173account);
$jieqiTpl->assign('mac', $mac);
if (is_array($jieqiPayset[JIEQI_PAY_TYPE]['addvars'])) {
foreach ($jieqiPayset[JIEQI_PAY_TYPE]['addvars'] as $k => $v) {
$jieqiTpl->assign($k, $v);
}
}
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['pay']['path'] . '/templates/15173.html';
include_once JIEQI_ROOT_PATH . '/footer.php';
}
} else {
jieqi_printfail($jieqiLang['pay']['need_buy_type']);
}
示例6: jieqi_loadlang
jieqi_loadlang('share', JIEQI_MODULE_NAME);
jieqi_getconfigs(JIEQI_MODULE_NAME, 'publisher');
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
if (!isset($_REQUEST['action'])) {
$_REQUEST['action'] = '';
}
if ($_REQUEST['action'] == 'login' && isset($_REQUEST['publishid'])) {
$_REQUEST['publishid'] = intval($_REQUEST['publishid']);
if (isset($jieqiPublisher[$_REQUEST['publishid']]) && $jieqiPublisher[$_REQUEST['publishid']]['password'] == $_REQUEST['password'] && !empty($_REQUEST['password'])) {
$_SESSION['jieqiPublishid'] = $_REQUEST['publishid'];
if (empty($_REQUEST['jumpurl'])) {
$_REQUEST['jumpurl'] = $jieqiModules['obook']['url'] . '/share/sharestat.php';
}
jieqi_jumppage($_REQUEST['jumpurl'], LANG_DO_SUCCESS, $jieqiLang['obook']['share_login_success']);
} else {
jieqi_printfail($jieqiLang['obook']['share_login_error']);
}
} else {
include_once JIEQI_ROOT_PATH . '/admin/header.php';
$publishrows = array();
foreach ($jieqiPublisher as $k => $v) {
$publishrows[] = array('id' => $k, 'name' => $v['name']);
}
$jieqiTpl->assign_by_ref('publishrows', $publishrows);
if (!empty($_REQUEST['jumpurl'])) {
$jieqiTpl->assign('url_login', $jieqiModules['obook']['url'] . '/share/sharelogin.php?do=submit&jumpurl=' . urlencode($_REQUEST['jumpurl']));
} else {
$jieqiTpl->assign('url_login', $jieqiModules['obook']['url'] . '/share/sharelogin.php?do=submit');
}
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['obook']['path'] . '/templates/share/sharelogin.html';
示例7: XMLArray
include_once JIEQI_ROOT_PATH . '/lib/xml/xmlarray.php';
$xmlarray = new XMLArray();
if ($_REQUEST['vsize'] <= 1) {
$packrows[1] = $xmlarray->xml2array(jieqi_readfile($packxml));
} else {
$packrows = $xmlarray->xml2array(jieqi_readfile($packxml));
}
}
$jieqiTpl->assign_by_ref('packrows', $packrows);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/packumd.html';
break;
case 'txtchapter':
default:
$jieqiTpl->assign('type', 'txtchapter');
$jieqiConfigs['article']['maketxt'] = intval($jieqiConfigs['article']['maketxt']);
if (empty($jieqiConfigs['article']['maketxt'])) {
jieqi_printfail($jieqiLang['article']['down_file_notopen']);
}
$packsize = array();
$jieqiTpl->assign_by_ref('packsize', $packsize);
$jieqiTpl->assign('vsize', 0);
foreach ($opf_chapters as $k => $v) {
$path = jieqi_uploadpath($jieqiConfigs['article']['txtdir'], 'article') . jieqi_getsubdir($_REQUEST['id']) . '/' . $_REQUEST['id'] . '/' . $v['chapterid'] . $jieqi_file_postfix['txt'];
$opf_chapters[$k]['maketime'] = intval(@filemtime($path));
$opf_chapters[$k]['filesize'] = intval(@filesize($path));
}
$jieqiTpl->assign_by_ref('packrows', $opf_chapters);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/packtxtchapter.html';
break;
}
include_once JIEQI_ROOT_PATH . '/footer.php';
示例8: jieqi_printfail
if (empty($_REQUEST['id'])) {
jieqi_printfail(LANG_ERROR_PARAMETER);
}
jieqi_loadlang('manage', JIEQI_MODULE_NAME);
include_once $jieqiModules['article']['path'] . '/class/article.php';
$article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
$article = $article_handler->get($_REQUEST['id']);
if (!$article) {
jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
//检查权限
jieqi_getconfigs(JIEQI_MODULE_NAME, 'power');
$canedit = jieqi_checkpower($jieqiPower['article']['delallarticle'], $jieqiUsersStatus, $jieqiUsersGroup, true);
if (!$canedit && !empty($_SESSION['jieqiUserId'])) {
//除了斑竹,作者、发表者和代理人可以删除文章
$tmpvar = $_SESSION['jieqiUserId'];
if ($tmpvar > 0 && ($article->getVar('authorid') == $tmpvar || $article->getVar('posterid') == $tmpvar || $article->getVar('agentid') == $tmpvar)) {
$canedit = jieqi_checkpower($jieqiPower['article']['delmyarticle'], $jieqiUsersStatus, $jieqiUsersGroup, true);
}
}
if (!$canedit) {
jieqi_printfail($jieqiLang['article']['noper_clean_article']);
}
//清理章节
include_once $jieqiModules['article']['path'] . '/include/operatefunction.php';
jieqi_article_clean($_REQUEST['id'], false);
if (!empty($_REQUEST['collecturl'])) {
jieqi_jumppage($_REQUEST['collecturl'], LANG_DO_SUCCESS, $jieqiLang['article']['article_clean_collect']);
} else {
jieqi_jumppage($article_static_url . '/articlemanage.php?id=' . $_REQUEST['id'], LANG_DO_SUCCESS, $jieqiLang['article']['article_clean_success']);
}
示例9: jieqi_msgbox
$newApply->setVar('applyflag', 0);
$apply_handler->insert($newApply);
//jieqi_msgwin(LANG_DO_SUCCESS, $jieqiLang['article']['apply_submit_success']);
include_once JIEQI_ROOT_PATH . '/header.php';
$jieqiTpl->setCaching(0);
$jieqiTpl->assign('jieqi_contents', jieqi_msgbox(LANG_DO_SUCCESS, $jieqiLang['article']['apply_submit_success']));
include_once JIEQI_ROOT_PATH . '/footer.php';
} else {
//不需要审核
include_once JIEQI_ROOT_PATH . '/class/groups.php';
jieqi_getconfigs(JIEQI_MODULE_NAME, 'configs');
$key = array_search($jieqiConfigs['article']['writergroup'], $jieqiGroups);
if ($key == false) {
jieqi_printfail($jieqiLang['article']['no_writer_group']);
} elseif ($key == JIEQI_GROUP_ADMIN) {
jieqi_printfail($jieqiLang['article']['no_writer_admin']);
} else {
include_once JIEQI_ROOT_PATH . '/class/users.php';
$users_handler =& JieqiUsersHandler::getInstance('JieqiUsersHandler');
$jieqiUsers = $users_handler->get($_SESSION['jieqiUserId']);
$jieqiUsers->setVar('groupid', $key);
$_SESSION['jieqiUserGroup'] = $jieqiUsers->getVar('groupid');
$users_handler->insert($jieqiUsers);
//自动申请通过
$newApply->setVar('applyflag', 1);
$apply_handler->insert($newApply);
jieqi_jumppage($jieqiModules['article']['url'] . '/myarticle.php', LANG_DO_SUCCESS, sprintf($jieqiLang['article']['apply_writer_success'], $jieqiConfigs['article']['writergroup']));
}
}
} else {
//显示申请条例
示例10: jieqi_checkpower
//检查权限
include_once JIEQI_ROOT_PATH . '/class/power.php';
$power_handler =& JieqiPowerHandler::getInstance('JieqiPowerHandler');
$power_handler->getSavedVars($_GET['mod']);
jieqi_checkpower($jieqiPower[$_GET['mod']]['adminblock'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
//载入语言
jieqi_loadlang('blocks', JIEQI_MODULE_NAME);
//取得设置
if (empty($_REQUEST['id'])) {
jieqi_printfail($jieqiLang['system']['block_not_exists']);
}
include_once JIEQI_ROOT_PATH . '/class/blocks.php';
$blocks_handler =& JieqiBlocksHandler::getInstance('JieqiBlocksHandler');
$block = $blocks_handler->get($_REQUEST['id']);
if (!is_object($block)) {
jieqi_printfail($jieqiLang['system']['block_not_exists']);
}
include_once JIEQI_ROOT_PATH . '/admin/header.php';
//区块名称
include_once JIEQI_ROOT_PATH . '/class/modules.php';
$modules_handler =& JieqiModulesHandler::getInstance('JieqiModulesHandler');
$criteria = new CriteriaCompo(new Criteria('publish', 1, '='));
$criteria->setSort('weight');
$criteria->setOrder('ASC');
$modules_handler->queryObjects($criteria);
unset($criteria);
$modules = array();
while ($v = $modules_handler->getObject()) {
$modules[$v->getVar('name', 'n')] = $v->getVar('caption', 'n');
}
$modules['system'] = LANG_MODULE_SYSTEM;
示例11: jieqi_printfail
$buyinfo->setVar('siteid', JIEQI_SITE_ID);
$buyinfo->setVar('osaleid', $osale->getVar('osaleid', 'n'));
$buyinfo->setVar('buytime', JIEQI_NOW_TIME);
$buyinfo->setVar('userid', $users->getVar('uid', 'n'));
$buyinfo->setVar('username', $users->getVar('uname', 'n'));
$buyinfo->setVar('obookid', $v['obookid']);
$buyinfo->setVar('ochapterid', $v['ochapterid']);
$buyinfo->setVar('obookname', $v['obookname']);
$buyinfo->setVar('chaptername', $v['chaptername']);
$buyinfo->setVar('lastread', 0);
$buyinfo->setVar('readnum', 0);
$buyinfo->setVar('state', 0);
$buyinfo->setVar('flag', 0);
$ret = $buyinfo_handler->insert($buyinfo);
if (!$ret) {
jieqi_printfail($jieqiLang['obook']['add_buyinfo_failure']);
}
//改变章节销售状态
$lastsale = $v['lastsale'];
$lastdate = date('Y-m-d', $lastsale);
$nowdate = date('Y-m-d', JIEQI_NOW_TIME);
$nowweek = date('w', JIEQI_NOW_TIME);
$addnum = 1;
$sql = '';
if ($nowdate == $lastdate) {
$sql .= 'daysale=daysale+' . $addnum . ', weeksale=weeksale+' . $addnum . ', monthsale=monthsale+' . $addnum;
} else {
$sql .= 'daysale=' . $addnum;
if ($nowweek == 1) {
$sql .= ', weeksale=' . $addnum;
} else {
示例12: jieqi_msgwin
}
} else {
jieqi_msgwin(LANG_NOTICE, sprintf($jieqiLang['article']['ovote_need_score'], $maxvote, $jieqiConfigs['article']['ovotescore'], jieqi_addurlvars(array('confirm' => 1))));
}
} else {
jieqi_printfail(sprintf($jieqiLang['article']['ovote_times_limit'], $maxvote));
}
}
include_once $jieqiModules['article']['path'] . '/class/article.php';
$article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
$article = $article_handler->get($_REQUEST['id']);
if (!$article) {
jieqi_printfail($jieqiLang['article']['article_not_exists']);
}
if (is_numeric($jieqiConfigs['article']['voteminsize']) && intval($jieqiConfigs['article']['voteminsize']) > $article->getVar('size')) {
jieqi_printfail(sprintf($jieqiLang['article']['ovote_min_articlesize'], $jieqiConfigs['article']['voteminsize']));
}
//增加投票值(每日、每周、每月、合计)
$lastdate = date('Y-m-d', $article->getVar('lastovote', 'n'));
$nowdate = date('Y-m-d', JIEQI_NOW_TIME);
$criteria = new CriteriaCompo(new Criteria('articleid', $_REQUEST['id']));
if (substr($nowdate, 0, 7) == substr($lastdate, 0, 7)) {
$monthovote = $article->getVar('monthovote', 'n') + $addnum;
$article_handler->updatefields(array('lastovote' => JIEQI_NOW_TIME, 'monthovote' => $monthvote), $criteria);
} else {
$oldovote = $article->getVar('monthovote', 'n');
$monthovote = $addnum;
$article_handler->updatefields(array('lastovote' => JIEQI_NOW_TIME, 'monthovote' => $monthvote, 'oldovote' => $oldovote), $criteria);
}
//记录已经投票标志
if (isset($userset['ovotedate']) && $userset['ovotedate'] == $today) {
示例13: jieqi_jumppage
if (in_array($v, $alltables)) {
if ($_POST['action'] == 'optimize') {
$db_query->execute("OPTIMIZE TABLE " . $v);
$doaction = $jieqiLang['system']['optimize_table_action'];
echo "<br>OPTIMIZE TABLE " . $v;
} else {
$db_query->execute("REPAIR TABLE " . $v);
$doaction = $jieqiLang['system']['repair_table_action'];
echo "<br>REPAIR TABLE " . $v;
}
}
}
if (!empty($doaction)) {
jieqi_jumppage(JIEQI_URL . '/admin/dboptimize.php', LANG_DO_SUCCESS, sprintf($jieqiLang['system']['optrep_table_success'], $doaction));
} else {
jieqi_printfail(sprintf($jieqiLang['system']['optrep_table_success'], $doaction));
}
} else {
$sql = "SHOW TABLE STATUS LIKE '" . JIEQI_DB_PREFIX . "%'";
$res = $db_query->execute($sql);
$tablerows = array();
$k = 0;
$totaltable = 0;
//表数
$totalsize = 0;
//数据长度
$totalrows = 0;
//记录数
$totalindex = 0;
//索引程度
$totalfree = 0;
示例14: raiseError
/**
* 产生一个错误
*
* @param string $message 错误信息
* @param int $mode 错误类型
* @access public
* @return void
*/
function raiseError($message = 'unknown error!', $mode = JIEQI_ERROR_DIE)
{
switch ($mode) {
case JIEQI_ERROR_DIE:
jieqi_printfail($message);
//$this->errors[$mode][] = $message;
break;
case JIEQI_ERROR_RETURN:
case JIEQI_ERROR_PRINT:
$this->errors[$mode][] = $message;
break;
default:
$this->errors[JIEQI_ERROR_RETURN][] = $message;
break;
}
}
示例15: jieqi_printfail
$newChapter->setVar('freesale', 0);
$newChapter->setVar('bespsale', 0);
$newChapter->setVar('totalsale', 0);
$newChapter->setVar('daysale', 0);
$newChapter->setVar('weeksale', 0);
$newChapter->setVar('monthsale', 0);
$newChapter->setVar('allsale', 0);
$newChapter->setVar('lastsale', 0);
$newChapter->setVar('canvip', 0);
$newChapter->setVar('canfree', 0);
$newChapter->setVar('canbesp', 0);
$newChapter->setVar('state', 0);
$newChapter->setVar('flag', 0);
$newChapter->setVar('display', 0);
if (!$chapter_handler->insert($newChapter)) {
jieqi_printfail($jieqiLang['obook']['add_chapter_failure']);
} else {
if ($chaptertype != 2) {
//增加或插入章节,最新卷可能也会变化
//暂时默认插入的章节就是本卷最后章节,否则最新章节可能不是插入的章节
$criteria = new CriteriaCompo(new Criteria('obookid', $_REQUEST['aid']));
$criteria->add(new Criteria('chapterorder', $_POST['volumeid'], '<'));
$criteria->add(new Criteria('chaptertype', 1, '='));
$criteria->setSort('chapterorder');
$criteria->setOrder('DESC');
$criteria->setLimit(1);
$chapter_handler->queryObjects($criteria);
$tmpchapter = $chapter_handler->getObject();
if (is_object($tmpchapter)) {
$lastvolume = $tmpchapter->getVar('chaptername', 'n');
$lastvolumeid = $tmpchapter->getVar('ochapterid', 'n');