Ejemplo n.º 1
0
<?php

/*------------------------------------------------------------------------------
  BerryIO Board Status Command
------------------------------------------------------------------------------*/
$title = 'Board Status';
// Load the board functions
require_once FUNCTIONS . 'board.php';
// Get the board details
if (($page['information'] = board_info()) === FALSE) {
    $content .= message('ERROR: Unable retrieve information from your board');
    return FALSE;
}
// Display status page
$content .= view('pages/board_status', $page);
Ejemplo n.º 2
0
<?php

$post_page = $current_page > 1 ? '?post_page=' . $current_page : '';
$board_info = board_info($BD);
?>
			<span id="post-board-title"><?php 
echo $board_info['nicename'];
?>
</span>
<?php 
if (!$row) {
    ?>
			<div class="no-post">
				<p>本看板目前還沒有文章。</p>
				<p>現在就<a href="<?php 
    echo OUT_PATH . $BD;
    ?>
/post" title="發表文章">搶下第一篇</a>吧!</p>
			</div>
<?php 
} else {
    ?>
			<ul id="post-board-list">
<?php 
    foreach ($row as $list) {
        $list["comment_count"] = !empty($list["comment_count"]) ? '<span class="post-comment-count">' . $list["comment_count"] . '</span>' : '';
        if ($list['post_author']) {
            $list['post_author'] = member_link(member_who($list['post_author']));
        } else {
            $list['post_author'] = $list['post_author_nicename'];
        }
Ejemplo n.º 3
0
		<div id="menu">
			<ul>
				<li class="menu-items"><a href="<?php 
echo OUT_PATH;
?>
main">快訊區</a></li>
<?php 
$menu = board_info();
foreach ($menu as $list) {
    ?>
				<li class="menu-items"><a href="<?php 
    echo OUT_PATH . $list['name'];
    ?>
/"><?php 
    echo $list['nicename'];
    ?>
</a></li>
<?php 
}
?>
			</ul>
		</div>
Ejemplo n.º 4
0
<?php

include load_template('header');
$order = isset($_GET['list_order']) && $_GET['list_order'] == 'post' ? 'post' : 'update';
$current_page = isset($_GET['post_page']) ? $_GET['post_page'] : 1;
$list = get_post_list(0, $current_page, 10, $order);
$total_pages = ceil(count($list) / 10);
$board_info = board_info();
?>
		<span id="post-last-title">LAST POSTS</span>
<?php 
if (!$list) {
    ?>
		<div class="no-post">
			<p>本網站目前還沒有文章。</p>
		</div>
<?php 
} else {
    ?>
			<ul id="post-last-list">
<?php 
    foreach ($list as $item) {
        $item["comment_count"] = !empty($item["comment_count"]) ? '<span class="post-comment-count">' . $item["comment_count"] . '</span>' : '';
        $item['post_board_nicename'] = $board_info[$item['post_board']]['nicename'];
        if ($item['post_update_member']) {
            $item['post_author'] = member_link(member_who($item['post_update_member']));
        } else {
            $item['post_author'] = $item['post_update_who'];
        }
        switch ($item["post_change"]) {
            case 'edit':
Ejemplo n.º 5
0
Archivo: lib.php Proyecto: kidwm/kidbox
function feed()
{
    $many = 20;
    $board = '';
    //wait for more fix
    $result = inget('`id`, `post_title`, `post_author`, `post_author_nicename`, `post_content`, `post_date`, `post_board`', 'posts', $board . 'ORDER BY `post_date` DESC LIMIT 0, ' . $many);
    $board = board_info();
    $who = member_who();
    $prefix = isSSL() ? 'https:' : 'http:';
    $row = mysql_fetch_all($result);
    if ($row) {
        foreach ($row as $id => $list) {
            $row[$id]['post_board'] = $board[$list['post_board']]['name'];
            $row[$id]['post_board_nicename'] = $board[$list['post_board']]['nicename'];
            if ($list['post_author']) {
                $row[$id]['post_author'] = $who[$list['post_author']]['nicename'];
            } else {
                $row[$id]['post_author'] = $list['post_author_nicename'];
            }
            $row[$id]['post_content'] = html_transfer(show_text($list['post_content']));
        }
    }
    header('Content-type: application/xml; charset=utf-8');
    echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
    include load_template('feed');
}