本文整理汇总了PHP中Common::getAbsoluteURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Common::getAbsoluteURL方法的具体用法?PHP Common::getAbsoluteURL怎么用?PHP Common::getAbsoluteURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Common
的用法示例。
在下文中一共展示了Common::getAbsoluteURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: export
public function export()
{
header("Content-Type: application/xml; charset=UTF-8");
$rss_date = self::displayDate($this->guessRSSDate());
$tVars = array('items' => $this->items, 'title_link' => $this->feedURL, 'feed_title' => $this->title, 'feed_description' => $this->descr, 'language' => GWF_Language::getCurrentISO(), 'image_url' => Common::getAbsoluteURL('/favicon.ico', false), 'image_link' => $this->webURL, 'image_width' => '32', 'image_height' => '32', 'pub_date' => $rss_date, 'build_date' => $rss_date);
return GWF_Template::templatePHPMain('rss2.php', $tVars);
}
示例2: deliver
public static function deliver(Module_PM $module, GWF_PM $pm)
{
if (false === ($pmo = GWF_PMOptions::getPMOptions($pm->getReceiver()))) {
return 0;
}
if (!$pmo->isOptionEnabled(GWF_PMOptions::EMAIL_ON_PM)) {
return 0;
}
$sender = $pm->getSender();
$receiver = $pm->getReceiver();
if ('' === ($rec = $receiver->getValidMail())) {
return 0;
}
$sendername = $sender->getID() !== '0' ? $sender->display('user_name') : GWF_HTML::langUser($receiver, 'guest');
$email = new GWF_Mail();
$email->setSender($module->cfgEmailSender());
$email->setReceiver($rec);
$email->setSubject($module->langUser($receiver, 'mail_subj', array($sendername)));
$autofolder = sprintf('index.php?mo=PM&me=AutoFolder&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
$autofolder = Common::getAbsoluteURL($autofolder);
$autofolder = GWF_HTML::anchor($autofolder, $autofolder);
$delete = sprintf('index.php?mo=PM&me=Delete&pmid=%s&uid=%s&token=%s', $pm->getID(), $receiver->getID(), $pm->getHashcode());
$delete = Common::getAbsoluteURL($delete);
$delete = GWF_HTML::anchor($delete, $delete);
$email->setBody($module->langUser($receiver, 'mail_body', array($receiver->displayUsername(), $sendername, $pm->display('pm_title'), $pm->display('pm_message'), $autofolder, $delete)));
if (false === $email->sendToUser($receiver)) {
return -4;
}
return 1;
}
示例3: displayPaysiteButton
public function displayPaysiteButton(GWF_Module $module, GWF_Order $order, GWF_Orderable $gdo, GWF_User $user)
{
$lang_iso = GWF_Language::getCurrentISO();
$action = self::RECEIVE_MONEY_URL;
$hidden = GWF_Form::hidden('ap_purchasetype', 'item') . GWF_Form::hidden('ap_merchant', $this->cfgSeller()) . GWF_Form::hidden('ap_itemname', $gdo->getOrderItemName($module, $lang_iso)) . GWF_Form::hidden('ap_currency', $order->getOrderCurrency()) . GWF_Form::hidden('ap_returnurl', Common::getAbsoluteURL($gdo->getOrderSuccessURL($user), false)) . GWF_Form::hidden('ap_itemcode', $order->getOrderToken()) . GWF_Form::hidden('ap_quantity', $order->getOrderAmount()) . GWF_Form::hidden('ap_description', $gdo->getOrderDescr($module, $lang_iso)) . GWF_Form::hidden('ap_amount', $order->getOrderPriceTotal()) . GWF_Form::hidden('ap_cancelurl', Common::getAbsoluteURL($gdo->getOrderCancelURL($user), false));
// echo GWF_HTML::display($hidden);
return Module_Payment::tinyform('pay_ap', 'img/' . GWF_ICON_SET . 'buy_ap.png', $action, $hidden);
}
示例4: getItems
private function getItems(GWF_Language $lang)
{
$back = array();
$items = GWF_News::getNews($this->module->cfgFeedItemcount(), 0, 1, "news_date DESC", false);
$langid = $lang->getID();
foreach ($items as $item) {
$item instanceof GWF_News;
$t = $item->getTranslationB($langid);
$back[] = array('title' => $t['newst_title'], 'descr' => GWF_Message::display($t['newst_message'], true, false, false), 'guid' => Common::getAbsoluteURL($item->hrefShow($lang), false), 'link' => Common::getAbsoluteURL($item->hrefShow($lang), false), 'date' => $item->displayDate(), 'pub_date' => $item->rssDate());
}
return $back;
}
示例5: onMailTicketB
private function onMailTicketB(GWF_HelpdeskTicket $ticket, GWF_HelpdeskMsg $message, GWF_User $user)
{
if ('' === ($rec = $user->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($user, 'subj_nt', array($ticket->getID())));
$href_work = Common::getAbsoluteURL($this->module->getMethodURL('AssignWork', '&ticket=' . $ticket->getID() . '&worker=' . $user->getID() . '&token=' . $ticket->getHashcode()), false);
$mail->setBody($this->module->langUser($user, 'body_nt', array($user->displayUsername(), $ticket->getCreator()->displayUsername(), $ticket->displayTitle($user), $message->displayMessage(), $href_work)));
return $mail->sendToUser($user);
}
示例6: execute
public function execute()
{
if (!($site = WC_Site::getByClassName(Common::getGetString('site')))) {
$this->module->ajaxErr('err_site');
}
require_once GWF_CORE_PATH . 'module/WeChall/WC_HistoryUser2.php';
$table = GDO::table('WC_HistoryUser2');
$orderby = 'userhist_date DESC';
$siteid = $site->getVar('site_id');
$conditions = "userhist_sid={$siteid}";
$items = $table->selectObjects('*', $conditions, $orderby, 15);
$feed = new GWF_RSS();
$feed->setTitle($this->l('siterss_title', array($site->displayName())));
$feed->setItems($items);
$feed->setFeedURL($_SERVER['REQUEST_URI']);
$feed->setWebURL(Common::getAbsoluteURL('site/history/' . $site->displayName()));
die($feed->export());
}
示例7: execute
public function execute()
{
$syntax = 'syntax: ' . Common::getAbsoluteURL('remoteupdate.php') . '?sitename=FOO&username=BAR';
$server = htmlspecialchars($_SERVER['SERVER_NAME'], ENT_QUOTES);
$unknownsite = 'Join us: ' . Common::getAbsoluteURL('join_us');
# "Join us: http://$server/join.php";
$unknownuser = 'Register at ' . Common::getAbsoluteURL('register') . ' for global ranking. Please note that the username is case sensitive for remoteupdates.';
// flag for images. 0=normal text, 1=default image, we can assign different image styles to higher numbers
$img = (int) Common::getGet('img', 0);
if ($img === 1) {
header("Content-Type: image/png");
}
if (false === ($sitename = Common::getRequest('sitename'))) {
$this->outDie($syntax);
}
if (false === ($onsitename = Common::getRequest('username'))) {
$this->outDie($syntax);
}
if ($sitename === 'FOO' && $onsitename === 'BAR') {
$this->outDie('Doh! Not literally!');
}
if (false === ($site = WC_Site::getByName($sitename)) && false === ($site = WC_Site::getByClassName($sitename))) {
$this->outExit($unknownsite);
}
$this->module->includeClass('WC_RegAt');
if (false === ($user = WC_RegAt::getUserByOnsiteName($onsitename, $site->getID()))) {
$this->outExit($unknownuser);
}
# Update him
$result = $site->onUpdateUser($user);
$site->saveOption(WC_Site::AUTO_UPDATE, true);
# Output result
switch ($img) {
case 0:
$this->outResult($result);
break;
case 1:
$this->imgDisplayText($result->getMessage());
break;
}
}
示例8: get2ndStepURL
private function get2ndStepURL(GWF_Order $order, GWF_Orderable $gdo)
{
return Common::getAbsoluteURL('index.php?mo=PaymentPaypal&me=ConfirmCheckout&gwf_token=' . $order->getOrderToken());
// return 'i_paid_with_paypal_for/'.$order->escape('order_title').'/'.$order->getOrderToken();
}
示例9: prog2NextQuestion
prog2NextQuestion($chall);
}
$solved = false;
if (false !== ($answer = Common::getGet('answer'))) {
$solved = prog2CheckResult($chall);
}
$chall->showHeader();
if ($solved === true) {
$chall->onChallengeSolved(GWF_Session::getUserID());
} elseif (is_string($solved)) {
htmlDisplayError($solved, false);
}
?>
<?php
$sol_url = Common::getAbsoluteURL($chall->getVar('chall_url')) . '?answer=the_message';
echo GWF_Box::box($chall->lang('info', array('index.php?action=request', $sol_url, TIMELIMIT)));
?>
<?php
function prog2NextQuestion(WC_Challenge $chall)
{
if (false === ($user = GWF_Session::getUser())) {
die($chall->lang('err_login'));
}
$solution = GWF_Random::randomKey(rand(9, 12));
GWF_Session::set('prog2_solution', $solution);
GWF_Session::set('prog2_timeout', microtime(true));
// GWF_Session::commit();
die($solution);
}
示例10: sprintf
?>
<item>
<title><?php
echo GWF_RSS::displayCData($item->getRSSTitle());
?>
</title>
<?php
if ($link = $item->getRSSLink()) {
echo sprintf('<link>%s</link>', GWF_HTML::display(Common::getAbsoluteURL($link, false))) . PHP_EOL;
}
?>
<description><?php
echo GWF_RSS::displayCData($item->getRSSDescription());
?>
</description>
<?php
if ($guid = $item->getRSSGUID()) {
echo sprintf('<guid>%s</guid>', GWF_HTML::display(Common::getAbsoluteURL($guid, false))) . PHP_EOL;
}
?>
<pubDate><?php
echo GWF_RSS::displayDate($item->getRSSPubDate());
?>
</pubDate>
</item>
<?php
}
?>
</channel>
</rss>
示例11: getGPGMailBody
private function getGPGMailBody(GWF_User $user, $fingerprint)
{
$href = Common::getAbsoluteURL(sprintf('index.php?mo=Account&me=SetupGPGKey&userid=%s&token=%s', $user->getVar('user_id'), $fingerprint), true);
$link = GWF_HTML::anchor($href, $href);
return $this->module->langUser($user, 'mailb_gpg', array($user->displayUsername(), $link));
}
示例12: getChangeLink
private static function getChangeLink($userid, $token)
{
$url = Common::getAbsoluteURL(sprintf('index.php?mo=Account&me=ChangeDemo&userid=%s&token=%s', $userid, $token));
return GWF_HTML::anchor($url, $url);
}
示例13: onRequestMail
private function onRequestMail(GWF_Group $group, GWF_User $user, GWF_UsergroupsInvite $request)
{
if (false === ($leader = $group->getFounder())) {
return false;
}
if ('' === ($email = $leader->getValidMail())) {
return false;
}
$userid = $user->getID();
$groupid = $group->getID();
$token = $request->getHashcode();
$link = Common::getAbsoluteURL('index.php?mo=Usergroups&me=Accept&uid=' . $userid . '&gid=' . $groupid . '&token=' . $token);
$link = GWF_HTML::anchor($link, $link);
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($email);
$mail->setSubject($this->module->lang('mail_subj_req', array($user->displayUsername(), $group->display('group_name'))));
$mail->setBody($this->module->lang('mail_body_req', array($leader->displayUsername(), $user->displayUsername(), $group->display('group_name'), $link)));
return $mail->sendToUser($leader);
}
示例14: onEMailModerationB
private function onEMailModerationB($user, GWF_Shoutbox $entry, GWF_User $staff)
{
if ('' === ($rec = $staff->getValidMail())) {
return;
}
$mail = new GWF_Mail();
$mail->setSender(GWF_BOT_EMAIL);
$mail->setReceiver($rec);
$mail->setSubject($this->module->langUser($staff, 'emod_subj'));
$id = $entry->getID();
$token = $entry->getHashcode();
$deletion_url = Common::getAbsoluteURL("index.php?mo=Shoutbox&me=Moderate&shoutid={$id}&token={$token}");
$deletion_link = GWF_HTML::anchor($deletion_url, $deletion_url);
$message = $entry->display('shout_message');
$username = $user === false ? GWF_HTML::lang('guest') : $user->display('user_name');
$mail->setBody($this->module->langUser($staff, 'emod_body', array($username, $message, $deletion_link)));
return $mail->sendToUser($staff);
}
示例15: getLinkB
private static function getLinkB($token, $userid)
{
$url = Common::getAbsoluteURL(sprintf('index.php?mo=Account&me=ChangeEmail&userid=%s&change=%s', $userid, $token));
return sprintf('<a href="%s">%s</a>', $url, $url);
}