本文整理汇总了PHP中JROUTE::_方法的典型用法代码示例。如果您正苦于以下问题:PHP JROUTE::_方法的具体用法?PHP JROUTE::_怎么用?PHP JROUTE::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JROUTE
的用法示例。
在下文中一共展示了JROUTE::_方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getData
function getData() {
$id = JRequest::getInt('id');
$db = & JFactory::getDBO();
$query = "SELECT * FROM #__k2_items WHERE id={$id}";
$db->setQuery($query, 0, 1);
$row = $db->loadObject();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OSE Added - OSE and Open Source Excellence is the registered trade mark of the Open Source Excellence PTE LTD.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
require_once(JPATH_SITE.DS.'components'.DS.'com_osemsc'.DS.'init.php');
$content_ids = oseRegistry::call('content')->getRestrictedContent('k2','article');
if(in_array($id,$content_ids))
{
$row->introtext = $row->introtext.'<br /> This content is members only, please <a href="'.JROUTE::_('index.php?option=com_osemsc&view=register').'">subscribe a membership plan first</a>';
$row->fulltext = '';
$row->mscControlled = true;
$row->mscControlClass = 'osemsc-control';
}
else
{
$row->mscControlClass = 'osemsc-free';
$row->mscControlled = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OSE Added - OSE and Open Source Excellence is the registered trade mark of the Open Source Excellence PTE LTD.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
return $row;
}
示例2: render
function render($position = "")
{
global $gantry;
ob_start();
?>
<div class="rt-block">
<div id="rt-accessibility">
<div class="rt-desc"><?php
echo JText::_('TEXT_SIZE');
?>
</div>
<div id="rt-buttons">
<a href="<?php
echo JROUTE::_($gantry->addQueryStringParams($gantry->getCurrentUrl(array('reset-settings')), array('font-size' => 'smaller')));
?>
" title="<?php
echo JText::_('DEC_FONT_SIZE');
?>
" class="small"><span class="button"></span></a>
<a href="<?php
echo JROUTE::_($gantry->addQueryStringParams($gantry->getCurrentUrl(array('reset-settings')), array('font-size' => 'larger')));
?>
" title="<?php
echo JText::_('INC_FONT_SIZE');
?>
" class="large"><span class="button"></span></a>
</div>
</div>
<div class="clear"></div>
</div>
<?php
return ob_get_clean();
}
示例3: render
function render($position = "")
{
global $gantry;
ob_start();
?>
<div class="rt-block">
<div id="rt-accessibility">
<div class="rt-desc"><?php
echo JText::_('TEXT_SIZE');
?>
</div>
<div id="rt-buttons">
<a href="<?php
echo JROUTE::_($gantry->getCurrentUrl() . "font-size=larger");
?>
" title="<?php
echo JText::_('INC_FONT_SIZE');
?>
" class="large"><span class="button"></span></a>
<a href="<?php
echo JROUTE::_($gantry->getCurrentUrl() . "font-size=smaller");
?>
" title="<?php
echo JText::_('DEC_FONT_SIZE');
?>
" class="small"><span class="button"></span></a>
</div>
</div>
<div class="clear"></div>
</div>
<?php
return ob_get_clean();
}
示例4: display
function display($cachable = false, $urlparams = false)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$menuItem = $app->getMenu()->getActive();
if (is_object($menuItem)) {
$mcatid = $menuItem->params->get('mcatid', '');
$filter_category = !is_array($mcatid) ? array($mcatid) : $mcatid;
} else {
$filter_category = '';
}
$items = $this->get('Records');
// $Itemid = $app->input->getInt('Itemid');
$Itemid = JRequest::getInt('Itemid');
foreach ($items as $item) {
if (!in_array('', $filter_category) && !in_array('0', $filter_category) && in_array($item->catid, $filter_category) || in_array('', $filter_category) || in_array('0', $filter_category)) {
// Load individual item creator class.
$feeditem = new JFeedItem();
$feeditem->title = $item->title . ' (' . $item->category . ')';
$feeditem->link = JROUTE::_('index.php?option=com_icagenda&view=list&layout=event&Itemid=' . (int) $Itemid . '&id=' . (int) $item->id . ':' . $item->alias);
$feeditem->image = icagendaThumb::sizeMedium($item->image);
$feeditem->description = '<img src="' . $feeditem->image . '" alt="" style="margin: 5px; float: left;">' . $item->desc;
$feeditem->date = $item->next;
$feeditem->category = $item->category;
// Loads item information into RSS array
$document->addItem($feeditem);
}
}
}
示例5: plgVmConfirmedOrder
function plgVmConfirmedOrder($cart, $order)
{
if (!($method = $this->getVmPluginMethod($order["details"]["BT"]->virtuemart_paymentmethod_id))) {
return null;
}
if (!$this->selectedThisElement($method->payment_element)) {
return false;
}
$this->logInfo('plgVmOnConfirmedOrderGetPaymentForm order number: ' . $order['details']['BT']->order_number, 'message');
$lang = JFactory::getLanguage();
$lang->load('plg_vmpayment_epay', JPATH_ADMINISTRATOR);
if (!class_exists('VirtueMartModelOrders')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
}
if (!class_exists('VirtueMartModelCurrency')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
}
$new_status = '';
$usrBT = $order['details']['BT'];
$address = isset($order['details']['ST']) ? $order['details']['ST'] : $order['details']['BT'];
$vendorModel = new VirtueMartModelVendor();
$vendorModel->setId(1);
$vendor = $vendorModel->getVendor();
$this->getPaymentCurrency($method);
$q = ' SELECT `currency_numeric_code` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
$db =& JFactory::getDBO();
$db->setQuery($q);
$currency_numeric_code = $db->loadResult();
$paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
$totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total, false), 2);
$cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
$session = JFactory::getSession();
$post_variables = array('merchantnumber' => $method->epay_merchant, 'instantcapture' => $method->epay_instantcapture, 'ownreceipt' => $method->epay_ownreceipt, 'group' => $method->epay_group, 'mailreceipt' => $method->epay_authmail, 'language' => $this->_getEpayLanguage(), 'orderid' => $order['details']['BT']->order_number, "amount" => $totalInPaymentCurrency * 100, "currency" => $currency_numeric_code, "accepturl" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "callbackurl" => JROUTE::_(JURI::root() . 'index.php?callback=1&option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "cancelurl" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "windowstate" => $method->epay_windowstate);
$hash = md5(implode($post_variables, "") . $method->epay_md5key);
// Prepare data that should be stored in the database
$dbValues['payment_name'] = $this->renderPluginName($method, $order);
$dbValues['order_number'] = $order['details']['BT']->order_number;
$dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;
$this->storePSPluginInternalData($dbValues);
// add spin image
$html = '<script type="text/javascript" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" charset="UTF-8"></script>';
$html .= '<script type="text/javascript">';
$html .= 'paymentwindow = new PaymentWindow({';
foreach ($post_variables as $name => $value) {
$html .= '\'' . $name . '\': "' . $value . '",';
}
$html .= '\'hash\': "' . $hash . '"';
$html .= '});';
$html .= '</script><input type="button" onclick="javascript: paymentwindow.open()" value="Go to payment" />';
$html .= ' <script type="text/javascript">';
$html .= ' paymentwindow.open();';
$html .= ' </script>';
// 2 = don't delete the cart, don't send email and don't redirect
$cart->_confirmDone = false;
$cart->_dataValidated = false;
$cart->setCartIntoSession();
JRequest::setVar('html', $html);
}
示例6: PayFastOneOffPostForm
function PayFastOneOffPostForm($orderInfo, $params = array())
{
$pConfig = oseMscConfig::getConfig('payment', 'obj');
$merchantId = $pConfig->payfast_merchant_id;
$merchantKey = $pConfig->payfast_merchant_key;
$html = array();
$test_mode = $pConfig->payfast_testmode;
if (!$test_mode) {
if (empty($merchantId) || empty($merchantKey)) {
$html['form'] = "";
$html['url'] = "";
return $html;
}
}
if ($test_mode == true) {
$merchantId = '10000100';
$merchantKey = '46f0cd694581a';
$url = "https://sandbox.payfast.co.za/eng/process";
} else {
$url = "https://www.payfast.co.za/eng/process";
}
$db = oseDB::instance();
$member = oseRegistry::call('member');
$member->instance($orderInfo->user_id);
$payment = oseRegistry::call('payment');
$paymentOrder = $payment->getInstance('Order');
$billinginfo = $paymentOrder->getBillingInfo($orderInfo->user_id);
$amount = $orderInfo->payment_price;
$currency = $orderInfo->payment_currency;
$order_id = $orderInfo->order_id;
$order_number = $orderInfo->order_number;
$user =& JFactory::getUser($orderInfo->user_id);
$orderInfoParams = oseJson::decode($orderInfo->params);
$cancelUrl = JURI::base() . "index.php";
$notifyUrl = JURI::base() . "components/com_osemsc/ipn/payfast_notify.php";
$returnUrl = urldecode(JROUTE::_(JURI::base() . "index.php?option=com_osemsc&view=thankyou&order_id=" . $orderInfo->order_id));
$returnUrl = $returnUrl ? $returnUrl : JURI::base() . "index.php?option=com_osemsc&view=member&result=success&amount={$amount}&ordernumber={$order_number}";
// Create description
$description = '';
$vendor_image_url = "";
$app =& JFactory::getApplication();
$currentSession = JSession::getInstance('none', array());
$stores = $currentSession->getStores();
$html['form'] = '<form action="' . $url . '" method="post">';
// Construct variables for post
$post_variables = array('merchant_id' => $merchantId, 'merchant_key' => $merchantKey, 'return_url' => $returnUrl, 'cancel_url' => $cancelUrl, 'notify_url' => $notifyUrl, 'name_first' => substr($billinginfo->firstname, 0, 100), 'name_last' => substr($billinginfo->lastname, 0, 100), 'email_address' => substr($billinginfo->email, 0, 255), 'item_name' => JText::_('Order ID: ') . $order_id, 'item_description' => $description, 'amount' => number_format($amount, 2, '.', ''), 'm_payment_id' => $order_id, 'currency_code' => $currency, 'custom_str1' => $order_number, 'user_agent' => 'Open Source Membership Control V5');
$html['form'] .= '<input type="image" id="payfast_image" name="cartImage" src="' . "components/com_osemsc/assets/images/checkout.png" . '" alt="' . JText::_('Click to pay with PayFast') . '" />';
// Process payment variables;
$html['url'] = $url . "?";
foreach ($post_variables as $name => $value) {
$html['form'] .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
$html['url'] .= $name . "=" . urlencode($value) . "&";
}
$html['form'] .= '</form>';
return $html;
}
示例7: panelButton
/**
* Display an image icon for the given image and create a link to the given link.
*
* @param string $link Link to use in the href tag
* @param string $image Name of the image file to display
* @param string $text Text to use for the image alt text and to display under the image.
* @param string $route internal links.
*/
public function panelButton($link, $imageclass, $text, $route = true)
{
if ($route === true) {
$link = JROUTE::_('index.php?option=com_virtuemart&view=' . $link . $this->tmpl);
}
$button = '<a class="span12 hasTooltip" title="' . $text . '" href="' . $link . '">';
$button .= '<i class="' . $imageclass . '"></i> ';
$button .= $text . '</a>';
echo $button;
}
示例8: init
function init()
{
global $gantry;
if ($this->get('enabled')) {
$gantry->addScript('gantry-morearticles.js');
$queryUrl = JROUTE::_($gantry->addQueryStringParams($gantry->getCurrentUrl($gantry->_setbyurl), array('tmpl' => 'component', 'type' => 'raw')));
$gantry->addInlineScript("window.addEvent('domready', function() { new GantryMoreArticles({'leadings': " . $this->_getCurrentLeadingArticles() . ", 'moreText': '" . addslashes($this->get('text')) . "', 'url': '" . $queryUrl . "'}); })");
if ($gantry->get('morearticles-pagination')) {
$gantry->addInlineStyle('.rt-pagination {display: none;}');
}
}
}
示例9: render
function render($position="") {
global $gantry;
ob_start();
?>
<div class="rt-block">
<span id="gantry-resetsettings">
<a href="<?php echo JROUTE::_($gantry->addQueryStringParams($gantry->getCurrentUrl($gantry->_setbyurl),array('reset-settings'=>''))); ?>"><?php echo $this->get('text'); ?></a>
</span>
</div>
<?php
return ob_get_clean();
}
示例10: QuickpayOneOffPay
function QuickpayOneOffPay($orderInfo, $params = array())
{
$pConfig = oseMscConfig::getConfig('payment', 'obj');
$merchant = $pConfig->quickpay_merchant;
$secret = $pConfig->quickpay_secret;
$test_mode = $pConfig->quickpay_testmode;
$cardtypelock = $pConfig->quickpay_cardtypelock;
$autocapture = $pConfig->quickpay_autocapture;
$autofee = $pConfig->quickpay_autofee;
$lang = empty($pConfig->quickpay_lang) ? 'en' : $pConfig->quickpay_lang;
$db = oseDB::instance();
$member = oseRegistry::call('member');
$member->instance($orderInfo->user_id);
$payment = oseRegistry::call('payment');
$paymentOrder = $payment->getInstance('Order');
$billinginfo = $paymentOrder->getBillingInfo($orderInfo->user_id);
$amount = $orderInfo->payment_price * 100;
$currency = $orderInfo->payment_currency;
$order_id = $orderInfo->order_id;
$order_number = $orderInfo->order_number;
$desc = self::generateDesc($order_id);
$user =& JFactory::getUser($orderInfo->user_id);
$order_id = sprintf("%04d", $order_id);
$orderInfoParams = oseJson::decode($orderInfo->params);
//$cancelUrl = JURI :: base()."index.php";
$notifyUrl = JURI::base() . "components/com_osemsc/ipn/quickpay_notify.php";
$returnUrl = urldecode(JROUTE::_(JURI::base() . "index.php?option=com_osemsc&view=thankyou&order_id=" . $orderInfo->order_id));
$returnUrl = $returnUrl ? $returnUrl : JURI::base() . "index.php?option=com_osemsc&view=member&result=success&amount={$amount}&ordernumber={$order_number}";
$date = oseHTML::getDateTime();
$url = "https://secure.quickpay.dk/form/";
$html['form'] = '<form action="' . $url . '" method="post">';
// Construct variables for post
$post_variables = array('protocol' => 5, 'msgtype' => 'authorize', 'merchant' => $merchant, 'language' => $lang, 'ordernumber' => $order_id, 'amount' => $amount, 'currency' => $currency, 'continueurl' => $returnUrl, 'continueurl' => $returnUrl, 'cancelurl' => $returnUrl, 'callbackurl' => $notifyUrl, 'autocapture' => $autocapture, 'autofee' => $autofee, 'cardtypelock' => $cardtypelock, 'description' => $desc, 'testmode' => $test_mode);
$md5String = '';
foreach ($post_variables as $name => $value) {
$md5String .= $value;
}
$md5String .= $secret;
$post_variables['md5check'] = md5($md5String);
//print_r($post_variables);exit;
$html['form'] .= '<input type="image" id="quickpay_image" name="cartImage" src="' . "components/com_osemsc/assets/images/checkout.png" . '" alt="' . JText::_('Click to pay with Quickpay') . '" />';
// Process payment variables;
$html['url'] = $url . "?";
foreach ($post_variables as $name => $value) {
$html['form'] .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
$html['url'] .= $name . "=" . urlencode($value) . "&";
}
$html['form'] .= '</form>';
return $html;
}
示例11: PagSeguroOneOffPay
function PagSeguroOneOffPay($orderInfo, $params = array())
{
require_once OSEMSC_B_LIB . DS . 'PagSeguroLibrary' . DS . 'PagSeguroLibrary.php';
$pConfig = oseMscConfig::getConfig('payment', 'obj');
$account = $pConfig->pagseguro_account;
$token = $pConfig->pagseguro_token;
$paymentRequest = new PaymentRequest();
$payment = oseRegistry::call('payment');
$paymentOrder = $payment->getInstance('Order');
$billinginfo = $paymentOrder->getBillingInfo($orderInfo->user_id);
$address = $billinginfo->addr1 . ' ' . $billinginfo->addr2;
$orderInfoParams = oseJson::decode($orderInfo->params);
$redirectUrl = urldecode(JROUTE::_(JURI::base() . "index.php?option=com_osemsc&view=thankyou&order_id=" . $orderInfo->order_id));
$redirectUrl = $redirectUrl ? $redirectUrl : JURI::root() . "index.php?option=com_osemsc&view=member";
$des = $this->generateDesc($orderInfo->order_id);
// Sets the currency
$paymentRequest->setCurrency($orderInfo->payment_currency);
// Add an item for this payment request
$paymentRequest->addItem($orderInfo->order_id, $des, 1, $orderInfo->payment_price);
// Sets a reference code for this payment request, it is useful to identify this payment in future notifications.
$paymentRequest->setReference($orderInfo->order_number);
// Sets shipping information for this payment request
$CODIGO_SEDEX = ShippingType::getCodeByType('SEDEX');
$paymentRequest->setShippingType($CODIGO_SEDEX);
$paymentRequest->setShippingAddress('', $address, $billinginfo->telephone, null, null, $billinginfo->city, $billinginfo->state, $billinginfo->country);
// Sets your customer information.
$paymentRequest->setSender($billinginfo->firstname . ' ' . $billinginfo->lastname, $billinginfo->email, null, null);
$redirectUrl = str_replace('https://', '', $redirectUrl);
$redirectUrl = str_replace('http://', '', $redirectUrl);
$paymentRequest->setRedirectUrl($redirectUrl);
$result = array();
$result['payment_method'] = 'pagseguro';
try {
$credentials = new AccountCredentials($account, $token);
$url = $paymentRequest->register($credentials);
$result['success'] = true;
$result['url'] = $url;
} catch (PagSeguroServiceException $e) {
$result['success'] = false;
$result['title'] = 'Error';
$result['content'] = $e->getMessage();
//$result['url'] = '';
}
return $result;
}
示例12: render
function render($position = "")
{
global $gantry;
ob_start();
?>
<div class="clear"></div>
<span id="gantry-resetsettings">
[ <a href="<?php
echo JROUTE::_($gantry->getCurrentUrl() . "reset-settings");
?>
"><?php
echo $this->get('text');
?>
</a> ]
</span>
<div class="clear"></div>
<?php
return ob_get_clean();
}
示例13: render
function render($position)
{
/** @var $gantry Gantry */
global $gantry;
ob_start();
?>
<div class="clear"></div>
<span id="gantry-resetsettings">
[ <a href="<?php
echo JROUTE::_($gantry->addQueryStringParams($gantry->getCurrentUrl($gantry->_setbyurl), array('reset-settings' => '')));
?>
" rel="nofollow"><?php
echo $this->get('text');
?>
</a> ]
</span>
<div class="clear"></div>
<?php
return ob_get_clean();
}
示例14: createHtml
public function createHtml(Email $email, $contato)
{
$html = file_get_contents($email->file_url);
preg_match_all('#<img.*?src="(.+?)".*?/>#', $html, $result);
for ($i = 0; $i < count($result[0]); $i++) {
$img = $result[0][$i];
$file = $result[1][$i];
$fileNew = $email->base_url . '/' . $file;
$imgNew = str_replace($file, $fileNew, $img);
$html = str_replace($img, $imgNew, $html);
}
$u =& JURI::getInstance();
$host = $u->getScheme() . '://' . $u->getHost();
$sid = $this->getSID($email->id, $contato);
preg_match('#<body.*?>#', $html, $result);
$link = $host . JROUTE::_('index.php?option=com_edesktop&view=mailing&layout=exibir&id=' . $email->id . '&e=' . $contato . '&sid=' . $sid . '&Itemid=200');
$linkTopo = $result[0] . '<center><font size="1" color="#000000" face="Arial">Caso não consiga visualizar este e-mail corretamente, <a href="' . $link . '" style="color:#0000ff;">clique aqui!</a></font></center><br />' . "\n";
$html = str_replace($result[0], $linkTopo, $html);
return $html;
}
示例15: display
function display($cachable = false, $urlparams = false)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$items = $this->get('Records');
// $Itemid = $app->input->getInt('Itemid');
$Itemid = JRequest::getInt('Itemid');
foreach ($items as $item) {
// Load individual item creator class.
$feeditem = new JFeedItem();
$feeditem->title = $item->title;
$feeditem->link = JROUTE::_('index.php?option=com_icagenda&view=list&layout=event&Itemid=' . (int) $Itemid . '&id=' . (int) $item->id);
// $feeditem->image = iCagendaThumb::sizeMedium($item->image);
// $feeditem->description = '<img src="' . $feeditem->image . '" alt="" style="margin: 5px; float: left;">' . $item->desc;
$feeditem->description = $item->desc;
$feeditem->date = $item->next;
$feeditem->category = $item->catid;
// Loads item information into RSS array
$document->addItem($feeditem);
}
}