decir/forum_index.php
changeset 6 3f66ec435f08
parent 5 6eea55374f5b
equal deleted inserted replaced
5:6eea55374f5b 6:3f66ec435f08
    46   do {
    46   do {
    47     switch ( $row['forum_type'] )
    47     switch ( $row['forum_type'] )
    48     {
    48     {
    49       case FORUM_FORUM:
    49       case FORUM_FORUM:
    50         $color = ( $row['user_level'] >= USER_LEVEL_ADMIN ) ? 'AA0000' : ( ( $row['user_level'] >= USER_LEVEL_MOD ) ? '00AA00' : '0000AA' );
    50         $color = ( $row['user_level'] >= USER_LEVEL_ADMIN ) ? 'AA0000' : ( ( $row['user_level'] >= USER_LEVEL_MOD ) ? '00AA00' : '0000AA' );
       
    51         $last_post_info = ( $row['last_post_id'] ) ?
       
    52                  '<a href="' . makeUrlNS('DecirTopic', $row['topic_id']) . '#post' . $row['post_id'] . '">' . $row['topic_title'] . '</a><br />
       
    53                  ' . date('d M Y h:i a', $row['timestamp']) . '<br />
       
    54                  by <b><a style="color: #' . $color . '" href="' . makeUrlNS('User', $row['username']) . '">' . $row['username'] . '</a></b>' :
       
    55                  '&lt;No posts&gt;';
    51         // Forum
    56         // Forum
    52         echo '<tr><td class="row3" style="text-align: center;">&lt;icon&gt;</td><td class="row2"><b><a href="' . makeUrlNS('DecirForum', $row['forum_id']) . '">'
    57         echo '<tr><td class="row3" style="text-align: center;">&lt;icon&gt;</td><td class="row2"><b><a href="' . makeUrlNS('DecirForum', $row['forum_id']) . '">'
    53              . $row['forum_name'] . '</a></b><br />' . $row['forum_desc'].'</td>
    58              . $row['forum_name'] . '</a></b><br />' . $row['forum_desc'].'</td>
    54              <td class="row3" style="text-align: center;">' . $row['num_topics'] . '</td>
    59              <td class="row3" style="text-align: center;">' . $row['num_topics'] . '</td>
    55              <td class="row3" style="text-align: center;">' . $row['num_posts'] . '</td>
    60              <td class="row3" style="text-align: center;">' . $row['num_posts'] . '</td>
    56              <td class="row1" style="text-align: center;">
    61              <td class="row1" style="text-align: center;">
    57                <small>
    62                <small>
    58                  <a href="' . makeUrlNS('DecirTopic', $row['topic_id']) . '#post' . $row['post_id'] . '">' . $row['topic_title'] . '</a><br />
    63                  ' . $last_post_info . '
    59                  ' . date('d M Y h:i a', $row['timestamp']) . '<br />
       
    60                  by <b><a style="color: #' . $color . '" href="' . makeUrlNS('User', $row['username']) . '">' . $row['username'] . '</a></b>
       
    61                </small>
    64                </small>
    62              </td>
    65              </td>
    63              </tr>';
    66              </tr>';
    64         break;
    67         break;
    65       case FORUM_CATEGORY:
    68       case FORUM_CATEGORY:
    80 if ( $cat_open )
    83 if ( $cat_open )
    81   echo '</tbody>';
    84   echo '</tbody>';
    82 echo '</table>
    85 echo '</table>
    83       </div>';
    86       </div>';
    84 
    87 
       
    88 decir_show_footers();
    85 $template->footer();
    89 $template->footer();
    86 
    90 
    87 ?>
    91 ?>