Example #1
0
function jieqi_upbookcasevisit()
{
    if (!empty($_REQUEST['bid'])) {
        include_once $jieqiModules['article']['path'] . '/class/bookcase.php';
        $bookcase_handler =& JieqiBookcaseHandler::getInstance('JieqiBookcaseHandler');
        $bookcase_handler->db->query('UPDATE ' . jieqi_dbprefix('article_bookcase') . ' SET lastvisit=' . JIEQI_NOW_TIME . ' WHERE caseid=' . $_REQUEST['bid']);
    }
}
Example #2
0
 * @version    $Id: bookcase.php 339 2009-06-23 03:03:24Z juny $
 */
define('JIEQI_MODULE_NAME', 'article');
require_once '../../global.php';
jieqi_checklogin();
jieqi_loadlang('bookcase', JIEQI_MODULE_NAME);
include_once JIEQI_ROOT_PATH . '/header.php';
jieqi_getconfigs('article', 'configs');
$article_static_url = empty($jieqiConfigs['article']['staticurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['staticurl'];
$article_dynamic_url = empty($jieqiConfigs['article']['dynamicurl']) ? $jieqiModules['article']['url'] : $jieqiConfigs['article']['dynamicurl'];
$jieqiTpl->assign('article_static_url', $article_static_url);
$jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
//处理删除
if (!empty($_REQUEST['delid'])) {
    include_once $jieqiModules['article']['path'] . '/class/bookcase.php';
    $bookcase_handler =& JieqiBookcaseHandler::getInstance('JieqiBookcaseHandler');
    $bookcase = $bookcase_handler->get($_REQUEST['delid']);
    if (is_object($bookcase)) {
        if ($bookcase->getVar('userid') == $_SESSION['jieqiUserId']) {
            include_once $jieqiModules['article']['path'] . '/class/article.php';
            $article_handler =& JieqiArticleHandler::getInstance('JieqiArticleHandler');
            $article_handler->db->query('UPDATE ' . jieqi_dbprefix('article_article') . ' SET goodnum=goodnum-1 WHERE articleid=' . $bookcase->getVar('articleid', 'n') . ' AND goodnum>0');
            $bookcase_handler->delete($_REQUEST['delid']);
        }
    }
    unset($bookcase);
}
//处理改变分类
if (!empty($_REQUEST['checkid']) && isset($_REQUEST['newclassid'])) {
    $_REQUEST['newclassid'] = intval($_REQUEST['newclassid']);
    $checkids = '';