当前位置: 首页>>代码示例>>PHP>>正文


PHP SEFLink函数代码示例

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


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

示例1: getSubCategories

 function getSubCategories($parentId, $order = 'id', $ordering = 'asc', $publish = 0)
 {
     $lang = JSFactory::getLang();
     $user = JFactory::getUser();
     $add_where = $publish ? " AND category_publish = '1' " : "";
     $groups = implode(',', $user->getAuthorisedViewLevels());
     $add_where .= ' AND access IN (' . $groups . ')';
     if ($order == "id") {
         $orderby = "category_id";
     }
     if ($order == "name") {
         $orderby = "`" . $lang->get('name') . "`";
     }
     if ($order == "ordering") {
         $orderby = "ordering";
     }
     if (!$orderby) {
         $orderby = "ordering";
     }
     $query = "SELECT `" . $lang->get('name') . "` as name,`" . $lang->get('description') . "` as description,`" . $lang->get('short_description') . "` as short_description, category_id, category_publish, ordering, category_image FROM `#__jshopping_categories`\n                   WHERE category_parent_id = '" . $this->_db->escape($parentId) . "' " . $add_where . "\n                   ORDER BY " . $orderby . " " . $ordering;
     $this->_db->setQuery($query);
     $categories = $this->_db->loadObjectList();
     foreach ($categories as $key => $value) {
         $categories[$key]->category_link = SEFLink('index.php?option=com_jshopping&controller=category&task=view&category_id=' . $categories[$key]->category_id, 1);
     }
     return $categories;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:27,代码来源:category.php

示例2: getAllManufacturers

 function getAllManufacturers($publish = 0, $order = "ordering", $dir = "asc")
 {
     $lang = JSFactory::getLang();
     $db = JFactory::getDBO();
     if ($order == "id") {
         $orderby = "manufacturer_id";
     }
     if ($order == "name") {
         $orderby = "name";
     }
     if ($order == "ordering") {
         $orderby = "ordering";
     }
     if (!$orderby) {
         $orderby = "ordering";
     }
     $query_where = $publish ? "WHERE manufacturer_publish = '1'" : "";
     $query = "SELECT manufacturer_id, manufacturer_url, manufacturer_logo, manufacturer_publish, `" . $lang->get('name') . "` as name, `" . $lang->get('description') . "` as description,  `" . $lang->get('short_description') . "` as short_description\n\t\t\t\t  FROM `#__jshopping_manufacturers` {$query_where} ORDER BY " . $orderby . " " . $dir;
     $db->setQuery($query);
     $list = $db->loadObjectList();
     foreach ($list as $key => $value) {
         $list[$key]->link = SEFLink('index.php?option=com_jshopping&controller=manufacturer&task=view&manufacturer_id=' . $list[$key]->manufacturer_id);
     }
     extract(js_add_trigger(get_defined_vars(), "after"));
     return $list;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:26,代码来源:manufacturer.php

示例3: loadOrderLink

 private function loadOrderLink()
 {
     $jshopConfig = JSFactory::getConfig();
     foreach ($this->list as $key => $value) {
         $this->list[$key]->order_href = SEFLink('index.php?option=com_jshopping&controller=user&task=order&order_id=' . $value->order_id, 0, 0, $jshopConfig->use_ssl);
     }
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:7,代码来源:userorders.php

示例4: onBeforeAddProductToCart

 public function onBeforeAddProductToCart($cart, &$product_id, &$quantity, &$attr_id, &$freeattributes, &$updateqty, &$errors, &$displayErrorMessage, &$additional_fields, &$usetriggers)
 {
     $cart->clear();
     $date_from = $this->DateToUnix($freeattributes[1]);
     $date_to = $this->DateToUnix($freeattributes[2]);
     $db = JFactory::getDBO();
     //проверяем не фейковая ли это квартира
     $field = 'extra_field_' . $this->fake_extra_field_id;
     $query = "SELECT `{$field}` FROM `#__jshopping_products` WHERE `product_id` = {$product_id}";
     $db->setQuery($query);
     $value = $db->loadResult();
     //var_dump($value);die;
     if ($value == $this->fake_yes_extra_field_value) {
         $mainframe = JFactory::getApplication();
         JError::raiseNotice(100, _JSHOP_OBJECT_IS_BOOKED);
         $category_id = JRequest::getInt('category_id');
         $mainframe->redirect(SEFLink('index.php?option=com_jshopping&controller=product&task=view&category_id=' . $category_id . '&product_id=' . $product_id, 1, 1));
         return;
     }
     //проверяем доступность по датам
     $query = "SELECT `product_id`, `dfrom`, `dto` FROM `#__jshopping_order_bookings` WHERE (`product_id` = {$product_id}) AND (`dfrom` > " . time() . ") ORDER BY `order_id` DESC";
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     foreach ($rows as $row) {
         $order_date_from = $row->dfrom;
         $order_date_to = $row->dto;
         if ($date_from >= $order_date_from && $date_from <= $order_date_to || $date_to >= $order_date_from && $date_to <= $order_date_to) {
             $mainframe = JFactory::getApplication();
             JError::raiseNotice(100, _JSHOP_OBJECT_IS_BOOKED);
             $category_id = JRequest::getInt('category_id');
             $mainframe->redirect(SEFLink('index.php?option=com_jshopping&controller=product&task=view&category_id=' . $category_id . '&product_id=' . $product_id, 1, 1));
             break;
         }
     }
 }
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:35,代码来源:check_availability_booking.php

示例5: chekBookingBeforeSave

 /**
  * отправляется запрос в базу локального сервера для окончательной проверки доступности для бронирования
  */
 public function chekBookingBeforeSave(&$order, &$cart)
 {
     $db_local = JDatabase::getInstance(VipLocalApi::getDbConnectOptions());
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     $adv_user = JSFactory::getUser();
     $adv_user = JSFactory::getTable('usershop', 'jshop');
     $adv_user->load($user->id);
     $order->country = $adv_user->country;
     $order->f_name = $adv_user->f_name;
     $order->l_name = $adv_user->l_name;
     $order->email = $adv_user->email;
     $order->phone = $adv_user->phone;
     //		echo'<pre>';print_r($user);echo'</pre>';//die;
     //		echo'<pre>';print_r($adv_user);echo'</pre>';//die;
     //		echo'<pre>';print_r($order);echo'</pre>';die;
     $product_id_local = $cart->products[0]['ean'];
     $product_id = $cart->products[0]['product_id'];
     $category_id = $cart->products[0]['category_id'];
     $booking_date_info = $cart->products[0]['free_attributes_value'];
     //$date_from = '31-10-2015';
     $date_from = str_replace('/', '-', $booking_date_info[0]->value);
     $date_to = str_replace('/', '-', $booking_date_info[1]->value);
     //проверяем только локальный сервер, так как на WuBook-е установлена нотификация каждого нового бронирования.
     $object_is_free_on_local = $this->chekBookingOnLocal($db_local, $product_id_local, $date_from, $date_to);
     //$object_is_free_on_local = true;
     //повторно проверяем по базе сайта, чтобы никто не забронил номер пока пользователь "копается"
     $object_is_free_on_site = $this->chekBookingOnSite($db, $product_id, $date_from, $date_to);
     if ($object_is_free_on_local == true && $object_is_free_on_site == true) {
         //заменяем разделитеть даты
         $date_from = str_replace('/', '-', $date_from);
         $date_to = str_replace('/', '-', $date_to);
         //			echo'<pre>';print_r($product_id_local);echo'</pre>';//die;
         //			echo'<pre>';print_r($date_from);echo'</pre>';//die;
         //			echo'<pre>';print_r($date_to);echo'</pre>';//die;
         //			echo'<pre>';print_r($order);echo'</pre>';die;
         //			echo'<pre>';print_r($db_local);echo'</pre>';die;
         $k_zajav = VipLocalApi::addBookingOnLocalServer($db_local, $product_id_local, $date_from, $date_to, $order, VipLocalApi::ON_BOOKING_FROM_SITE_PRIM_PREFIX);
         //echo'<pre>';var_dump($k_zajav);echo'</pre>';die;
         $session = JFactory::getSession();
         $session->set("k_zajav", $k_zajav);
     } else {
         $cart->clear();
         $mainframe = JFactory::getApplication();
         JError::raiseNotice(100, _JSHOP_OBJECT_IS_ALREADY_BOOKED);
         $contextfilter = "jshoping.list.front.product.cat." . $category_id;
         $date_from_ = $mainframe->getUserStateFromRequest($contextfilter . 'dfrom', 'dfrom', date('d/m/Y'));
         $date_to_ = $mainframe->getUserStateFromRequest($contextfilter . 'dto', 'dto', date('d/m/Y', time() + 60 * 60 * 24));
         if ($date_from_ == '') {
             $date_from_ = date('d/m/Y');
         }
         if ($date_to_ == '') {
             $date_to_ = date('d/m/Y', time() + 60 * 60 * 24);
         }
         $mainframe->redirect(SEFLink('index.php?option=com_jshopping&view=category&layout=category&task=view&category_id=' . $category_id . '&dfrom=' . $date_from_ . '&dto=' . $date_to_, 1, 1));
     }
 }
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:60,代码来源:check_booking_on_confirm_order.php

示例6: getSearchCategory

 public static function getSearchCategory($selected = null)
 {
     $jshopConfig = JSFactory::getConfig();
     $attribs = self::getDataultAttribs('');
     if ($jshopConfig->admin_show_product_extra_field) {
         $urlsearchcaracters = SEFLink("index.php?option=com_jshopping&controller=search&task=get_html_characteristics&ajax=1", 0, 1);
         $attribs .= " onchange='updateSearchCharacteristic(\"" . $urlsearchcaracters . "\",this.value);'";
     }
     return self::getCategory($selected, $attribs);
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:10,代码来源:selects.php

示例7: getUrlCheckout

 public function getUrlCheckout()
 {
     $jshopConfig = JSFactory::getConfig();
     if ($jshopConfig->shop_user_guest == 1) {
         $href_checkout = SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2&check_login=1', 1, 0, $jshopConfig->use_ssl);
     } else {
         $href_checkout = SEFLink('index.php?option=com_jshopping&controller=checkout&task=step2', 1, 0, $jshopConfig->use_ssl);
     }
     return $href_checkout;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:10,代码来源:cartpreview.php

示例8: showEndForm

 function showEndForm($params, $order)
 {
     $db =& JFactory::getDBO();
     $hash = md5("authorizenetcc1" . mktime());
     $query = "update `#__jshopping_orders` set `order_hash`='" . $db->getEscaped($hash) . "' WHERE `order_id` = '" . $order->order_id . "'";
     $db->setQuery($query);
     $db->query();
     $mainframe =& JFactory::getApplication();
     $mainframe->redirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=step7&act=return&js_paymentclass=pm_authorizenet_aim&oid=' . $order->order_id . "&h=" . $hash, 0, 1));
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:10,代码来源:pm_authorizenet_aim.php

示例9: onBeforeDisplayProduct

 function onBeforeDisplayProduct(&$product)
 {
     $document = JFactory::getDocument();
     $maincategory_id = $product->getCategory();
     $product_id = JRequest::getInt('product_id');
     $category_id = JRequest::getInt('category_id');
     if ($category_id != $maincategory_id) {
         $url = SEFLink('index.php?option=com_jshopping&controller=product&task=view&category_id=' . $maincategory_id . '&product_id=' . $product_id);
         $document->addCustomTag('<link rel="canonical" href="' . $url . '"/>');
     }
 }
开发者ID:aldegtyarev,项目名称:vip-kvartira,代码行数:11,代码来源:product_canonical.php

示例10: getCheckoutUrl

 public function getCheckoutUrl($step, $defaultItemId = 0, $redirect = 1)
 {
     $jshopConfig = JSFactory::getConfig();
     if (preg_match('/^(\\d)+$/', $step)) {
         $task = 'step' . $step;
     } else {
         $task = $step;
     }
     $url = SEFLink('index.php?option=com_jshopping&controller=checkout&task=' . $task, $defaultItemId, $redirect, $jshopConfig->use_ssl);
     return $url;
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:11,代码来源:checkoutstep.php

示例11: remove_to_cart

 function remove_to_cart()
 {
     header("Cache-Control: no-cache, must-revalidate");
     $ajax = JRequest::getInt('ajax');
     $number_id = JRequest::getInt('number_id');
     $cart = JSFactory::getModel('checkout', 'jshop')->removeWishlistItemToCart($number_id);
     if ($ajax) {
         print getOkMessageJson($cart);
         die;
     }
     $this->setRedirect(SEFLink('index.php?option=com_jshopping&controller=cart&task=view', 1, 1));
 }
开发者ID:panickylemon,项目名称:joomlastayn,代码行数:12,代码来源:wishlist.php

示例12: showEndForm

 function showEndForm($pmconfigs, $order)
 {
     $jshopConfig = JSFactory::getConfig();
     $pm_method = $this->getPmMethod();
     $item_name = sprintf(_JSHOP_PAYMENT_NUMBER, $order->order_number);
     $sandbox = $pmconfigs['testmode'] ? 'sandbox.' : '';
     $email = $pmconfigs['email_received'];
     $token = $pmconfigs[$sandbox ? 'test_token' : 'token'];
     $address_override = (int) $pmconfigs['address_override'];
     $_country = JSFactory::getTable('country', 'jshop');
     $_country->load($order->d_country);
     $country = $_country->country_code_2;
     $order->order_total = $this->fixOrderTotal($order);
     // Return links
     $uri = JURI::getInstance();
     $liveurlhost = $uri->toString(array('scheme', 'host', 'port'));
     if ($pmconfigs['notifyurlsef']) {
         $notify_url = $liveurlhost . SEFLink("index.php?option=com_jshopping&controller=checkout&task=step7&act=notify&js_paymentclass=" . $pm_method->payment_class . "&no_lang=1");
     } else {
         $notify_url = JURI::root() . "index.php?option=com_jshopping&controller=checkout&task=step7&act=notify&js_paymentclass=" . $pm_method->payment_class . "&no_lang=1";
     }
     $return = $liveurlhost . SEFLink("index.php?option=com_jshopping&controller=checkout&task=step7&act=return&js_paymentclass=" . $pm_method->payment_class);
     $cancel_return = $liveurlhost . SEFLink("index.php?option=com_jshopping&controller=checkout&task=step7&act=cancel&js_paymentclass=" . $pm_method->payment_class);
     // Build data for the request
     $vendor = JSFactory::getTable('vendor', 'jshop');
     $vendor->loadMain();
     $data = array('email' => $email, 'token' => $token, 'senderName' => $vendor->shop_name, 'senderAreaCode' => 11, 'senderEmail' => $order->email, 'currency' => $order->currency_code_iso, 'redirectURL' => $return, 'reference' => $order->order_id, 'itemId1' => $order->order_id, 'itemDescription1' => $item_name, 'itemAmount1' => number_format($order->order_subtotal, 2, '.', ''), 'itemQuantity1' => 1, 'shippingCost' => number_format($order->order_shipping, 2, '.', ''), 'shippingType' => 3, 'shippingAddressStreet' => $order->d_street, 'shippingAddressPostalCode' => $order->d_zip, 'shippingAddressCity' => $order->d_city, 'shippingAddressState' => $order->d_state, 'shippingAddressCountry' => 'BRA');
     // Post the order data to PagSeguro
     $options = array(CURLOPT_POST => 1, CURLOPT_HEADER => 0, CURLOPT_URL => "https://ws.{$sandbox}pagseguro.uol.com.br/v2/checkout/", CURLOPT_FRESH_CONNECT => 1, CURLOPT_RETURNTRANSFER => 1, CURLOPT_FORBID_REUSE => 1, CURLOPT_TIMEOUT => 4, CURLOPT_POSTFIELDS => http_build_query($data));
     $ch = curl_init();
     curl_setopt_array($ch, $options);
     if (!($result = curl_exec($ch))) {
         die('Error: ' . curl_error($ch));
     }
     curl_close($ch);
     // If we received a code (and it's not an error number), redirect the client to PagSeguro to complete the order
     $code = preg_match('|<code>(.+?)</code>|', $result, $m) ? $m[1] : false;
     if ($code && !is_numeric($code)) {
         header("Location: https://{$sandbox}pagseguro.uol.com.br/v2/checkout/payment.html?code={$code}");
     } else {
         die("Error: {$result}");
     }
 }
开发者ID:uinerd,项目名称:Code,代码行数:43,代码来源:pm_pagseguro.php

示例13: getObjectInfo

 function getObjectInfo($id, $language = null)
 {
     $info = new JCommentsObjectInfo();
     $functions = JPATH_ROOT . '/components/com_jshopping/lib/functions.php';
     if (is_file($functions)) {
         require_once JPATH_ROOT . '/components/com_jshopping/lib/factory.php';
         require_once $functions;
         $titleField = 'name_' . JFactory::getLanguage()->getTag();
         $db = JFactory::getDBO();
         $query = "SELECT p.`{$titleField}`, p.access, c.category_id " . " FROM #__jshopping_products AS p" . " JOIN #__jshopping_products_to_categories AS c ON p.product_id = c.product_id" . " WHERE p.product_id = " . $id;
         $db->setQuery($query);
         $row = $db->loadObject();
         if (!empty($row)) {
             $info->category_id = $row->category_id;
             $info->title = $row->{$titleField};
             $info->access = $row->access;
             $info->link = SEFLink('index.php?option=com_jshopping&controller=product&task=view&category_id=' . $row->category_id . '&product_id=' . $id);
         }
     }
     return $info;
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:21,代码来源:com_jshopping.plugin.php

示例14: onBeforeRegister

 function onBeforeRegister(&$post, &$default_usergroup)
 {
     $plugin = JComponentHelper::getParams('com_users')->get('captcha', JFactory::getConfig()->get('captcha'));
     if ($plugin === 0 || $plugin === '0' || $plugin === '' || $plugin === null) {
         return;
     }
     $jshopConfig = JSFactory::getConfig();
     $app = JFactory::getApplication();
     $language = JFactory::getLanguage();
     $language->load('plg_captcha_' . $plugin);
     $captcha = new JCaptcha($plugin, array());
     if (!$captcha->checkAnswer($plugin)) {
         $error = $captcha->getError();
         if ($error instanceof Exception) {
             JError::raiseWarning('', $error);
         } else {
             JError::raiseWarning('', new JException($error));
         }
         $app->redirect(SEFLink("index.php?option=com_jshopping&controller=user&task=register", 1, 1, $jshopConfig->use_ssl));
     }
 }
开发者ID:arkane0906,项目名称:lasercut-bootstrap,代码行数:21,代码来源:jshopping_captcha.php

示例15: defined

<?php

/**
* @version      4.1.0 14.08.2013
* @author       MAXXmarketing GmbH
* @package      Jshopping
* @copyright    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
error_reporting(error_reporting() & ~E_NOTICE);
if (!file_exists(JPATH_SITE . '/components/com_jshopping/jshopping.php')) {
    JError::raiseError(500, "Please install component \"joomshopping\"");
}
require_once JPATH_SITE . '/components/com_jshopping/lib/factory.php';
require_once JPATH_SITE . '/components/com_jshopping/lib/functions.php';
JSFactory::loadCssFiles();
JSFactory::loadJsFiles();
JSFactory::loadLanguageFile();
$adv_search = $params->get('advanced_search');
$category_id = intval($params->get('category_id'));
$search_type = $params->get('search_type', 'any');
if ($adv_search) {
    $adv_search_link = SEFLink('index.php?option=com_jshopping&controller=search', 1);
}
$search = JRequest::getVar('search', '');
require JModuleHelper::getLayoutPath('mod_jshopping_search');
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:27,代码来源:mod_jshopping_search.php


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