Esempio n. 1
0
            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');
    }
    echo table::close();
    echo html::spacer();
}
echo table::open(0);
echo table::tds(array('text' => html::img('plugins/forum/forum/html/images/icon_board_new.gif') . html::span(Lang::item('home.new_posts')) . html::img('plugins/forum/forum/html/images/icon_board.gif') . html::span(Lang::item('home.no_new_posts'))));
echo table::close();
echo table::open();
echo table::td(Lang::item('home.latest_posts'), 2);
foreach ($recents as $recent) {
    echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('text' => sprintf(Lang::item('home.latest_post'), html::message_anchor($recent['msg_id'], $recent['subject']), html::profile_anchor($recent['poster_id'], $recent['poster_name']))), array('align' => 'right', 'text' => time::decode($recent['poster_time'])))) . table::close())));
}
echo table::close();
// left
$left_table = '';
$left_table .= table::open(3);
$left_table .= table::td(Lang::item('home.visitor_stats'), 4);
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_r_m')), array('class' => 'tableb', 'text' => $stats['t_r_m']), array('class' => 'tableb', 'text' => Lang::item('home.t_li_u')), array('class' => 'tableb', 'text' => $stats['t_li_u'])));
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_t')), array('class' => 'tableb', 'text' => $stats['t_t']), array('class' => 'tableb', 'text' => Lang::item('home.t_a_u')), array('class' => 'tableb', 'text' => $stats['t_a_u'])));
$left_table .= table::tds(array(array('class' => 'tableb', 'text' => Lang::item('home.t_r')), array('class' => 'tableb', 'text' => $stats['t_r']), array('class' => 'tableb', 'text' => ' '), array('class' => 'tableb', 'text' => ' ')));
$left_table .= table::close();
// right
foreach ($newest_members as $k => $v) {
    $newest_members[$k] = html::profile_anchor($v['user_id'], $v['user_name']);
}
$newest_members = implode(', ', $newest_members);
Esempio n. 2
0
echo form::hidden('c', Config::item('c'));
echo table::td(Lang::item('search.search'), 2);
echo table::tds(array(array('class' => 'tableb', 'width' => '30%', 'text' => Lang::item('search.search')), array('class' => 'tableb', 'width' => '70%', 'text' => form::text('search', $search))));
echo table::tds(array(array('class' => 'tablef', 'colspan' => 2, 'text' => form::submit(Lang::item('common.search'), 'submit'))));
echo form::close();
echo table::close();
if (count($messages) > 0) {
    echo html::spacer();
    // paging
    echo table::open();
    echo table::td(Lang::item('search.search_result') . ' - ' . sprintf(Lang::item('search.found'), $results));
    echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('board.page') . forum::paging($paging))));
    echo table::close();
    foreach ($messages as $message) {
        echo table::open();
        echo table::tds(array(array('class' => 'tableh1', 'text' => table::open(2) . table::tds(array(array('align' => 'left', 'width' => '70%', 'text' => forum::nagavitor($message['linkto'], '-->')), array('align' => 'right', 'width' => '30%', 'text' => Lang::item('search.on') . time::decode($message['poster_time'])))) . table::close())));
        echo table::tds(array(array('class' => 'tableh2', 'colspan' => 2, 'text' => Lang::item('search.start_by') . html::profile_anchor($message['starter_id'], $message['starter_name']) . ' | ' . Lang::item('search.message_by') . html::profile_anchor($message['poster_id'], $message['poster_name']))));
        echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => forum::format_message($message['body']))));
        echo table::close();
    }
    // paging
    echo table::open();
    echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('board.page') . forum::paging($paging))));
    echo table::close();
    echo html::spacer();
} else {
    if (isset($search)) {
        echo table::open();
        echo table::td(Lang::item('search.search_result'));
        echo table::tds(array(array('class' => 'tableb', 'text' => Lang::item('search.no_result'))));
        echo table::close();
Esempio n. 3
0
<?php

/**************************************************
  Coppermine 1.5.x Plugin - forum
  *************************************************
  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$
  **************************************************/
echo table::open();
echo table::tds(array(array('class' => 'tableh1', 'width' => '170px', 'text' => html::profile_anchor($message['poster_id'], $message['poster_name'])), array('class' => 'tableh1', 'text' => html::img($message['icon'], '65%') . NBSP . sprintf(Lang::item('topic.topic_title'), html::anchor('forum.php?c=message&m=single&id=' . $message['msg_id'], $message['subject']), time::decode($message['time'])))));
echo table::tds(array(array('class' => 'tablef', 'valign' => 'top', 'align' => 'left', 'text' => html::span(sprintf(Lang::item('topic.user_profile'), html::img($message['avatar'], Config::item('fr_avatar_size')), $message['poster_group'], $message['poster_posts'], $message['poster_registed']))), array('class' => 'tableb', 'valign' => 'top', 'text' => forum::format_message($message['body']) . (trim($message['signature']) != '' ? sprintf(Lang::item('topic.signature'), forum::format_message($message['signature'])) : ''))));
echo table::tds(array(array('class' => 'tablef', 'text' => html::button('profile.php?uid=' . $message['poster_id'], Lang::item('topic.profile')) . NBSP), array('class' => 'tablef', 'text' => ($authorizer->can_edit_msg($message['msg_id']) ? html::button('forum.php?c=message&m=edit&id=' . $message['msg_id'], Lang::item('common.modify')) . NBSP : '') . ($authorizer->can_delete_msg($message['msg_id']) ? html::jsbutton("button_confirm('" . Lang::item('message.confirm_delete') . "','forum.php?c=message&m=delete&id={$message['msg_id']}');", Lang::item('common.delete')) : ''))));
echo table::close();
Esempio n. 4
0
  the Free Software Foundation; either version 3 of the License, or
  (at your option) any later version.
  ********************************************
  $HeadURL$
  $Revision$
  $LastChangedBy$
  $Date$
  **************************************************/
// paging
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => (check_model::can_reply($topic_id) ? html::jsbutton('show_section(\'fastreply\');', Lang::item('topic.fast_reply')) . NBSP . html::button('forum.php?c=topic&m=reply&id=' . $topic_id, Lang::item('topic.reply')) : '') . NBSP . ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_topic($topic_id) ? Lang::item('topic.disable_notify') : Lang::item('topic.active_notify')) . "','" . ($authorizer->is_notify_topic($topic_id) ? 'forum.php?c=topic&m=unnotify&id=' . $topic_id : 'forum.php?c=topic&m=notify&id=' . $topic_id) . "');", Lang::item('topic.notify')) . NBSP : '')))) . table::close())));
echo table::close();
foreach ($messages as $message) {
    echo "<a name=\"{$message['id']}\"></a>";
    echo table::open();
    echo table::tds(array(array('class' => 'tableh1', 'width' => '170px', 'text' => html::profile_anchor($message['poster_id'], $message['poster_name'])), array('class' => 'tableh1', 'text' => table::open(2) . table::tds(array(array('text' => html::img($message['icon'], '65%') . NBSP . sprintf(Lang::item('topic.topic_title'), html::b(html::anchor('forum.php?c=message&id=' . $message['id'], $message['name'])), time::decode($message['time']))), array('align' => 'right', 'text' => html::anchor('forum.php?c=message&m=single&id=' . $message['id'], html::b('#' . $message['pos']))))) . table::close())));
    echo table::tds(array(array('class' => 'tablef', 'valign' => 'top', 'align' => 'left', 'text' => html::span(sprintf(Lang::item('topic.user_profile'), html::img($message['avatar'], Config::item('fr_avatar_size')), $message['poster_group'], $message['poster_posts'], $message['poster_registed']))), array('class' => 'tableb', 'valign' => 'top', 'text' => forum::format_message($message['post']) . (trim($message['signature']) != '' ? sprintf(Lang::item('topic.signature'), forum::format_message($message['signature'])) : ''))));
    echo table::tds(array(array('class' => 'tablef', 'text' => html::button('profile.php?uid=' . $message['poster_id'], Lang::item('topic.profile')) . NBSP), array('class' => 'tablef', 'text' => (function_exists('get_bbcode_tags') ? html::button('forum.php?c=topic&m=reply&id=' . $topic_id . '&quote=' . $message['id'], Lang::item('common.quote')) . NBSP : '') . ($authorizer->can_edit_msg($message['id']) ? html::button('forum.php?c=message&m=edit&id=' . $message['id'], Lang::item('common.modify')) . NBSP : '') . ($authorizer->can_delete_msg($message['id']) ? html::jsbutton("button_confirm('" . Lang::item('message.confirm_delete') . "','forum.php?c=message&m=delete&id={$message['id']}');", Lang::item('common.delete')) : ''))));
    echo table::close();
}
if (count($messages) == 0) {
    echo table::open();
    echo table::td(Lang::item('topic.no_message'), 1, 'tableb');
    echo table::close();
}
// paging
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => (check_model::can_reply($topic_id) ? html::jsbutton('show_section(\'fastreply\');', Lang::item('topic.fast_reply')) . NBSP . html::button('forum.php?c=topic&m=reply&id=' . $topic_id, Lang::item('topic.reply')) : '') . NBSP . ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_topic($topic_id) ? Lang::item('topic.disable_notify') : Lang::item('topic.active_notify')) . "','" . ($authorizer->is_notify_topic($topic_id) ? 'forum.php?c=topic&m=unnotify&id=' . $topic_id : 'forum.php?c=topic&m=notify&id=' . $topic_id) . "');", Lang::item('topic.notify')) . NBSP : '')))) . table::close())));
echo html::spacer();
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '66%', 'text' => ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=locked&id=' . $topic_id, $authorizer->is_locked($topic_id) ? Lang::item('topic.unlock_topic') : Lang::item('topic.lock_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=sticky&id=' . $topic_id, $authorizer->is_sticky($topic_id) ? Lang::item('topic.unsticky_topic') : Lang::item('topic.sticky_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::jsbutton("button_confirm('" . Lang::item('topic.confirm_delete') . "','forum.php?c=topic&m=delete&id={$topic_id}');", Lang::item('topic.delete_topic')) . NBSP : '') . ($authorizer->can_moderator_topic($topic_id) ? html::button('forum.php?c=topic&m=move&id=' . $topic_id, Lang::item('topic.move_topic')) : '')), array('width' => '33%', 'align' => 'right', 'text' => forum::redirect_box($cbs, $board_id)))) . table::close())));
Esempio n. 5
0
 function get_last_visit_time($user_id = USER_ID)
 {
     $user_id = (int) $user_id;
     $this->db->select('user_lastvisit');
     $this->db->where('user_id', $user_id);
     $query = $this->db->get(Config::item('TABLE_USERS'));
     $row = $query->row();
     return time::decode(strtotime($row->user_lastvisit));
 }
Esempio n. 6
0
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_board($board_id) ? Lang::item('board.disable_notify') : Lang::item('board.active_notify')) . "','" . ($authorizer->is_notify_board($board_id) ? 'forum.php?c=board&m=unnotify&id=' . $board_id : 'forum.php?c=board&m=notify&id=' . $board_id) . "');", Lang::item('board.notify')) . NBSP : '') . ($authorizer->can_create_topic(board_id) ? html::button('forum.php?c=board&amp;m=newtopic&amp;id=' . $board_id, Lang::item('board.new_topic')) : '')))) . table::close())));
echo table::close();
// topic listing
echo table::open();
echo table::td(Lang::item('board.topics'), 5);
echo table::tds(array(array('class' => 'tableh2', 'width' => '60%', 'colspan' => '2', 'text' => html::bold(Lang::item('board.topic_title'))), array('class' => 'tableh2', 'width' => '5%', 'text' => html::bold(Lang::item('board.replies'))), array('class' => 'tableh2', 'width' => '5%', 'text' => html::bold(Lang::item('board.views'))), array('class' => 'tableh2', 'width' => '30%', 'text' => html::bold(Lang::item('board.latest_post_info')))));
foreach ($topics as $topic) {
    $buffer = '';
    $buffer .= table::open(array());
    if (Config::item('fr_msg_icons') == 1) {
        $buffer .= table::tds(array(array('text' => html::img($topic['icon'])), array('text' => NBSP), array('text' => html::topic_anchor($topic['id'], $topic['name']))));
    } else {
        $buffer .= table::tds(array(array('text' => html::topic_anchor($topic['id'], $topic['name']))));
    }
    $buffer .= table::close();
    echo table::tds(array(array('class' => 'tableb', 'width' => '0%', 'align' => 'center', 'text' => html::img($topic['status'])), array('class' => 'tableb', 'width' => '60%', 'align' => 'left', 'valign' => 'middle', 'text' => $buffer), array('class' => 'tableb', 'align' => 'center', 'text' => $topic['replies']), array('class' => 'tableb', 'align' => 'center', 'text' => $topic['views']), array('class' => 'tableb', 'valign' => 'top', 'text' => $topic['last_post_id'] ? html::span(sprintf(Lang::item('home.last_post_title'), html::message_anchor($topic['last_post_id'], $topic['last_post_title']), time::decode($topic['last_post_time']), html::profile_anchor($topic['last_post_author_id'], $topic['last_post_author_name']))) : '')));
}
if (count($topics) == 0) {
    echo table::td(Lang::item('board.no_topic'), 5, 'tableb');
}
echo table::close();
// paging
echo table::open();
echo table::tds(array(array('class' => 'tableb', 'text' => table::open(2) . table::tds(array(array('width' => '70%', 'align' => 'left', 'text' => Lang::item('board.page') . forum::paging($paging)), array('width' => '30%', 'align' => 'right', 'text' => ($authorizer->is_user() ? html::jsbutton("button_confirm('" . ($authorizer->is_notify_board($board_id) ? Lang::item('board.disable_notify') : Lang::item('board.active_notify')) . "','" . ($authorizer->is_notify_board($board_id) ? 'forum.php?c=board&m=unnotify&id=' . $board_id : 'forum.php?c=board&m=notify&id=' . $board_id) . "');", Lang::item('board.notify')) . NBSP : '') . ($authorizer->can_create_topic(board_id) ? html::button('forum.php?c=board&amp;m=newtopic&amp;id=' . $board_id, Lang::item('board.new_topic')) : '')))) . table::close())));
echo table::close();
echo html::spacer();
// legend
echo table::open();
echo table::tds(array(array('class' => 'tableh1', 'width' => '66%', 'text' => Lang::item('board.legend')), array('class' => 'tableh1', 'width' => '33%', 'text' => Lang::item('board.jump'))));
echo table::tds(array(array('class' => 'tableb', 'colspan' => 2, 'text' => table::open(2) . table::tds(array(array('class' => 'tableb', 'valign' => 'top', 'width' => '33%', 'text' => html::img('plugins/forum/forum/html/images/icon_topic.gif') . Lang::item('board.n_n_m') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_new.gif') . Lang::item('board.n_m') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_hot.gif') . sprintf(lang::item('board.h_t'), Config::item('fr_hot_topic_msg')) . '<br />'), array('class' => 'tableb', 'valign' => 'top', 'width' => '33%', 'text' => html::img('plugins/forum/forum/html/images/icon_topic_reply.gif') . Lang::item('board.s_t') . '<br />' . html::img('plugins/forum/forum/html/images/icon_topic_readonly.gif') . Lang::item('board.r_o_t') . '<br />'), array('class' => 'tableb', 'width' => '33%', 'valign' => 'middle', 'text' => forum::redirect_box($cbs, $board_id)))) . table::close())));
echo table::close();