本文整理汇总了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>';
}
示例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>';
}
示例3: getUrl
public function getUrl()
{
if ($this->hasLogo()) {
return get_server_url() . '/themes/' . $this->theme . '/images/organization_logo.png';
}
return null;
}
示例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();
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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());
}
}
示例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;
}
示例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>';
}
示例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();
}
示例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();
}
示例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();
}
示例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');
}