<?php

define('THIS_SCRIPT', 'dispargue');
require_once 'global.php';
require_once INC_PATH.'filehandle.misc.php';
require_once INC_PATH.'BoardCache.class.php';
$lang = load_lang($lang, 'dispargue' );
define('TABLE_PREFIX', $dv);
define('USER_ID', $userid);
define('MEMBER_NAME', $membername);
define('ROOT_ID', $id);
define('BOARD_ID', $boardid);
if ($board_settings[61] <= 0) {
	$board_settings[61] = 10;
}
define('PAGE_SIZE', $board_settings[61]);
require_once INC_PATH.'argue_mod.functions.php';
require_once CACHE_PATH.'forum_pic.php';
$empath = $_DCACHE['forum_emot'][0];
if (empty($action)) {
	$topinfo =& get_top_argumentation_info(ROOT_ID, BOARD_ID, array('argumentation_topic_opts'=>array('hits_auto_increment'=>true)));
	$arguetopicinfo =& $topinfo['topicinfo'];
	$arguedbinfo =& $topinfo['argueinfo'];
	$stats = $gettitle = (!empty($arguetopicinfo['title']) ? $arguetopicinfo['title'] : $lang['err.str1']);
	head();
	if (empty($topinfo) OR empty($arguetopicinfo)) {	//	您查找的数据暂不存在！
		showmsg($lang['err.str0']);
		exit;
	}
	require_once printout('dispargue');
	footer();
} elseif ('pagenation' === $action) {
	$topicinfo =& get_argumentation_topicinfo(ROOT_ID, BOARD_ID, array('hits_auto_increment'=>true));
	if (!empty($topicinfo)) {
		$argueinfo['ResultSet'] =& get_argumentation_info($arguetype, $star, ROOT_ID, BOARD_ID, array('convert_ubb'=>true));
		$argueinfo['options'] = array('master'=>$master, 'superboardmaster'=>$superboardmaster, 'boardmaster'=>$boardmaster, 'userid'=>$userid, 'boardid'=>$boardid, 'star'=>$star, 'page_size'=>PAGE_SIZE, 'page'=>$page, 'imgurl'=>$imgurl, 'child'=>$topicinfo['child'], 'child_obverse'=>$topicinfo['child_obverse'], 'child_obverse_post'=>$topicinfo['child_obverse_post'], 'child_obverse_reply'=>$topicinfo['child_obverse_reply'], 'child_reversed'=>$topicinfo['child_reversed'], 'child_reversed_post'=>$topicinfo['child_reversed_post'], 'child_reversed_reply'=>$topicinfo['child_reversed_reply'], 'child_third'=>$topicinfo['child_third'], 'child_third_post'=>$topicinfo['child_third_post'], 'child_third_reply'=>$topicinfo['child_third_reply'], 'vote_width_third'=>0, 'vote'=>$topicinfo['vote'], 'vote_obverse'=>$topicinfo['vote_obverse'], 'vote_reversed'=>$topicinfo['vote_reversed'], 'vote_third'=>$topicinfo['vote_third'], 'vote_third'=>$topicinfo['vote_third'], 'rootid'=>ROOT_ID, 'realnumcount'=>count($argueinfo['ResultSet']), 'hits'=>$topicinfo['hits'], 'empath'=>$empath);
		require_once printout('dispargue');
	}
	footer(false);
} elseif ('post_vote' === $action) {
	require_once printout('dispargue');
	footer(false);
}
?>