Exemplo n.º 1
0
  *************************************************
  Copyright (c) 2010 foulu (Le Hoai Phuong), eenemeenemuu
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
if ($authorizer->is_user()) {
    echo table::open(0);
    echo table::tds(array(array('align' => 'left', 'text' => forum::seperate(array(html::anchor('forum.php?c=search&m=new_topics', Lang::item('home.new_topcis')), html::anchor('forum.php?c=search&m=active_topics', Lang::item('home.active_topcis')), html::anchor('forum.php?c=search&m=pending_topics', Lang::item('home.pending_topcis'))))), array('align' => 'right', 'text' => sprintf(Lang::item('home.user_q_stats'), $user_posts, $last_visit))));
    echo table::close();
}
foreach ($categories as $k => $category) {
    echo table::open();
    echo table::td(html::category_anchor($category['id'], $category['name']), 5);
    echo table::tds(array(array('class' => 'tableh2', 'width' => '0%', 'align' => 'center', 'text' => ' '), array('class' => 'tableh2', 'width' => '60%', 'text' => html::bold(Lang::item('home.forum_name'))), array('class' => 'tableh2', 'width' => '5%', ' align' => 'center', 'text' => html::bold(Lang::item('home.topics'))), array('class' => 'tableh2', 'width' => '5%', ' align' => 'center', 'text' => html::bold(Lang::item('home.replies'))), array('class' => 'tableh2', 'width' => '30%', 'text' => html::bold(Lang::item('home.l_post_info')))));
    foreach ($category['boards'] as $board) {
        echo table::tds(array(array('class' => 'tableb', 'align' => 'center', 'text' => html::img($board['icon'])), array('class' => 'tableb', 'valign' => 'top', 'text' => html::board_anchor($board['id'], $board['name']) . '<br />' . ($board['description'] ? html::span($board['description']) : '')), array('class' => 'tableb', 'align' => 'center', 'text' => $board['topics']), array('class' => 'tableb', 'align' => 'center', 'text' => $board['replies']), array('class' => 'tableb', 'text' => $board['last_post_title'] ? html::span(sprintf(Lang::item('home.last_post_title'), html::message_anchor($board['last_post_id'], $board['last_post_title']), time::decode($board['last_post_time']), html::profile_anchor($board['last_post_author_id'], $board['last_post_author_name']))) : '')));
        if ($board['childs']) {
            echo table::td(html::span(html::bold(Lang::item('home.child_boards')) . forum::child_board_list($board['childs'])), 5, 'tablef');
        }
    }
    if (count($category['boards']) == 0) {
        echo table::td(Lang::item('home.no_board'), 5, 'tableb');
    }