コード例 #1
0
ファイル: reviewshow.php プロジェクト: thu0ng91/jmc
$criteria->setLimit($_REQUEST['pagerows']);
$query_count = $article_query->getCount($criteria);
if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'last') {
    $_REQUEST['page'] = ceil($query_count / $_REQUEST['pagerows']);
} elseif (empty($_REQUEST['page']) || !is_numeric($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
}
$criteria->setStart(($_REQUEST['page'] - 1) * $_REQUEST['pagerows']);
$article_query->queryObjects($criteria);
include_once JIEQI_ROOT_PATH . '/lib/text/textconvert.php';
$ts = TextConvert::getInstance('TextConvert');
$replyrows = array();
$k = 0;
while ($review = $article_query->getObject()) {
    $addvars = array('order' => ($_REQUEST['page'] - 1) * $_REQUEST['pagerows'] + $k + 1);
    $replyrows[$k] = jieqi_post_vars($review, $jieqiConfigs['article'], $addvars, true);
    $k++;
}
$jieqiTpl->assign_by_ref('replyrows', $replyrows);
$jieqiTpl->assign('enablepost', $enablepost);
//是否显示验证码
if (!isset($jieqiConfigs['system'])) {
    jieqi_getconfigs('system', 'configs');
}
$jieqiTpl->assign('postcheckcode', $jieqiConfigs['system']['postcheckcode']);
//处理页面跳转
include_once JIEQI_ROOT_PATH . '/lib/html/page.php';
$jumppage = new JieqiPage($query_count, $_REQUEST['pagerows'], $_REQUEST['page']);
$jieqiTpl->assign('url_jumppage', $jumppage->whole_bar());
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = $jieqiModules['article']['path'] . '/templates/reviewshow.html';
コード例 #2
0
ファイル: ptopicshow.php プロジェクト: thu0ng91/jmc
$criteria->setSort('p.postid');
$criteria->setOrder('ASC');
$criteria->setLimit($_REQUEST['pagerows']);
$query_count = $post_query->getCount($criteria);
if ($_REQUEST['page'] == 'last') {
    $_REQUEST['page'] = ceil($query_count / $_REQUEST['pagerows']);
} elseif (empty($_REQUEST['page']) || !is_numeric($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
}
$criteria->setStart(($_REQUEST['page'] - 1) * $_REQUEST['pagerows']);
$post_query->queryObjects($criteria);
$ppostrows = array();
$k = 0;
while ($ppost = $post_query->getObject()) {
    $addvars = array('order' => ($_REQUEST['page'] - 1) * $_REQUEST['pagerows'] + $k + 1);
    $ppostrows[$k] = jieqi_post_vars($ppost, $jieqiConfigs['system'], $addvars, true);
    $k++;
}
$jieqiTpl->assign_by_ref('ppostrows', $ppostrows);
$jieqiTpl->assign('enablepost', $enablepost);
if (!isset($jieqiConfigs['system'])) {
    jieqi_getconfigs('system', 'configs');
}
$jieqiTpl->assign('postcheckcode', $jieqiConfigs['system']['postcheckcode']);
//处理页面跳转
include_once JIEQI_ROOT_PATH . '/lib/html/page.php';
$jumppage = new JieqiPage($query_count, $_REQUEST['pagerows'], $_REQUEST['page']);
$jieqiTpl->assign('url_jumppage', $jumppage->whole_bar());
$jieqiTpl->setCaching(0);
$jieqiTset['jieqi_contents_template'] = JIEQI_ROOT_PATH . '/templates/ptopicshow.html';
//增加点击数