*/ include "includes/commons.inc.php"; !$auth[is_fms] && exit(msg::umsg('Not_FMS', __('zcore_no_power'))); $in_front = true; $tag = trim(gpc('tag', 'G', '')); if ($tag) { $title = __('tag') . ': ' . $tag . ' - ' . $settings['site_title']; $tag_title = __('tag') . ': ' . $tag; } else { $title = __('tag_view') . ' - ' . $settings['site_title']; $tag_title = __('tag_view'); } include PHPDISK_ROOT . "./includes/header.inc.php"; if (!$tag) { $hot_tags = get_hot_tag(50); $last_tags = get_last_tag(50); } else { function get_file_ids($tag) { global $db, $tpf; $q = $db->query("select file_id from {$tpf}file2tag where tag_name='{$tag}'"); while ($rs = $db->fetch_array($q)) { $file_ids .= $rs['file_id'] . ','; } $db->free($q); unset($rs); return $file_ids; } $file_ids = get_file_ids($tag); $file_ids = substr($file_ids, -1) == ',' ? substr($file_ids, 0, -1) : $file_ids; if (!$file_ids) {
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(); while ($rs = $db->fetch_array($q)) {