当前位置: 首页>>代码示例>>PHP>>正文


PHP Cloud类代码示例

本文整理汇总了PHP中Cloud的典型用法代码示例。如果您正苦于以下问题:PHP Cloud类的具体用法?PHP Cloud怎么用?PHP Cloud使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Cloud类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getGlobalPostString

 private function getGlobalPostString($action)
 {
     global $_G;
     $setting = $_G['setting'];
     $mySiteId = empty($_G['setting']['my_siteid']) ? '' : $_G['setting']['my_siteid'];
     $siteName = $_G['setting']['bbname'];
     $siteUrl = $_G['siteurl'];
     $ucUrl = rtrim($_G['setting']['ucenterurl'], '/') . '/';
     $siteCharset = $_G['charset'];
     $siteTimeZone = $_G['setting']['timeoffset'];
     $mySiteKey = empty($_G['setting']['my_sitekey']) ? '' : $_G['setting']['my_sitekey'];
     $siteKey = C::t('common_setting')->fetch('siteuniqueid');
     $siteLanguage = $_G['config']['output']['language'];
     $siteVersion = $_G['setting']['version'];
     $utilService = Cloud::loadClass('Service_Util');
     $myVersion = $utilService->getApiVersion();
     $productType = 'DISCUZX';
     $siteRealNameEnable = '';
     $siteRealAvatarEnable = '';
     $siteEnableApp = intval($setting['my_app_status']);
     $key = $mySiteId . $siteName . $siteUrl . $ucUrl . $siteCharset . $siteTimeZone . $siteRealNameEnable . $mySiteKey . $siteKey;
     $key = md5($key);
     $siteTimeZone = urlencode($siteTimeZone);
     $siteName = urlencode($siteName);
     $register = false;
     return sprintf('action=%s&productType=%s&key=%s&mySiteId=%d&siteName=%s&siteUrl=%s&ucUrl=%s&siteCharset=%s&siteTimeZone=%s&siteEnableRealName=%s&siteEnableRealAvatar=%s&siteKey=%s&siteLanguage=%s&siteVersion=%s&myVersion=%s&siteEnableApp=%s&from=cloud', $action, $productType, $key, $mySiteId, $siteName, $siteUrl, $ucUrl, $siteCharset, $siteTimeZone, $siteRealNameEnable, $siteRealAvatarEnable, $siteKey, $siteLanguage, $siteVersion, $myVersion, $siteEnableApp);
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:27,代码来源:Manyou.php

示例2: checkCloud

	function checkCloud() {
		global $_G;

		loadcache('mobileoem_data');
		if(!$_G['cache']['mobileoem_data'] || (TIMESTAMP - $_G['cache']['mobileoem_data']['timestamp']) > 86400) {
			try {
				$cloud = Cloud::loadClass('Service_Client_OEM');
				$clouddata = $cloud->checkApp();
			} catch (Exception $e) {
				$clouddata = array('errCode' => 1);
			}
			if(!$clouddata['errCode']) {
				if(!$clouddata['isDone']) {
					$_G['cache']['mobileoem_data'] = array();
				} else {
					$_G['cache']['mobileoem_data'] = $clouddata;
				}
			}
			$_G['cache']['mobileoem_data']['timestamp'] = TIMESTAMP;
			savecache('mobileoem_data', $_G['cache']['mobileoem_data']);
		}

		$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
		if(strpos($useragent, 'iphone') !== false || strpos($useragent, 'ios') !== false) {
			$this->platform = '&platform=ios';
		} elseif(strpos($useragent, 'android') !== false) {
			$this->platform = '&platform=android';
		} elseif(strpos($useragent, 'windows phone') !== false) {
			$this->platform = '&platform=windowsphone';
		} else {
			$this->platform = '';
		}
	}
开发者ID:hutao1004,项目名称:yintt,代码行数:33,代码来源:mobileoem.class.php

示例3: show

    public function show()
    {
        global $_G;
        if ($_G['inajax']) {
            return '';
        }
        $clientVersion = '2';
        $util = Cloud::loadclass('Service_Util');
        include_once DISCUZ_ROOT . '/source/discuz_version.php';
        $release = DISCUZ_RELEASE;
        $fix = DISCUZ_FIXBUG;
        $cloudApi = $util->getApiVersion();
        $isfounder = $util->isfounder($_G['member']);
        $sId = $_G['setting']['my_siteid'];
        $version = $_G['setting']['version'];
        $ts = TIMESTAMP;
        $sig = '';
        $adminId = $_G['adminid'];
        $openId = $_G['member']['conopenid'];
        $uid = $_G['uid'];
        $groupId = $_G['groupid'];
        if ($sId) {
            $params = array('s_id' => $sId, 'product_version' => $version, 'product_release' => '', 'fix_bug' => '', 'is_founder' => $isfounder, 's_url' => $_G['siteurl'], 'admin_id' => $adminId, 'open_id' => $openId, 'uid' => $uid, 'group_id' => $groupId, 'last_send_time' => $_COOKIE['dctips']);
            ksort($params);
            $str = $util->httpBuildQuery($params, '', '&');
            $sig = md5(sprintf('%s|%s|%s', $str, $_G['setting']['my_sitekey'], $ts));
        }
        $jsCode = <<<EOF
\t\t\t<div id="discuz_tips" style="display:none;"></div>
EOF;
        echo $jsCode;
    }
开发者ID:JX3PVE-Team,项目名称:JX3PVE2015,代码行数:32,代码来源:DiscuzTips.php

示例4: onCommonGetNavs

 public function onCommonGetNavs($type = '')
 {
     Cloud::loadFile('Service_SearchHelper');
     $navtype = null;
     switch ($type) {
         case 'footer':
             $navtype = 1;
             break;
         case 'space':
             $navtype = 2;
             break;
         case 'my':
             $navtype = 3;
             break;
         case 'header':
             $navtype = 0;
             break;
     }
     $navs = $subNavs = array();
     foreach (C::t('common_nav')->fetch_all_by_navtype($navtype) as $nav) {
         if (!$nav['parentid']) {
             $navs[$nav['id']] = Cloud_Service_SearchHelper::convertNav($nav);
         } else {
             $subNavs[$nav['id']] = $nav;
         }
     }
     foreach ($subNavs as $k => $v) {
         $navs[$v['parentid']]['navs'][$v['id']] = Cloud_Service_SearchHelper::convertNav($v);
     }
     return $navs;
 }
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:Common.php

示例5: plugin_qqgroup

 public function plugin_qqgroup()
 {
     global $_G;
     self::$siteId = $_G['setting']['my_siteid'];
     self::$siteKey = $_G['setting']['my_sitekey'];
     self::$util = Cloud::loadClass('Service_Util');
 }
开发者ID:tianyunchong,项目名称:php,代码行数:7,代码来源:qqgroup.class.php

示例6: generateSiteSignUrl

 public function generateSiteSignUrl($params = array())
 {
     global $_G;
     $utilService = Cloud::loadClass('Service_Util');
     @(include_once DISCUZ_ROOT . './source/discuz_version.php');
     if (!isset($_G['member']['conopenid'])) {
         $member_connect = $_G['uid'] ? C::t('#qqconnect#common_member_connect')->fetch($_G['uid']) : array();
         $_G['member'] = array_merge($_G['member'], $member_connect);
     }
     $ts = TIMESTAMP;
     $sKey = $_G['setting']['my_sitekey'];
     $params['clientIp'] = $_G['clientip'];
     $params['uid'] = $_G['uid'];
     $params['openId'] = getuserprofile('conopenid');
     $params['sId'] = $_G['setting']['siteuniqueid'];
     $params['appId'] = $_G['setting']['connectappid'];
     $params['ver'] = CLOUDCAPTCHA_VER;
     $params['dzVersion'] = DISCUZ_VERSION;
     $params['sId'] = $_G['setting']['my_siteid'];
     ksort($params);
     $str = $utilService->httpBuildQuery($params, '', '&');
     $sig = md5(sprintf('%s|%s|%s', $str, $sKey, $ts));
     $params['ts'] = $ts;
     $params['sig'] = $sig;
     $params = $utilService->httpBuildQuery($params, '', '&');
     return $params;
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:27,代码来源:class_captcha.php

示例7: getCloudRelateThreads

function getCloudRelateThreads($api = 'tao', $keyword, $page, $tpp = 20, $excludeForumIds = '', $cache = false)
{
    global $_G;
    $threadlist = array();
    $searchHelper = Cloud::loadClass('Service_SearchHelper');
    if ($api != 'tao') {
        $cloudData = $searchHelper->getRelatedThreads($excludeForumIds);
    } else {
        $cloudData = $searchHelper->getRelatedThreadsTao($keyword, $page, $tpp, $disAd, $of, $ot, $cache, $excludeForumIds);
    }
    if ($cloudData['result']['data']) {
        foreach ($cloudData['result']['ad']['content'] as $sAdv) {
            $threadlist[] = array('icon' => (string) $cloudData['result']['ad']['icon']) + $sAdv;
        }
        foreach ($cloudData['result']['data'] as $sPost) {
            $threadlist[] = $sPost;
        }
    } else {
        return null;
    }
    loadcache('forums');
    foreach ($threadlist as $curtid => &$curvalue) {
        $curvalue['pForumName'] = $_G['cache']['forums'][$curvalue['pForumId']]['name'];
        $curvalue['istoday'] = strtotime($curvalue['pPosted']) > $todaytime ? 1 : 0;
        $curvalue['dateline'] = $curvalue['pPosted'];
    }
    return array($threadlist, $cloudData);
}
开发者ID:softhui,项目名称:discuz,代码行数:28,代码来源:forumdisplay.inc.php

示例8: __construct

 public function __construct()
 {
     global $_G;
     $this->_util = Cloud::loadClass('Service_Util');
     $this->_client = Cloud::loadClass('Service_Client_Disk');
     $this->_baseUrl = $_G['siteurl'] . 'apptest.php?';
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:7,代码来源:Disk.php

示例9: update

 static function update()
 {
     if (file_exists('data.txt')) {
         self::$instance = unserialize(file_get_contents("data.txt"));
     } else {
         self::$instance = new Cloud();
     }
     return self::$instance;
 }
开发者ID:kingsj,项目名称:core,代码行数:9,代码来源:Cloud.php

示例10: _output

 public function _output($aid, $sha, $filename)
 {
     include_once libfile('function/attachment');
     $storageService = Cloud::loadClass('Service_Storage');
     $qqdlUrl = $storageService->makeQQdlUrl($sha, $filename);
     $aidencode = packaids(array('aid' => $aid));
     include template('xf_storage:link');
     return $return;
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:9,代码来源:xf_storage.class.php

示例11: onCloudOpenCloud

 public function onCloudOpenCloud()
 {
     $appService = Cloud::loadClass('Service_App');
     $utilService = Cloud::loadClass('Service_Util');
     $this->_openCloud();
     $res = array();
     $res['status'] = true;
     $res['siteInfo'] = $this->_getBaseInfo();
     return $res;
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:10,代码来源:Cloud.php

示例12: bindQQ

 public function bindQQ($appIdentifier, $fromUrl, $extra = array())
 {
     $this->reloadId();
     $utilService = Cloud::loadClass('Service_Util');
     $fromUrl .= $extra ? '&' . $utilService->httpBuildQuery(array('extra' => $extra), '', '&') : '';
     $params = array('s_id' => $this->_sId, 'app_identifier' => $appIdentifier, 's_site_uid' => $this->siteUid, 'from_url' => $fromUrl, 'ADTAG' => 'CP.CLOUD.BIND.INDEX');
     ksort($params);
     $str = $utilService->httpBuildQuery($params, '', '&');
     $params['sig'] = md5(sprintf('%s|%s|%s', $str, $this->_sKey, $this->_ts));
     $params['ts'] = $this->_ts;
     return 'http://cp.discuz.qq.com/addon_bind/index?' . $utilService->httpBuildQuery($params, '', '&');
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:12,代码来源:Cloud.php

示例13: mobileplugin_cloudsearch

 public function mobileplugin_cloudsearch()
 {
     global $_G, $searchparams;
     $cloudAppService = Cloud::loadClass('Service_App');
     $this->allow = $cloudAppService->getCloudAppStatus('search');
     if ($this->allow) {
         include_once template('cloudsearch:module');
         if (!$searchparams) {
             $searchHelper = Cloud::loadClass('Cloud_Service_SearchHelper');
             $searchparams = $searchHelper->makeSearchSignUrl();
         }
     }
 }
开发者ID:softhui,项目名称:discuz,代码行数:13,代码来源:search_wap.class.php

示例14: __construct

 public function __construct()
 {
     $this->model = model('Base')->model;
     $this->cloud = Cloud::getInstance();
     // 定义当前请求的系统常量
     define('NOW_TIME', $_SERVER['REQUEST_TIME']);
     define('REQUEST_METHOD', $_SERVER['REQUEST_METHOD']);
     define('IS_GET', REQUEST_METHOD == 'GET' ? true : false);
     define('IS_POST', REQUEST_METHOD == 'POST' ? true : false);
     define('IS_PUT', REQUEST_METHOD == 'PUT' ? true : false);
     define('IS_DELETE', REQUEST_METHOD == 'DELETE' ? true : false);
     define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
 }
开发者ID:m7720647,项目名称:demo,代码行数:13,代码来源:Controller.class.php

示例15: getInstance

 public static function getInstance()
 {
     global $_G;
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
         $cloudAppService = Cloud::loadClass('Service_App');
         self::$_appStatus = $cloudAppService->getCloudAppStatus('storage');
         self::$_siteId = $_G['setting']['my_siteid'];
         self::$_encKey = $_G['setting']['xf_storage_enc_key'];
         self::$_util = Cloud::loadClass('Service_Util');
     }
     return self::$_instance;
 }
开发者ID:softhui,项目名称:discuz,代码行数:13,代码来源:Storage.php


注:本文中的Cloud类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。