本文整理汇总了PHP中get_server_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_server_url函数的具体用法?PHP get_server_url怎么用?PHP get_server_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_server_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: notifyAdministrator
public function notifyAdministrator(PFuser $user)
{
$user_name = $user->getUserName();
$href_approval = get_server_url() . '/admin/approve_pending_users.php?page=pending';
$from = ForgeConfig::get('sys_noreply');
$to = ForgeConfig::get('sys_email_admin');
$subject = $GLOBALS['Language']->getText('account_register', 'mail_approval_subject', $user_name);
$body = stripcslashes($GLOBALS['Language']->getText('account_register', 'mail_approval_body', array(ForgeConfig::get('sys_name'), $user_name, $href_approval)));
$mail = new Mail();
$mail->setSubject($subject);
$mail->setFrom($from);
$mail->setTo($to, true);
$mail->setBody($body);
if (!$mail->send()) {
$GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('global', 'mail_failed', $to));
}
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:17,代码来源:PendingUserNotifier.php
示例17: createMailAccountPresenter
/**
* Create a presenter for email account.
*
* @return MailRegisterPresenter
*/
public function createMailAccountPresenter($login, $password, $confirm_hash, $presenter_role, $logo_url)
{
$color_logo = "#000";
$color_button = "#347DBA";
$base_url = get_server_url();
$this->setColorTheme($color_logo, $color_button);
$attributes_presenter = array("login" => $login, "password" => $password, "color_logo" => $color_logo, "color_button" => $color_button, "confirm_hash" => $confirm_hash, "base_url" => $base_url, "logo_url" => $logo_url);
if ($presenter_role === "user") {
$presenter = $this->createUserEmailPresenter($attributes_presenter);
} else {
if ($presenter_role === "admin") {
$presenter = $this->createAdminEmailPresenter($attributes_presenter);
} else {
if ($presenter_role === "admin-notification") {
$presenter = $this->createAdminNotificationPresenter($attributes_presenter);
} else {
$presenter = $this->createApprovalEmailPresenter($attributes_presenter);
}
}
}
return $presenter;
}
开发者ID:rinodung,项目名称:tuleap,代码行数:27,代码来源:MailPresenterFactory.class.php
示例18: svn_header_admin
function svn_header_admin($params)
{
global $group_id, $Language;
//required params for site_project_header();
$params['group'] = $group_id;
$params['toptab'] = 'svn';
$project = ProjectManager::instance()->getProject($group_id);
$service = $project->getService('svn');
if (!$service) {
exit_error($Language->getText('global', 'error'), $Language->getText('svn_utils', 'svn_off'));
}
$toolbar = array();
$toolbar[] = array('title' => $Language->getText('svn_utils', 'admin'), 'url' => '/svn/admin/?group_id=' . $group_id);
$toolbar[] = array('title' => $Language->getText('svn_admin_index', 'gen_sett'), 'url' => '/svn/admin/?func=general_settings&group_id=' . $group_id);
$toolbar[] = array('title' => $Language->getText('svn_admin_index', 'access'), 'url' => '/svn/admin/?func=access_control&group_id=' . $group_id);
$toolbar[] = array('title' => $Language->getText('svn_utils', 'notif'), 'url' => '/svn/admin/?func=notification&group_id=' . $group_id);
if (!$params['help']) {
$params['help'] = "svn.html#subversion-administration-interface";
}
$toolbar[] = array('title' => $Language->getText('global', 'help'), 'url' => 'javascript:help_window(\'' . get_server_url() . '/doc/' . UserManager::instance()->getCurrentUser()->getShortLocale() . '/user-guide/' . $params['help'] . '\');');
$service->displayHeader($params['title'], array(array('title' => $params['title'], 'url' => '/svn/?group_id=' . $group_id)), $toolbar);
}
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:22,代码来源:svn_utils.php
示例19: getUrl
/**
* Get the Url to the artifact link
*
* @return string the html code (a href) to this artifact link
*/
public function getUrl()
{
$server_url = get_server_url();
return '<a class="cross-reference" href="' . $server_url . '/goto?key=' . $this->getKeyword() . '&val=' . $this->getArtifactId() . '&group_id=' . $this->getGroupId() . '">' . $this->getLabel() . '</a>';
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:Tracker_ArtifactLinkInfo.class.php
示例20: displayRSS
/**
* displayRSS
*
* Display the follow-ups of this artifact as a rss feed
*
*/
function displayRSS()
{
$uh = UserHelper::instance();
$hp = Codendi_HTMLPurifier::instance();
$group = $this->ArtifactType->getGroup();
$rss = new RSS(array('title' => $group->getPublicName() . ' ' . $this->ArtifactType->getName() . ' #' . $this->getId() . ' - ' . $this->getValue('summary') . ' - ' . $GLOBALS['Language']->getText('tracker_include_artifact', 'follow_ups'), 'description' => '', 'link' => '<![CDATA[' . get_server_url() . '/tracker/?atid=' . $this->ArtifactType->getID() . '&group_id=' . $group->getGroupId() . ']]>', 'language' => 'en-us', 'copyright' => $GLOBALS['Language']->getText('rss', 'copyright', array($GLOBALS['sys_long_org_name'], $GLOBALS['sys_name'], date('Y', time()))), 'pubDate' => gmdate('D, d M Y h:i:s', $this->getLastUpdateDate()) . ' GMT'));
$result = $this->getFollowups();
for ($i = 0; $i < db_numrows($result); $i++) {
$comment_type = db_result($result, $i, 'comment_type');
$comment_type_id = db_result($result, $i, 'comment_type_id');
$comment_id = db_result($result, $i, 'artifact_history_id');
$field_name = db_result($result, $i, 'field_name');
$orig_subm = $this->getOriginalCommentSubmitter($comment_id);
$orig_date = $this->getOriginalCommentDate($comment_id);
if ($comment_type_id == 100 || $comment_type == "") {
$comment_type = '';
} else {
$comment_type = '<strong>[' . $comment_type . ']</strong><br />';
}
$rss->addItem(array('title' => '<![CDATA[' . $GLOBALS['Language']->getText('tracker_include_artifact', 'add_flup_comment') . ' #' . $comment_id . ']]>', 'description' => '<![CDATA[' . $comment_type . util_make_links(nl2br(db_result($result, $i, 'new_value')), $group->getGroupId(), $this->ArtifactType->getID()) . ']]>', 'pubDate' => gmdate('D, d M Y h:i:s', db_result($orig_date, 0, 'date')) . ' GMT', 'dc:creator' => $hp->purify($uh->getDisplayNameFromUserId(db_result($orig_subm, 0, 'mod_by'))), 'link' => '<![CDATA[' . get_server_url() . '/tracker/?func=detail&aid=' . $this->getId() . '&atid=' . $this->ArtifactType->getID() . '&group_id=' . $group->getGroupId() . '#comment_' . $comment_id . ']]>', 'guid' => '<![CDATA[' . get_server_url() . '/tracker/?func=detail&aid=' . $this->getId() . '&atid=' . $this->ArtifactType->getID() . '&group_id=' . $group->getGroupId() . '#comment_' . $comment_id . ']]>'));
}
$rss->display();
exit;
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:30,代码来源:ArtifactHtml.class.php
注:本文中的get_server_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论