示例#1
0
文件: index.php 项目: osw17/oledrion
 */
/**
 * Page d'index, liste des derniers produits
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_index.tpl';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once OLEDRION_PATH . 'class/registryfile.php';
// Initialisations
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
$limit = oledrion_utils::getModuleOption('newproducts');
// Nombre maximum d'éléments à afficher
$baseurl = OLEDRION_URL . basename(__FILE__);
// URL de ce script (sans son nom)
$registry = new oledrion_registryfile();
$lastTitle = '';
// 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('welcome_msg', nl2br($registry->getfile(OLEDRION_TEXTFILE1)));
$xoopsTpl->assign('columnsCount', oledrion_utils::getModuleOption('index_colums'));
// Lecture des TVA ********************************************************************************
$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';
示例#2
0
文件: caddy.php 项目: osw17/oledrion
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
 * @version     $Id: caddy.php 12290 2014-02-07 11:05:17Z beckmi $
 */
/**
 * Affichage et gestion du caddy
 */
require 'header.php';
$GLOBALS['current_category'] = -1;
$xoopsOption['template_main'] = 'oledrion_caddy.tpl';
require_once XOOPS_ROOT_PATH . '/header.php';
require_once OLEDRION_PATH . 'class/registryfile.php';
$xoopsTpl->assign('mod_pref', $mod_pref);
// Préférences du module
if (oledrion_utils::getModuleOption('restrict_orders', false)) {
    $registry = new oledrion_registryfile();
    $text = $registry->getfile(OLEDRION_TEXTFILE5);
    $xoopsTpl->assign('restrict_orders_text', xoops_trim($text));
} else {
    $xoopsTpl->assign('restrict_orders_text', '');
}
$op = 'default';
if (isset($_POST['op'])) {
    $op = $_POST['op'];
} elseif (isset($_GET['op'])) {
    $op = $_GET['op'];
}
$productId = 0;
if (isset($_POST['product_id'])) {
    $productId = intval($_POST['product_id']);
} elseif (isset($_GET['product_id'])) {
示例#3
0
 * 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';
示例#4
0
 $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='******'IP'] = oledrion_utils::IP();
 if ($commande->getVar('cmd_bill') == 1) {
     $msg['FACTURE'] = _YES;
 } else {
     $msg['FACTURE'] = _NO;
 }
 // Envoi du mail au client
 oledrion_utils::sendEmailFromTpl('command_client.tpl', $commande->getVar('cmd_email'), sprintf(_OLEDRION_THANKYOU_CMD, $xoopsConfig['sitename']), $msg);
 // Envoi du mail au groupe de personne devant recevoir le mail
 oledrion_utils::sendEmailFromTpl('command_shop.tpl', oledrion_utils::getEmailsFromGroup(oledrion_utils::getModuleOption('grp_sold')), _OLEDRION_NEW_COMMAND, $msg);
 // Présentation du formulaire pour envoi à la passerelle de paiement
 // Présentation finale avec panier en variables cachées ******************************
 $registry = new oledrion_registryfile();
 $text = $registry->getfile(OLEDRION_TEXTFILE7);
 $xoopsTpl->assign('text', xoops_trim($text));
 if (oledrion_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0) {
     $payURL = XOOPS_URL;
     $text = $registry->getfile(OLEDRION_TEXTFILE4);
     $xoopsTpl->append('text', "<br />" . xoops_trim($text));
     $sform = new XoopsThemeForm(_OLEDRION_FINISH, 'payform', $payURL, 'post');
     $h_oledrion_caddy->emptyCart();
 } else {
     if (is_object($gateway)) {
         $payURL = $gateway->getRedirectURL();
     } else {
         $payURL = XOOPS_URL;
     }
     $sform = new XoopsThemeForm(_OLEDRION_PAY_GATEWAY, 'payform', $payURL, 'post');
示例#5
0
文件: texts.php 项目: osw17/oledrion
            $sform->addElement($editor6, false);
        }
        $editor7 = oledrion_utils::getWysiwygForm(_AM_OLEDRION_CHECKOUT_TEXT2, 'welcome7', $registry->getfile(OLEDRION_TEXTFILE7), 5, 60, 'hometext7_hidden');
        if ($editor7) {
            $sform->addElement($editor7, false);
        }
        $button_tray = new XoopsFormElementTray('', '');
        $submit_btn = new XoopsFormButton('', 'post', _AM_OLEDRION_MODIFY, 'submit');
        $button_tray->addElement($submit_btn);
        $sform->addElement($button_tray);
        $sform = oledrion_utils::formMarkRequiredFields($sform);
        $sform->display();
        break;
        // ****************************************************************************************************************
    // ****************************************************************************************************************
    case 'savetexts':
        // Sauvegarde des textes d'accueil ********************************************************
        // ****************************************************************************************************************
        require_once OLEDRION_PATH . 'class/registryfile.php';
        $registry = new oledrion_registryfile();
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome1']), OLEDRION_TEXTFILE1);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome2']), OLEDRION_TEXTFILE2);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome3']), OLEDRION_TEXTFILE3);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome4']), OLEDRION_TEXTFILE4);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome5']), OLEDRION_TEXTFILE5);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome6']), OLEDRION_TEXTFILE6);
        $registry->savefile($myts->stripSlashesGPC($_POST['welcome7']), OLEDRION_TEXTFILE7);
        oledrion_utils::updateCache();
        oledrion_utils::redirect(_AM_OLEDRION_SAVE_OK, $baseurl . '?op=texts', 2);
        break;
}