<?php
include '../../mainfile.php';
include XOOPS_ROOT_PATH.'/modules/newbb/config.php';

global $arrResponse;

$sql = 'SELECT topic_id, topic_title, topic_response FROM ' . $xoopsDB->prefix('bb_topics') . ' ORDER BY topic_response, topic_id';

if ( !$result = $xoopsDB->query($sql) ) {
    redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED);
    exit();
}

while ( $myrow = $xoopsDB->fetchArray($result) ) {

	foreach($myrow as $key => $val){
		//$val = mb_convert_encoding($val, "euc-jp");
		if($key == "topic_response"){
			print("¡Ú" . $arrResponse[$val] . "¡Û");
		}else{
			print($val . "\t");
		}
	}
	print("<BR>");
}

?>