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


PHP Common::getProtocol方法代码示例

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


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

示例1: execute

 public function execute()
 {
     if (false !== ($error = $this->sanitize())) {
         return $error;
     }
     GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi');
     GWF_Website::addJavascriptInline('google.load("language", "1");');
     GWF_Website::setPageTitle($this->pm->display('pm_title'));
     return $this->templateShow(Common::getGet('translate') !== false);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:Show.php

示例2: getOnChange

 public static function getOnChange()
 {
     # TODO: Use GWF_DOMAIN?
     if (isset($_SERVER['HTTP_HOST']) === false) {
         return '';
     }
     $current_url = htmlspecialchars(GWF_Session::getCurrentURL(), ENT_QUOTES);
     $url = Common::getProtocol() . '://' . $_SERVER['HTTP_HOST'] . '/';
     return 'window.location = \'' . $url . '\'+this.value+\'' . $current_url . '\'; return true;';
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:10,代码来源:GWF_LangSwitch.php

示例3: templatePlaces

 private function templatePlaces()
 {
     GWF_Website::addJavascript($this->googleMapsPath());
     GWF_Website::addJavascript(GWF_WEB_ROOT_NO_LANG . 'js/module/Profile/profile.js?v=57');
     // 		GWF_Website::addJavascript(GWF_WEB_ROOT_NO_LANG.'js/3p/fancybox/jquery.fancybox.pack.js');
     // 		GWF_Website::addCSS(GWF_WEB_ROOT_NO_LANG.'js/3p/fancybox/jquery.fancybox.css');
     // 		GWF_Website::addCSS(GWF_WEB_ROOT_NO_LANG.'css/profile_poi.css');
     $user = GWF_User::getStaticOrGuest();
     $userid = $user->getID();
     $table = GDO::table('GWF_ProfilePOI');
     $tVars = array('user_id' => $userid, 'is_admin' => $user->isAdmin() ? 'true' : 'false', 'total' => $table->countRows(), 'visible' => $table->countRows(GWF_ProfilePOI::wherePermissions(), array('users', 'profiles', 'whitelist')), 'js_trans' => $this->jsTrans(), 'form_delete' => $this->formDelete(), 'pois' => GWF_ProfilePOI::getPOICount($userid), 'maxp' => $this->module->cfgAllowedPOIs(), 'api_key' => $this->module->cfgMapsApiKey(), 'protocol' => Common::getProtocol(), 'init_lat' => 0, 'init_lon' => 0);
     return $this->module->templatePHP('places.php', $tVars);
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:13,代码来源:Places.php

示例4: execute

 public function execute()
 {
     GWF_ForumBoard::init(true);
     if (false !== ($error = $this->sanitize())) {
         return $error;
     }
     GWF_Website::addJavascript(GWF_WEB_ROOT . 'js/module/Forum/gwf_forum.js');
     if ($this->module->cfgUseGTranslate()) {
         GWF_Website::addJavascript(Common::getProtocol() . '://www.google.com/jsapi');
         GWF_Website::addJavascriptInline('google.load("language", "1");');
     }
     GWF_Website::setPageTitle($this->module->lang('pt_thread', array($this->thread->getBoard()->getVar('board_title'), $this->thread->getVar('thread_title'))));
     return $this->templateThread();
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:14,代码来源:ShowThread.php

示例5: array

// $href_api_3 = GWF_WEB_ROOT.'index.php?mo=WeChall&me=JoinUs&section=api#api_3';
echo '<a name="api_3"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_3b', array($usage_3_1, $usage_3_1, $usage_3_1, $event_types, $examples)), $l->lang('api_3t'));
# API 4)
$href_api_4 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_4';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_User&no_session=1&', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_4_1 = htmlspecialchars($url . 'username=<username>[&apikey=<your_api_key>]');
$example_4_1 = GWF_HTML::anchor($url . 'username=' . $uname, $url . 'username=' . $uname);
if ($user !== false && isset($udata['WC_NO_XSS_PASS'])) {
    $api_key = urlencode($udata['WC_NO_XSS_PASS']);
    $example_4_2 = GWF_HTML::anchor($url . "username={$uname}&apikey={$api_key}", $url . "username={$uname}&apikey={$api_key}");
} else {
    $example_4_2 = '';
}
echo '<a name="api_4"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_4b', array($usage_4_1, $usage_4_1, $example_4_1, $example_4_2)), $l->lang('api_4t'));
# API 5)
$href_api_5 = GWF_WEB_ROOT . 'index.php?mo=WeChall&amp;me=JoinUs&amp;section=api#api_5';
$url = sprintf('%s://%s%sindex.php?mo=WeChall&me=API_Site&no_session=1', Common::getProtocol(), GWF_DOMAIN, GWF_WEB_ROOT);
$usage_5_1 = htmlspecialchars($url . '[&sitename=<sitename>]');
$example_5_1 = GWF_HTML::anchor($url, $url);
$example_5_2 = GWF_HTML::anchor($url . '&sitename=WeChall', $url . '&sitename=WeChall');
echo '<a name="api_5"></a>' . PHP_EOL;
echo GWF_Box::box($l->lang('api_5b', array($usage_5_1, $usage_5_1, $example_5_1, $example_5_2)), $l->lang('api_5t'));
# Buttons
echo GWF_Button::wrapStart();
echo GWF_Button::generic($l->lang('btn_join'), GWF_WEB_ROOT . 'join_us');
echo GWF_Button::generic($l->lang('btn_join_war'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=warbox');
echo GWF_Button::generic($l->lang('btn_join_opt'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=optional');
echo GWF_Button::generic($l->lang('btn_api'), GWF_WEB_ROOT . 'index.php?mo=WeChall&me=JoinUs&section=wechall_api', 'generic', '', true);
echo GWF_Button::wrapEnd();
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:join_api.php

示例6: err404

 public static function err404($filename)
 {
     @header(Common::getProtocol() . ' 404 File not found');
     return self::err('ERR_FILE_NOT_FOUND', htmlspecialchars($filename));
 }
开发者ID:sinfocol,项目名称:gwf3,代码行数:5,代码来源:GWF_Error.php

示例7: rtrim

<applet id="ssy_applet2" code="com.assessystem.SSYMain" archive="<?php 
echo GWF_WEB_ROOT;
?>
applet/surveystudios5i.jar">
	<param name="width" value="640" />
	<param name="height" value="480" />
<!-- 	<param name="locale" value="<?php 
echo $tVars['locale'];
?>
" />  -->
	<param name="host" value="<?php 
echo rtrim(sprintf("%s://%s%s", Common::getProtocol(), Common::getHost(), GWF_WEB_ROOT), '/') . '/';
?>
" />
	<param name="uid" value="<?php 
echo $tVars['uid'];
?>
" />
	<param name="sid" value="<?php 
echo $tVars['cookie'];
?>
" />
	<param name="quit" value="<?php 
echo 'account';
?>
" />
	<?php 
echo $tVars['module']->error('err_no_java');
?>
</applet>
<script type="text/javascript">
开发者ID:sinfocol,项目名称:gwf3,代码行数:31,代码来源:applet.php


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