function setClient() { global $_G; require_once libfile('function/cloud'); $this->_secStatus = getcloudappstatus('security', 0); if (!$this->_secStatus) { return false; } $this->_secClient = new Security_Cloud_Client(); }
function xf_getOpenidByUid($uid) { global $_G; $openid = 0; if (getcloudappstatus('connect')) { $openid = DB::result_first('SELECT conopenid FROM ' . DB::table('common_member_connect') . ' WHERE uid = ' . $uid); } return $openid; }
} $srchtxt = trim($_G['gp_srchtxt']); $srchuid = intval($_G['gp_srchuid']); $srchuname = isset($_G['gp_srchuname']) ? trim(str_replace('|', '', $_G['gp_srchuname'])) : ''; $srchfrom = intval($_G['gp_srchfrom']); $before = intval($_G['gp_before']); $srchfid = $_G['gp_srchfid']; $srhfid = intval($_G['gp_srhfid']); $keyword = isset($srchtxt) ? htmlspecialchars(trim($srchtxt)) : ''; $forumselect = forumselect(); if (!empty($srchfid) && !is_numeric($srchfid)) { $forumselect = str_replace('<option value="' . $srchfid . '">', '<option value="' . $srchfid . '" selected="selected">', $forumselect); } $my_search_data = unserialize($_G['setting']['my_search_data']); require_once libfile('function/cloud'); if ($my_search_data['status'] && getcloudappstatus('search') && !$srchfrom && !$searchid) { if (!$_G['setting']['my_siteid']) { dheader('Location: index.php'); } $source = ''; if (!empty($_G['gp_srhlocality'])) { $sourcetype = explode('::', $_G['gp_srhlocality']); if ($sourcetype[0] == 'forum') { $source = $sourcetype[1] == 'index' ? 'forum' : ($sourcetype[1] == 'forumdisplay' ? 'forum_forum' : 'forum_thread'); } elseif ($sourcetype[0] == 'portal') { $source = $sourcetype[1] == 'view' ? 'article' : ($sourcetype[1] == 'list' ? 'portal_list' : 'portal'); } elseif ($sourcetype[0] == 'group') { $source = $sourcetype[1] == 'viewthread' ? 'group_thread' : ($sourcetype[1] == 'group' ? 'group_forum' : 'group'); } elseif ($sourcetype[0] == 'home') { $source = 'home' . (empty($sourcetype[1]) ? '' : '_' . $sourcetype[1]); } elseif ($sourcetype[0] == 'misc' && $sourcetype[1] == 'ranklist') {
} else { $modmenu = array(); } if ($_G['forum']['alloweditpost'] && $_G['uid']) { $alloweditpost_status = getstatus($_G['setting']['alloweditpost'], $_G['forum_thread']['special'] + 1); if (!$alloweditpost_status) { $edittimelimit = $_G['group']['edittimelimit'] * 60; } } if ($_G['forum_thread']['replies'] > $_G['forum_thread']['views']) { $_G['forum_thread']['views'] = $_G['forum_thread']['replies']; } $my_search_data = unserialize($_G['setting']['my_search_data']); if (viewthread_is_search_referer() && $my_search_data['status']) { require_once libfile('function/cloud'); if (getcloudappstatus('search')) { $_params = array('s_site_gid' => $_G['groupid'], 'response_type' => 'js', 'referer' => $_SERVER['HTTP_REFERER']); $signUrl = generateSiteSignUrl($_params); $my_search_se_url = 'http://search.discuz.qq.com/api/site/se?' . $signUrl . ""; } } if (empty($_G['gp_viewpid'])) { $sufix = ''; if ($_G['gp_from'] == 'portal') { $_G['disabledwidthauto'] = 1; $sufix = '_portal'; $post =& $postlist[$_G['forum_firstpid']]; } include template('diy:forum/viewthread' . $sufix . ':' . $_G['fid']); } else { $_G['setting']['admode'] = 0;
function __construct() { require_once libfile('function/cloud'); $this->_secStatus = getcloudappstatus('security'); }
} cpmsg('recyclebin_succeed', 'action=recyclebin', 'succeed', array('threadsdel' => $threadsdel, 'threadsundel' => $threadsundel)); } } elseif ($operation == 'search') { if (!submitcheck('rbsubmit')) { $inforum = $_G['gp_inforum']; $authors = $_G['gp_authors']; $keywords = $_G['gp_keywords']; $admins = $_G['gp_admins']; $pstarttime = $_G['gp_pstarttime']; $pendtime = $_G['gp_pendtime']; $mstarttime = $_G['gp_mstarttime']; $mendtime = $_G['gp_mendtime']; $searchsubmit = $_G['gp_searchsubmit']; require_once libfile('function/cloud'); $secStatus = getcloudappstatus('security', 0); if ($secStatus) { $security = $_G['gp_security']; } require_once libfile('function/forumlist'); $forumselect = '<select name="inforum"><option value=""> > ' . $lang['select'] . '</option>' . '<option value=""> </option><option value="groupthread">' . $lang['group_thread'] . '</option>' . forumselect(FALSE, 0, 0, TRUE) . '</select>'; if ($inforum) { $forumselect = preg_replace("/(\\<option value=\"{$inforum}\")(\\>)/", "\\1 selected=\"selected\" \\2", $forumselect); } shownav('topic', 'nav_recyclebin'); showsubmenu('nav_recyclebin', array(array('recyclebin_list', 'recyclebin', 0), array('search', 'recyclebin&operation=search', 1), array('clean', 'recyclebin&operation=clean', 0))); echo <<<EOT <script type="text/javascript" src="static/js/calendar.js"></script> <script type="text/JavaScript"> function page(number) { \t\$('rbsearchform').page.value=number;
showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_dns_api') . '</strong>', cloudDNSCheckResult(1))); showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_dns_api_test') . '</strong>', cloudGetAPIConnectJS(1))); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_api_test', false); showtagfooter('tbody'); showtagheader('tbody', '', true); showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_dns_manyou') . '</strong>', cloudDNSCheckResult(2))); showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_dns_manyou_test') . '</strong>', cloudGetAPIConnectJS(2))); showtagfooter('tbody'); showtagheader('tbody', 'cloud_tbody_manyou_test', false); showtagfooter('tbody'); showtagheader('tbody', '', true); showtitle('cloud_doctor_title_plugin'); cloudShowPlugin(); showtagfooter('tbody'); if (getcloudappstatus('connect')) { showtagheader('tbody', '', true); showtitle('cloud_doctor_title_connect'); showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_connect_app_id') . '</strong>', !empty($_G['setting']['connectappid']) ? $_G['setting']['connectappid'] : $lang['cloud_doctor_connect_reopen'])); showtablerow('', array('class="td24"'), array('<strong>' . cplang('cloud_doctor_connect_app_key') . '</strong>', !empty($_G['setting']['connectappkey']) ? preg_replace('/(\\w{2})\\w*(\\w{2})/', '\\1****\\2', $_G['setting']['connectappkey']) . ' ' . $lang['cloud_site_key_safetips'] : $lang['cloud_doctor_connect_reopen'])); showtagfooter('tbody'); } showtablefooter(); showGetCloudAPIIPJS(); } function cloudShowPlugin() { $plugins = array(); $query = DB::query("SELECT pluginid, available, name, identifier, modules, version FROM " . DB::table('common_plugin') . " WHERE identifier IN ('qqconnect', 'cloudstat', 'soso_smilies', 'cloudsearch')"); while ($plugin = DB::fetch($query)) { $plugins[$plugin['identifier']] = $plugin;
function plugin_xf_storage() { global $_G; include_once libfile('function/cloud'); $this->status = getcloudappstatus('storage', 0); }
function notOpenService() { require_once libfile('function/cloud'); $secStatus = getcloudappstatus('security', 0); if (!$secStatus) { return true; } else { return false; } }
function makeSearchSignUrl() { global $_G; $url = ''; $params = array(); $my_search_data = unserialize($_G['setting']['my_search_data']); $my_siteid = $_G['setting']['my_siteid']; $my_sitekey = $_G['setting']['my_sitekey']; require_once libfile('function/cloud'); if ($my_search_data['status'] && getcloudappstatus('search') && $my_siteid) { $my_extgroupids = array(); $_extgroupids = explode("\t", $_G['member']['extgroupids']); foreach ($_extgroupids as $v) { if ($v) { $my_extgroupids[] = $v; } } $my_extgroupids_str = implode(',', $my_extgroupids); $params = array('sId' => $my_siteid, 'ts' => time(), 'cuId' => $_G['uid'], 'cuName' => $_G['username'], 'gId' => intval($_G['groupid']), 'agId' => intval($_G['adminid']), 'egIds' => $my_extgroupids_str, 'fmSign' => ''); $groupIds = array($params['gId']); if ($params['agId']) { $groupIds[] = $params['agId']; } if ($my_extgroupids) { $groupIds = array_merge($groupIds, $my_extgroupids); } $groupIds = array_unique($groupIds); foreach ($groupIds as $v) { $key = 'ugSign' . $v; $params[$key] = ''; } $params['sign'] = md5(implode('|', $params) . '|' . $my_sitekey); $params['charset'] = $_G['charset']; $mySearchData = unserialize($_G['setting']['my_search_data']); if ($mySearchData['domain']) { $domain = $mySearchData['domain']; } else { $domain = 'search.discuz.qq.com'; } $url = 'http://' . $domain . '/f/discuz'; } return !empty($url) ? array($url, $params) : array(); }