connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect); $db->select_db($dbname); unset($dbhost, $dbuser, $dbpw, $dbname, $pconnect); $PHP_SELF = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; $boardurl = 'http://'.$_SERVER['HTTP_HOST'].substr($PHP_SELF, 0, strpos($PHP_SELF, 'archiver/')); $groupid = 7; $extgroupids = ''; $navtitle = $meta_contentadd = ''; $fid = $page = $tid = 0; $qm = in_array($_DCACHE['settings']['rewritestatus'], array(1, 3)) ? '' : '?'; $fullversion = array('title' => $_DCACHE['settings']['bbname'], 'link' => 'index.php'); $querystring = preg_replace("/\.html$/i", '', trim($_SERVER['QUERY_STRING'])); if($querystring) { $queryparts = explode('-', $querystring); foreach($queryparts as $querypart) { if(empty($lastpart)) { $lastpart = in_array($querypart, array('fid', 'page', 'tid')) ? $querypart : ''; } else { $$lastpart = intval($querypart); $lastpart = ''; } } } if($tid) { $action = 'thread'; $forward = 'viewthread.php?tid='.$tid; } elseif($fid) { $action = 'forum'; $forward = 'forumdisplay.php?fid='.$fid; } else { $action = 'index'; $forward = 'index.php'; } if($_DCACHE['settings']['archiverstatus'] != 1 && !preg_match("/($kw_spiders)/i", $_SERVER['HTTP_USER_AGENT']) && (($_DCACHE['settings']['archiverstatus'] == 2 && preg_match("/($kw_searchengines)/", $_SERVER['HTTP_REFERER'])) || ($_DCACHE['settings']['archiverstatus'] == 3 && preg_match("/($kw_browsers)/", $_SERVER['HTTP_USER_AGENT'])))) { header("Location: $boardurl$forward"); exit; } require_once "./include/$action.inc.php"; $runtime = explode(' ', microtime()); $totaltime = round(($runtime[1] + $runtime[0] - $starttime), 6); ?>
:


Powered by Discuz! Archiver   © 2001-2006 Comsenz Inc. 1) { $pagelink .= "{$GLOBALS[lang][page]}: \n"; $pagestart = $page - 10 < 1 ? 1 : $page - 10; $pageend = $page + 10 >= $pages ? $pages : $page + 10; for($i = $pagestart; $i < $pageend; $i++) { $pagelink .= ($i == $page ? "[$i]" : "$i")." \n"; } } return $pagelink; } function forumperm($viewperm) { return (empty($viewperm) || ($viewperm && strstr($viewperm, "\t7\t"))); } ?>