Index: temp/test-xoops.ec-cube.net/html/test/kakinaka/topic_list.php
===================================================================
--- temp/test-xoops.ec-cube.net/html/test/kakinaka/topic_list.php	(revision 974)
+++ temp/test-xoops.ec-cube.net/html/test/kakinaka/topic_list.php	(revision 975)
@@ -2,8 +2,10 @@
 
 include '../../mainfile.php';
-include XOOPS_ROOT_PATH.'/modules/newbb/functions.php';
-include XOOPS_ROOT_PATH.'/modules/newbb/config.php';
-include XOOPS_ROOT_PATH."/header.php";
 
+$sql = 'SELECT * FROM ' . $xoopsDB->prefix('bb_categories');
+if ( !$result = $xoopsDB->query($sql) ) {
+    redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED);
+    exit();
+}
 
 ?>
