source: temp/test-xoops.ec-cube.net/html/test/kakinaka/topic_list.php @ 1044

Revision 1044, 1.4 KB checked in by kaki, 20 years ago (diff)
Line 
1<?php
2include '../../mainfile.php';
3include XOOPS_ROOT_PATH.'/modules/newbb/config.php';
4
5global $arrResponse;
6
7$sql = 'SELECT topic_id, topic_title, topic_response FROM ' . $xoopsDB->prefix('bb_topics') . ' ORDER BY topic_response, topic_id';
8
9if ( !$result = $xoopsDB->query($sql) ) {
10    redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED);
11    exit();
12}
13
14
15print '<table class="outer" cellspacing="1">
16    <tr class="head" align="center">
17        <td width="2%">&nbsp;</td>
18        <td>&nbsp;<b><a href="<{$h_topic_link}>"><{$lang_topic}></a></b></td>
19        <td width="7%" align="center" nowrap="nowrap"><b><a href="<{$h_reply_response}>"><{$lang_response}></a></b></td>
20        <td width="5%" align="center" nowrap="nowrap"><b><a href="<{$h_reply_link}>"><{$lang_replies}></a></b></td>
21        <td width="15%" align="center" nowrap="nowrap"><b><a href="<{$h_poster_link}>"><{$lang_poster}></a></b></td>
22        <td width="8%" align="center" nowrap="nowrap"><b><a href="<{$h_views_link}>"><{$lang_views}></a></b></td>
23        <td width="15%" align="center" nowrap="nowrap"><b><a href="<{$h_date_link}>"><{$lang_date}></a></b></td>
24    </tr>';
25
26while ( $myrow = $xoopsDB->fetchArray($result) ) {
27
28    foreach($myrow as $key => $val){
29        //$val = mb_convert_encoding($val, "euc-jp");
30        if($key == "topic_response"){
31            print($arrResponse[$val] . "\t");
32        }else{
33            print($val . "\t");
34        }
35    }
36    print("<BR>");
37}
38
39print "</table>";
40
41?>
Note: See TracBrowser for help on using the repository browser.