• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Vmconfig类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(VMPATH_ADMIN . DS . 'helpers');
     if (!class_exists('vmPSPlugin')) {
         require VMPATH_PLUGINLIBS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = vRequest::getCmd('layout', 'default');
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         VmConfig::loadJLang('plg_vmpsplugin', false);
         JForm::addFieldPath(VMPATH_ADMIN . DS . 'fields');
         $shipment = $model->getShipment();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmshipment' . DS . $shipment->shipment_element . DS . $shipment->shipment_element . '.xml');
         if (file_exists($formFile)) {
             $shipment->form = JForm::getInstance($shipment->shipment_element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $shipment->params = new stdClass();
             $varsToPush = vmPlugin::getVarsToPushFromForm($shipment->form);
             VmTable::bindParameterableToSubField($shipment, $varsToPush);
             $shipment->form->bind($shipment->getProperties());
         } else {
             $shipment->form = null;
         }
         if (!class_exists('VmImage')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->pluginList = self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id);
         $this->assignRef('shipment', $shipment);
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true);
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', vmText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $this->shipments = $model->getShipments();
         VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
         foreach ($this->shipments as &$data) {
             // Write the first 5 shoppergroups in the list
             $data->shipmentShoppersList = shopfunctions::renderGuiList($data->virtuemart_shoppergroup_ids, 'shoppergroups', 'shopper_group_name', 'shopper');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:60,代码来源:view.html.php


示例2: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(JPATH_VM_ADMINISTRATOR . DS . 'helpers');
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('vmPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
     }
     $this->assignRef('perms', Permissions::getInstance());
     $model = VmModel::getModel('paymentmethod');
     //@todo should be depended by loggedVendor
     //		$vendorId=1;
     //		$this->assignRef('vendorId', $vendorId);
     // TODO logo
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     $vendorModel = VmModel::getModel('vendor');
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $currencyModel = VmModel::getModel('currency');
     $currencyModel = $currencyModel->getCurrency($vendor->vendor_currency);
     $this->assignRef('vendor_currency', $currencyModel->currency_symbol);
     if ($layoutName == 'edit') {
         // Load the helper(s)
         if (!class_exists('VmImage')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         $payment = $model->getPayment();
         $this->assignRef('payment', $payment);
         $this->assignRef('vmPPaymentList', self::renderInstalledPaymentPlugins($payment->payment_jplugin_id));
         //			$this->assignRef('PaymentTypeList',self::renderPaymentRadioList($paym->payment_type));
         //			$this->assignRef('creditCardList',self::renderCreditCardRadioList($paym->payment_creditcards));
         //			echo 'humpf <pre>'.print_r($paym).'</pre>' ;
         //$this->assignRef('creditCardList',ShopFunctions::renderCreditCardList($paym->payment_creditcards,true));
         $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($payment->virtuemart_shoppergroup_ids, true));
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($payment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->addStandardEditViewCommands($payment->virtuemart_paymentmethod_id);
     } else {
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $payments = $model->getPayments();
         $this->assignRef('payments', $payments);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:Arturogcalleja,项目名称:herbolario,代码行数:58,代码来源:view.html.php


示例3: display

 function display($tpl = null)
 {
     $this->loadHelper('html');
     $model = VmModel::getModel();
     $layoutName = $this->getLayout();
     if ($layoutName == 'edit') {
         $category = $model->getCategory('', false);
         if (isset($category->category_name)) {
             $name = $category->category_name;
         } else {
             $name = '';
         }
         $this->SetViewTitle('CATEGORY', $name);
         $model->addImages($category);
         if ($category->virtuemart_category_id > 1) {
             $relationInfo = $model->getRelationInfo($category->virtuemart_category_id);
             $this->assignRef('relationInfo', $relationInfo);
         }
         $parent = $model->getParentCategory($category->virtuemart_category_id);
         $this->assignRef('parent', $parent);
         if (!class_exists('ShopFunctions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php';
         }
         $templateList = ShopFunctions::renderTemplateList(JText::_('COM_VIRTUEMART_CATEGORY_TEMPLATE_DEFAULT'));
         $this->assignRef('jTemplateList', $templateList);
         if (!class_exists('VirtueMartModelConfig')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'config.php';
         }
         $categoryLayoutList = VirtueMartModelConfig::getLayoutList('category');
         $this->assignRef('categoryLayouts', $categoryLayoutList);
         $productLayouts = VirtueMartModelConfig::getLayoutList('productdetails');
         $this->assignRef('productLayouts', $productLayouts);
         //Nice fix by Joe, the 4. param prevents setting an category itself as child
         $categorylist = ShopFunctions::categoryListTree(array($parent->virtuemart_category_id), 0, 0, (array) $category->virtuemart_category_id);
         $this->loadHelper('permissions');
         $perms = Permissions::getInstance();
         $this->assignRef('perms', $perms);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($category->virtuemart_vendor_id, false);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->assignRef('category', $category);
         $this->assignRef('categorylist', $categorylist);
         $this->addStandardEditViewCommands($category->virtuemart_category_id, $category);
     } else {
         $this->SetViewTitle('CATEGORY_S');
         $keyWord = '';
         $this->assignRef('model', $model);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, 'category_name');
         $categories = $model->getCategoryTree(0, 0, false, $this->lists['search']);
         $this->assignRef('categories', $categories);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:57,代码来源:view.html.php


示例4: __construct

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  *
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     //Todo multivendor nasty hack, to get vendor with id 1
     if (Vmconfig::get('multix', 'none') == 'none') {
         $this->setId(1);
     }
     $this->setMainTable('vendors');
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:15,代码来源:vendor.php


示例5: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('permissions');
     $this->loadHelper('html');
     if (!class_exists('vmPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
     }
     $this->perms = Permissions::getInstance();
     $model = VmModel::getModel('paymentmethod');
     //@todo should be depended by loggedVendor
     //		$vendorId=1;
     //		$this->assignRef('vendorId', $vendorId);
     $vendorModel = VmModel::getModel('vendor');
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $currencyModel = VmModel::getModel('currency');
     $currencyModel->setId($vendor->vendor_currency);
     $currency = $currencyModel->getData();
     $this->vendor_currency = $currency->currency_symbol;
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         // Load the helper(s)
         $this->loadHelper('image');
         // jimport('joomla.html.pane');
         $this->payment = $model->getPayment();
         // $this->vmPPaymentList = self::InstalledPaymentPlgSelectList($payment->payment_jplugin_id);
         //			$this->assignRef('PaymentTypeList',self::renderPaymentRadioList($paym->payment_type));
         //			$this->assignRef('creditCardList',self::renderCreditCardRadioList($paym->payment_creditcards));
         //			echo 'humpf <pre>'.print_r($paym).'</pre>' ;
         //$this->assignRef('creditCardList',ShopFunctions::renderCreditCardList($paym->payment_creditcards,true));
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($this->payment->virtuemart_shoppergroup_ids, true);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $this->vendorList = ShopFunctions::renderVendorList($this->payment->virtuemart_vendor_id);
         }
         // TODO logo
         $this->SetViewTitle('', $this->payment->payment_name);
         $this->addStandardEditViewCommands($this->payment->virtuemart_paymentmethod_id);
     } else {
         if (JRequest::getWord('format', '') === 'raw') {
             $tpl = 'results';
         } else {
             $this->SetViewTitle();
             $this->addStandardDefaultViewCommands();
             // know payment list
             $this->installedPayments = $this->PaymentPlgList();
         }
         $this->addStandardDefaultViewLists($model);
         $this->payments = $model->getPayments();
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
     if ($tpl === 'results') {
         echo $this->AjaxScripts();
     }
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:56,代码来源:view.html.php


示例6: display

 function display($tpl = null)
 {
     // Load the helper(s)
     $this->addHelperPath(JPATH_VM_ADMINISTRATOR . DS . 'helpers');
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (!class_exists('vmPSPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
     }
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = JRequest::getWord('layout', 'default');
     $this->SetViewTitle();
     $layoutName = JRequest::getWord('layout', 'default');
     if ($layoutName == 'edit') {
         $shipment = $model->getShipment();
         if (!class_exists('VmImage')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'image.php';
         }
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         if (!class_exists('VirtueMartModelVendor')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'vendor.php';
         }
         $vendor_id = 1;
         $currency = VirtueMartModelVendor::getVendorCurrency($vendor_id);
         $this->assignRef('vendor_currency', $currency->currency_symbol);
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $vendorList = ShopFunctions::renderVendorList($shipment->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->assignRef('pluginList', self::renderInstalledShipmentPlugins($shipment->shipment_jplugin_id));
         $this->assignRef('shipment', $shipment);
         $this->assignRef('shopperGroupList', ShopFunctions::renderShopperGroupList($shipment->virtuemart_shoppergroup_ids, true));
         $this->addStandardEditViewCommands($shipment->virtuemart_shipmentmethod_id);
     } else {
         JToolBarHelper::custom('cloneshipment', 'copy', 'copy', JText::_('COM_VIRTUEMART_SHIPMENT_CLONE'), true);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shipments = $model->getShipments();
         $this->assignRef('shipments', $shipments);
         $pagination = $model->getPagination();
         $this->assignRef('pagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:50,代码来源:view.html.php


示例7: save

 /**
  * We want to allow html so we need to overwrite some request data
  *
  * @author Max Milbers
  */
 function save($data = 0)
 {
     if ($data === 0) {
         $data = JRequest::get('post');
     }
     $data['product_desc'] = $this->filterText('product_desc');
     $data['product_s_desc'] = $this->filterText('product_s_desc');
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (Permissions::getInstance()->isSuperVendor() != 1) {
         $multix = Vmconfig::get('multix', 'none');
         if ($multix != 'none') {
             unset($data['childs']);
         }
     }
     return parent::save($data);
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:23,代码来源:product.php


示例8: getVendorAcceptedCurrrenciesList

    function getVendorAcceptedCurrrenciesList($vendorId = 0)
    {
        static $currencies = array();
        if ($vendorId === 0) {
            $multix = Vmconfig::get('multix', 'none');
            if (strpos($multix, 'payment') !== FALSE) {
                if (!class_exists('VirtueMartModelVendor')) {
                    require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
                }
                $vendorId = VirtueMartModelVendor::getLoggedVendor();
            } else {
                $vendorId = 1;
            }
        }
        if (!isset($currencies[$vendorId])) {
            $db = JFactory::getDbo();
            $q = 'SELECT `vendor_accepted_currencies`, `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id`=' . $vendorId;
            $db->setQuery($q);
            $vendor_currency = $db->loadAssoc();
            if (!$vendor_currency['vendor_accepted_currencies']) {
                $vendor_currency['vendor_accepted_currencies'] = $vendor_currency['vendor_currency'];
                vmWarn('No accepted currencies defined');
                if (empty($vendor_currency['vendor_accepted_currencies'])) {
                    $uri = JFactory::getURI();
                    $link = $uri->root() . 'administrator/index.php?option=com_virtuemart&view=user&task=editshop';
                    vmWarn(vmText::sprintf('COM_VIRTUEMART_CONF_WARN_NO_CURRENCY_DEFINED', '<a href="' . $link . '">' . $link . '</a>'));
                    $currencies[$vendorId] = false;
                    return $currencies[$vendorId];
                }
            }
            $q = 'SELECT `virtuemart_currency_id`,CONCAT_WS(" ",`currency_name`,`currency_symbol`) as currency_txt
					FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id` IN (' . $vendor_currency['vendor_accepted_currencies'] . ')';
            if ($vendorId != 1) {
                $q .= ' AND (`virtuemart_vendor_id` = "' . $vendorId . '" OR `shared`="1")';
            }
            $q .= '	AND published = "1"
					ORDER BY `ordering`,`currency_name`';
            $db->setQuery($q);
            $currencies[$vendorId] = $db->loadObjectList();
        }
        return $currencies[$vendorId];
    }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:42,代码来源:currency.php


示例9: save

 /**
  * We want to allow html so we need to overwrite some request data
  *
  * @author Max Milbers
  */
 function save($data = 0)
 {
     $data = vRequest::getRequest();
     $user = JFactory::getUser();
     if (!($user->authorise('core.admin', 'com_virtuemart') or $user->authorise('core.manage', 'com_virtuemart'))) {
         $data['product_desc'] = vRequest::get('product_desc', '');
         $data['product_s_desc'] = vRequest::get('product_s_desc', '');
         $data['customtitle'] = vRequest::get('customtitle', '');
     } else {
         $data['product_desc'] = vRequest::getHtml('product_desc', '');
         //Why we have this?
         $multix = Vmconfig::get('multix', 'none');
         if ($multix != 'none') {
             //in fact this shoudl be used, when the mode is administrated and the system is so that
             //every product must be approved by an admin.
             unset($data['published']);
             //unset($data['childs']);
         }
     }
     parent::save($data);
 }
开发者ID:lenard112,项目名称:cms,代码行数:26,代码来源:product.php


示例10: checkVmUserVendor

 private function checkVmUserVendor()
 {
     $db = JFactory::getDBO();
     $multix = Vmconfig::get('multix', 'none');
     $q = 'select virtuemart_user_id,virtuemart_vendor_id from #__virtuemart_vmusers where user_is_vendor = 1';
     // and virtuemart_vendor_id '.$vendorWhere.' limit 1';
     $db->setQuery($q);
     $r = $db->loadAssocList();
     if (empty($r)) {
         vmWarn('Your Virtuemart installation contains an error: No user as marked as vendor. Please update all users to be associated with virtuemart_vendor_id 1.');
     } else {
         if ($multix == 'none' and count($r) != 1) {
             vmWarn('You are using single vendor mode, but it seems more than one user is set as vendor');
         }
         foreach ($r as $entry) {
             if (empty($entry['virtuemart_vendor_id'])) {
                 vmWarn('The user with virtuemart_user_id = ' . $entry['virtuemart_user_id'] . ' is set as vendor, but has no referencing vendorId.');
             }
         }
     }
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:21,代码来源:view.html.php


示例11: save

	/**
	 * We want to allow html so we need to overwrite some request data
	 *
	 * @author Max Milbers
	 */
	function save($data = 0){

		if($data===0)$data = vRequest::getRequest();

		$user = JFactory::getUser();
		if($user->authorise('core.admin','com_virtuemart') or $user->authorise('core.manage','com_virtuemart')){
			$data['product_desc'] = vRequest::get('product_desc','');
			$data['product_s_desc'] = vRequest::get('product_s_desc','');
			$data['customtitle'] = vRequest::get('customtitle','');

				if(isset($data['field'])){
				$data['field'] = vRequest::get('field');
			}
			if(isset($data['childs'])){
				foreach($data['childs'] as $k=>$v){
					$data['childs'][$k]['product_name'] = vRequest::get('product_name','',FILTER_UNSAFE_RAW,FILTER_FLAG_NO_ENCODE,$data['childs'][$k]);
				}
			}
		} else  {
			$data['product_desc'] = vRequest::getHtml('product_desc','');
			$data['product_s_desc'] = vRequest::getHtml('product_s_desc','');
			$data['customtitle'] = vRequest::getHtml('customtitle','');

			if(isset($data['field'])){
				$data['field'] = vRequest::getHtml('field');
			}

			//Why we have this?
			$multix = Vmconfig::get('multix','none');
			if( $multix != 'none' ){
				//in fact this shoudl be used, when the mode is administrated and the system is so that
				//every product must be approved by an admin.
				unset($data['published']);
				//unset($data['childs']);
			}

		}
		parent::save($data);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:44,代码来源:product.php


示例12: save

 /**
  * We want to allow html so we need to overwrite some request data
  *
  * @author Max Milbers
  */
 function save($data = 0)
 {
     $data = JRequest::get('post');
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (Permissions::getInstance()->check('admin')) {
         $data['product_desc'] = JRequest::getVar('product_desc', '', 'post', 'STRING', 2);
         $data['product_s_desc'] = JRequest::getVar('product_s_desc', '', 'post', 'STRING', 2);
         $data['customtitle'] = JRequest::getVar('customtitle', '', 'post', 'STRING', 2);
     } else {
         $data['product_desc'] = JRequest::getVar('product_desc', '', 'post', 'STRING', 2);
         $data['product_desc'] = JComponentHelper::filterText($data['product_desc']);
         //Why we have this?
         $multix = Vmconfig::get('multix', 'none');
         if ($multix != 'none') {
             //in fact this shoudl be used, when the mode is administrated and the sysetm is so that
             //every product must be approved by an admin.
             unset($data['published']);
             //unset($data['childs']);
         }
     }
     parent::save($data);
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:29,代码来源:product.php


示例13: renderVendorList

 /**
  * Creates a Drop Down list of available Vendors
  *
  * @author Max Milbers
  * @access public
  * @param int $virtuemart_shoppergroup_id the shopper group to pre-select
  * @param bool $multiple if the select list should allow multiple selections
  * @return string HTML select option list
  */
 public static function renderVendorList($vendorId, $multiple = FALSE)
 {
     $db = JFactory::getDBO();
     if (Vmconfig::get('multix', 'none') == 'none') {
         $vendorId = 1;
         $q = 'SELECT `vendor_name` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "' . (int) $vendorId . '" ';
         $db->setQuery($q);
         $vendor = $db->loadResult();
         $html = '<input type="text" size="14" name="vendor_name" class="inputbox" value="' . $vendor . '" readonly="">';
     } else {
         if (!JFactory::getUser()->authorise('core.admin', 'com_virtuemart')) {
             if (empty($vendorId)) {
                 $vendorId = 1;
                 //Dont delete this message, we need it later for multivendor
                 //vmWarn('renderVendorList $vendorId is empty, please correct your used model to automatically set the virtuemart_vendor_id to the logged Vendor');
             }
             $q = 'SELECT `vendor_name` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "' . (int) $vendorId . '" ';
             $db->setQuery($q);
             $vendor = $db->loadResult();
             $html = '<input type="text" size="14" name="vendor_name" class="inputbox" value="' . $vendor . '" readonly="">';
             //			$html .='<input type="hidden" value="'.$vendorId.'" name="virtuemart_vendor_id">';
             return $html;
         } else {
             return self::renderVendorFullVendorList($vendorId);
         }
     }
 }
开发者ID:lenard112,项目名称:cms,代码行数:36,代码来源:shopfunctions.php


示例14: check

 /**
  * @author Max Milbers
  * @param
  */
 function check()
 {
     if (!empty($this->_slugAutoName)) {
         $slugAutoName = $this->_slugAutoName;
         $slugName = $this->_slugName;
         if (in_array($slugAutoName, $this->_translatableFields)) {
             $checkTable = $this->_tbl . '_' . VMLANG;
         } else {
             $checkTable = $this->_tbl;
         }
         if (empty($this->{$slugName})) {
             // 				vmdebug('table check use _slugAutoName '.$slugAutoName.' '.$slugName);
             if (!empty($this->{$slugAutoName})) {
                 $this->{$slugName} = $this->{$slugAutoName};
             } else {
                 vmError('VmTable ' . $checkTable . ' Check not passed. Neither slug nor obligatory value at ' . $slugAutoName . ' for auto slug creation is given');
                 return false;
             }
         }
         //if (!class_exists('VmMediaHandler')) require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'mediahandler.php');
         //vmdebug('check $slug before stringURLSafe',$this->$slugName);
         //$this->$slugName = vmFile::makeSafe( $this->$slugName );
         //$lang = JFactory::getLanguage();
         //$this->$slugName = $lang->transliterate($this->$slugName);
         if (JVM_VERSION === 1) {
             $this->{$slugName} = JFilterOutput::stringURLSafe($this->{$slugName});
         } else {
             $this->{$slugName} = JApplication::stringURLSafe($this->{$slugName});
         }
         $valid = $this->checkCreateUnique($checkTable, $slugName);
         if (!$valid) {
             return false;
         }
     }
     foreach ($this->_obkeys as $obkeys => $error) {
         if (empty($this->{$obkeys})) {
             if (empty($error)) {
                 $error = 'Serious error cant save ' . $this->_tbl . ' without ' . $obkeys;
             } else {
                 //	$error = get_class($this).' '.JText::_($error);
                 $error = get_class($this) . ' ' . $error;
             }
             $this->setError($error);
             vmError($error);
             return false;
         }
     }
     if ($this->_unique) {
         if (empty($this->_db)) {
             $this->_db = JFactory::getDBO();
         }
         foreach ($this->_unique_name as $obkeys => $error) {
             if (empty($this->{$obkeys})) {
                 // 					vmError(JText::sprintf('COM_VIRTUEMART_NON_UNIQUE_KEY',$this->$obkeys));
                 $this->setError($error);
                 vmError('Non unique ' . $this->_unique_name . ' ' . $error);
                 return false;
             } else {
                 $valid = $this->checkCreateUnique($this->_tbl, $obkeys);
                 if (!$valid) {
                     return false;
                 }
             }
         }
     }
     if (isset($this->virtuemart_vendor_id)) {
         $multix = Vmconfig::get('multix', 'none');
         //Lets check if the user is admin or the mainvendor
         if (!class_exists('Permissions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
         }
         $virtuemart_vendor_id = false;
         if ($multix == 'none' and get_class($this) !== 'TableVmusers') {
             $this->virtuemart_vendor_id = 1;
         } else {
             $loggedVendorId = Permissions::getInstance()->isSuperVendor();
             $admin = Permissions::getInstance()->check('admin');
             $tbl_key = $this->_tbl_key;
             if (get_class($this) !== 'TableVmusers') {
                 $q = 'SELECT `virtuemart_vendor_id` FROM `' . $this->_tbl . '` WHERE `' . $this->_tbl_key . '`=' . $this->{$tbl_key};
                 $this->_db->setQuery($q);
                 $virtuemart_vendor_id = $this->_db->loadResult();
             } else {
                 $q = 'SELECT `virtuemart_vendor_id`,`user_is_vendor` FROM `' . $this->_tbl . '` WHERE `' . $this->_tbl_key . '`=' . $this->{$tbl_key};
                 $this->_db->setQuery($q);
                 $vmuser = $this->_db->loadRow();
                 if ($vmuser and count($vmuser) === 2) {
                     $virtuemart_vendor_id = $vmuser[0];
                     $user_is_vendor = $vmuser[1];
                     if ($multix == 'none') {
                         if (empty($user_is_vendor)) {
                             $this->virtuemart_vendor_id = 0;
                         } else {
                             $this->virtuemart_vendor_id = 1;
                         }
                         return true;
//.........这里部分代码省略.........
开发者ID:Gskflute,项目名称:joomla25,代码行数:101,代码来源:vmtable.php


示例15: defined

* @author Max Milbers
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: default.php 6475 2012-09-21 11:54:21Z Milbo $
*/
// Added modal for adding NEW payment. THe customer have to preselect a payment now to add a new one.
// this permit to load directly the config XML and not to save 2 time the paymentmethod form
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die;
//if($virtuemart_vendor_id==1 || $perm->check( 'admin' )){
$multiX = Vmconfig::get('multix', 'none') !== 'none' ? true : false;
$cols = $multiX ? 10 : 9;
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<?php 
AdminUIHelper::startAdminArea();
?>

	<div class="clearfix"> </div>
	<div id="results">
		<?php 
// split to use ajax search
echo $this->loadTemplate('results');
?>
	</div>
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:30,代码来源:default.php


示例16: array

?>

		<?php 
//echo VmHTML::row('booleanlist','COM_VIRTUEMART_VISIBLE_FOR_SHOPPER','calc_shopper_published',$this->calc->calc_shopper_published);
?>
		<?php 
//echo VmHTML::row('booleanlist','COM_VIRTUEMART_VISIBLE_FOR_VENDOR','calc_vendor_published',$this->calc->calc_vendor_published);
?>
		<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_START_DATE', vmJsApi::jDate($this->calc->publish_up, 'publish_up'));
?>
		<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_END_DATE', vmJsApi::jDate($this->calc->publish_down, 'publish_down'));
?>
		<?php 
if (Vmconfig::get('multix', 'none') !== 'none' and $this->perms->check('admin')) {
    echo VmHTML::row('raw', 'COM_VIRTUEMART_VENDOR', $this->vendorList);
}
?>
        </table></fieldset>
		<?php 
if (!class_exists('vmCalculationPlugin')) {
    require JPATH_VM_PLUGINS . DS . 'vmcalculationplugin.php';
}
JPluginHelper::importPlugin('vmcalculation');
$dispatcher = JDispatcher::getInstance();
$html = '';
$returnValues = $dispatcher->trigger('plgVmOnDisplayEdit', array(&$this->calc, &$html));
echo $html;
?>
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:30,代码来源:edit.php


示例17: renderVendorList

 /**
  * Creates a Drop Down list of available Vendors
  *
  * @author Max Milbers
  * @access public
  * @param int $virtuemart_shoppergroup_id the shopper group to pre-select
  * @param bool $multiple if the select list should allow multiple selections
  * @return string HTML select option list
  */
 public static function renderVendorList($vendorId, $multiple = FALSE)
 {
     $db = JFactory::getDBO();
     if (Vmconfig::get('multix', 'none') == 'none') {
         $vendorId = 1;
         $q = 'SELECT `vendor_name` FROM #__virtuemart_vendors WHERE `virtuemart_vendor_id` = "' . (int) $vendorId . '" ';
         $db->setQuery($q);
         $vendor = $db->loadResult();
         $html = '<input type="text" size="14" name="vendor_name" class="inputbox" value="' . $vendor . '" readonly="">';
     } else {
         if (!class_exists('Permissions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
         }
         if (!Permissions::getInstance()->check('admin')) {
             if (empty($vendorId)) {
                 $vendorId = 1;
                 //Dont delete this message, we need it later for multivendor
                 //JError::raiseWarning(1,'renderVendorList $vendorId is empty, please correct your used model to automatically set the virtuemart_vendor_id to the logged Vendor');
             }
             $q = 'SELECT `vendor_name` FROM #__virtuemart_vendors WHERE `virtuemart_vendor_id` = "' . (int) $vendorId . '" ';
             $db->setQuery($q);
             $vendor = $db->loadResult();
             $html = '<input type="text" size="14" name="vendor_name" class="inputbox" value="' . $vendor . '" readonly="">';
             //			$html .='<input type="hidden" value="'.$vendorId.'" name="virtuemart_vendor_id">';
             return $html;
         } else {
             $q = 'SELECT `virtuemart_vendor_id`,`vendor_name` FROM #__virtuemart_vendors';
             $db->setQuery($q);
             $vendors = $db->loadAssocList();
             $attrs = '';
             $name = 'vendor_name';
             $idA = $id = 'virtuemart_vendor_id';
             if ($multiple) {
                 $attrs = ' multiple="multiple" ';
                 $idA .= '[]';
             } else {
                 $emptyOption = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_LIST_EMPTY_OPTION'), $id, $name);
                 array_unshift($vendors, $emptyOption);
             }
             $listHTML = JHTML::_('select.genericlist', $vendors, $idA, $attrs, $id, $name, $vendorId);
             return $listHTML;
         }
     }
 }
开发者ID:Roma48,项目名称:abazherka_old,代码行数:53,代码来源:shopfunctions.php


示例18: display

 function display($tpl = null)
 {
     VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
     $option = vRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $layoutName = vRequest::getCmd('layout', 'default');
     $model = VmModel::getModel();
     // The list of fields which can't be toggled
     //$lists['coreFields']= array( 'name','username', 'email', 'password', 'password2' );
     $lists['coreFields'] = $model->getCoreFields();
     if ($layoutName == 'edit') {
         $this->editor = JFactory::getEditor();
         $this->userField = $model->getUserfield();
         //vmdebug('user plugin $this->userField',$this->userField);
         $this->SetViewTitle('USERFIELD', $this->userField->name);
         $this->assignRef('viewName', $viewName);
         $userFieldPlugin = '';
         if (!class_exists('ShopFunctions')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
         }
         $this->ordering = ShopFunctions::renderOrderingList('userfields', 'name', $this->userField->ordering);
         if ($this->userField->virtuemart_userfield_id < 1) {
             // Insert new userfield
             $userFieldValues = array();
             $attribs = '';
             $lists['type'] = JHtml::_('select.genericlist', $this->_getTypes(), 'type', $attribs, 'type', 'text', $this->userField->type);
         } else {
             // Update existing userfield
             // Ordering dropdown
             $userFieldValues = $model->getUserfieldValues();
             $lists['type'] = $this->_getTypes($this->userField->type) . '<input id="type" type="hidden" name="type" value="' . $this->userField->type . '" />';
             if (strpos($this->userField->type, 'plugin') !== false) {
                 $userFieldPlugin = self::renderUserfieldPlugin(substr($this->userField->type, 6), $this->userField);
             }
         }
         $this->assignRef('userFieldPlugin', $userFieldPlugin);
         JToolBarHelper::divider();
         JToolBarHelper::save();
         JToolBarHelper::apply();
         JToolBarHelper::cancel();
         $notoggle = '';
         // (in_array($this->userField->name, $lists['coreFields']) ? 'class="readonly"' : '');
         // Vendor selection
         if (Vmconfig::get('multix', 'none') !== 'none') {
             $lists['vendors'] = ShopFunctions::renderVendorList($this->userField->virtuemart_vendor_id);
         }
         // Shopper groups for EU VAT Id
         $shoppergroup_model = VmModel::getModel('shoppergroup');
         $shoppergroup_list = $shoppergroup_model->getShopperGroups(true);
         array_unshift($shoppergroup_list, '0');
         $lists['shoppergroups'] = JHtml::_('select.genericlist', $shoppergroup_list, 'virtuemart_shoppergroup_id', '', 'virtuemart_shoppergroup_id', 'shopper_group_name', $this->userField->get('virtuemart_shoppergroup_id'));
         // Minimum age select
         $ages = array();
         for ($i = 13; $i <= 25; $i++) {
             $ages[] = array('key' => $i, 'value' => $i . ' ' . vmText::_('COM_VIRTUEMART_YEAR_S'));
         }
         $lists['minimum_age'] = JHtml::_('select.genericlist', $ages, 'minimum_age', '', 'key', 'value', $this->userField->get('minimum_age', 18));
         // Web address types
         $webaddress_types = array(array('key' => 0, 'value' => vmText::_('COM_VIRTUEMART_USERFIELDS_URL_ONLY')), array('key' => 2, 'value' => vmText::_('COM_VIRTUEMART_USERFIELDS_HYPERTEXT_URL')));
         $lists['webaddresstypes'] = JHtml::_('select.genericlist', $webaddress_types, 'webaddresstype', '', 'key', 'value', $this->userField->get('webaddresstype'));
         // Userfield values
         if (($n = count($userFieldValues)) < 1) {
             $lists['userfield_values'] = '<tr>' . '<td><input type="text" value="" name="vValues[0]" /></td>' . '<td><input type="text" size="50" value="" name="vNames[0]" /></td>' . '</tr>';
             $i = 1;
         } else {
             $lists['userfield_values'] = '';
             $lang = JFactory::getLanguage();
             for ($i = 0; $i < $n; $i++) {
                 $translate = $lang->hasKey($userFieldValues[$i]->fieldtitle) ? " (" . vmText::_($userFieldValues[$i]->fieldtitle) . ")" : "";
                 $lists['userfield_values'] .= '<tr>' . '<td><input type="text" value="' . $userFieldValues[$i]->fieldvalue . '" name="vValues[' . $i . ']" /></td>' . '<td><input type="text" size=& 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Vote类代码示例发布时间:2022-05-23
下一篇:
PHP VmViewAdmin类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap