function global_kkvip() { global $_G, $vip; if ($_GET['op'] == 'verify' && in_array($_GET['vid'], array('vip', 'no_vip'))) { dheader('Location: vip.php'); } if ($_GET['op'] == 'verify' && in_array($_GET['vid'], array('year_vip', 'no_year_vip'))) { dheader('Location: vip.php?do=year'); } if (!$_G['uid'] || $_G['vip']) { return; } loadcache('plugin'); include_once libfile('class/vip'); $vip = $vip ? $vip : new vip(); if ($vip->is_vip($_G['uid'])) { $_G['vip']['isvip'] = false; return; } $_G['vip'] = $vip->getvipinfo($_G['uid']); $_G['vip']['isvip'] = true; if ($vip->vars['vip_noad']) { loadcache('advs'); unset($_G['cache']['advs']); } return; }
function common() { global $_G; if (!defined('IN_DISCUZ') || empty($_GET['aid']) || empty($_GET['size']) || empty($_GET['key'])) { header('location: ' . $_G['siteurl'] . 'static/image/common/none.gif'); exit; } $allowsize = array('960x960', '268x380', '266x698', '2000x2000'); if (!in_array($_GET['size'], $allowsize)) { header('location: ' . $_G['siteurl'] . 'static/image/common/none.gif'); exit; } $nocache = !empty($_GET['nocache']) ? 1 : 0; $daid = intval($_GET['aid']); $type = !empty($_GET['type']) ? $_GET['type'] : 'fixwr'; list($w, $h) = explode('x', $_GET['size']); $dw = intval($w); $dh = intval($h); $thumbfile = 'image/' . $daid . '_' . $dw . '_' . $dh . '.jpg'; $parse = parse_url($_G['setting']['attachurl']); $attachurl = !isset($parse['host']) ? $_G['siteurl'] . $_G['setting']['attachurl'] : $_G['setting']['attachurl']; if (!$nocache) { if (file_exists($_G['setting']['attachdir'] . $thumbfile)) { dheader('location: ' . $attachurl . $thumbfile); } } define('NOROBOT', TRUE); $id = !empty($_GET['atid']) ? $_GET['atid'] : $daid; if (md5($id . '|' . $dw . '|' . $dh) != $_GET['key']) { dheader('location: ' . $_G['siteurl'] . 'static/image/common/none.gif'); } if ($attach = C::t('forum_attachment_n')->fetch('aid:' . $daid, $daid, array(1, -1))) { if (!$dw && !$dh && $attach['tid'] != $id) { dheader('location: ' . $_G['siteurl'] . 'static/image/common/none.gif'); } dheader('Expires: ' . gmdate('D, d M Y H:i:s', TIMESTAMP + 3600) . ' GMT'); if ($attach['remote']) { $filename = $_G['setting']['ftp']['attachurl'] . 'forum/' . $attach['attachment']; } else { $filename = $_G['setting']['attachdir'] . 'forum/' . $attach['attachment']; } require_once libfile('class/image'); $img = new image(); if ($img->Thumb($filename, $thumbfile, $w, $h, $type)) { if ($nocache) { dheader('Content-Type: image'); @readfile($_G['setting']['attachdir'] . $thumbfile); @unlink($_G['setting']['attachdir'] . $thumbfile); } else { dheader('location: ' . $attachurl . $thumbfile); } } else { dheader('Content-Type: image'); @readfile($filename); } } exit; }
function msg($msg = errmsg, $forward = 'goback', $time = '1') { global $CFG; if (!$msg && $forward && $forward != 'goback') { dheader($forward); } include DT_ROOT . '/admin/template/msg.tpl.php'; exit; }
function common() { global $_G; if (is_numeric($_G['setting']['seccodedata']['type'])) { if (in_array($_G['setting']['seccodedata']['type'], array(2, 3))) { exit; } $seccode = make_seccode(); if (!$_G['setting']['nocacheheaders']) { @header("Expires: -1"); @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE); @header("Pragma: no-cache"); } require_once libfile('class/seccode'); $code = new seccode(); $code->code = $seccode; $code->type = $_G['setting']['seccodedata']['type']; $code->width = $_G['setting']['seccodedata']['width']; $code->height = $_G['setting']['seccodedata']['height']; $code->background = $_G['setting']['seccodedata']['background']; $code->adulterate = $_G['setting']['seccodedata']['adulterate']; $code->ttf = $_G['setting']['seccodedata']['ttf']; $code->angle = $_G['setting']['seccodedata']['angle']; $code->warping = $_G['setting']['seccodedata']['warping']; $code->scatter = $_G['setting']['seccodedata']['scatter']; $code->color = $_G['setting']['seccodedata']['color']; $code->size = $_G['setting']['seccodedata']['size']; $code->shadow = $_G['setting']['seccodedata']['shadow']; $code->animator = 0; $code->fontpath = DISCUZ_ROOT . './static/image/seccode/font/'; $code->datapath = DISCUZ_ROOT . './static/image/seccode/'; $code->includepath = DISCUZ_ROOT . './source/class/'; $code->display(); } else { $etype = explode(':', $_G['setting']['seccodedata']['type']); if (count($etype) > 1) { $codefile = DISCUZ_ROOT . './source/plugin/' . $etype[0] . '/seccode/seccode_' . $etype[1] . '.php'; $class = $etype[1]; } else { $codefile = libfile('seccode/' . $_G['setting']['seccodedata']['type'], 'class'); $class = $_G['setting']['seccodedata']['type']; } if (file_exists($codefile)) { @(include_once $codefile); $class = 'seccode_' . $class; if (class_exists($class)) { make_seccode(); $code = new $class(); $image = $code->image($idhash, $modid); if ($image) { dheader('location: ' . $image); } } } } }
public function optimizer() { $adminfile = defined(ADMINSCRIPT) ? ADMINSCRIPT : 'admin.php'; if ($_GET['optimizefid']) { $url = '?action=forums&operation=edit&fid=' . dintval($_GET['optimizefid']); } else { $url = '?action=forums'; } dheader('Location: ' . $_G['siteurl'] . $adminfile . $url); }
public function optimizer() { $adminfile = defined(ADMINSCRIPT) ? ADMINSCRIPT : 'admin.php'; if ($_GET['checkemail']) { $url = '?action=setting&operation=mail'; } else { $url = '?action=setting&operation=access'; } dheader('Location: ' . $_G['siteurl'] . $adminfile . $url); }
function adminchecklogin() { global $_ADMINUSERS; if (empty($_ADMINUSERS['adminid'])) { //set_cookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));//设置登录成功跳转地址 dheader("login.php"); //php跳转页面 // showmsg('你未登录!请登录后操作!', "login.php",0,1); exit; } }
function dsu_signtz() { global $_G; if (defined('IN_MOBILE')) { return ''; } else { if ($_G['cache']['plugin']['dsu_paulsign']['ajax_sign']) { return '<script type="text/javascript">showWindow(\'dsu_paulsign\', \'plugin.php?id=dsu_paulsign:sign&' . FORMHASH . '\');</script>'; } else { dheader('Location: plugin.php?id=dsu_paulsign:sign'); } } }
function global_footer() { global $_G; if ($_G['mod'] == 'forumdisplay' || $_G['mod'] == 'viewthread' || $_G['mod'] == 'post' || $_G['mod'] == 'redirect') { $fiddb = DB::fetch_first("SELECT * FROM " . DB::table('dsu_marcofidts') . " WHERE fid='" . intval($_G['fid']) . "'"); $groups = explode(",", $fiddb['groups']); if ($_G['fid'] == $fiddb['fid'] && in_array($_G['groupid'], $groups)) { if (!$_G['cookie']["dsu_marcofidts_{$_G[fid]}"]) { dsetcookie('dsu_marcofidts_back', base64_encode($_SERVER['REQUEST_URI'])); dheader('Location: plugin.php?id=dsu_marcofidts&fid=' . intval($_G['fid']) . ''); } } } }
function common() { global $_G, $seccodecheck, $secqaacheck, $connect_guest; if ($_G['uid'] && $_G['member']['conisbind']) { dheader('location: ' . $_G['siteurl'] . 'index.php'); } $connect_guest = array(); if ($_G['connectguest'] && (submitcheck('regsubmit', 0, $seccodecheck, $secqaacheck) || submitcheck('loginsubmit', 1, $seccodestatus))) { if (!$_GET['auth_hash']) { $_GET['auth_hash'] = $_G['cookie']['con_auth_hash']; } $conopenid = authcode($_GET['auth_hash']); $connect_guest = C::t('#qqconnect#common_connect_guest')->fetch($conopenid); if (!$connect_guest) { dsetcookie('con_auth_hash'); showmessage('qqconnect:connect_login_first'); } } }
public function common() { global $_G; if (self::$securityStatus != TRUE) { return false; } if ($_G['uid']) { $lastCookieReportTime = $this->_decodeReportTime($_G['cookie']['security_cookiereport']); if ($lastCookieReportTime < strtotime('today')) { $this->_reportLoginUser(array('uid' => $_G['uid'])); } } if ($_G['adminid'] > 0) { self::$isAdminGroup = 1; } if ($_G['setting']['connect']['allow'] && $_G['setting']['security_qqlogin_alone']) { $_G['setting']['regstatus'] = 0; $_G['setting']['regconnect'] = 1; } if ($_G['setting']['connect']['allow'] && $_G['setting']['security_safelogin'] && (!$_G['uid'] && $_G['connectguest'] || $_G['uid'] && !$_G['member']['conisbind']) && CURMODULE == 'post') { $msg = '<p>' . lang('plugin/security', 'safelogintips') . '</p><p class="mtm"><a href="connect.php?mod=config" target="_blank"><img src="' . IMGDIR . '/qq_bind_small.gif" class="qq_bind" align="absmiddle" /></a></p>'; if ($_G['inajax']) { if (!$_GET['ajaxtarget']) { $_GET['handlekey'] = 'safelogin'; } if (!$_G['uid'] && $_G['connectguest']) { showmessage('qqconnect:connectguest_message_complete_or_bind'); } else { showmessage($msg, 'connect.php?mod=config', array(), array('alert' => 'info', 'showdialog' => true, 'striptags' => false, 'locationtime' => 0)); } } else { if (!$_G['uid'] && $_G['connectguest']) { dheader('location: ' . $_G['siteurl'] . 'member.php?mod=connect&ac=bind'); } else { showmessage($msg, '', array(), array('alert' => 'info', 'showdialog' => true, 'msgtype' => 2, 'striptags' => false)); } } } if ($_G['setting']['connect']['allow'] && $_G['setting']['security_qqlogin_alone'] && CURMODULE == 'logging' && $_GET['action'] == 'login' && submitcheck('loginsubmit', 1)) { showmessage('security:qqloginaloneopened'); } return true; }
function dsu_signtz() { global $_G; if (defined('IN_MOBILE')) { return ''; } else { if (in_array($_G['groupid'], unserialize($_G['cache']['plugin']['dsu_paulsign']['autosign_ug']))) { $nfastreplytext = str_replace(array("\r\n", "\n", "\r"), '/hhf/', $_G['cache']['plugin']['dsu_paulsign']['fastreplytext']); $fastreplytexts = explode("/hhf/", $nfastreplytext); return '<script type="text/javascript">showWindow(\'dsu_paulsign\', \'plugin.php?id=dsu_paulsign:sign&operation=qiandao&formhash=' . FORMHASH . '&qdmode=2&fastreply=' . array_rand($fastreplytexts, '1') . '&qdxq=' . array_rand(unserialize($_G['setting']['paulsign_emot']), '1') . '\');</script>'; } else { if ($_G['cache']['plugin']['dsu_paulsign']['ajax_sign']) { return '<script type="text/javascript">showWindow(\'dsu_paulsign\', \'plugin.php?id=dsu_paulsign:sign&' . FORMHASH . '\');</script>'; } else { dheader('Location: plugin.php?id=dsu_paulsign:sign'); } } } }
public function actionLogout() { global $_G; if (!$_G['uid']) { dheader('location: index.php?r=site/index'); } if ($_GET['formhash'] != $_G['formhash']) { exit('请求来路不明'); } else { global $_G; require_once libfile('function/member'); $ucsynlogout = $this->setting['allowsynlogin'] ? uc_user_synlogout() : ''; clearcookies(); $_G['groupid'] = $_G['member']['groupid'] = 7; $_G['uid'] = $_G['member']['uid'] = 0; $_G['username'] = $_G['member']['username'] = $_G['member']['password'] = ''; $_G['setting']['styleid'] = $this->setting['styleid']; //退出登录成功 dheader('location: ' . dreferer()); } return true; }
<?php /* [Discuz!] (C)2001-2007 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: forumdisplay.php 10115 2007-08-24 00:58:08Z cnteacher $ */ define('CURSCRIPT', 'forumdisplay'); require_once './include/common.inc.php'; require_once DISCUZ_ROOT . './include/forum.func.php'; $discuz_action = 2; if ($forum['redirect']) { dheader("Location: {$forum['redirect']}"); } elseif ($forum['type'] == 'group') { dheader("Location: {$indexname}?gid={$fid}"); } elseif (empty($forum['fid'])) { showmessage('forum_nonexistence', NULL, 'HALTED'); } $showoldetails = isset($showoldetails) ? $showoldetails : ''; switch ($showoldetails) { case 'no': dsetcookie('onlineforum', 0, 86400 * 365); break; case 'yes': dsetcookie('onlineforum', 1, 86400 * 365); break; } if ($forum['type'] == 'forum') { $navigation = "» {$forum['name']}"; $navtitle = strip_tags($forum['name']);
$filename = 'favicon.ico'; } else { $shortcut = '[InternetShortcut] URL=' . $_G['siteurl'] . ' IconFile=' . $_G['siteurl'] . 'favicon.ico IconIndex=1 '; $filename = $_G['setting']['bbname'] . '.url'; } if (!strexists($_SERVER['HTTP_USER_AGENT'], 'MSIE')) { $filename = diconv($filename, CHARSET, 'UTF-8'); } else { $filename = diconv($filename, CHARSET, 'GBK'); } dheader('Content-type: application/octet-stream'); dheader('Content-Disposition: attachment; filename="' . $filename . '"'); echo $shortcut; exit; } elseif ($_GET['action'] == 'livelastpost') { $fid = dintval($_GET['fid']); $forum = C::t('forum_forumfield')->fetch($fid); $livetid = $forum['livetid']; $postlist = array(); if ($livetid) { $thread = C::t('forum_thread')->fetch($livetid); $postlist['count'] = $thread['replies']; $postarr = C::t('forum_post')->fetch_all_by_tid('tid:' . $livetid, $livetid, true, 'DESC', 20); ksort($postarr); foreach ($postarr as $post) { if ($post['first'] == 1 || getstatus($post['status'], 1)) { continue;
<?php defined('IN_DESTOON') or exit('Access Denied'); login(); require DT_ROOT . '/module/' . $module . '/common.inc.php'; if ($_groupid > 5 && !$_edittime && $action == 'add') { dheader($MODULE[2]['linkurl'] . 'edit.php?tab=2'); } $MG['homepage'] && $MG['news_limit'] > -1 or dalert(lang('message->without_permission_and_upgrade'), 'goback'); require DT_ROOT . '/include/post.func.php'; $TYPE = get_type('news-' . $_userid); require MD_ROOT . '/news.class.php'; $do = new news(); switch ($action) { case 'add': if ($MG['news_limit']) { $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}news WHERE username='******' AND status>0"); if ($r['num'] >= $MG['news_limit']) { dalert(lang($L['limit_add'], array($MG['news_limit'], $r['num'])), 'goback'); } } if ($submit) { if ($do->pass($post)) { $post['username'] = $_username; $post['level'] = $post['addtime'] = 0; $need_check = $MOD['news_check'] == 2 ? $MG['check'] : $MOD['news_check']; $post['status'] = get_status(3, $need_check); $do->add($post); dmsg($L['op_add_success'], '?status=' . $post['status']); } else { message($do->errmsg);
showmessage('group_admin_enter_panel', 'forum.php?mod=group&action=manage&fid=' . $_G['fid']); } require_once DISCUZ_ROOT . './source/admincp/admincp_cpanel.php'; $_G['gp_action'] = empty($_G['gp_action']) && $_G['fid'] ? 'thread' : $_G['gp_action']; $op = getgpc('op'); $cpscript = basename($_G['PHP_SELF']); $modsession = new AdminSession($_G['uid'], $_G['groupid'], $_G['adminid'], $_G['clientip']); if ($modsession->cpaccess == 1) { if ($_G['gp_action'] == 'login' && $_G['gp_cppwd'] && submitcheck('submit')) { loaducenter(); $ucresult = uc_user_login($_G['uid'], $_G['gp_cppwd'], 1); if ($ucresult[0] > 0) { $modsession->errorcount = '-1'; $url_forward = $modsession->get('url_forward'); $modsession->clear(true); $url_forward && dheader("Location: {$cpscript}?mod=modcp&{$url_forward}"); $_G['gp_action'] = 'home'; } else { $modsession->errorcount++; $modsession->update(); } } else { $_G['gp_action'] = 'login'; } } if ($_G['gp_action'] == 'logout') { $modsession->destroy(); showmessage('modcp_logout_succeed', 'forum.php'); } $modforums = $modsession->get('modforums'); if ($modforums === null) {
function register_member() { global $_G; if ($this->allow && $_G['connectguest']) { if ($_G['inajax']) { showmessage('qqconnect:connectguest_message_complete_or_bind'); } else { dheader('location: ' . $_G['siteurl'] . 'member.php?mod=connect'); } } }
/* [Discuz!] (C)2001-2009 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: member.php 16790 2008-11-20 06:45:21Z zhaoxiongfei $ */ define('CURSCRIPT', 'member'); define('NOROBOT', TRUE); require_once './include/common.inc.php'; if ($action == 'clearcookies') { if (is_array($_COOKIE) && (empty($discuz_uid) || $discuz_uid && $formhash == formhash())) { foreach ($_COOKIE as $key => $val) { dsetcookie($key, '', -86400 * 365, 0); } } dheader("Location: {$boardurl}" . $indexname); } elseif ($action == 'online') { $discuz_action = 31; @(include language('actions')); $page = max(1, intval($page)); $start_limit = ($page - 1) * $memberperpage; $num = $db->result_first("SELECT COUNT(*) FROM {$tablepre}sessions"); $multipage = multi($num, $memberperpage, $page, 'member.php?action=online'); $onlinelist = array(); $query = $db->query("SELECT s.*, f.name, t.subject FROM {$tablepre}sessions s\r\n\t\tLEFT JOIN {$tablepre}forums f ON s.fid=f.fid\r\n\t\tLEFT JOIN {$tablepre}threads t ON s.tid=t.tid\r\n\t\tWHERE s.invisible='0'\r\n\t\tORDER BY s.lastactivity DESC LIMIT {$start_limit}, {$memberperpage}"); while ($online = $db->fetch_array($query)) { $online['lastactivity'] = gmdate($timeformat, $online['lastactivity'] + $timeoffset * 3600); $online['action'] = $actioncode[$online['action']]; $online['subject'] = $online['subject'] ? cutstr($online['subject'], 35) : NULL; $online['ip'] = $online['ip1'] . '.' . $online['ip2'] . '.' . $online['ip3'] . '.' . $online['ip4']; $onlinelist[] = $online;
<?php defined('IN_DESTOON') or exit('Access Denied'); $table = $DT_PRE . 'page'; $table_data = $DT_PRE . 'page_data'; if ($itemid) { $item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); if (!$item || $item['status'] < 3 || $item['username'] != $username) { dheader($MENU[$menuid]['linkurl']); } extract($item); $t = $db->get_one("SELECT content FROM {$table_data} WHERE itemid={$itemid}"); $content = $t['content']; if (!$DT_BOT) { $db->query("UPDATE LOW_PRIORITY {$table} SET hits=hits+1 WHERE itemid={$itemid}", 'UNBUFFERED'); } $head_title = $title . $DT['seo_delimiter'] . $head_title; $head_keywords = $title . ',' . $COM['company']; $head_description = get_intro($content, 200); } else { $content_table = content_table(4, $userid, is_file(DT_CACHE . '/4.part'), $DT_PRE . 'company_data'); $t = $db->get_one("SELECT content FROM {$content_table} WHERE userid={$userid}"); $content = $t['content']; $COM['thumb'] = $COM['thumb'] ? $COM['thumb'] : DT_SKIN . 'image/company.jpg'; } $TYPE = array(); $result = $db->query("SELECT itemid,title,style FROM {$table} WHERE status=3 AND username='******' ORDER BY listorder DESC,addtime DESC"); while ($r = $db->fetch_array($result)) { $r['alt'] = $r['title']; $r['title'] = set_style($r['title'], $r['style']); $r['linkurl'] = userurl($username, "file={$file}&itemid={$r['itemid']}", $domain);
} } if ($searchindex['id']) { $searchid = $searchindex['id']; } else { if (!$srchtxt) { dheader('Location: search.php?mod=portal'); } if ($_G['adminid'] != '1' && $_G['setting']['search']['portal']['maxspm']) { if (DB::result_first("SELECT COUNT(*) FROM " . DB::table('common_searchindex') . " WHERE srchmod='{$srchmod}' AND dateline>'{$_G['timestamp']}'-60") >= $_G['setting']['search']['portal']['maxspm']) { showmessage('search_toomany', 'search.php?mod=portal', array('maxspm' => $_G['setting']['search']['portal']['maxspm'])); } } $num = $ids = 0; $_G['setting']['search']['portal']['maxsearchresults'] = $_G['setting']['search']['portal']['maxsearchresults'] ? intval($_G['setting']['search']['portal']['maxsearchresults']) : 500; $srchtxtsql = addcslashes($srchtxt, '%_'); $query = DB::query("SELECT aid FROM " . DB::table('portal_article_title') . " WHERE title LIKE '%{$srchtxtsql}%' ORDER BY aid DESC LIMIT " . $_G['setting']['search']['portal']['maxsearchresults']); while ($article = DB::fetch($query)) { $ids .= ',' . $article['aid']; $num++; } DB::free_result($query); $keywords = str_replace('%', '+', $srchtxt); $expiration = TIMESTAMP + $cachelife_text; DB::query("INSERT INTO " . DB::table('common_searchindex') . " (srchmod, keywords, searchstring, useip, uid, dateline, expiration, num, ids)\r\n\t\t\t\t\tVALUES ('{$srchmod}', '{$keywords}', '{$searchstring}', '{$_G['clientip']}', '{$_G['uid']}', '{$_G['timestamp']}', '{$expiration}', '{$num}', '{$ids}')"); $searchid = DB::insert_id(); !($_G['portal']['exempt'] & 2) && updatecreditbyaction('search'); } dheader("location: search.php?mod=portal&searchid={$searchid}&searchsubmit=yes"); } }
<?php require '../../common.inc.php'; header("Content-type:image/png"); $_userid or dheader('image/qrcode_error.png'); $auth = isset($auth) ? decrypt($auth, DT_KEY . 'WXQR') : ''; $auth == $_username . md5(DT_IP . $_SERVER['HTTP_USER_AGENT']) or dheader('image/qrcode_error.png'); $t = $db->get_one("SELECT itemid FROM {$DT_PRE}weixin_user WHERE username='******'"); $t or dheader('image/qrcode_error.png'); require DT_ROOT . '/api/weixin/init.inc.php'; $url = 'https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=' . $access_token; $par = '{"action_name": "QR_LIMIT_SCENE","action_info": {"scene": {"scene_id":99999}}}'; $arr = $wx->http_post($url, $par); if (isset($arr['ticket']) && $arr['ticket']) { dheader('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=' . urlencode($arr['ticket'])); } if (is_file(DT_ROOT . '/api/weixin/image/qrcode.png')) { dheader('image/qrcode.png'); }
$thread = C::t('forum_thread')->fetch_by_tid_displayorder($tid, 0); if ($thread['authorid'] == $_G['uid']) { $thread['status'] = setstatus(6, $status, $thread['status']); C::t('forum_thread')->update($tid, array('status' => $thread['status']), true); showmessage('replynotice_success_' . $status); } } showmessage('replynotice_error', 'forum.php?mod=viewthread&tid=' . $tid); } elseif ($_GET['action'] == 'removeindexheats') { if ($_G['adminid'] != 1) { showmessage('no_privilege_indexheats'); } C::t('forum_thread')->update($_G['tid'], array('heats' => 0)); require_once libfile('function/cache'); updatecache('heats'); dheader('Location: ' . dreferer()); } else { if (empty($_G['forum']['allowview'])) { if (!$_G['forum']['viewperm'] && !$_G['group']['readaccess']) { showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1)); } elseif ($_G['forum']['viewperm'] && !forumperm($_G['forum']['viewperm'])) { showmessage('forum_nopermission', NULL, array($_G['group']['grouptitle']), array('login' => 1)); } } $thread = C::t('forum_thread')->fetch($_G['tid']); if (!($thread['displayorder'] >= 0 || $thread['displayorder'] == -4 && $thread['authorid'] == $_G['uid'])) { $thread = array(); } if ($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid']) { showmessage('thread_nopermission', NULL, array('readperm' => $thread['readperm']), array('login' => 1)); }
if ($aids) { parseforumattach($firstpost, $aids); } $content['content'] = $firstpost['message']; $content['pid'] = $firstpost['pid']; $org = $firstpost; $org_url = "forum.php?mod=viewthread&tid={$article['id']}"; } else { C::t('portal_article_title')->update($aid, array('id' => 0, 'idtype' => '')); C::t('portal_article_content')->update_by_aid($aid, array('id' => 0, 'idtype' => '')); } } elseif ($article['idtype'] == 'blogid') { $org = C::t('home_blog')->fetch($article['id']); if (empty($org)) { C::t('portal_article_title')->update($aid, array('id' => 0, 'idtype' => '')); dheader('location: ' . fetch_article_url($article)); exit; } } $article['related'] = array(); if ($relateds = C::t('portal_article_related')->fetch_all_by_aid($aid)) { foreach (C::t('portal_article_title')->fetch_all(array_keys($relateds)) as $raid => $value) { $value['uri'] = fetch_article_url($value); $article['related'][$raid] = $value; } } $article['allowcomment'] = !empty($cat['allowcomment']) && !empty($article['allowcomment']) ? 1 : 0; $_G['catid'] = $_GET['catid'] = $article['catid']; $common_url = ''; $commentlist = array(); if ($article['allowcomment']) {
function task_preprocess($task = array()) { if (!isset($task['newbie'])) { dheader("Location: task.php?action=draw&id={$task['taskid']}"); } }
if ($_G['gp_customnew'] != $name) { DB::update('advertisement_custom', array('name' => $customnew), "id='{$_G['gp_id']}'"); } } } elseif ($do == 'delete') { if (!submitcheck('submit')) { ajaxshowheader(); showformheader("adv&operation=custom&do=delete&id={$_G['gp_id']}"); echo $lang['adv_custom_delete'] . '<br /><input name="submit" class="btn" type="submit" value="' . $lang['delete'] . '" /> ' . '<input class="btn" type="button" onclick="location.href=\'' . ADMINSCRIPT . '?action=adv&operation=list\'" value="' . $lang['cancel'] . '" />'; showformfooter(); ajaxshowfooter(); } else { DB::delete('advertisement_custom', "id='{$_G['gp_id']}'"); } } dheader('location: ' . ADMINSCRIPT . '?action=adv&operation=list'); } function encodeadvcode($advnew) { switch ($advnew['style']) { case 'code': $advnew['code'] = $advnew['code']['html']; break; case 'text': $advnew['code'] = '<a href="' . $advnew['text']['link'] . '" target="_blank" ' . ($advnew['text']['size'] ? 'style="font-size: ' . $advnew['text']['size'] . '"' : '') . '>' . $advnew['text']['title'] . '</a>'; break; case 'image': $advnew['code'] = '<a href="' . $advnew['image']['link'] . '" target="_blank"><img src="' . $advnew['image']['url'] . '"' . ($advnew['image']['height'] ? ' height="' . $advnew['image']['height'] . '"' : '') . ($advnew['image']['width'] ? ' width="' . $advnew['image']['width'] . '"' : '') . ($advnew['image']['alt'] ? ' alt="' . $advnew['image']['alt'] . '"' : '') . ' border="0"></a>'; break; case 'flash': $advnew['code'] = '<embed width="' . $advnew['flash']['width'] . '" height="' . $advnew['flash']['height'] . '" src="' . $advnew['flash']['url'] . '" type="application/x-shockwave-flash" wmode="transparent"></embed>';
<?php if (!defined('IN_DISCUZ')) { exit('Access Denied'); } hookscriptoutput('discuz'); if ($_G['setting']['mobile']['mobilehotthread'] && $_GET['forumlist'] != 1) { dheader('Location:forum.php?mod=guide&view=hot'); exit; } include template('common/header'); ?> <script type="text/javascript"> function getvisitclienthref() { var visitclienthref = ''; if(ios) { visitclienthref = 'https://itunes.apple.com/cn/app/zhang-shang-lun-tan/id489399408?mt=8'; } else if(andriod) { visitclienthref = 'http://www.discuz.net/mobile.php?platform=android'; } return visitclienthref; } </script> <?php if ($_GET['visitclient']) { ?> <header class="header"> <div class="nav"> <span>温馨提示</span>
} } define('NOROBOT', TRUE); $id = !empty($_GET['atid']) ? $_GET['atid'] : $daid; if (brand_dsign($id . '|' . $dw . '|' . $dh) != $_GET['key']) { ///dheader('location: '.$_G['siteurl'].'static/image/common/none.gif'); } if ($attach = C::t('#sanree_brand#sanree_brand_businesses')->getbusinesses_by_bid($daid)) { if (!$dw && !$dh) { dheader('location: ' . $_G['siteurl'] . 'static/image/common/none.gif'); } dheader('Expires: ' . gmdate('D, d M Y H:i:s', TIMESTAMP + 3600) . ' GMT'); $filename = $_G['setting']['attachdir'] . 'category/' . $attach['poster']; require_once libfile('class/image'); $img = new image(); if ($img->Thumb($filename, $thumbfile, $w, $h, $type)) { if ($nocache) { dheader('Content-Type: image'); @readfile($_G['setting']['attachdir'] . $thumbfile); @unlink($_G['setting']['attachdir'] . $thumbfile); } else { dheader('location: ' . $attachurl . $thumbfile); } } else { dheader('Content-Type: image'); @readfile($filename); } exit; } dheader('location: ' . $_G['siteurl'] . 'static/image/common/nophoto.gif');
} } elseif ($sgid) { if (!empty($second[$sgid])) { $curtype = $second[$sgid]; $fup = $curtype['fup']; $groupids = array($sgid); $url .= '?sgid=' . $sgid; } else { $sgid = 0; } } if (empty($curtype)) { if ($_G['uid'] && empty($_G['mod'])) { $usergroups = getuserprofile('groups'); if (!empty($usergroups)) { dheader('Location:group.php?mod=my'); exit; } } $curtype = array(); } else { $nav = get_groupnav($curtype); $groupnav = $nav['nav']; $_G['grouptypeid'] = $curtype['fid']; $perpage = 10; if ($curtype['forumcolumns'] > 1) { $curtype['forumcolwidth'] = floor(100 / $curtype['forumcolumns']) - 0.1 . '%'; $perpage = $curtype['forumcolumns'] * 10; } } $seodata = array('first' => $nav['first']['name'], 'second' => $nav['second']['name']);
function fix_message() { global $_username, $_message; $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->pre}message WHERE touser='******' AND status=3 AND isread=0"); $num = intval($r['num']); if ($_message != $num) { $this->db->query("UPDATE {$this->pre}member SET message='{$num}' WHERE username='******'"); dheader('message.php'); } }