Beispiel #1
0
                    $board['last_usernick'] = cs_user($board['board_last_userid'], $board['board_last_user']);
                }
                $board['of'] = $cs_lang['of'];
            } else {
                if (empty($check_pw)) {
                    $board['board_threads'] = '-';
                    $board['board_comments'] = '-';
                }
                $board['last_name'] = '';
                $board['board_last_id'] = '';
                $board['last_time'] = '';
                $board['last_usernick'] = '';
                $board['board_last_userid'] = '';
                $board['of'] = '';
            }
            $board['last_url'] = cs_url('board', 'thread', 'where=' . $board['board_last_threadid'] . '&start=' . last_comment($board['board_last_threadid'], $account["users_id"], $account['users_limit']));
            $board['user_url'] = cs_url('users', 'view', 'id=' . $board['board_last_userid']);
            $board['board_name'] = cs_secure($board['board_name']);
            $data['categories'][$run_1]['board'][$run_2] = $board;
        }
    } else {
        $data['categories'][$run_1]['subboard'] = $data['categories'][$run_1]['board'];
        $data['categories'][$run_1]['board'] = array();
        $data['categories'][$run_1]['if']['small_subforums'] = true;
        $count_boards = count($data['categories'][$run_1]['subboard']);
        $count_boards_less = $count_boards - 1;
        for ($j = 0; $j < $count_boards; $j++) {
            $data['categories'][$run_1]['subboard'][$j]['comma'] = $j != $count_boards_less ? ', ' : '';
        }
    }
}
Beispiel #2
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('board');
require_once 'mods/board/functions.php';
$data = array();
$cs_homelimit = cs_sql_select(__FILE__, 'users', 'users_homelimit, users_readtime', "users_id = '" . $account["users_id"] . "'");
$cs_readtime = cs_time() - $cs_homelimit['users_readtime'];
cs_sql_query(__FILE__, "DELETE FROM {pre}_read WHERE users_id = '" . $account['users_id'] . "' AND read_since < '" . $cs_readtime . "'");
$from = "threads thr " . "INNER JOIN {pre}_board frm ON frm.board_id = thr.board_id " . "INNER JOIN {pre}_categories cat ON cat.categories_id = frm.categories_id " . "INNER JOIN {pre}_users usr ON thr.threads_last_user = usr.users_id " . "LEFT JOIN {pre}_members mem ON frm.squads_id = mem.squads_id AND mem.users_id = '" . $account['users_id'] . "' " . "LEFT JOIN {pre}_read red ON thr.threads_id = red.threads_id AND red.users_id = '" . $account['users_id'] . "'";
$where = "(frm.board_access <= '" . $account['access_board'] . "' OR mem.users_id = '" . $account['users_id'] . "') AND frm.board_pwd = '' AND thr.threads_last_time > '" . $cs_readtime . "' AND (thr.threads_last_time > red.read_since OR red.threads_id IS NULL)";
$select = 'cat.categories_name AS categories_name, cat.categories_id AS categories_id, frm.board_name AS board_name, frm.board_id AS board_id, thr.threads_headline AS threads_headline, thr.threads_last_time AS threads_last_time, thr.threads_comments AS threads_comments, thr.threads_id AS threads_id, usr.users_nick AS users_nick, usr.users_id AS users_id, usr.users_active AS users_active, usr.users_delete AS users_delete';
$order = 'thr.threads_last_time DESC';
$data['threads'] = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, $cs_homelimit['users_homelimit']);
if (!empty($data['threads'])) {
    $count_threads = count($data['threads']);
    for ($run = 0; $run < $count_threads; $run++) {
        $data['threads'][$run]['threads_last_time'] = !empty($data['threads'][$run]['threads_last_time']) ? cs_date('unix', $data['threads'][$run]['threads_last_time'], 1) : '';
        $data['threads'][$run]['pages'] = $data['threads'][$run]['threads_comments'] <= $account['users_limit'] ? '' : cs_html_br(1) . cs_pages('board', 'thread', $data['threads'][$run]['threads_comments'], 0, $data['threads'][$run]['threads_id'], 0, 0, 1);
        $data['threads'][$run]['users_nick'] = !empty($data['threads'][$run]['users_nick']) ? cs_html_br(1) . $cs_lang['from'] . ' ' . cs_user($data['threads'][$run]['users_id'], $data['threads'][$run]['users_nick'], $data['threads'][$run]['users_active'], $data['threads'][$run]['users_delete']) : '';
        $data['threads'][$run]['new_posts'] = last_comment($data['threads'][$run]['threads_id'], $account['users_id'], $account['users_limit']);
    }
    echo cs_subtemplate(__FILE__, $data, 'board', 'users_home');
}
Beispiel #3
0
 }
 $data['threads'][$run]['icon'] = cs_html_img('symbols/board/' . $icon . '.png');
 if (!empty($thread['threads_important'])) {
     $data['threads'][$run]['important'] = $cs_lang['important'] . ' ';
 } else {
     $data['threads'][$run]['important'] = '';
 }
 $headline = cs_secure($thread['threads_headline']);
 if (!empty($thread['threads_ghost'])) {
     $data['threads'][$run]['headline'] = $headline;
     $data['threads'][$run]['headline'] .= ' ' . cs_link(cs_icon('cancel'), 'board', 'thread_remove', 'id=' . $thread['threads_id']);
     $data['threads'][$run]['ghost_thread'] = cs_html_br(2);
     $data['threads'][$run]['ghost_thread'] .= cs_link($cs_lang['ghost_topic'], 'board', 'thread', 'where=' . $thread['threads_ghost_thread']);
     $data['threads'][$run]['ghost_board'] = ' - ' . cs_link($cs_lang['ghost_board'], 'board', 'listcat', 'id=' . $thread['threads_ghost_board']);
 } else {
     $data['threads'][$run]['headline'] = cs_link($headline, 'board', 'thread', 'where=' . $thread['threads_id'] . '&amp;start=' . last_comment($thread['threads_id'], $account["users_id"], $account['users_limit']));
     $data['threads'][$run]['ghost_thread'] = '';
     $data['threads'][$run]['ghost_board'] = '';
 }
 $check_file = cs_sql_count(__FILE__, 'boardfiles', 'threads_id = ' . $thread['threads_id']);
 if (!empty($check_file)) {
     $data['threads'][$run]['attach'] = cs_icon('attach');
 } else {
     $data['threads'][$run]['attach'] = '';
 }
 if ($account['access_board'] >= 4) {
     $check_rp = cs_sql_count(__FILE__, 'boardreport', 'boardreport_done = 0 AND threads_id = ' . $thread['threads_id']);
     if (!empty($check_rp)) {
         $data['threads'][$run]['report'] = cs_icon('special_paste', 16, $cs_lang['report']);
     } else {
         $data['threads'][$run]['report'] = '';