<?php
/**
* 公告列表
* @author moufer<moufer@163.com>
* @package modoer_plugin
* @copyright phpdp.com
* @version $Id action_list.php 1 2008-5-11 01:24 $
*/
!defined('IN_MUDDER') && exit('Access Denied');

$offset = 20;
$limit = get_limit($page, $offset);
$table = "{$dbpre}announcements";
$total = $db->select_count($table, "available='1'");
if($total > 0) {
    $query = $db->query("SELECT * FROM $table WHERE available='1' ORDER BY orders,dateline DESC LIMIT $limit");
    while($row = $db->fetch_array($query)) {
        $row['dateline'] = date('Y-m-d H:i:s', $row['dateline']);
        $datas[] = $row;
    }
    unset($row);
    $url = "plugin.php?module=$module&action=$action";
    $multipage = multi($total, $offset, $page, $url);
}

$subtitle = '公告列表';
require_once MUDDER_ROOT.'header.php';
require_once template_plugin('list');
footer();
?>
