function GetForumdb() { global $admin_gid, $admin_name; if ($admin_gid == 5) { list($fids, $forumcache) = GetAllowForum($admin_name); $cmscache = ''; } else { //* include pwCache::getPath(D_P.'data/bbscache/forumcache.php'); extract(pwCache::getData(D_P . 'data/bbscache/forumcache.php', false)); $forumcache = preg_replace('/<option value="\\d+">>> (.+?)<\\/option>/is', '</optgroup><optgroup label="\\1">', $forumcache); $forumcache = '<optgroup>' . $forumcache . '</optgroup>'; list($fids, $hideforum) = GetHiddenForum(); if ($admin_gid == 3) { $fids = ''; $forumcache .= $hideforum; } unset($hideforum); $cmscache = trim($cmscache); } return array($fids, $forumcache, $cmscache); }
<?php !function_exists('adminmsg') && exit('Forbidden'); @set_time_limit(0); $db_perpage = 50; $basename = "{$admin_file}?adminjob=attachment"; //* include pwCache::getPath(D_P.'data/bbscache/forum_cache.php'); pwCache::getData(D_P . 'data/bbscache/forum_cache.php'); if ($admin_gid == 5) { list($allowfid, $forumcache) = GetAllowForum($admin_name); $sql = $allowfid ? "fid IN({$allowfid})" : '0'; } else { //* include pwCache::getPath(D_P.'data/bbscache/forumcache.php'); pwCache::getData(D_P . 'data/bbscache/forumcache.php'); list($hidefid, $hideforum) = GetHiddenForum(); if ($admin_gid == 3) { $forumcache .= $hideforum; $sql = '1'; } else { $sql = $hidefid ? "fid NOT IN({$hidefid})" : '1'; } } if (empty($action)) { S::gp(array('fid', 'username', 'uid', 'filename', 'hits', 'ifmore', 'filesize', 'ifless', 'postdate1', 'postdate2', 'orderway', 'asc', 'pernum', 'page')); $forumcache = str_replace("<option value=\"{$fid}\">", "<option value=\"{$fid}\" selected>", $forumcache); $hitsMoreThan = '0' == $ifmore ? 'checked' : ''; $hitsLessThan = !$hitsMoreThan ? 'checked' : ''; $downloadMoreThan = '0' == $ifless ? 'checked' : ''; $downloadLessThan = !$downloadMoreThan ? 'checked' : ''; $ascChecked = 'ASC' == $asc ? 'checked' : ''; $descChecked = !$ascChecked ? 'checked' : '';
function GetForumdb() { global $admin_gid, $admin_name; if ($admin_gid == 5) { list($fids, $forumcache) = GetAllowForum($admin_name); $cmscache = ''; } else { include D_P . 'data/bbscache/forumcache.php'; list($fids, $hideforum) = GetHiddenForum(); if ($admin_gid == 3) { $fids = ''; $forumcache .= $hideforum; } unset($hideforum); $cmscache = trim($cmscache); } return array($fids, $forumcache, $cmscache); }