Ejemplo n.º 1
0
        $where = '1';
    }
    $sql = "SELECT articleid FROM " . jieqi_dbprefix('article_article') . " WHERE " . $where;
    $res = $query->execute($sql);
    $resnum = $query->db->getRowsNum($res);
    echo sprintf($jieqiLang['article']['clean_show_num'], $resnum);
    ob_flush();
    flush();
    include_once $jieqiModules['article']['path'] . '/include/operatefunction.php';
    if (!in_array($_POST['operate'], array('delarticle', 'delchapter', 'delattach'))) {
        $badparm = true;
    }
    $criteria = new CriteriaCompo(new Criteria('attachment', '', '!='));
    while ($row = $query->getRow()) {
        if ($_POST['operate'] == 'delarticle') {
            $ret = jieqi_article_delete($row['articleid'], false);
        } elseif ($_POST['operate'] == 'delchapter') {
            $ret = jieqi_article_clean($row['articleid'], false);
        } elseif ($_POST['operate'] == 'delattach') {
            $ret = jieqi_article_delchapter($row['articleid'], $criteria, false);
        }
        if (is_object($ret)) {
            echo sprintf($jieqiLang['article']['clean_article_doing'], $ret->getVar('articlename'), $ret->getVar('articleid'));
            ob_flush();
            flush();
        }
    }
    echo $jieqiLang['article']['clean_all_success'];
    ob_flush();
    flush();
} else {
Ejemplo n.º 2
0
 * @version    $Id: batchdel.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']['delallarticle'], $jieqiUsersStatus, $jieqiUsersGroup, false, true);
jieqi_loadlang('manage', JIEQI_MODULE_NAME);
if (empty($_REQUEST['checkid'])) {
    jieqi_printfail($jieqiLang['article']['need_delete_ids']);
}
@set_time_limit(0);
@session_write_close();
echo '                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ';
include_once $jieqiModules['article']['path'] . '/include/operatefunction.php';
foreach ($_REQUEST['checkid'] as $deleteid) {
    $ret = jieqi_article_delete($deleteid, false);
    if (is_object($ret)) {
        echo sprintf($jieqiLang['article']['start_delete_article'], $ret->getVar('articlename'));
        ob_flush();
        flush();
    }
}
//更新最新文章
jieqi_getcachevars('article', 'articleuplog');
if (!is_array($jieqiArticleuplog)) {
    $jieqiArticleuplog = array('articleuptime' => 0, 'chapteruptime' => 0);
}
$jieqiArticleuplog['articleuptime'] = time();
jieqi_setcachevars('articleuplog', 'jieqiArticleuplog', $jieqiArticleuplog, 'article');
echo $jieqiLang['article']['batch_delete_success'];
ob_flush();
Ejemplo n.º 3
0
            jieqi_setcachevars('articleuplog', 'jieqiArticleuplog', $jieqiArticleuplog, 'article');
            break;
        case 'ready':
            $article_handler->updatefields(array('display' => 1), $criteria);
            //更新最新章节
            $jieqiArticleuplog['articleuptime'] = JIEQI_NOW_TIME;
            jieqi_setcachevars('articleuplog', 'jieqiArticleuplog', $jieqiArticleuplog, 'article');
            break;
        case 'del':
            $canedit = jieqi_checkpower($jieqiPower['article']['delallarticle'], $jieqiUsersStatus, $jieqiUsersGroup, true, true);
            if ($canedit) {
                $article = $article_handler->get($_REQUEST['id']);
                if (is_object($article)) {
                    //删除文章
                    include_once $jieqiModules['article']['path'] . '/include/operatefunction.php';
                    jieqi_article_delete($_REQUEST['id'], true);
                }
            }
            break;
    }
    unset($criteria);
    //更新静态页
    if ($jieqiConfigs['article']['fakestatic'] > 0) {
        include_once $jieqiModules['article']['path'] . '/include/funstatic.php';
        article_update_static('articleedit', $_REQUEST['id'], 0);
    }
}
include_once JIEQI_ROOT_PATH . '/admin/header.php';
$jieqiTpl->assign('article_static_url', $article_static_url);
$jieqiTpl->assign('article_dynamic_url', $article_dynamic_url);
jieqi_getconfigs('article', 'sort');