Example #1
0
$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';
//增加点击数
if ($addnewreply > 0) {
    $lastinfo = serialize(array('time' => JIEQI_NOW_TIME, 'uid' => intval($_SESSION['jieqiUserId']), 'uname' => strval($_SESSION['jieqiUserName'])));
    $article_query->execute('UPDATE ' . jieqi_dbprefix('article_reviews') . ' SET views=views+1,replies=replies+1,replytime=' . JIEQI_NOW_TIME . ",lastinfo='" . jieqi_dbslashes($lastinfo) . "' WHERE topicid=" . $_REQUEST['rid']);
} elseif ($addnewreply < 0) {
    $article_query->execute('UPDATE ' . jieqi_dbprefix('article_reviews') . ' SET views=views+1,replies=replies-1 WHERE topicid=' . $_REQUEST['rid']);
} else {
    //载入统计处理函数
    include_once JIEQI_ROOT_PATH . '/include/funstat.php';
    jieqi_visit_stat($_REQUEST['rid'], jieqi_dbprefix('article_reviews'), 'views', 'topicid', $article_query);
}
include_once JIEQI_ROOT_PATH . '/footer.php';
Example #2
0
/**
 * 增加主题点击数
 * 
 * @param      int         $tid 主题ID
 * @param      string      $table 主题表名
 * @access     public
 * @return     bool
 */
function jieqi_topic_addviews($tid, $table)
{
    global $query;
    //载入统计处理函数
    include_once JIEQI_ROOT_PATH . '/include/funstat.php';
    return jieqi_visit_stat($tid, $table, 'views', 'topicid', $query);
}
Example #3
0
$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';
//增加点击数
if ($addnewreply > 0) {
    $lastinfo = serialize(array('time' => JIEQI_NOW_TIME, 'uid' => intval($_SESSION['jieqiUserId']), 'uname' => strval($_SESSION['jieqiUserName'])));
    $post_query->execute('UPDATE ' . jieqi_dbprefix('system_ptopics') . ' SET views=views+1,replies=replies+1,replytime=' . JIEQI_NOW_TIME . ",lastinfo='" . jieqi_dbslashes($lastinfo) . "' WHERE topicid=" . $_REQUEST['tid']);
} elseif ($addnewreply < 0) {
    $post_query->execute('UPDATE ' . jieqi_dbprefix('system_ptopics') . ' SET views=views+1,replies=replies-1 WHERE topicid=' . $_REQUEST['tid']);
} else {
    //载入统计处理函数
    include_once JIEQI_ROOT_PATH . '/include/funstat.php';
    jieqi_visit_stat($_REQUEST['tid'], jieqi_dbprefix('system_ptopics'), 'views', 'topicid', $post_query);
}
include_once JIEQI_ROOT_PATH . '/footer.php';