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


PHP oledrion_utils::isAdmin方法代码示例

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


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

示例1: isProductVisible

 /**
  * Indique si le produit courant est visible (périmé, encore en stock, en ligne etc)
  *
  * @return boolean
  * @since 2.3.2009.03.17
  */
 function isProductVisible()
 {
     $isAdmin = oledrion_utils::isAdmin();
     if ($this->getVar('product_online') == 0) {
         if (!$isAdmin) {
             return false;
         }
     }
     if (oledrion_utils::getModuleOption('show_unpublished') == 0 && $this->getVar('product_submitted') > time()) {
         if (!$isAdmin) {
             return false;
         }
     }
     if (oledrion_utils::getModuleOption('nostock_display') == 0 && $this->getVar('product_stock') == 0) {
         if (!$isAdmin) {
             return false;
         }
     }
     return true;
 }
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:26,代码来源:oledrion_products.php

示例2: error_reporting

 */
/**
 * Script pour tout ce qui est relatif à Ajax et JSON
 *
 * @since 2.3.2009.03.17
 */
require_once 'header.php';
error_reporting(0);
@($xoopsLogger->activated = false);
$op = isset($_POST['op']) ? $_POST['op'] : '';
if ($op == '') {
    $op = isset($_GET['op']) ? $_GET['op'] : '';
}
$return = '';
$uid = oledrion_utils::getCurrentUserID();
$isAdmin = oledrion_utils::isAdmin();
switch ($op) {
    // ****************************************************************************************************************
    case 'updatePrice':
        // Mise à jour du prix du produit en fonction des attributs sélectionnés
        // ****************************************************************************************************************
        $product_id = isset($_POST['product_id']) ? intval($_POST['product_id']) : 0;
        if (isset($_POST['formcontent']) && $product_id > 0) {
            $data = $data = $attributesIds = $attributes = $templateProduct = array();
            $handlers = oledrion_handler::getInstance();
            $product = null;
            $product = $handlers->h_oledrion_products->get($product_id);
            if (!is_object($product)) {
                return _OLEDRION_NA;
            }
            if (!$product->isProductVisible()) {
开发者ID:osw17,项目名称:oledrion,代码行数:31,代码来源:ajax.php

示例3: XoopsTpl

 * @author 			Hervé Thouzard of Instant Zero (http://www.instant-zero.com)
 *
 * Version : $Id:
 * ****************************************************************************
 */
/**
 * Sélecteur de produits
 */
require_once '../../../include/cp_header.php';
require_once '../include/common.php';
require_once XOOPS_ROOT_PATH . '/class/template.php';
include_once OLEDRION_PATH . 'class/tree.php';
if (!isset($xoopsUser) || !is_object($xoopsUser)) {
    exit;
}
if (!oledrion_utils::isAdmin()) {
    exit;
}
$xoopsTpl = new XoopsTpl();
$ts =& MyTextSanitizer::getInstance();
$limit = oledrion_utils::getModuleOption('items_count');
// Nombre maximum d'éléments à afficher dans l'admin
$oledrion_handlers = oledrion_handler::getInstance();
$searchFields = array('product_title' => _OLEDRION_TITLE, 'product_summary' => _OLEDRION_SUMMARY, 'product_description' => _OLEDRION_DESCRIPTION, 'product_id' => _AM_OLEDRION_ID, 'product_sku' => _OLEDRION_NUMBER, 'product_extraid' => _OLEDRION_EXTRA_ID);
$searchCriterias = array(XOOPS_MATCH_START => _STARTSWITH, XOOPS_MATCH_END => _ENDSWITH, XOOPS_MATCH_EQUAL => _MATCHES, XOOPS_MATCH_CONTAIN => _CONTAINS);
$vendors = array();
$vendors = $oledrion_handlers->h_oledrion_vendors->getList();
$vendors[0] = '---';
sort($vendors);
$categories = $oledrion_handlers->h_oledrion_cat->getAllCategories(new oledrion_parameters());
$mytree = new Oledrion_XoopsObjectTree($categories, 'cat_cid', 'cat_pid');
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:productsselector.php

示例4: oledrion_shelf

$h_oledrion_products_list = $oledrion_handlers->h_oledrion_products_list;
$h_oledrion_lists = $oledrion_handlers->h_oledrion_lists;
$h_oledrion_delivery = $oledrion_handlers->h_oledrion_delivery;
$h_oledrion_location = $oledrion_handlers->h_oledrion_location;
$h_oledrion_packing = $oledrion_handlers->h_oledrion_packing;
$h_oledrion_payment = $oledrion_handlers->h_oledrion_payment;
$h_oledrion_location_delivery = $oledrion_handlers->h_oledrion_location_delivery;
$h_oledrion_delivery_payment = $oledrion_handlers->h_oledrion_delivery_payment;
$h_oledrion_payment_log = $oledrion_handlers->h_oledrion_payment_log;
$oledrion_shelf = new oledrion_shelf();
// Façade
$oledrion_shelf_parameters = new oledrion_shelf_parameters();
// Les paramètres de la façade
// Définition des images
if (!defined("_OLEDRION_EDIT")) {
    global $xoopsConfig;
    if (file_exists(OLEDRION_PATH . 'language/' . $xoopsConfig['language'] . '/main.php')) {
        include OLEDRION_PATH . 'language/' . $xoopsConfig['language'] . '/main.php';
    } else {
        include OLEDRION_PATH . 'language/english/main.php';
    }
}
global $xoopsModule;
$dirname = basename(dirname(dirname(__FILE__)));
$module_handler = xoops_gethandler('module');
$module = $module_handler->getByDirname($dirname);
$pathIcon16 = '../' . $module->getInfo('icons16');
$icones = array('edit' => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _OLEDRION_EDIT . "' align='middle' />", 'delete' => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _OLEDRION_DELETE . "' align='middle' />", 'online' => "<img src='" . OLEDRION_IMAGES_URL . "online.gif' alt='" . _OLEDRION_ONLINE . "' align='middle' />", 'offline' => "<img src='" . OLEDRION_IMAGES_URL . "offline.gif' alt='" . _OLEDRION_OFFLINE . "' align='middle' />", 'ok' => "<img src='" . OLEDRION_IMAGES_URL . "ok.png' alt='" . _OLEDRION_VALIDATE_COMMAND . "' align='middle' />", 'copy' => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _OLEDRION_DUPLICATE_PRODUCT . "' align='middle' />", 'details' => "<img src='" . OLEDRION_IMAGES_URL . "details.png' alt='" . _OLEDRION_DETAILS . "' align='middle' />", 'print' => "<img src='" . OLEDRION_IMAGES_URL . "print.png' alt='" . _OLEDRION_PRINT_VERSION . "' align='middle' />", 'delivery' => "<img src='" . OLEDRION_IMAGES_URL . "delivery.png' alt='" . _OLEDRION_DELIVERY . "' align='middle' />", 'package' => "<img src='" . OLEDRION_IMAGES_URL . "package.png' alt='" . _OLEDRION_PACK . "' align='middle' />", 'submit' => "<img src='" . OLEDRION_IMAGES_URL . "submit.png' alt='" . _OLEDRION_SUBMIT . "' align='middle' />", 'track' => "<img src='" . OLEDRION_IMAGES_URL . "track.png' alt='" . _OLEDRION_TRACK . "' align='middle' />");
// Chargement de quelques préférences
$mod_pref = array('money_short' => oledrion_utils::getModuleOption('money_short'), 'money_full' => oledrion_utils::getModuleOption('money_full'), 'url_rewriting' => oledrion_utils::getModuleOption('urlrewriting'), 'tooltip' => oledrion_utils::getModuleOption('infotips'), 'advertisement' => oledrion_utils::getModuleOption('advertisement'), 'rss' => oledrion_utils::getModuleOption('use_rss'), 'nostock_msg' => oledrion_utils::getModuleOption('nostock_msg'), 'use_price' => oledrion_utils::getModuleOption('use_price'), 'restrict_orders' => oledrion_utils::getModuleOption('restrict_orders'), 'isAdmin' => oledrion_utils::isAdmin());
开发者ID:osw17,项目名称:oledrion,代码行数:30,代码来源:common.php


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