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


PHP get_server_url函数代码示例

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


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

示例1: getHelp

function getHelp($section = '')
{
    if (trim($section) !== '' && $section[0] !== '#') {
        $section = '#' . $section;
    }
    return '<a href="javascript:help_window(\'' . get_server_url() . '/plugins/pluginsadministration/documentation/' . UserManager::instance()->getCurrentUser()->getLocale() . '/' . $section . '\');">[?]</a>';
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:common.php

示例2: _getHelp

 function _getHelp($section = '')
 {
     if (trim($section) !== '' && $section[0] !== '#') {
         $section = '#' . $section;
     }
     return '<b><a href="javascript:help_window(\'' . get_server_url() . '/documentation/user_guide/html/' . UserManager::instance()->getCurrentUser()->getLocale() . '/IMPlugin.html' . $section . '\');">' . $GLOBALS['Language']->getText('global', 'help') . '</a></b>';
 }
开发者ID:nterray,项目名称:tuleap,代码行数:7,代码来源:IMViews.class.php

示例3: getUrl

 public function getUrl()
 {
     if ($this->hasLogo()) {
         return get_server_url() . '/themes/' . $this->theme . '/images/organization_logo.png';
     }
     return null;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:LogoRetriever.class.php

示例4: send_new_user_email

function send_new_user_email($to, $login, $password, $confirm_hash, $template, $isAdminPresenter)
{
    //needed by new_user_email.txt
    $base_url = get_server_url();
    $defaultTheme = $GLOBALS['sys_themedefault'];
    $color_logo = "#0000";
    $color_button = "#347DBA";
    if (themeIsFlamingParrot($defaultTheme)) {
        $defaultThemeVariant = $GLOBALS['sys_default_theme_variant'];
        $color_logo = FlamingParrot_Theme::getColorOfCurrentTheme($defaultThemeVariant);
        $color_button = $color_logo;
    }
    $logo_url = $base_url . "/themes/" . $defaultTheme . "/images/organization_logo.png";
    $has_logo = file_exists(dirname(__FILE__) . '/../themes/' . $defaultTheme . '/images/organization_logo.png');
    if ($isAdminPresenter) {
        $subject = $GLOBALS['Language']->getText('account_register', 'welcome_email_title', $GLOBALS['sys_name']);
        include $GLOBALS['Language']->getContent('account/new_account_email');
        $presenter = new MailRegisterByAdminPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $section_three, $section_after_password, $password);
    } else {
        $subject = $GLOBALS['Language']->getText('include_proj_email', 'account_register', $GLOBALS['sys_name']);
        include $GLOBALS['Language']->getContent('include/new_user_email');
        $redirect_url = $base_url . "/account/verify.php?confirm_hash={$confirm_hash}";
        $presenter = new MailRegisterByUserPresenter($has_logo, $logo_url, $title, $section_one, $section_two, $section_after_login, $thanks, $signature, $help, $color_logo, $login, $redirect_url, $redirect_button, $color_button);
    }
    $renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
    $mail = initializeMail($subject, $GLOBALS['sys_noreply'], $to, $renderer->renderToString($template, $presenter), $message);
    return $mail->send();
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:28,代码来源:proj_email.php

示例5: getQueryHost

 private function getQueryHost()
 {
     if (isset($_SERVER['HTTP_HOST'])) {
         $scheme = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
         return $this->getUrlBase($scheme . $_SERVER['HTTP_HOST']);
     }
     return $this->getUrlBase(get_server_url());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:GateKeeper.class.php

示例6: send_approval_new_user_email

function send_approval_new_user_email($to, $login)
{
    //needed by new_user_email.txt
    $base_url = get_server_url();
    $presenter = new MailPresenterFactory();
    $renderer = TemplateRendererFactory::build()->getRenderer(ForgeConfig::get('codendi_dir') . '/src/templates/mail/');
    $mail = new TuleapRegisterMail($presenter, $renderer, "mail-admin-approval");
    $mail = $mail->getMail($login, '', '', $base_url, $GLOBALS['sys_noreply'], $to, "admin-approval");
    return $mail->send();
}
开发者ID:rinodung,项目名称:tuleap,代码行数:10,代码来源:proj_email.php

示例7: notifyOnDisable

 /**
  * Send a mail when PDF Watermarking is disabled.
  * 
  * @param Docman_Item $item
  * @param User        $currentUser
  * 
  * @return void
  */
 public function notifyOnDisable($item, $currentUser, $defaultUrl)
 {
     $admins = $this->getPeopleToNotifyWhenWatermarkingIsDisabled($item);
     $link = get_server_url() . $defaultUrl . '&action=details&id=' . $item->getId();
     $mail = new Mail();
     $mail->setTo(implode(',', $admins));
     $mail->setSubject($GLOBALS['Language']->getText('plugin_docmanwatermark', 'email_disable_watermark_subject', array($item->getTitle())));
     $mail->setBody($GLOBALS['Language']->getText('plugin_docmanwatermark', 'email_disable_watermark_body', array($item->getTitle(), $currentUser->getRealname(), $link)));
     $mail->send();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:18,代码来源:DocmanWatermark_ItemFactory.class.php

示例8: __construct

 /**
  * @param Tracker_Artifact        $artifact The child
  * @param Tracker_Artifact        $parent   The parent
  * @param Tracker_Semantic_Status $semantic The status semantic used by the corresponding tracker
  */
 public function __construct(Tracker_Artifact $artifact, Tracker_Artifact $parent, Tracker_Semantic_Status $semantic)
 {
     $base_url = get_server_url();
     $this->xref = $artifact->getXRef();
     $this->title = $artifact->getTitle();
     $this->id = $artifact->getId();
     $this->url = $base_url . $artifact->getUri();
     $this->status = $semantic->getStatus($artifact);
     $this->parent_id = $parent->getId();
     $this->has_children = $artifact->hasChildren();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:16,代码来源:ArtifactChildPresenter.class.php

示例9: sendErrorNotification

 private function sendErrorNotification(GitRepository $repository)
 {
     $user = $this->getRequester();
     if (!$user->isAnonymous()) {
         $factory = new BaseLanguageFactory();
         $language = $factory->getBaseLanguage($user->getLocale());
         $url = get_server_url() . GIT_BASE_URL . '/?action=repo_management&group_id=' . $repository->getProjectId() . '&repo_id=' . $repository->getId() . '&pane=gerrit';
         $notification = new Notification(array($user->getEmail()), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_subject', array($repository->getFullName())), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_body', array($repository->getFullName(), $url)), $language->getText('plugin_git', 'delegated_to_gerrit_error_mail_body', array($repository->getFullName(), $url)), $url, 'git');
         $this->mail_builder->buildAndSendEmail($repository->getProject(), $notification, new MailEnhancer());
     }
 }
开发者ID:blestab,项目名称:tuleap,代码行数:11,代码来源:SystemEvent_GIT_GERRIT_MIGRATION.class.php

示例10: createDomDocument

 public function createDomDocument()
 {
     $impl = new DOMImplementation();
     $dtd = $impl->createDocumentType('docman', '', get_server_url() . '/plugins/docman/docman-1.0.dtd');
     $doc = $impl->createDocument('', '', $dtd);
     $doc->encoding = 'UTF-8';
     $doc->standalone = 'no';
     $doc->version = '1.0';
     $doc->formatOutput = true;
     return $doc;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:11,代码来源:XMLExport.class.php

示例11: _getHelp

 function _getHelp($section = '', $questionmark = false)
 {
     if (trim($section) !== '' && $section[0] !== '#') {
         $section = '#' . $section;
     }
     if ($questionmark) {
         $help_label = '[?]';
     } else {
         $help_label = $GLOBALS['Language']->getText('global', 'help');
     }
     return '<b><a href="javascript:help_window(\'' . get_server_url() . '/documentation/user_guide/html/' . UserManager::instance()->getCurrentUser()->getLocale() . '/ContinuousIntegrationWithHudson.html' . $section . '\');">' . $help_label . '</a></b>';
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:hudsonViews.class.php

示例12: send_new_user_email

function send_new_user_email($to, $confirm_hash, $username)
{
    //needed by new_user_email.txt
    $base_url = get_server_url();
    include $GLOBALS['Language']->getContent('include/new_user_email');
    $mail = new Mail();
    $mail->setTo($to);
    $mail->setSubject($GLOBALS['Language']->getText('include_proj_email', 'account_register', $GLOBALS['sys_name']));
    $mail->setBody($message);
    $mail->setFrom($GLOBALS['sys_noreply']);
    return $mail->send();
}
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:12,代码来源:proj_email.php

示例13: sendMail

 public function sendMail(PFUser $user, Project $project, $tv3_id, $tracker_name)
 {
     $mail = new Codendi_Mail();
     $breadcrumbs = array();
     $breadcrumbs[] = '<a href="' . get_server_url() . '/projects/' . $project->getUnixName(true) . '" />' . $project->getPublicName() . '</a>';
     $mail->getLookAndFeelTemplate()->set('breadcrumbs', $breadcrumbs);
     $mail->addAdditionalHeader("X-Codendi-Project", $project->getUnixName());
     $mail->setFrom($GLOBALS['sys_noreply']);
     $mail->setTo($user->getEmail());
     $mail->setSubject('Output of your migration TV3 -> TV5');
     $mail->setBody($this->getMailBody($tv3_id, $tracker_name));
     $mail->send();
     $this->purgeLogStack();
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:MailLogger.class.php

示例14: send_new_user_email

function send_new_user_email($to, $confirm_hash, $username)
{
    global $Language;
    $base_url = get_server_url();
    // $message is defined in the content file
    include $Language->getContent('include/new_user_email');
    list($host, $port) = explode(':', $GLOBALS['sys_default_domain']);
    $mail = new Mail();
    $mail->setTo($to);
    $mail->setSubject($Language->getText('include_proj_email', 'account_register', $GLOBALS['sys_name']));
    $mail->setBody($message);
    $mail->setFrom($GLOBALS['sys_noreply']);
    return $mail->send();
}
开发者ID:nterray,项目名称:tuleap,代码行数:14,代码来源:proj_email.php

示例15: finish_login

 public function finish_login()
 {
     try {
         $return_url = get_server_url() . '/my';
         if ($this->request->existAndNonEmpty('return_to')) {
             $return_url = $this->request->getValidated('return_to', 'string', '');
         }
         $driver = new Openid_Driver_ConnexionDriver($this->logger, '?func=' . OpenId_OpenIdRouter::FINISH_LOGIN);
         $connexion_manager = new Openid_ConnexionManager($driver);
         $identity_url = $connexion_manager->finishAuthentication($return_url);
         $this->account_manager->authenticateCorrespondingUser($identity_url);
         $this->response->redirect($return_url);
     } catch (OpenId_OpenIdException $exception) {
         $this->response->addFeedback(Feedback::ERROR, $exception->getMessage());
     }
     $this->response->redirect('/account/login');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:LoginController.class.php


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