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


PHP Server::getSiteUrl方法代码示例

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


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

示例1: post

 public function post(\Request $request)
 {
     $cmd = $request->shiftCommand();
     switch ($cmd) {
         case 'toggleAllow':
             \Settings::set('pulse', 'allow_web_access', (\Settings::get('pulse', 'allow_web_access') - 1) * -1);
             $response = new \Http\SeeOtherResponse(\Server::getSiteUrl() . 'pulse/admin/');
             break;
     }
     return $response;
     exit;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:12,代码来源:PulseAdminController.php

示例2: setAction

 /**
  * Sets the action url.
  * @param string $action
  */
 public function setAction($action)
 {
     if (!preg_match('/^http(s)?:/i', $action)) {
         $action = \Server::getSiteUrl() . $action;
     }
     $this->action = $action;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:11,代码来源:Form.php

示例3: loadSrc

 /**
  * Creates a src url path based on the current directory.
  */
 private function loadSrc()
 {
     $this->loadRelativePath();
     $this->setSrc(\Server::getSiteUrl() . $this->getRelativePath());
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:8,代码来源:Image.php

示例4: sendWinnerEmail

 private function sendWinnerEmail($lottery, \tailgate\Resource\Game $game)
 {
     $variables = $game->getStringVars();
     $variables['confirmation_link'] = \Server::getSiteUrl() . 'tailgate/User/Lottery/?command=confirm&hash=' . $lottery['confirmation'];
     $tpl = new \Template();
     $tpl->setModuleTemplate('tailgate', 'Admin/Lottery/Winner.html');
     $tpl->addVariables($variables);
     $content = $tpl->get();
     $this->sendEmail('Tailgate successful', $lottery['student_id'], $content);
 }
开发者ID:AppStateESS,项目名称:tailgate,代码行数:10,代码来源:Lottery.php

示例5: getHomeHttp

 /**
  * Returns the installations url address
  */
 public static function getHomeHttp($with_http = true, $with_directory = true, $with_slash = true)
 {
     $url = Server::getSiteUrl($with_http, $with_directory);
     if ($with_slash && !preg_match('/\\/$/', $url)) {
         $url .= '/';
     }
     return $url;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:11,代码来源:PHPWS_Core.php

示例6: define

<?php

// Detect phpWebSite
if (file_exists('../config/core/config.php')) {
    define('PHPWEBSITE', true);
    require_once '../config/core/config.php';
    require_once PHPWS_SOURCE_DIR . 'inc/Bootstrap.php';
    if (isset($_SERVER['PHP_AUTH_USER'])) {
        require_once PHPWS_SOURCE_DIR . 'mod/users/class/Current_User.php';
        Current_User::loginUser(preg_replace(PHPWS_SHIBB_USER_AUTH, '', $_SERVER['PHP_AUTH_USER']));
    }
    PHPWS_unBootstrap();
}
// Build new URL
require_once PHPWS_SOURCE_DIR . 'Global/Server.php';
$redirect = preg_replace('/secure\\/?$/', '', \Server::getSiteUrl());
?>
<html>
    <head>
        <!-- THIS FILE SHOULD NEVER EVER BE CACHED.  MAKE SURE TO DISABLE CACHING AT THE APACHE LEVEL. -->
        <meta http-equiv="refresh" content="0;url=<?php 
echo $redirect;
?>
" />
    </head>
    <body>
        <p><a href="<?php 
echo $redirect;
?>
">If you are not redirected automatically, please click this link.</a></p>
    </body>
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:index.php

示例7: confirmWinner

 private function confirmWinner()
 {
     $game = \tailgate\Factory\Game::getCurrent();
     $hash = filter_input(INPUT_GET, 'hash', FILTER_SANITIZE_STRING);
     $template = new \Template();
     $factory = new Factory();
     $template->setModuleTemplate('tailgate', 'User/confirmation.html');
     $template->add('button_color', 'primary');
     if ($game->getPickupDeadline() < time()) {
         $template->add('message_color', 'danger');
         $template->add('message', 'Sorry, the confirmation deadline for this lottery has passed.');
         $template->add('url', \Server::getSiteUrl());
         $template->add('label', 'Go back to home page');
         $content = $template->get();
         return $content;
     }
     $confirm = $factory->confirm($hash);
     if ($confirm) {
         $template->add('message_color', 'success');
         $template->add('message', 'Lottery win confirmed!');
         if (!\Current_User::isLogged()) {
             $template->add('url', \Server::getSiteUrl() . 'admin/');
             $template->add('label', 'Log in to pick your lot');
         } else {
             $template->add('url', \Server::getSiteUrl() . 'tailgate/');
             $template->add('label', 'Go to your status page and pick a spot');
         }
     } else {
         $template->add('message_color', 'danger');
         $template->add('message', 'Sorry, could not confirm your lottery win. Contact us if you are having trouble.');
         $template->add('url', \Server::getSiteUrl());
         $template->add('label', 'Go back to home page');
     }
     $content = $template->get();
     return $content;
 }
开发者ID:AppStateESS,项目名称:tailgate,代码行数:36,代码来源:Lottery.php


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