本文整理汇总了PHP中oledrion_utils::getModuleName方法的典型用法代码示例。如果您正苦于以下问题:PHP oledrion_utils::getModuleName方法的具体用法?PHP oledrion_utils::getModuleName怎么用?PHP oledrion_utils::getModuleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oledrion_utils
的用法示例。
在下文中一共展示了oledrion_utils::getModuleName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
*
* Version : $Id:
* ****************************************************************************
*/
/**
* Plan des catégories
*/
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_map.html';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once OLEDRION_PATH . 'class/tree.php';
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$categories = array();
$categories = $h_oledrion_cat->getAllCategories(new oledrion_parameters());
$mytree = new Oledrion_XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
$tree = $mytree->makeTreeAsArray('cat_title', '-');
foreach ($tree as $key => $value) {
if (isset($categories[$key])) {
$category = $categories[$key];
$xoopsTpl->append('categories', array('cat_url_rewrited' => $category->getLink(), 'cat_href_title' => $category->getHrefTitle(), 'cat_title' => $value));
}
}
oledrion_utils::setCSS();
oledrion_utils::loadLanguageFile('modinfo.php');
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _MI_OLEDRION_SMNAME4)));
$title = _MI_OLEDRION_SMNAME4 . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
require_once XOOPS_ROOT_PATH . '/footer.php';
示例2: array
// Lecture des TVA ********************************************************************************
$vatArray = array();
$vatArray = $h_oledrion_vat->getAllVats(new oledrion_parameters());
// Quelques options pour le template
$xoopsTpl->assign('nostock_msg', oledrion_utils::getModuleOption('nostock_msg'));
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$xoopsTpl->assign('columnsCount', oledrion_utils::getModuleOption('catagory_colums'));
$xoopsTpl->assign('welcome_msg', nl2br($registry->getfile(OLEDRION_TEXTFILE3)));
// Récupération du nombre total de produits publiés dans la base
$itemsCount = $h_oledrion_products->getRecommendedCount();
if ($itemsCount > $limit) {
$pagenav = new XoopsPageNav($itemsCount, $limit, $start);
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
if ($limit > 0) {
// Récupération de la liste des produits récents
$oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recommended')->setStart($start)->setLimit($limit)->setSort('product_recommended')->setOrder('DESC')->setCategory(0)->setWithXoopsUser(true)->setWithRelatedProducts(true);
$products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
if (isset($products['lastTitle'])) {
$lastTitle = strip_tags($products['lastTitle']);
unset($products['lastTitle']);
}
$xoopsTpl->assign('products', $products);
}
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_RECOMMENDED)));
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
oledrion_utils::setMetas(_OLEDRION_RECOMMENDED . ' - ' . oledrion_utils::getModuleName(), oledrion_utils::getModuleName());
require_once XOOPS_ROOT_PATH . '/footer.php';
示例3: oledrion_parameters
$vatArray = $h_oledrion_vat->getAllVats(new oledrion_parameters());
// Récupération du nombre total de produits de la base
$xoopsTpl->assign('total_products_count', sprintf(_OLEDRION_THEREARE, $h_oledrion_products->getTotalPublishedProductsCount()));
if ($limit > 0) {
$itemsCount = $h_oledrion_products->getRecentProductsCount();
if ($itemsCount > $limit) {
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($itemsCount, $limit, $start);
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
$oledrion_shelf_parameters->resetDefaultValues()->setProductsType('recent')->setStart($start)->setLimit($limit)->setSort('product_id DESC, product_title')->setWithXoopsUser(true)->setWithRelatedProducts(true);
$products = $oledrion_shelf->getProducts($oledrion_shelf_parameters);
if (isset($products['lastTitle'])) {
$lastTitle = strip_tags($products['lastTitle']);
unset($products['lastTitle']);
}
$xoopsTpl->assign('products', $products);
}
// Mise en place des catégories de niveau 1
$count = 1;
$categories = $h_oledrion_cat->getMotherCategories();
foreach ($categories as $category) {
$tmp = $category->toArray();
$tmp['count'] = $count;
$xoopsTpl->append('categories', $tmp);
$count++;
}
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
oledrion_utils::setMetas($lastTitle . ' - ' . oledrion_utils::getModuleName(), oledrion_utils::getModuleName());
require_once XOOPS_ROOT_PATH . '/footer.php';
示例4: file_put_contents
* @author Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
*
* Version : $Id:
* ****************************************************************************
*/
/**
* Page appelée par la passerelle après le paiement en ligne
*/
require 'header.php';
$GLOBALS['current_category'] = -1;
$success = true;
$xoopsOption['template_main'] = 'oledrion_thankyou.html';
require_once XOOPS_ROOT_PATH . '/header.php';
$h_oledrion_caddy->emptyCart();
// On donne la possibilité à la passerelle de traiter la commande
$gateway = null;
$gateway = oledrion_gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'thankYou')) {
if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
}
$gateway->thankYou(OLEDRION_GATEWAY_LOG_PATH);
unset($gateway);
}
$xoopsTpl->assign('success', $success);
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_PURCHASE_FINSISHED)));
$title = _OLEDRION_PURCHASE_FINSISHED . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
示例5:
case 2:
$command['cmd_state_title'] = _OLEDRION_USER_STATE2;
break;
case 3:
$command['cmd_state_title'] = _OLEDRION_USER_STATE3;
break;
case 4:
$command['cmd_state_title'] = _OLEDRION_USER_STATE4;
break;
case 5:
$command['cmd_state_title'] = _OLEDRION_USER_STATE5;
break;
case 6:
$command['cmd_state_title'] = _OLEDRION_USER_STATE6;
break;
case 7:
$command['cmd_state_title'] = _OLEDRION_USER_STATE7;
break;
case 8:
$command['cmd_state_title'] = _OLEDRION_USER_STATE8;
break;
}
$list[] = $command;
}
}
$xoopsTpl->assign('list', $list);
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
$title = _OLEDRION_USER . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
require_once XOOPS_ROOT_PATH . '/footer.php';
示例6: htmlspecialchars
$categoryTitle = $category->getVar('cat_title');
}
}
$sitename = htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES);
$email = checkEmail($xoopsConfig['adminmail'], true);
$slogan = htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES);
$limit = oledrion_utils::getModuleOption('perpage');
$tpl->assign('charset', $charset);
$tpl->assign('channel_title', xoops_utf8_encode($sitename));
$tpl->assign('channel_link', XOOPS_URL . '/');
$tpl->assign('channel_desc', xoops_utf8_encode($slogan));
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', xoops_utf8_encode($email));
$tpl->assign('channel_editor', xoops_utf8_encode($email));
$tpl->assign('channel_category', xoops_utf8_encode($categoryTitle));
$tpl->assign('channel_generator', xoops_utf8_encode(oledrion_utils::getModuleName()));
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL . '/images/logo.png');
$dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.png');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = $dimention[0] > 144 ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = $dimention[1] > 400 ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
示例7: XoopsPageNav
$rowCount = $xoopsDB->fetchArray($result);
if ($rowCount['cpt'] > $limit) {
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav = new XoopsPageNav($rowCount['cpt'], $limit, $start, 'start');
$xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
$sql .= ' GROUP BY b.product_id ORDER BY product_submitted DESC';
$result = $xoopsDB->query($sql, $limit, $start);
$ret = array();
$tempProduct = $h_oledrion_products->create(true);
while ($myrow = $xoopsDB->fetchArray($result)) {
$ret = array();
$ret['link'] = $tempProduct->getLink($myrow['product_id'], $myrow['product_title']);
$ret['title'] = $myts->htmlSpecialChars($myrow['product_title']);
$ret['href_title'] = oledrion_utils::makeHrefTitle($myts->htmlSpecialChars($myrow['product_title']));
$ret['time'] = $myrow['product_submitted'];
$ret['uid'] = $myrow['product_submitter'];
$xoopsTpl->append('products', $ret);
}
unset($tempProduct);
} else {
$xoopsTpl->assign('search_results', false);
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_SEARCHFOR)));
oledrion_utils::setMetas(oledrion_utils::getModuleName() . ' - ' . _OLEDRION_SEARCHFOR, oledrion_utils::getModuleName() . ' - ' . _OLEDRION_SEARCHFOR);
}
require_once OLEDRION_PATH . 'include/product_search_form.php';
$sform = oledrion_utils::formMarkRequiredFields($sform);
$xoopsTpl->assign('search_form', $sform->render());
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
示例8: oledrion_registryfile
* which is considered copyrighted (c) material of the original comment or credit authors.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package oledrion
* @author Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
*
* Version : $Id:
* ****************************************************************************
*/
/**
* Affichage des conditions générales de vente
*/
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_cgv.html';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once OLEDRION_PATH . 'class/registryfile.php';
$registry = new oledrion_registryfile();
$xoopsTpl->assign('nostock_msg', oledrion_utils::getModuleOption('nostock_msg'));
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$xoopsTpl->assign('cgv_msg', $registry->getfile(OLEDRION_TEXTFILE2));
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_CGV)));
oledrion_utils::setCSS();
oledrion_utils::setMetas(_OLEDRION_CGV . ' ' . oledrion_utils::getModuleName(), _OLEDRION_CGV . ' ' . oledrion_utils::getModuleName());
require_once XOOPS_ROOT_PATH . '/footer.php';
示例9: XoopsFormLabel
$sform->addElement(new XoopsFormLabel(_OLEDRION_STREET, $commande->getVar('cmd_adress')));
$sform->addElement(new XoopsFormLabel(_OLEDRION_CP, $commande->getVar('cmd_zip')));
$sform->addElement(new XoopsFormLabel(_OLEDRION_CITY, $commande->getVar('cmd_town')));
$sform->addElement(new XoopsFormLabel(_OLEDRION_COUNTRY, $countries[$commande->getVar('cmd_country')]));
$sform->addElement(new XoopsFormLabel(_OLEDRION_PHONE, $commande->getVar('cmd_telephone')));
$sform->addElement(new XoopsFormLabel(_OLEDRION_EMAIL, $commande->getVar('cmd_email')));
if (oledrion_utils::getModuleOption('ask_vatnumber')) {
$sform->addElement(new XoopsFormLabel(_OLEDRION_VAT_NUMBER, $commande->getVar('cmd_vat_number')));
}
if ($commande->getVar('cmd_bill') == 0) {
$sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _NO));
} else {
$sform->addElement(new XoopsFormLabel(_OLEDRION_INVOICE, _YES));
}
$button_tray = new XoopsFormElementTray('', '');
if (oledrion_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0) {
$submit_btn = new XoopsFormButton('', 'post', _OLEDRION_FINISH, 'submit');
} else {
$submit_btn = new XoopsFormButton('', 'post', _OLEDRION_PAY_GATEWAY, 'submit');
}
$button_tray->addElement($submit_btn);
$sform->addElement($button_tray);
$xoopsTpl->assign('form', $sform->render());
break;
}
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_VALIDATE_CMD)));
$title = _OLEDRION_VALIDATE_CMD . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
require_once XOOPS_ROOT_PATH . '/footer.php';
示例10: array
$tbl_tmp['product_property2_title'] = oledrion_utils::getModuleOption('product_property2_title');
$tbl_tmp['product_property3_title'] = oledrion_utils::getModuleOption('product_property3_title');
$tbl_tmp['product_property4_title'] = oledrion_utils::getModuleOption('product_property4_title');
$tbl_tmp['product_property5_title'] = oledrion_utils::getModuleOption('product_property5_title');
$tbl_tmp['product_property6_title'] = oledrion_utils::getModuleOption('product_property6_title');
$tbl_tmp['product_property7_title'] = oledrion_utils::getModuleOption('product_property7_title');
$tbl_tmp['product_property8_title'] = oledrion_utils::getModuleOption('product_property8_title');
$tbl_tmp['product_property9_title'] = oledrion_utils::getModuleOption('product_property9_title');
$tbl_tmp['product_property10_title'] = oledrion_utils::getModuleOption('product_property10_title');
$xoopsTpl->assign('product', $tbl_tmp);
// Breadcrumb *************************************************************************************
$tbl_tmp = array();
$mytree = new XoopsObjectTree($tbl_categories, 'cat_cid', 'cat_pid');
$tbl_ancestors = $mytree->getAllParent($product->getVar('product_cid'));
$tbl_ancestors = array_reverse($tbl_ancestors);
$tbl_tmp[] = "<a href='" . OLEDRION_URL . "index.php' title='" . oledrion_utils::makeHrefTitle(oledrion_utils::getModuleName()) . "'>" . oledrion_utils::getModuleName() . "</a>";
foreach ($tbl_ancestors as $item) {
$tbl_tmp[] = "<a href='" . $item->getLink() . "' title='" . oledrion_utils::makeHrefTitle($item->getVar('cat_title')) . "'>" . $item->getVar('cat_title') . "</a>";
}
// Ajout de la catégorie courante
$tbl_tmp[] = "<a href='" . $product_category->getLink() . "' title='" . oledrion_utils::makeHrefTitle($product_category->getVar('cat_title')) . "'>" . $product_category->getVar('cat_title') . "</a>";
$tbl_tmp[] = $product->getVar('product_title');
$breadcrumb = implode(' » ', $tbl_tmp);
$xoopsTpl->assign('breadcrumb', $breadcrumb);
// Maj compteur de lectures ***********************************************************************
if ($product->getVar('product_submitter') != $currentUser) {
$h_oledrion_products->addCounter($product_id);
}
// produits précédents et suivants ******************************************************************
if (oledrion_utils::getModuleOption('showprevnextlink') == 1) {
$xoopsTpl->assign('showprevnextlink', true);
示例11: file_put_contents
/**
* Page appelée par la passerelle de paiement dans le cas de l'annulation d'une commande
*/
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_cancelpurchase.tpl';
require_once XOOPS_ROOT_PATH . '/header.php';
// On donne la possibilité à la passerelle d'annuler la commande
$gateway = null;
$gateway = oledrion_gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'cancelOrder')) {
if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>');
}
$gateway->cancelOrder(OLEDRION_GATEWAY_LOG_PATH);
unset($gateway);
} elseif (isset($_GET['id'])) {
$order = null;
$order = $h_oledrion_commands->getOrderFromCancelPassword($_GET['id']);
if (is_object($order)) {
$h_oledrion_commands->setOrderCanceled($order);
}
}
$h_oledrion_caddy->emptyCart();
$xoopsTpl->assign('mod_pref', $mod_pref);
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb(array(OLEDRION_URL . basename(__FILE__) => _OLEDRION_ORDER_CANCELED)));
$title = _OLEDRION_ORDER_CANCELED . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
require_once XOOPS_ROOT_PATH . '/footer.php';
示例12: TCPDF
// ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
// ****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
$doc_title = _OLEDRION_CATALOG;
$doc_subject = _OLEDRION_CATALOG;
$doc_keywords = "Instant Zero";
require_once OLEDRION_PATH . 'pdf/config/lang/' . _LANGCODE . '.php';
require OLEDRION_PATH . 'pdf/tcpdf.php';
//create new PDF document (document units are set by default to millimeters)
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor(PDF_AUTHOR);
$pdf->SetTitle($doc_title);
$pdf->SetSubject($doc_subject);
$pdf->SetKeywords($doc_keywords);
$firstLine = utf8_encode(oledrion_utils::getModuleName() . ' - ' . $xoopsConfig['sitename']);
$secondLine = OLEDRION_URL . ' - ' . formatTimestamp(time(), 'm');
$pdf->SetHeaderData('', '', $firstLine, $secondLine);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set image scale factor
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->setLanguageArray($l);
//set language items
//initialize document
示例13: die
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package oledrion
* @author Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
*
* Version : $Id:
* ****************************************************************************
*/
/**
* Recherche avancée dans les produits, formulaire de sélection des critères
*/
if (!defined('XOOPS_ROOT_PATH')) {
die('XOOPS root path not defined');
}
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
require_once OLEDRION_PATH . 'class/tree.php';
$sform = new XoopsThemeForm(oledrion_utils::getModuleName() . ' - ' . _OLEDRION_SEARCHFOR, 'productsSearchForm', OLEDRION_URL . 'search.php', 'post');
$sform->addElement(new XoopsFormText(_OLEDRION_TEXT, 'product_text', 50, 255, ''), false);
$sform->addElement(new XoopsFormSelectMatchOption(_OLEDRION_TYPE, 'search_type', 3), false);
// Sélecteur de catégories ****************************************************
$categorySelect = new XoopsFormSelect(_OLEDRION_CATEGORY, 'product_category', 0);
$treeObject = new Oledrion_XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
$tree = $treeObject->makeTreeAsArray('cat_title', '-', 0, _OLEDRION_ALL_CATEGORIES);
$categorySelect->addOptionArray($tree);
$sform->addElement($categorySelect, false);
// Sélecteur pour les fabricants *************************************************
$authorSelect = new XoopsFormSelect(_OLEDRION_MANUFACTURER, 'product_manufacturers', 0, 5, true);
$tblTmp = array();
$tblTmp[0] = _OLEDRION_ALL_MANUFACTURERS;
foreach ($manufacturers as $item) {
$tblTmp[$item->getVar('manu_id')] = $item->getVar('manu_commercialname') . ' ' . $item->getVar('manu_name');
}
示例14: array
$xoopsTpl->assign('columnsCount', oledrion_utils::getModuleOption('catagory_colums'));
$xoopsTpl->assign('list', $list->toArray());
// TVA
$vatArray = array();
$vatArray = $h_oledrion_vat->getAllVats(new oledrion_parameters());
// Recherche des produits de la liste
$products = $handlers->h_oledrion_lists->getListProducts($list);
if (count($products) > 0) {
foreach ($products as $product) {
$xoopsTpl->append('products', $product->toArray());
}
}
// Mise à jour du compte de vues
$handlers->h_oledrion_lists->incrementListViews($list);
// Recherce des autres listes de cet utilisateur
if ($handlers->h_oledrion_lists->getRecentListsCount(OLEDRION_LISTS_ALL_PUBLIC, oledrion_utils::getCurrentUserID()) > 1) {
$otherUserLists = $handlers->h_oledrion_lists->getRecentLists(new oledrion_parameters(array('start' => 0, 'limit' => 0, 'sort' => 'list_date', 'order' => 'DESC', 'idAsKey' => true, 'listType' => OLEDRION_LISTS_ALL_PUBLIC, 'list_uid' => oledrion_utils::getCurrentUserID())));
if (count($otherUserLists) > 0) {
foreach ($otherUserLists as $oneOtherList) {
$xoopsTpl->append('otherUserLists', $oneOtherList->toArray());
}
}
}
oledrion_utils::setCSS();
oledrion_utils::setLocalCSS($xoopsConfig['language']);
oledrion_utils::loadLanguageFile('modinfo.php');
$breadcrumb = array(OLEDRION_URL . 'all-lists.php' => _MI_OLEDRION_SMNAME11, OLEDRION_URL . basename(__FILE__) => $list->getVar('list_title'));
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb($breadcrumb));
$title = $list->getVar('list_title') . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title, oledrion_utils::createMetaKeywords($list->getVar('list_description', 'n') . ' ' . $list->getVar('list_title', 'n')));
require_once XOOPS_ROOT_PATH . '/footer.php';
示例15: number_format
}
$result = $h_oledrion_votedata->createRating($product->getVar('product_id'), $ratinguser, $rating);
// Calcul du nombre de votes et du total des votes pour mettre à jour les informations du produit
$totalVotes = 0;
$sumRating = 0;
$ret = 0;
$ret = $h_oledrion_votedata->getCountRecordSumRating($product->getVar('product_id'), $totalVotes, $sumRating);
$finalrating = $sumRating / $totalVotes;
$finalrating = number_format($finalrating, 4);
$h_oledrion_products->updateRating($product_id, $finalrating, $totalVotes);
$ratemessage = _OLEDRION_VOTEAPPRE . '<br />' . sprintf(_OLEDRION_THANKYOU, $xoopsConfig['sitename']);
oledrion_utils::redirect($ratemessage, OLEDRION_URL . 'product.php?product_id=' . $product->getVar('product_id'), 2);
} else {
oledrion_utils::redirect(_OLEDRION_VOTEONCE, OLEDRION_URL . 'product.php?product_id=' . $product->getVar('product_id'), 5);
}
} else {
// Affichage du formulaire
$GLOBALS['current_category'] = $product->getVar('product_cid');
$xoopsOption['template_main'] = 'oledrion_rate_product.html';
require_once XOOPS_ROOT_PATH . '/header.php';
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
$xoopsTpl->assign('product', $product->toArray());
$xoopsTpl->assign('global_advert', oledrion_utils::getModuleOption('advertisement'));
$breadcrumb = array($product->getLink() => $product->getVar('product_title'), OLEDRION_URL . basename(__FILE__) => _OLEDRION_RATETHISPRODUCT);
$xoopsTpl->assign('breadcrumb', oledrion_utils::breadcrumb($breadcrumb));
$title = _OLEDRION_RATETHISPRODUCT . ' : ' . strip_tags($product->getVar('product_title')) . ' - ' . oledrion_utils::getModuleName();
oledrion_utils::setMetas($title, $title);
oledrion_utils::setCSS();
}
require_once XOOPS_ROOT_PATH . '/footer.php';