# Site: http://www.google.com # # $Id: ann_list.php 121 2014-03-04 12:38:05Z along $ # # Copyright (C) 2008-2014 PHPDisk Team. All Rights Reserved. # */ include "includes/commons.inc.php"; $in_front = true; $aid = (int) gpc('aid', 'G', 0); $nav_title = @$db->result_first("select subject from {$tpf}announces where annid='{$aid}'"); $nav_title = $nav_title ? $nav_title : __('all_ann_list'); $title = $nav_title . ' - ' . $settings['site_title']; $file_keywords = $nav_title . ','; include PHPDISK_ROOT . "./includes/header.inc.php"; $ann_list_sub = get_announces(10); $perpage = 5; $sql_ext = $aid ? " and annid='{$aid}'" : ''; $sql_do = "{$tpf}announces where is_hidden=0 {$sql_ext}"; $rs = $db->fetch_one_array("select count(*) as total_num from {$sql_do}"); $total_num = $rs['total_num']; $start_num = ($pg - 1) * $perpage; $q = $db->query("select * from {$sql_do} order by show_order asc,annid desc limit {$start_num},{$perpage}"); $ann_list = array(); while ($rs = $db->fetch_array($q)) { $rs[a_ann_href] = urr("ann_list", "aid={$rs[annid]}"); $rs[in_time] = date('Y-m-d H:i', $rs[in_time]); $ann_list[] = $rs; } $db->free($q); unset($rs);
$upload_remote = false; if (display_plugin('multi_server', 'open_multi_server_plugin', $settings['open_multi_server'], 0)) { $rs = $db->fetch_one_array("select server_host,server_store_path,server_key from {$tpf}servers where server_id>1 order by is_default desc limit 1"); if ($rs) { $upload_remote = true; $remote_url = $rs['server_host'] . '?code=' . pd_encode($rs['server_key']); } unset($rs); } $C[last_file] = get_last_file(15); $C[hot_file] = get_hot_file(15); if ($auth[is_fms]) { $C[links_arr] = get_friend_link(); $C[last_users] = get_last_user_list(5); $C[last_one] = index_last(); $C[ann_list] = get_announces(); $C[index_tags] = get_last_tag(); $C[commend_file] = get_commend_file(15); } require_once template_echo('phpdisk', $user_tpl_dir); $f = PHPDISK_ROOT . "./system/global/stats.inc.php"; if (!file_exists($f) || $timestamp - @filemtime($f) > 3600) { stats_cache(); } sitemap::build(); include PHPDISK_ROOT . "./includes/footer.inc.php"; function get_last_user_list($num = 10) { global $db, $tpf; $q = $db->query("select username,reg_time from {$tpf}users order by userid desc limit {$num}"); $last_users = array();