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


PHP oledrion_utils类代码示例

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


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

示例1: b_oledrion_rated_show

/**
 * Affiche les produits les mieux notés
 */
function b_oledrion_rated_show($options)
{
    // '10|0';	// Voir 10 produits, pour toutes les catégories ou une catégorie particulière
    global $xoopsConfig, $xoopsTpl;
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $products = $block = array();
    $start = 0;
    $limit = $options[0];
    $categoryId = $options[1];
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('bestrated')->setStart($start)->setLimit($limit)->setSort('product_rating')->setOrder('DESC')->setCategory($categoryId);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $url = OLEDRION_URL . 'include/oledrion.css';
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoopsTpl->assign("xoops_module_header", "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\" />");
        return $block;
    } else {
        // La liste des produits est introuvable (on ne trouve pas les produits vendus dans le stock des produits)
        return false;
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:28,代码来源:oledrion_rated.php

示例2: b_oledrion_recomm_show

/**
 * Renvoie la liste des produits recommandés
 */
function b_oledrion_recomm_show($options)
{
    // '10|0';	// Voir 10 produits, pour toutes les catégories ou une catégorie particulière
    global $xoopsConfig, $xoopsTpl;
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $products = $block = array();
    $start = 0;
    $limit = $options[0];
    $categoyrId = $options[1];
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recommended')->setStart($start)->setLimit($limit)->setSort('product_recommended')->setOrder('DESC')->setCategory($categoyrId);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if ($h_oledrion_products->getRecommendedCount() > $limit) {
        // Il y a plus de produits recommandés dans la BDD que dans le bloc, on affiche donc un lien vers la page des produits recommandés
        $block['showMore'] = true;
    }
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $url = OLEDRION_URL . 'include/oledrion.css';
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoopsTpl->assign("xoops_module_header", "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\" />");
        return $block;
    } else {
        // Pas de produits recommandés
        return false;
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:32,代码来源:oledrion_recommended.php

示例3: b_oledrion_random_show

/**
 * Affiche x produit(s) au hasard
 */
function b_oledrion_random_show($options)
{
    // '10|0|0';	// Voir 10 produits, pour toutes les catégories ou une catégorie particulière, et pour ce mois-ci ou pour tout le temps ?
    global $xoopsConfig, $xoopsTpl;
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $products = $block = array();
    $start = 0;
    $limit = $options[0];
    $categoryId = $options[1];
    $thisMonthOnly = intval($options[2]);
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('random')->setStart($start)->setLimit($limit)->setSort('RAND()')->setCategory($categoryId)->setThisMonthOnly($thisMonthOnly);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $url = OLEDRION_URL . 'include/oledrion.css';
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoopsTpl->assign("xoops_module_header", "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\" />");
        return $block;
    } else {
        return false;
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:28,代码来源:oledrion_random.php

示例4: getCurrentGateway

 /**
  * Retourne la passerelle de paiement en cours d'utilisation
  *
  * @return string	Le nom de la  passerelle de paiement (en fait le nom de son répertoire)
  */
 function getCurrentGateway()
 {
     $return = xoops_trim(oledrion_utils::getModuleOption('used_gateway'));
     if ($return == '') {
         $return = 'paypal';
         // Valeur par défaut
     }
     return $return;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:14,代码来源:oledrion_gateways.php

示例5: b_sitemap_oledrion

/**
 * oledrion
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
 * @version     $Id: oledrion.php 12290 2014-02-07 11:05:17Z beckmi $
 */
function b_sitemap_oledrion()
{
    require '../oledrion/header.php';
    global $sitemap_configs;
    $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
    $table = $xoopsDB->prefix('oledrion_cat');
    $id_name = 'cat_cid';
    $pid_name = 'cat_pid';
    $title_name = 'cat_title';
    $url = 'category.php?cat_cid=';
    $order = 'cat_title';
    include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
    $mytree = new XoopsTree($table, $id_name, $pid_name);
    $xoopsDB = XoopsDatabaseFactory::getDatabaseConnection();
    $sitemap = array();
    $myts = MyTextSanitizer::getInstance();
    $i = 0;
    $sql = "SELECT `{$id_name}`,`{$title_name}` FROM `{$table}` WHERE `{$pid_name}`=0";
    if ($order != '') {
        $sql .= " ORDER BY `{$order}`";
    }
    $result = $xoopsDB->query($sql);
    while (list($catid, $name) = $xoopsDB->fetchRow($result)) {
        $sitemap['parent'][$i]['id'] = $catid;
        $sitemap['parent'][$i]['title'] = $myts->htmlSpecialChars($name);
        if (oledrion_utils::getModuleOption('urlrewriting') == 1) {
            // On utilise l'url rewriting
            $url = 'category' . '-' . intval($catid) . oledrion_utils::makeSeoUrl($name) . '.html';
        } else {
            // Pas d'utilisation de l'url rewriting
            $url = 'category.php?cat_cid=' . intval($catid);
        }
        $sitemap['parent'][$i]['url'] = $url;
        if (@$sitemap_configs["show_subcategoris"]) {
            $j = 0;
            $child_ary = $mytree->getChildTreeArray($catid, $order);
            foreach ($child_ary as $child) {
                $count = strlen($child['prefix']) + 1;
                $sitemap['parent'][$i]['child'][$j]['id'] = $child[$id_name];
                $sitemap['parent'][$i]['child'][$j]['title'] = $myts->htmlSpecialChars($child[$title_name]);
                $sitemap['parent'][$i]['child'][$j]['image'] = $count > 3 ? 4 : $count;
                if (oledrion_utils::getModuleOption('urlrewriting') == 1) {
                    // On utilise l'url rewriting
                    $url = 'category' . '-' . intval($child[$id_name]) . oledrion_utils::makeSeoUrl($child[$title_name]) . '.html';
                } else {
                    // Pas d'utilisation de l'url rewriting
                    $url = 'category.php?cat_cid=' . intval($child[$id_name]);
                }
                $sitemap['parent'][$i]['child'][$j]['url'] = $url;
                $j++;
            }
        }
        $i++;
    }
    return $sitemap;
}
开发者ID:osw17,项目名称:oledrion,代码行数:64,代码来源:oledrion.php

示例6: __construct

 public function __construct()
 {
     // Get the module's preferences
     $this->_decimalsCount = oledrion_utils::getModuleOption('decimals_count');
     $this->_thousandsSep = oledrion_utils::getModuleOption('thousands_sep');
     $this->_decimalSep = oledrion_utils::getModuleOption('decimal_sep');
     $this->_moneyFull = oledrion_utils::getModuleOption('money_full');
     $this->_moneyShort = oledrion_utils::getModuleOption('money_short');
     $this->_monnaiePlace = oledrion_utils::getModuleOption('monnaie_place');
     $this->_thousandsSep = str_replace('[space]', ' ', $this->_thousandsSep);
     $this->_decimalSep = str_replace('[space]', ' ', $this->_decimalSep);
 }
开发者ID:osw17,项目名称:oledrion,代码行数:12,代码来源:oledrion_currency.php

示例7: b_oledrion_category_lists_edit

/**
 * Edition des paramètres du bloc
 *
 * @param array $options [0] = Nombre maximum de listes à voir, [1] = Type de listes (0 = les 2, 1 = liste cadeaux, 2 = produits recommandés)
 * @return array
 */
function b_oledrion_category_lists_edit($options)
{
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $form = '';
    $form .= "<table border='0'>";
    $form .= '<tr><td>' . _MB_OLEDRION_LISTS_COUNT . "</td><td><input type='text' name='options[]' id='options' value='" . intval($options[0]) . "' /></td></tr>";
    $listTypes = oledrion_lists::getTypesArray();
    $listTypeSelect = oledrion_utils::htmlSelect('options[]', $listTypes, intval($options[1]), false);
    $form .= '<tr><td>' . _MB_OLEDRION_LISTS_TYPE . "</td><td>" . $listTypeSelect . "</td></tr>";
    $form .= '</table>';
    return $form;
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:18,代码来源:oledrion_categoy_lists.php

示例8: b_oledrion_my_lists_show

/**
 * Affiche les listes de l'utilisateur
 *
 * @param array $options [0] = Nombre maximum de listes à voir
 * @return array
 */
function b_oledrion_my_lists_show($options)
{
    require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    oledrion_utils::loadLanguageFile('modinfo.php');
    $start = 0;
    $limit = intval($options[0]);
    $uid = oledrion_utils::getCurrentUserID();
    if ($uid == 0) {
        return null;
    }
    $listType = OLEDRION_LISTS_ALL;
    $block = array();
    $handlers = oledrion_handler::getInstance();
    $items = array();
    $items = $handlers->h_oledrion_lists->getRecentLists(new oledrion_parameters(array('start' => $start, 'limit' => $limit, 'sort' => 'list_date', 'order' => 'DESC', 'idAsKey' => true, 'listType' => $listType, 'list_uid' => $uid)));
    if (count($items) > 0) {
        foreach ($items as $item) {
            $block['my_lists'][] = $item->toArray();
        }
    }
    return $block;
}
开发者ID:osw17,项目名称:oledrion,代码行数:28,代码来源:oledrion_my_lists.php

示例9: b_oledrion_recentlysold_show

/**
 * This block shows the products that were recently sold
 * @param array $options    [0] = Nombre maximum de produits à voir
 * @return array
 */
function b_oledrion_recentlysold_show($options)
{
    global $xoopsConfig, $xoTheme;
    require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $categoryId = 0;
    $start = 0;
    $limit = $options[0];
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recentlysold')->setStart($start)->setLimit($limit);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $block = array();
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoTheme->addStylesheet(OLEDRION_URL . 'assets/css/oledrion.css');
        return $block;
    } else {
        return false;
    }
}
开发者ID:osw17,项目名称:oledrion,代码行数:27,代码来源:oledrion_recentlysold.php

示例10: b_oledrion_recentlysold_show

/**
 * This block shows the products that were recently sold
 * @param array $options	[0] = Nombre maximum de produits à voir
 * @return array
 */
function b_oledrion_recentlysold_show($options)
{
    global $xoopsConfig, $xoopsTpl;
    require XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $categoryId = 0;
    $start = 0;
    $limit = $options[0];
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recentlysold')->setStart($start)->setLimit($limit);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $url = OLEDRION_URL . 'include/oledrion.css';
        $block = array();
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoopsTpl->assign("xoops_module_header", "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\" />");
        return $block;
    } else {
        return false;
    }
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:28,代码来源:oledrion_recentlysold.php

示例11: b_oledrion_promotion_show

/**
 * Affiche x produit(s) en promotion
 */
function b_oledrion_promotion_show($options)
{
    // '10|0';	// Voir 10 produits, pour toutes les catégories ou une catégorie particulière
    global $xoopsConfig, $xoTheme;
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $block = $products = array();
    $start = 0;
    $limit = $options[0];
    $categoryId = $options[1];
    $oledrion_shelf_parameters->resetDefaultValues()->setProductsType('promotional')->setStart($start)->setLimit($limit)->setSort('product_submitted DESC, product_title')->setOrder('ASC')->setCategory($categoryId);
    $products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
    if (isset($products['lastTitle'])) {
        unset($products['lastTitle']);
    }
    if (count($products) > 0) {
        $block['nostock_msg'] = oledrion_utils::getModuleOption('nostock_msg');
        $block['block_products'] = $products;
        $xoTheme->addStylesheet(OLEDRION_URL . 'assets/css/oledrion.css');
        return $block;
    } else {
        return false;
    }
}
开发者ID:osw17,项目名称:oledrion,代码行数:26,代码来源:oledrion_promotion.php

示例12: b_oledrion_cart_show

/**
 * block to display items in cart
 *
 * @param integer $options[0] Count of items to show (0 = no limit)
 * @return array Block's content
 */
function b_oledrion_cart_show($options)
{
    global $mod_pref, $xoopsConfig;
    include XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
    $productsCount = intval($options[0]);
    $cartForTemplate = $block = array();
    $emptyCart = false;
    $shippingAmount = $commandAmount = $vatAmount = $discountsCount = 0;
    $goOn = '';
    $commandAmountTTC = 0;
    $discountsDescription = array();
    // Calcul du montant total du caddy
    $reductions = new oledrion_reductions();
    $reductions->computeCart($cartForTemplate, $emptyCart, $shippingAmount, $commandAmount, $vatAmount, $goOn, $commandAmountTTC, $discountsDescription, $discountsCount);
    $dec = oledrion_utils::getModuleOption('decimals_count');
    if ($emptyCart) {
        return '';
    }
    $block['block_money_full'] = oledrion_utils::getModuleOption('money_full');
    $block['block_money_short'] = oledrion_utils::getModuleOption('money_short');
    $block['block_shippingAmount'] = sprintf("%0." . $dec . 'f', $shippingAmount);
    // Montant des frais de port
    $block['block_commandAmount'] = sprintf("%0." . $dec . 'f', $commandAmount);
    // Montant HT de la commande
    $block['block_vatAmount'] = sprintf("%0." . $dec . 'f', $vatAmount);
    // Montant de la TVA
    $block['block_commandAmountTTC'] = sprintf("%0." . $dec . 'f', $commandAmountTTC);
    // Montant TTC de la commande
    $block['block_discountsDescription'] = $discountsDescription;
    // Liste des réductions accordées
    if ($productsCount > 0 && count($cartForTemplate) > $productsCount) {
        array_slice($cartForTemplate, 0, $productsCount - 1);
    }
    $block['block_caddieProducts'] = $cartForTemplate;
    // Produits dans le caddy
    return $block;
}
开发者ID:osw17,项目名称:oledrion,代码行数:43,代码来源:oledrion_cart.php

示例13: CriteriaCompo

                $configHandler->insertConfig($config);
            }
        }
        if (isset($_POST['product_property10'])) {
            if (oledrion_utils::getModuleOption('product_property10') != $_POST['product_property10']) {
                $criteria = new CriteriaCompo();
                $criteria->add($moduleIdCriteria);
                $criteria->add(new Criteria('conf_name', 'product_property10'));
                $config = $configHandler->getConfigs($criteria);
                $config = $config[0];
                $configValue = array('conf_modid' => $xoopsModule->getVar('mid'), 'conf_catid' => 0, 'conf_name' => 'product_property10', 'conf_value' => $_POST['product_property10'], 'conf_formtype' => 'hidden', 'conf_valuetype' => 'text');
                $config->setVars($configValue);
                $configHandler->insertConfig($config);
            }
        }
        if (isset($_POST['product_property10_title'])) {
            if (oledrion_utils::getModuleOption('product_property10_title') != $_POST['product_property10_title']) {
                $criteria = new CriteriaCompo();
                $criteria->add($moduleIdCriteria);
                $criteria->add(new Criteria('conf_name', 'product_property10_title'));
                $config = $configHandler->getConfigs($criteria);
                $config = $config[0];
                $configValue = array('conf_modid' => $xoopsModule->getVar('mid'), 'conf_catid' => 0, 'conf_name' => 'product_property10_title', 'conf_value' => $_POST['product_property10_title'], 'conf_formtype' => 'hidden', 'conf_valuetype' => 'text');
                $config->setVars($configValue);
                $configHandler->insertConfig($config);
            }
        }
        oledrion_utils::updateCache();
        oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=property', 2);
        break;
}
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:property.php

示例14: getVar

                       $msg['PAYS'] = $countries[$commande->getVar('cmd_country')];
                       $msg['TELEPHONE'] = $commande->getVar('cmd_telephone');
                       $msg['EMAIL'] = $commande->getVar('cmd_email');
                       $msg['URL_BILL'] = OLEDRION_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass=' . $commande->getVar('cmd_password');
                       $msg['IP'] = oledrion_utils::IP();
                       if ($commande->getVar('cmd_bill') == 1) {
                           $msg['FACTURE'] = _YES;
                       } else {
                           $msg['FACTURE'] = _NO;
                       }
                       // Send mail to client
                       oledrion_utils::sendEmailFromTpl('command_client.tpl', $commande -> getVar('cmd_email'), sprintf(_OLEDRION_THANKYOU_CMD, $xoopsConfig['sitename']), $msg);
                       // Send mail to admin
                       oledrion_utils::sendEmailFromTpl('command_shop.tpl', oledrion_utils::getEmailsFromGroup(oledrion_utils::getModuleOption('grp_sold')), _OLEDRION_NEW_COMMAND, $msg);
                       */
                    // Send SMS
                    if (oledrion_utils::getModuleOption('sms_checkout')) {
                        $information['to'] = ltrim($commande->getVar('cmd_mobile'), 0);
                        $information['text'] = oledrion_utils::getModuleOption('sms_checkout_text');
                        $sms = oledrion_sms::sendSms($information);
                    }
                }
            } else {
                $ret['status'] = 0;
                $ret['message'] = _OLEDRION_ERROR10;
            }
        }
        $return = json_encode($ret);
        break;
}
echo $return;
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:ajax.php

示例15: array

 *					$options[2] - max font size (px or %)
 *					$options[3] - min font size (px or %)
 */
$modversion['blocks'][] = array('file' => 'oledrion_block_tag.php', 'name' => _MI_OLEDRION_TAG_CLOUD, 'description' => 'Show tag cloud', 'show_func' => 'oledrion_tag_block_cloud_show', 'edit_func' => 'oledrion_tag_block_cloud_edit', 'options' => '100|0|150|80', 'template' => 'oledrion_tag_block_cloud.tpl');
/*
 * $options:
 *					$options[0] - number of tags to display
 *					$options[1] - time duration, in days, 0 for all the time
 *					$options[2] - sort: a - alphabet; c - count; t - time
 */
$modversion['blocks'][] = array('file' => 'oledrion_block_tag.php', 'name' => _MI_OLEDRION_TOP_TAGS, 'description' => 'Show top tags', 'show_func' => 'oledrion_tag_block_top_show', 'edit_func' => 'oledrion_tag_block_top_edit', 'options' => '50|30|c', 'template' => 'oledrion_tag_block_top.tpl');
// Menu
$modversion['hasMain'] = 1;
$cptm = 0;
require_once 'class/oledrion_utils.php';
if (oledrion_utils::getModuleOption('use_price')) {
    $cptm++;
    $modversion['sub'][$cptm]['name'] = _MI_OLEDRION_SMNAME1;
    $modversion['sub'][$cptm]['url'] = 'caddy.php';
}
$cptm++;
$modversion['sub'][$cptm]['name'] = _MI_OLEDRION_SMNAME3;
$modversion['sub'][$cptm]['url'] = 'category.php';
$cptm++;
$modversion['sub'][$cptm]['name'] = _MI_OLEDRION_SMNAME4;
$modversion['sub'][$cptm]['url'] = 'categories-map.php';
$cptm++;
$modversion['sub'][$cptm]['name'] = _MI_OLEDRION_SMNAME5;
$modversion['sub'][$cptm]['url'] = 'whoswho.php';
$cptm++;
$modversion['sub'][$cptm]['name'] = _MI_OLEDRION_SMNAME6;
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:xoops_version.php


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