• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JURI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: modifyAttrs

 function modifyAttrs($lnkAttrs, $imgAttrs, $group, $params)
 {
     $lnkAttrs['rel'] = 'sexylightbox';
     if ($group) {
         $lnkAttrs['rel'] .= '[' . $group . ']';
     }
     $link = $lnkAttrs['href'];
     $bgColor = $params->get('lightbox_bgColor');
     if ($this->isLink($link)) {
         $uri = new JURI($link);
         $uri->setVar('TB_iframe', 'true');
         $uri->setVar('height', intval($params->get('lightbox_height'), 10));
         $uri->setVar('width', intval($params->get('lightbox_width'), 10));
         if ($bgColor) {
             $uri->setVar('background', $bgColor);
         }
         $lnkAttrs['href'] = $uri->toString();
     } else {
         if ($bgColor) {
             $uri = new JURI($link);
             $uri->setVar('background', $bgColor);
             $lnkAttrs['href'] = $uri->toString();
         }
     }
     return parent::modifyAttrs($lnkAttrs, $imgAttrs, $group, $params);
 }
开发者ID:ashanrupasinghe,项目名称:slbcv1,代码行数:26,代码来源:class.Arisexylightbox.php


示例2: ajaxGetRender

 /**
  *
  * Ajax render to store in session
  */
 public function ajaxGetRender()
 {
     /** load libraries for the system rener **/
     JSNFactory::localimport('libraries.joomlashine.mode.rawmode');
     JSNFactory::localimport('libraries.joomlashine.menu.menuitems');
     /** get url **/
     $render_url = JRequest::getVar('render_url', '');
     $urlRender = base64_decode($render_url);
     $session = JSession::getInstance('files', array('name' => 'jsnpoweradmin'));
     if ($render_url == '') {
         $urlRender = JSNDatabase::getDefaultPage()->link;
     }
     $currUri = new JURI($urlRender);
     if (!$currUri->hasVar('Itemid')) {
         $currUri->setVar('Itemid', JSNDatabase::getDefaultPage()->id);
     }
     $urlString = $currUri->toString();
     $session->set('rawmode_render_url', base64_encode($urlString));
     $parts = JString::parse_url($urlString);
     if (!empty($parts['query'])) {
         parse_str($parts['query'], $params);
     } else {
         $params = array();
     }
     $jsntemplate = JSNFactory::getTemplate();
     $jsnrawmode = JSNRawmode::getInstance($params);
     $jsnrawmode->setParam('positions', $jsntemplate->loadXMLPositions());
     $jsnrawmode->renderAll();
     $session = JSession::getInstance('files', array('name' => 'jsnajaxgetrender'));
     $session->set('component', $jsnrawmode->getHTML('component'));
     $session->set('jsondata', $jsnrawmode->getScript('positions', 'JSON'));
     jexit('success');
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:37,代码来源:rawmode.php


示例3: checkLogin

 function checkLogin()
 {
     global $mainframe;
     DEFINE('GOTOSTARTPAGE_COOKIE', 'ap_gotostartpage');
     DEFINE('LOGINPAGELOCATION_COOKIE', 'ap_loginpagelocation');
     DEFINE('STARTPAGE_COOKIE', 'ap_startpage');
     $gotostartpage = @$_COOKIE[GOTOSTARTPAGE_COOKIE];
     if ($gotostartpage) {
         setcookie(GOTOSTARTPAGE_COOKIE, 0);
         $uri = JFactory::getURI();
         $url = $uri->toString();
         $loginpagelocation = @$_COOKIE[LOGINPAGELOCATION_COOKIE];
         $loginpagelocationuri = new JURI($loginpagelocation);
         $query = $loginpagelocationuri->getQuery();
         if ($query && strpos($query, 'com_login') === FALSE) {
             if ($loginpagelocation && $url != $loginpagelocation) {
                 $mainframe->redirect($loginpagelocation);
             }
         } else {
             $startpage = @$_COOKIE[STARTPAGE_COOKIE];
             if ($startpage && $url != $startpage) {
                 $mainframe->redirect($startpage);
             }
         }
     }
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:26,代码来源:helper.php


示例4: getList

 /**
  * Function for getting the list of languages
  *
  * @return	array  Language list
  */
 public static function getList()
 {
     $app = JFactory::getApplication();
     $languages = JLanguageHelper::getLanguages();
     $db = JFactory::getDbo();
     $Itemid = $app->input->getInt('Itemid', 0);
     $uri = new JURI(Juri::current());
     $uri->delVar('lang');
     $uri->delVar('Itemid');
     $location = htmlspecialchars($uri->getQuery());
     if (!empty($location)) {
         $location .= '&';
     }
     if (!$Itemid) {
         $active = $app->getMenu()->getActive();
         if ($active) {
             $Itemid = $active->id;
         }
     }
     // For every language we load menu items language specific alias and params
     foreach ($languages as $i => $language) {
         $db->forceLanguageTranslation = $language->lang_code;
         RMenu::resetJoomlaMenuItems();
         $db->forceLanguageTranslation = false;
         $languages[$i]->active = $language->lang_code == JFactory::getLanguage()->getTag();
         $languages[$i]->link = RRoute::_('index.php?' . $location . 'lang=' . $language->sef . ($Itemid > 0 ? '&Itemid=' . $Itemid : ''));
     }
     // After we are done we reset it the way it was
     RMenu::resetJoomlaMenuItems();
     return $languages;
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:36,代码来源:helper.php


示例5: getUri

 public static function getUri($layout = null)
 {
     $uri = new JURI('index.php?option=com_kunena&view=announcement');
     if ($layout) {
         $uri->setVar('layout', $layout);
     }
     return $uri;
 }
开发者ID:laiello,项目名称:senluonirvana,代码行数:8,代码来源:helper.php


示例6: updateWeekend

 /**
  * Update the current walk with passed in form data
  */
 public function updateWeekend(array $formData)
 {
     $this->loadWeekend($formData['id']);
     // Update all basic fields
     // Fields that can't be saved are just ignored
     // Invalid fields throw an exception - display this to the user and continue
     foreach ($formData as $name => $value) {
         try {
             $this->weekend->{$name} = $value;
         } catch (UnexpectedValueException $e) {
             // TODO: Error message
             echo "<p>";
             var_dump($name);
             var_dump($value);
             var_dump($e->getMessage());
             echo "</p>";
         }
     }
     // Date fields need to be converted
     if (!empty($formData['startdate'])) {
         $this->weekend->start = strtotime($formData['startdate']);
     } else {
         $this->weekend->start = null;
     }
     if (!empty($formData['enddate'])) {
         $this->weekend->endDate = strtotime($formData['enddate']);
     } else {
         $this->weekend->endDate = null;
     }
     // Alterations
     $this->weekend->alterations->incrementVersion();
     $this->weekend->alterations->setDetails(!empty($formData['alterations_details']));
     $this->weekend->alterations->setCancelled(!empty($formData['alterations_cancelled']));
     $this->weekend->alterations->setOrganiser(!empty($formData['alterations_organiser']));
     $this->weekend->alterations->setDate(!empty($formData['alterations_date']));
     if ($this->weekend->isValid()) {
         $this->weekend->save();
         // Redirect to the list page
         $itemid = JRequest::getInt('returnPage');
         if (empty($itemid)) {
             return false;
         }
         $item = JFactory::getApplication()->getMenu()->getItem($itemid);
         $link = new JURI("/" . $item->route);
         // Jump to the event?
         if (JRequest::getBool('jumpToEvent')) {
             $link->setFragment("weekend_" . $this->weekend->id);
         }
         JFactory::getApplication()->redirect($link, "Weekend saved");
     }
 }
开发者ID:SheffieldWalkingGroup,项目名称:swgwebsite,代码行数:54,代码来源:addeditweekend.php


示例7: updateWI

 /**
  * Update the current walk with passed in form data
  */
 public function updateWI(array $formData)
 {
     // Load an existing walk instance (if any)
     if (!empty($formData['id'])) {
         $factory = SWG::walkInstanceFactory();
         $this->wi = $factory->getSingle($formData['id']);
     } else {
         $this->wi = new WalkInstance();
     }
     // Update all basic fields
     // Fields that can't be saved are just ignored
     // Invalid fields throw an exception - display this to the user and continue
     foreach ($formData as $name => $value) {
         try {
             $this->wi->{$name} = $value;
         } catch (UnexpectedValueException $e) {
             echo "<p>";
             var_dump($name);
             var_dump($value);
             var_dump($e->getMessage());
             echo "</p>";
         }
     }
     // Now do the fields that have to be done separately
     // Date & time
     $this->wi->start = strtotime($formData['date'] . " " . $formData['meetTime']);
     // Alterations
     $this->wi->alterations->incrementVersion();
     $this->wi->alterations->setDetails($formData['alterations_details']);
     $this->wi->alterations->setCancelled($formData['alterations_cancelled']);
     $this->wi->alterations->setPlaceTime($formData['alterations_placeTime']);
     $this->wi->alterations->setOrganiser($formData['alterations_organiser']);
     $this->wi->alterations->setDate($formData['alterations_date']);
     if ($this->wi->isValid()) {
         $this->wi->save();
         // Redirect to the list page
         $itemid = JRequest::getInt('returnPage');
         if (empty($itemid)) {
             return false;
         }
         $item = JFactory::getApplication()->getMenu()->getItem($itemid);
         $link = new JURI("/" . $item->route);
         // Jump to the event?
         if (JRequest::getBool('jumpToEvent')) {
             $link->setFragment("walk_" . $this->wi->id);
         }
         JFactory::getApplication()->redirect($link, "Walk scheduled");
     } else {
     }
 }
开发者ID:SheffieldWalkingGroup,项目名称:swgwebsite,代码行数:53,代码来源:schedulewalk.php


示例8: fetchHead

 public static function fetchHead($params, $module)
 {
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $template = $mainframe->getTemplate();
     JHTML::_('behavior.framework');
     $language = JFactory::getLanguage();
     $mapApi = 'http://maps.google.com/maps/api/js?sensor=true&language=' . $language->getTag();
     if ($params->get('weather')) {
         $mapApi .= '&libraries=weather';
     }
     $document->addScript($mapApi);
     if (file_exists(JPATH_BASE . '/templates/' . $template . '/html/mod_bt_googlemaps/js/default.js')) {
         $document->addScript(JURI::root() . 'templates/' . $template . '/html/mod_bt_googlemaps/js/default.js');
     } else {
         $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/btbase64.min.js');
         if ($params->get('enable-custom-infobox')) {
             $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/infobox.js');
         }
         $document->addScript(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/js/default.js');
     }
     if (file_exists(JPATH_BASE . '/templates/' . $template . '/html/mod_bt_googlemaps/css/styles.css')) {
         $document->addStyleSheet(JURI::root() . 'templates/' . $template . '/html/mod_bt_googlemaps/css/style.css');
     } else {
         $document->addStyleSheet(JURI::root() . 'modules/mod_bt_googlemaps/tmpl/css/style.css');
     }
 }
开发者ID:Tommar,项目名称:vino2,代码行数:27,代码来源:helper.php


示例9: fetchElement

 /**
  * fetch Element 
  */
 function fetchElement($name, $values, &$node, $control_name)
 {
     $mediaPath = JURI::root() . str_replace(DS, '/', str_replace(JPATH_ROOT, '', dirname(dirname(dirname(__FILE__))))) . '/assets/';
     JHTML::stylesheet('form.css', $mediaPath);
     $attributes = $node->attributes();
     $class = isset($attributes['group']) && trim($attributes['group']) == 'end' ? 'lof-end-group' : 'lof-group';
     $title = isset($attributes['title']) ? JText::_($attributes['title']) : 'Group';
     $title = isset($attributes['title']) ? JText::_($attributes['title']) : '';
     $for = isset($attributes['for']) ? $attributes['for'] : '';
     if (isset($attributes['onoff'])) {
         // echo $control_name; die;
         // echo $name; die;
         //	echo '<pre>'.print_r($values,1); die;
         $string = '<div ' . ($title ? "" : 'style="display:none"') . '  class="' . $class . '" title="' . $for . '">';
         $checked = $values ? 'checked="checked"' : "";
         //	echo $checked; die;
         $string .= '<input type="checkbox" class="lof-onoff" id="params' . $for . '" value="" ' . $checked . ' name="' . $control_name . '[' . $for . ']" /><b>' . $title . '</b></div>';
         return $string;
     } else {
         $string = '<div ' . ($title ? "" : 'style="display:none"') . '  class="' . $class . '" title="' . $for . '">' . $title . '</div>';
         if (!defined('LOF_ADDED_TIME')) {
             $string .= '<input type="hidden" class="text_area" value="' . time() . '" id="paramsmain_lof_added_time" name="params[lof_added_time]">';
             define('LOF_ADDED_TIME', 1);
         }
     }
     if (!defined('ADD_MEDIA_CONTROL')) {
         define('ADD_MEDIA_CONTROL', 1);
         $uri = str_replace(DS, "/", str_replace(JPATH_SITE, JURI::base(), dirname(__FILE__)));
         $uri = str_replace("/administrator/", "", $uri);
         JHTML::stylesheet('form.css', $uri . "/media/");
         JHTML::script('form.js', $uri . "/media/");
     }
     return $string;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:37,代码来源:fgroup.php


示例10: fetchButton

 function fetchButton($type = 'Acyactions')
 {
     $url = JURI::base() . "index.php?option=com_acymailing&ctrl=filter&tmpl=component";
     $top = 0;
     $left = 0;
     $width = 700;
     $height = 500;
     $text = JText::_('ACTIONS');
     if (!ACYMAILING_J30) {
         $class = "icon-32-acyaction";
     } else {
         $class = "icon-14-acyaction";
     }
     $js = "\r\nfunction getAcyActionUrl() {\r\n\ti = 0;\r\n\tmylink = 'index.php?option=com_acymailing&ctrl=filter&tmpl=component&subid=';\r\n\twhile(window.document.getElementById('cb'+i)){\r\n\t\tif(window.document.getElementById('cb'+i).checked)\r\n\t\t\tmylink += window.document.getElementById('cb'+i).value+',';\r\n\t\ti++;\r\n\t}\r\n\treturn mylink;\r\n}\r\n";
     $doc = JFactory::getDocument();
     $doc->addScriptDeclaration($js);
     if (!ACYMAILING_J30) {
         JHTML::_('behavior.modal', 'a.modal');
         return '<a href="' . $url . '" class="modal" onclick="this.href=getAcyActionUrl();" rel="{handler: \'iframe\', size: {x: ' . $width . ', y: ' . $height . '}}"><span class="' . $class . '" title="' . $text . '"></span>' . $text . '</a>';
     }
     $html = '<button class="btn btn-small modal" data-toggle="modal" data-target="#modal-' . $type . '"><i class="' . $class . '"></i> ' . $text . '</button>';
     $params['title'] = $text;
     $params['url'] = '\'+getAcyActionUrl()+\'';
     //$url;
     $params['height'] = $height;
     $params['width'] = $width;
     $modalHtml = JHtml::_('bootstrap.renderModal', 'modal-' . $type, $params);
     $html .= str_replace(array('id="modal-' . $type . '"'), array('id="modal-' . $type . '" style="width:' . ($width + 20) . 'px;height:' . ($height + 90) . 'px;margin-left:-' . ($width + 20) / 2 . 'px"'), $modalHtml);
     $html .= '<script>' . "\r\n" . 'jQuery(document).ready(function(){jQuery("#modal-' . $type . '").appendTo(jQuery(document.body));});' . "\r\n" . '</script>';
     return $html;
 }
开发者ID:freaqzilla,项目名称:joomla-site,代码行数:31,代码来源:acyactions.php


示例11: foreach

 function &getItem($translation = null)
 {
     $table = clone parent::getItem();
     // I could pick up the URL here or treat as a special content element field type?
     if ($table->type == 'component') {
         // Note that to populate the initial value of the urlparams
         $conf = JFactory::getConfig();
         $elementTable = $conf->get('falang.elementTable', false);
         foreach ($elementTable->Fields as $efield) {
             if ($efield->Name == "link" && isset($efield->translationContent->value) && $efield->translationContent->value !== "") {
                 $uri = new JURI($efield->translationContent->value);
                 if ($uri->getVar("option", false)) {
                     $table->link = $efield->translationContent->value;
                 }
             }
         }
         $url = str_replace('index.php?', '', $table->link);
         $url = str_replace('&amp;', '&', $url);
         $table->linkparts = null;
         if (strpos($url, '&amp;') !== false) {
             $url = str_replace('&amp;', '&', $url);
         }
         parse_str($url, $table->linkparts);
         $db = $this->getDBO();
         if ($component = @$table->linkparts['option']) {
             $query = 'SELECT `extension_id`' . ' FROM `#__extensions`' . ' WHERE `element` = "' . $db->escape($component) . '"';
             $db->setQuery($query);
             $table->componentid = $db->loadResult();
         }
     }
     $item = $table;
     return $item;
 }
开发者ID:shuramita,项目名称:anhquanggffl,代码行数:33,代码来源:JFMenusModelItem.php


示例12: checkAclViolation

 public function checkAclViolation($data)
 {
     $redirectUrl = XiptRoute::_($this->getRedirectUrl());
     $redirectURI = new JURI($redirectUrl);
     $redirectVar = $redirectURI->getQuery(true);
     foreach ($redirectVar as $key => $value) {
         if (array_key_exists($key, $data)) {
             if ($value != $data[$key]) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:14,代码来源:redirect.php


示例13: __construct

 public function __construct($component, $componentParams, $article, $articleParams, $properties)
 {
     parent::__construct($component, $componentParams, $article, $articleParams);
     $this->print = isset($properties['print']) ? $properties['print'] : '';
     $this->pageHeading = $this->_componentParams->get('show_page_heading', 1) ? $this->_componentParams->get('page_heading') : '';
     $this->titleLink = $this->_articleParams->get('link_titles') && !empty($this->_article->readmore_link) ? $this->_article->readmore_link : '';
     $this->emailIconVisible = $this->emailIconVisible && !$this->print;
     $this->editIconVisible = $this->editIconVisible && !$this->print;
     $this->categoryLink = $this->_articleParams->get('link_category') && $this->_article->catslug ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->_article->catslug)) : '';
     $this->category = $this->_articleParams->get('show_category') ? $this->_article->category_title : '';
     $this->categoryLink = $this->_articleParams->get('link_category') && $this->_article->catslug ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->_article->catslug)) : '';
     $this->parentCategory = $this->_articleParams->get('show_parent_category') && $this->_article->parent_slug != '1:root' ? $this->_article->parent_title : '';
     $this->parentCategoryLink = $this->_articleParams->get('link_parent_category') && $this->_article->parent_slug ? JRoute::_(ContentHelperRoute::getCategoryRoute($this->_article->parent_slug)) : '';
     $this->author = $this->_articleParams->get('show_author') && !empty($this->_article->author) ? $this->_article->created_by_alias ? $this->_article->created_by_alias : $this->_article->author : '';
     if (strlen($this->author) && $this->_articleParams->get('link_author')) {
         $needle = 'index.php?option=com_contact&view=contact&id=' . $this->_article->contactid;
         $menu = JFactory::getApplication()->getMenu();
         $item = $menu->getItems('link', $needle, true);
         $this->authorLink = !empty($item) ? $needle . '&Itemid=' . $item->id : $needle;
     } else {
         $this->authorLink = '';
     }
     $this->toc = isset($this->_article->toc) ? $this->_article->toc : '';
     $this->text = $this->_articleParams->get('access-view') ? $this->_article->text : '';
     $user = JFactory::getUser();
     $this->introVisible = !$this->_articleParams->get('access-view') && $this->_articleParams->get('show_noauth') && $user->get('guest');
     $this->intro = $this->_article->introtext;
     if (!$this->_articleParams->get('access-view') && $this->_articleParams->get('show_noauth') && $user->get('guest') && $this->_articleParams->get('show_readmore') && $this->_article->fulltext != null) {
         $attribs = json_decode($this->_article->attribs);
         if ($attribs->alternative_readmore == null) {
             $this->readmore = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
         } elseif ($this->readmore = $this->_article->alternative_readmore) {
             if ($this->_articleParams->get('show_readmore_title', 0) != 0) {
                 $this->readmore .= JHtml::_('string.truncate', $this->_article->title, $this->_articleParams->get('readmore_limit'));
             }
         } elseif ($this->_articleParams->get('show_readmore_title', 0) == 0) {
             $this->readmore = JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
         } else {
             $this->readmore = JText::_('COM_CONTENT_READ_MORE') . JHtml::_('string.truncate', $this->_article->title, $this->_articleParams->get('readmore_limit'));
         }
         $link = new JURI(JRoute::_('index.php?option=com_users&view=login'));
         $this->readmoreLink = $link->__toString();
     } else {
         $this->readmore = '';
         $this->readmoreLink = '';
     }
     $this->paginationPosition = isset($this->_article->pagination) && $this->_article->pagination && isset($this->_article->paginationposition) ? ($this->_article->paginationposition ? 'below' : 'above') . ' ' . ($this->_article->paginationrelative ? 'full article' : 'text') : '';
     $this->showLinks = isset($this->_article->urls) && is_string($this->_article->urls) && !empty($this->_article->urls);
 }
开发者ID:sealse,项目名称:mondiale,代码行数:49,代码来源:SingleArticle.php


示例14: parseRoute

 /**
  * Method to parse the router
  *
  * @param   JRouter  $router  JRouter instance
  * @param   JURI     $uri     Current JURI instance
  *
  * @return array
  */
 public function parseRoute($router, $uri)
 {
     $path = $uri->getPath();
     $segments = explode('/', $path);
     $alias = end($segments);
     if (preg_match('/^([0-9])\\-/', $alias) == false) {
         $alias = preg_replace('/\\-$/', '', $alias);
         $slug = $this->getSlugByAlias($alias);
         if (!empty($slug)) {
             $path = str_replace($alias, $slug, $path);
             $uri->setPath($path);
         }
     }
     return array();
 }
开发者ID:pjasmits,项目名称:JoomlaPluginsBook,代码行数:23,代码来源:ch06test04.php


示例15: getBlogItemLink

function getBlogItemLink($item)
{
    if ($item->params->get('access-view')) {
        $link = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
    } else {
        $menu = JFactory::getApplication()->getMenu();
        $active = $menu->getActive();
        $itemId = $active->id;
        $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
        $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
        $link = new JURI($link1);
        $link->setVar('return', base64_encode(urlencode($returnURL)));
    }
    return $link;
}
开发者ID:kylephp,项目名称:wright,代码行数:15,代码来源:com_content.helper.php


示例16: onTP_GetHTML

 /**
  * RETURN PAY HTML FORM
  * */
 function onTP_GetHTML($vars)
 {
     $vars = $this->preFormatingData($vars);
     $plgPaymentEpaydkHelper = new plgPaymentEpaydkHelper();
     // Split the name in first and last name
     $user = JFactory::getUser();
     $nameParts = $user->name;
     // explode(' ', $user->name, 2);
     $firstName = $user->name;
     $lastName = $user->name;
     // Get the base URL without the path
     $rootURL = rtrim(JURI::base(), '/');
     $subpathURL = JURI::base(true);
     if (!empty($subpathURL) && $subpathURL != '/') {
         $rootURL = substr($rootURL, 0, -1 * strlen($subpathURL));
     }
     // Separate URL variable as it cannot be a part of the md5 checksum
     $url = $this->getPaymentURL();
     $data = array('merchant' => $this->getMerchantID(), 'success' => $vars->return, 'cancel' => $vars->cancel_return, 'postback' => $vars->notify_url, 'orderid' => $vars->order_id, 'currency' => strtoupper($vars->currency_code), 'amount' => $vars->amount * 100, 'cardtypes' => implode(',', $this->params->get('cardtypes', array())), 'instantcapture' => '1', 'instantcallback' => '1', 'language' => $this->params->get('language', '0'), 'ordertext' => 'Order id' . ' - [ ' . $vars->order_id . ' ]', 'windowstate' => '3', 'ownreceipt' => '0', 'md5' => $this->params->get('secret', ''));
     if ($this->params->get('md5', 1)) {
         // Security hash - must be compiled from ALL inputs sent
         $data['md5'] = md5(implode('', $data));
     } else {
         $data['md5'] = '';
     }
     $data['actionURL'] = $url;
     // dont make md5
     $data['submiturl'] = $vars->submiturl;
     // Set array as object for compatability
     $data = (object) $data;
     $html = $this->buildLayout($data);
     return $html;
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:36,代码来源:epaydk.php


示例17: getInput

 /**
  * Method to get the field input markup for a generic list.
  * Use the multiple attribute to enable multiselect.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     $document = JFactory::getDocument();
     $jsPath = JURI::root(true) . '/modules/mod_currentdatetime/js';
     $joomlaVersion = new JVersion();
     if ($joomlaVersion->isCompatible('3')) {
         JHtml::_('jquery.ui', array('core', 'sortable'));
     } else {
         $document->addStyleSheet($jsPath . '/25/css/chosen.min.css');
         $document->addScript($jsPath . '/25/jquery.min.js');
         $document->addScript($jsPath . '/25/jquery-noconflict.js');
         $document->addScript($jsPath . '/25/chosen.jquery.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.core.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.widget.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.mouse.min.js');
         $document->addScript($jsPath . '/25/jquery.ui.sortable.min.js');
     }
     $document->addScript($jsPath . '/jquery-chosen-sortable.min.js');
     $script = 'jQuery(function(){jQuery(".chzn-sortable").chosen().chosenSortable();});';
     $document->addScriptDeclaration($script);
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $html = parent::getInput();
     return $html;
 }
开发者ID:abdullah929,项目名称:bulletin,代码行数:34,代码来源:items.php


示例18: getMessage

 function getMessage($extension = '', $xml = '', $version = '', $addmargin = 0)
 {
     if (!$extension || !$xml && !$version) {
         return;
     }
     $alias = preg_replace('#[^a-z\\-]#', '', str_replace('?', '-', strtolower($extension)));
     if ($xml) {
         $xml = JApplicationHelper::parseXMLInstallFile(JPATH_SITE . DS . str_replace('/', DS, $xml));
         if ($xml && isset($xml['version'])) {
             $version = $xml['version'];
         }
     }
     if (!$version) {
         return;
     }
     JHTML::_('behavior.mootools');
     $document =& JFactory::getDocument();
     $document->addScript(JURI::root(true) . '/plugins/system/nonumberelements/js/script.js?v=' . $this->_version);
     $url = 'http://www.nonumber.nl/ext/version.php?ext=' . $alias . '&version=' . $version;
     $script = "\n\t\t\twindow.addEvent( 'domready', function() {\n\t\t\t\tnnScripts.loadajax(\n\t\t\t\t\t'" . $url . "',\n\t\t\t\t\t'nnScripts.displayVersion( \\'" . $alias . "\\', data )',\n\t\t\t\t\t'nnScripts.displayVersion( \\'" . $alias . "\\', \\'\\' )'\n\t\t\t\t);\n\t\t\t});\n\t\t";
     $document->addScriptDeclaration($script);
     $msg = html_entity_decode(JText::sprintf('NN_A_NEWER_VERSION_IS_AVAILABLE', 'http://www.nonumber.nl/' . $alias . '/download', '<span id="nonumber_newversionnumber_' . $alias . '"></span>', $version), ENT_COMPAT, 'UTF-8');
     $margin = $addmargin ? '10px;' : '3px;';
     $msg = '<div style="border:3px solid #F0DC7E;color:#CC0000;margin-bottom:' . $margin . '"><div style="padding: 2px 5px;background-color:#EFE7B8">' . $msg . '</div></div>';
     $msg = '<div id="nonumber_version_' . $alias . '" style="display: none;">' . $msg . '</div>';
     return $msg;
 }
开发者ID:jtresca,项目名称:nysurveyor,代码行数:27,代码来源:versions.php


示例19: sendMemberDaytimeToAdmin

 function sendMemberDaytimeToAdmin($member_id, $service_id, $daytime_id)
 {
     define("BodyMemberDaytimeToAdmin", "<h1>Nouvelle inscription à une tranche horaire</h1><p>Un bénévole s'est inscrit à un secteur / tranche horaire.</p><p><strong>Nom :</strong> %s <br /><strong>Secteur :</strong> %s<br /><strong>Date :</strong> %s<br /><strong>Tranche horaire :</strong> %s</p><p><a href=\"" . JURI::root() . "/administrator/index.php?option=com_estivole&view=member&layout=edit&member_id=%s\">Cliquez ici</a> pour valider l'inscription et/ou recontacter le bénévole.</p>");
     define("SubjectMemberDaytimeToAdmin", "Nouvelle inscription à une tranche horaire");
     $db = JFactory::getDBO();
     $query = $db->getQuery(TRUE);
     $this->user = JFactory::getUser();
     // Get the dispatcher and load the user's plugins.
     $dispatcher = JEventDispatcher::getInstance();
     JPluginHelper::importPlugin('user');
     $data = new JObject();
     $data->id = $this->user->id;
     // Trigger the data preparation event.
     $dispatcher->trigger('onContentPrepareData', array('com_users.profilestivole', &$data));
     $userProfilEstivole = $data;
     $userName = $userProfilEstivole->profilestivole['firstname'] . ' ' . $userProfilEstivole->profilestivole['lastname'];
     $query->select('*');
     $query->from('#__estivole_members as b, #__estivole_services as s, #__estivole_daytimes as d');
     $query->where('b.member_id = ' . (int) $member_id);
     $query->where('s.service_id = ' . (int) $service_id);
     $query->where('d.daytime_id = ' . (int) $daytime_id);
     $db->setQuery($query);
     $mailModel = $db->loadObject();
     $mail = JFactory::getMailer();
     $mail->setBody(sprintf(constant("BodyMemberDaytimeToAdmin"), $userName, $mailModel->service_name, date('d-m-Y', strtotime($mailModel->daytime_day)), date('H:i', strtotime($mailModel->daytime_hour_start)) . ' - ' . date('H:i', strtotime($mailModel->daytime_hour_end)), $mailModel->member_id));
     $mail->setSubject(constant("SubjectMemberDaytimeToAdmin"));
     $mail->isHtml();
     $recipient = array('[email protected]', $mailModel->email_responsable);
     $mail->addRecipient($recipient);
     $mail->Send('[email protected]');
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:31,代码来源:mail.php


示例20: onAfterInitialise

 /**
  * Routes URLs
  *
  * @access public
  */
 function onAfterInitialise()
 {
     global $mainframe;
     $uri =& JURI::getInstance();
     $router =& $mainframe->getRouter();
     $router->attachParseRule('parseJumiRouter');
 }
开发者ID:jennycraig,项目名称:jumi,代码行数:12,代码来源:jumirouter.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JUcmType类代码示例发布时间:2022-05-23
下一篇:
PHP JUDownloadHelper类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap