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


PHP vmdebug函数代码示例

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


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

示例1: display

 /**
  * Render the view
  */
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $this->loadHelper('html');
     $this->loadHelper('currencydisplay');
     $this->loadHelper('reportFunctions');
     $model = VmModel::getModel();
     // $config		= JFactory::getConfig();
     // $tzoffset	= $config->getValue('config.offset');
     JRequest::setvar('task', '');
     // set period
     //$date_presets = $model->getDatePresets();
     $this->SetViewTitle('REPORT');
     $myCurrencyDisplay = CurrencyDisplay::getInstance();
     $this->addStandardDefaultViewLists($model);
     $revenueBasic = $model->getRevenue();
     if ($revenueBasic) {
         $totalReport['revenueTotal_brutto'] = $totalReport['revenueTotal_netto'] = $totalReport['number_of_ordersTotal'] = $totalReport['itemsSoldTotal'] = 0;
         foreach ($revenueBasic as &$j) {
             vmdebug('VirtuemartViewReport revenue', $j);
             $totalReport['revenueTotal_netto'] += $j['order_subtotal_netto'];
             $totalReport['revenueTotal_brutto'] += $j['order_subtotal_brutto'];
             $totalReport['number_of_ordersTotal'] += $j['count_order_id'];
             $j['order_subtotal_netto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_netto']);
             $j['order_subtotal_brutto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_brutto']);
             $j['product_quantity'] = $model->getItemsByRevenue($j);
             $totalReport['itemsSoldTotal'] += $j['product_quantity'];
         }
         $totalReport['revenueTotal_netto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_netto']);
         $totalReport['revenueTotal_brutto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_brutto']);
         // if ( 'product_quantity'==JRequest::getWord('filter_order')) {
         // foreach ($revenueBasic as $key => $row) {
         // $created_on[] =$row['created_on'];
         // $intervals[] =$row['intervals'];
         // $itemsSold[] =$row['product_quantity'];
         // $number_of_orders[] =$row['count_order_id'];
         // $revenue[] =$row['revenue'];
         // }
         // if (JRequest::getWord('filter_order_Dir') == 'desc') array_multisort($itemsSold, SORT_DESC,$revenueBasic);
         // else array_multisort($itemsSold, SORT_ASC,$revenueBasic);
         // }
     }
     $this->assignRef('report', $revenueBasic);
     $this->assignRef('totalReport', $totalReport);
     //$itemsSold = $model->getItemsSold($revenueBasic);
     //$this->assignRef('itemsSold', $itemsSold);
     // I tihnk is to use in a different layout such as product solds
     // PATRICK K.
     // $productList = $model->getOrderItems();
     // $this->assignRef('productList', $productList);
     $this->lists['select_date'] = $model->renderDateSelectList();
     $this->lists['state_list'] = $model->renderOrderstatesList();
     $this->lists['intervals'] = $model->renderIntervalsList();
     $this->assignRef('from_period', $model->from_period);
     $this->assignRef('until_period', $model->until_period);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:63,代码来源:view.html.php

示例2: convert

 function convert($amountA, $currA = '', $currB = '', $a2rC = true, $relatedCurrency = 'EUR')
 {
     // cache subfolder(group) 'convertECB', cache method: callback
     $cache = JFactory::getCache('convertECB', 'callback');
     // save configured lifetime
     @($lifetime = $cache->lifetime);
     $cache->setLifeTime(86400 / 4);
     // check 4 time per day
     // save cache conf
     $conf = JFactory::getConfig();
     // check if cache is enabled in configuration
     $cacheactive = $conf->getValue('config.caching');
     $cache->setCaching(1);
     //enable caching
     $globalCurrencyConverter = $cache->call(array('convertECB', 'getSetExchangeRates'), $this->document_address);
     // revert configuration
     $cache->setCaching($cacheactive);
     if (!$globalCurrencyConverter) {
         vmdebug('convert convert No $globalCurrencyConverter convert ' . $amountA);
         return $amountA;
     } else {
         $valA = isset($globalCurrencyConverter[$currA]) ? $globalCurrencyConverter[$currA] : 1.0;
         $valB = isset($globalCurrencyConverter[$currB]) ? $globalCurrencyConverter[$currB] : 1.0;
         $val = (double) $amountA * $valB / (double) $valA;
         // 			$val = $amountA * $valB / $valA;
         // 			vmdebug('convert convert in: '.$amountA.'  out: '.$val);
         return $val;
     }
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:29,代码来源:convertECB.php

示例3: save

 function save($data = 0)
 {
     $fileModel = VmModel::getModel('media');
     //Now we try to determine to which this media should be long to
     $data = array_merge(vRequest::getRequest(), vRequest::get('media'));
     //$data['file_title'] = vRequest::getVar('file_title','','post','STRING',JREQUEST_ALLOWHTML);
     $data['file_description'] = vRequest::getHtml('media[file_description]', '');
     /*$data['media_action'] = vRequest::getCmd('media[media_action]');
     		$data['media_attributes'] = vRequest::getCmd('media[media_attributes]');
     		$data['file_type'] = vRequest::getCmd('media[file_type]');*/
     if (empty($data['file_type'])) {
         $data['file_type'] = $data['media_attributes'];
     }
     vmdebug('my media in controller save media', $data);
     $msg = '';
     if ($id = $fileModel->store($data)) {
         $msg = vmText::_('COM_VIRTUEMART_FILE_SAVED_SUCCESS');
     }
     $cmd = vRequest::getCmd('task');
     if ($cmd == 'apply') {
         $redirection = 'index.php?option=com_virtuemart&view=media&task=edit&virtuemart_media_id=' . $id;
     } else {
         $redirection = 'index.php?option=com_virtuemart&view=media';
     }
     $this->setRedirect($redirection, $msg);
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:26,代码来源:media.php

示例4: getVmPluginCreateTableSQL

	/**
	 * @return string
	 */
	public function getVmPluginCreateTableSQL () {

		$db = JFactory::getDBO();
		$query = 'SHOW TABLES LIKE "%' . str_replace('#__', '', $this->_tablename) . '"';
		$db->setQuery($query);
		$result = $db->loadResult();
		$app = JFactory::getApplication();
		$tablesFields = 0;
		if ($result) {
			$SQLfields = $this->getTableSQLFields();
			$loggablefields = $this->getTableSQLLoggablefields();
			$tablesFields = array_merge($SQLfields, $loggablefields);
			$update[$this->_tablename] = array($tablesFields, array(), array());
			vmdebug(get_class($this) . ':: VirtueMart2 update ' . $this->_tablename);
			if (!class_exists('GenericTableUpdater')) {
				require(JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'tableupdater.php');
			}
			$updater = new GenericTableUpdater();
			$updater->updateMyVmTables($update);
			//	return FALSE;   //TODO enable this, when using vm version higher than 2.0.8F
		} else {
			return $this->createTableSQL('Userfield Realex Realvault Table', $tablesFields);
		}

	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:28,代码来源:realex_hpp_api.php

示例5: store

	/**
	 * Records in this table do not need to exist, so we might need to create a record even
	 * if the primary key is set. Therefore we need to overload the store() function.
	 *
	 * @author Max Milbers
	 * @see libraries/joomla/database/JTable#store($updateNulls)
	 */
	public function store($updateNulls = false) {

		$this->setLoggableFieldsForStore();

		$this->storeParams();

		$tblKey = $this->_tbl_key;
		$pKey = $this->_pkey;

		if($tblKey == $pKey){
			vmdebug('VmTableData '.get_class($this). ' need not to be a vmtabledata $tblKey == $pKey');
			$res = false;
			if(!empty($this->$tblKey)){
				$_qry = 'SELECT `'.$this->_tbl_key.'` '
				. 'FROM `'.$this->_tbl.'` '
				. 'WHERE `'.$this->_tbl_key.'` = "' . $this->$tblKey.'" ';
				$this->_db->setQuery($_qry);
				$res = $this->_db->loadResult();
			}
			if($res){
				$returnCode = $this->_db->updateObject($this->_tbl, $this, $this->_tbl_key, $updateNulls);
			} else {
				$returnCode = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key);
			}
		} else {
			if(!empty($this->$pKey)){
				$_qry = 'SELECT `'.$this->_tbl_key.'` '
				. 'FROM `'.$this->_tbl.'` '
				. 'WHERE `'.$this->_pkey.'` = "' . $this->$pKey.'" ';
				$this->_db->setQuery($_qry);
				//Yes, overwriting $this->$tblKey is correct !
				$this->$tblKey = $this->_db->loadResult();
			}
			if ( !empty($this->$tblKey) ) {
				$returnCode = $this->_db->updateObject($this->_tbl, $this, $this->_tbl_key, $updateNulls);
			} else {
				$returnCode = $this->_db->insertObject($this->_tbl, $this, $this->_tbl_key);
			}
		}


		//reset Params
		if(isset($this->_tmpParams)){
			foreach($this->_tmpParams as $k => $v){
				$this->$k = $v;
			}
		}
		$this->_tmpParams = false;

		if (!$returnCode) {
			vmError(get_class($this) . '::store failed - ' . $this->_db->getErrorMsg());
			return false;
		}
		else {

			return true;
		}

	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:66,代码来源:vmtabledata.php

示例6: check

 /**
  * Validates the user info record fields.
  *
  * @author RickG, RolandD, Max Milbers
  * @return boolean True if the table buffer is contains valid data, false otherwise.
  */
 public function check()
 {
     if ($this->address_type == 'BT' or $this->address_type == 'ST') {
         if ($this->address_type == 'ST' and empty($this->address_type_name)) {
             $this->address_type_name = 'Delivery Address ' . rand(1, 9);
             vmWarn('Table userinfos check failed: address_type ' . $this->address_type . ' without name, autogenerated ' . $this->address_type_name, 'check failed: ST has no name, autogenerated ' . $this->address_type_name);
             //return false;
         }
     } else {
         vmError('Table userinfos check failed: Unknown address_type ' . $this->address_type, 'check failed: Unknown address_type ');
         vmdebug('Table userinfos check failed: Unknown address_type ' . $this->address_type . ' virtuemart_user_id ' . $this->virtuemart_user_id . ' name ' . $this->name);
         return false;
     }
     if (!empty($this->virtuemart_userinfo_id)) {
         $this->virtuemart_userinfo_id = (int) $this->virtuemart_userinfo_id;
         if (!class_exists('Permissions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
         }
         if (!Permissions::getInstance()->check("admin")) {
             $q = "SELECT virtuemart_user_id\n\t\t\t\t\t\t\t\t\t\tFROM #__virtuemart_userinfos\n\t\t\t\t\t\t\t\t\t\tWHERE virtuemart_userinfo_id = " . $this->virtuemart_userinfo_id;
             $this->_db->setQuery($q);
             $total = $this->_db->loadResultArray();
             if (count($total) > 0) {
                 $userId = JFactory::getUser()->id;
                 if ($total[0] != $userId) {
                     vmError('Hacking attempt uid check, you got logged');
                     echo 'Hacking attempt uid check, you got logged';
                     return false;
                 }
             }
         }
         //return parent::check();
     } else {
         if (empty($this->address_type)) {
             $this->address_type = 'BT';
         }
         /* Check if a record exists */
         $q = "SELECT virtuemart_userinfo_id\n\t\t\tFROM #__virtuemart_userinfos\n\t\t\tWHERE virtuemart_user_id = " . $this->virtuemart_user_id . "\n\t\t\tAND address_type = " . $this->_db->Quote($this->address_type);
         if ($this->address_type != 'BT') {
             $q .= " AND address_type_name = " . $this->_db->Quote($this->address_type_name);
         }
         $this->_db->setQuery($q);
         $total = $this->_db->loadResultArray();
         if (count($total) > 0) {
             $this->virtuemart_userinfo_id = (int) $total[0];
         } else {
             $this->virtuemart_userinfo_id = 0;
             //md5(uniqid($this->virtuemart_user_id));
         }
     }
     if (empty($this->virtuemart_user_id)) {
         $user = JFactory::getUser();
         if (!empty($user->id)) {
             $this->virtuemart_user_id = $user->id;
         }
     }
     return parent::check();
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:64,代码来源:userinfos.php

示例7: displayErrors

 function displayErrors($errors)
 {
     foreach ($errors as $error) {
         vmError(vmText::sprintf('VMPAYMENT_ubrir_ERROR_FROM', $error['message'], $error['field'], $error['code']));
         vmInfo(vmText::sprintf('VMPAYMENT_ubrir_ERROR_FROM', $error['message'], $error['field'], $error['code']));
         if ($error['message'] == 401) {
             vmdebug('check you payment parameters: custom_id, project_id, api key');
         }
     }
 }
开发者ID:itm-constantine,项目名称:ubrr_vm,代码行数:10,代码来源:ubrir.php

示例8: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($field = vRequest::getVar('field')) {
         if (strpos($field, 'plugin') !== false) {
             JForm::addFieldPath(JPATH_VM_ADMINISTRATOR . DS . 'fields');
             $table = '#__extensions';
             $field = substr($field, 6);
             $q = 'SELECT `params`,`element`,`type` FROM `' . $table . '` WHERE `element` = "' . $field . '"';
             $db->setQuery($q);
             $this->userField = $db->loadObject();
             //$this->userField->element = substr($this->userField->type, 6);
             if (!class_exists('vmPlugin')) {
                 require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
             }
             vmPlugin::loadJLang('plg_vmuserfield_' . $this->userField->element, 'vmuserfield', $this->userField->element);
             $path = JPATH_ROOT . DS . 'plugins' . DS . 'vmuserfield' . DS . $this->userField->element . DS . $this->userField->element . '.xml';
             // Get the payment XML.
             $formFile = JPath::clean($path);
             if (file_exists($formFile)) {
                 if (!class_exists('VmConfig')) {
                     require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
                 }
                 if (!class_exists('VmTable')) {
                     require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'vmtable.php';
                 }
                 $this->userField->form = JForm::getInstance($this->userField->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
                 $this->userField->params = new stdClass();
                 $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
                 /*
                 					$this->userField->params->userfield_params = $this->userField->params;
                 					VmTable::bindParameterable($this->userField->params,'userfield_params',$varsToPush);*/
                 if (empty($this->userField->userfield_params)) {
                     $this->userField->userfield_params = '';
                 }
                 $this->userField->params->userfield_params = $this->userField->userfield_params;
                 VmTable::bindParameterable($this->userField->params, 'userfield_params', $varsToPush);
                 $this->userField->form->bind($this->userField);
             } else {
                 $this->userField->form = false;
                 vmdebug('renderUserfieldPlugin could not find xml for ' . $this->userField->type . ' at ' . $path);
             }
             //vmdebug('renderUserfieldPlugin ',$this->userField->form);
             if ($this->userField->form) {
                 $form = $this->userField->form;
                 ob_start();
                 include JPATH_VM_ADMINISTRATOR . DS . 'fields' . DS . 'formrenderer.php';
                 $body = ob_get_contents();
                 ob_end_clean();
                 echo $body;
             }
         }
     }
     jExit();
 }
开发者ID:lenard112,项目名称:cms,代码行数:55,代码来源:view.json.php

示例9: check

 /**
  * Validates the user info record fields.
  *
  * @author RickG, RolandD, Max Milbers
  * @return boolean True if the table buffer is contains valid data, false otherwise.
  */
 public function check()
 {
     if ($this->address_type == 'BT' or $this->address_type == 'ST') {
         if ($this->address_type == 'ST' and empty($this->address_type_name)) {
             $this->address_type_name = 'Delivery Address ' . rand(1, 9);
             vmWarn('Table userinfos check failed: address_type ' . $this->address_type . ' without name, autogenerated ' . $this->address_type_name, 'check failed: ST has no name, autogenerated ' . $this->address_type_name);
         }
     } else {
         vmError('Table userinfos check failed: Unknown address_type ' . $this->address_type, 'check failed: Unknown address_type ');
         vmdebug('Table userinfos check failed: Unknown address_type ' . $this->address_type . ' virtuemart_user_id ' . $this->virtuemart_user_id . ' name ' . $this->name);
         return false;
     }
     if (!empty($this->virtuemart_userinfo_id)) {
         $this->virtuemart_userinfo_id = (int) $this->virtuemart_userinfo_id;
         $user = JFactory::getUser();
         if (!$user->authorise('core.admin', 'com_virtuemart')) {
             $q = "SELECT virtuemart_user_id\n\t\t\t\t\t\t\t\t\t\tFROM #__virtuemart_userinfos\n\t\t\t\t\t\t\t\t\t\tWHERE virtuemart_userinfo_id = " . $this->virtuemart_userinfo_id;
             $this->_db->setQuery($q);
             $total = $this->_db->loadColumn();
             if (count($total) > 0) {
                 $userId = JFactory::getUser()->id;
                 if ($total[0] != $userId) {
                     vmError('Hacking attempt uid check, you got logged');
                     echo 'Hacking attempt uid check, you got logged';
                     return false;
                 }
             }
         }
         //return parent::check();
     } else {
         if (empty($this->address_type)) {
             $this->address_type = 'BT';
         }
         /* Check if a record exists */
         $q = "SELECT virtuemart_userinfo_id\n\t\t\tFROM #__virtuemart_userinfos\n\t\t\tWHERE virtuemart_user_id = " . $this->virtuemart_user_id . "\n\t\t\tAND address_type = " . $this->_db->Quote($this->address_type);
         if ($this->address_type != 'BT') {
             $q .= " AND address_type_name = " . $this->_db->Quote($this->address_type_name);
         }
         $this->_db->setQuery($q);
         $total = $this->_db->loadColumn();
         if (count($total) > 0) {
             $this->virtuemart_userinfo_id = (int) $total[0];
         } else {
             $this->virtuemart_userinfo_id = 0;
             //md5(uniqid($this->virtuemart_user_id));
         }
     }
     if (empty($this->virtuemart_user_id)) {
         $user = JFactory::getUser();
         if (!empty($user->id)) {
             $this->virtuemart_user_id = $user->id;
         }
     }
     return parent::check();
 }
开发者ID:lenard112,项目名称:cms,代码行数:61,代码来源:userinfos.php

示例10: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`=' . $virtuemart_media_id;
         $db->setQuery($query);
         $json = $db->loadObject();
         if (isset($json->file_url)) {
             $json->file_url = JURI::root() . $json->file_url;
             $json->msg = 'OK';
             echo json_encode($json);
         } else {
             $json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = vRequest::getInt('custom_jplugin_id')) {
         $table = '#__extensions';
         $ext_id = 'extension_id';
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->jCustom = $db->loadObject();
         $customModel = VmModel::getModel('custom');
         $this->custom = $customModel->getCustom();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmcustom' . DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
         if (file_exists($formFile)) {
             VmConfig::loadJLang('plg_vmpsplugin', false);
             if (!class_exists('vmPlugin')) {
                 require VMPATH_PLUGINLIBS . DS . 'vmplugin.php';
             }
             $filename = 'plg_vmcustom_' . $this->jCustom->element;
             vmPlugin::loadJLang($filename, 'vmcustom', $this->jCustom->element);
             $this->custom = VmModel::getModel('custom')->getCustom();
             $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
             $this->custom->form = JForm::getInstance($this->jCustom->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $this->custom->params = new stdClass();
             foreach ($varsToPush as $k => $field) {
                 if (strpos($k, '_') != 0) {
                     $this->custom->params->{$k} = $field[0];
                 }
             }
             $this->custom->form->bind($this->custom->getProperties());
             $form = $this->custom->form;
             include VMPATH_ADMIN . DS . 'fields' . DS . 'formrenderer.php';
             echo '<input type="hidden" value="' . $this->jCustom->element . '" name="custom_value">';
         } else {
             $this->custom->form = null;
             //VmConfig::$echoDebug = 1;
             vmdebug('File does not exist ' . $formFile);
         }
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:54,代码来源:view.json.php

示例11: removeAddressST

 function removeAddressST()
 {
     $virtuemart_userinfo_id = vRequest::getInt('virtuemart_userinfo_id');
     $virtuemart_user_id = vRequest::getInt('virtuemart_user_id');
     //Lets do it dirty for now
     $userModel = VmModel::getModel('user');
     vmdebug('removeAddressST', $virtuemart_user_id, $virtuemart_userinfo_id);
     $userModel->setId($virtuemart_user_id[0]);
     $userModel->removeAddress($virtuemart_userinfo_id);
     $layout = vRequest::getCmd('layout', 'edit');
     $this->setRedirect('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $virtuemart_user_id[0]);
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:12,代码来源:user.php

示例12: __construct

 /**
  * Construct a proxy for Avalara's Address Web Service using the default URL as coded in the class or programatically set.
  * 
  * <b>Example:</b>
  * <pre>
  *  $port = new AddressServiceSoap();
  *  $port->ping();
  * </pre>
  *
  * @see AvalaraSoapClient
  * @see TaxServiceSoap
  */
 public function __construct($configurationName = 'Default', $config = 0)
 {
     if (empty($config)) {
         vmdebug('AddressServiceSoap ' . $configurationName);
         $config = new ATConfig($configurationName);
     }
     if (!class_exists('DynamicSoapClient')) {
         require VMAVALARA_CLASS_PATH . '/DynamicSoapClient.class.php';
     }
     $this->client = new DynamicSoapClient($config->addressWSDL, array('location' => $config->url . $config->addressService, 'trace' => $config->trace, 'classmap' => AddressServiceSoap::$classmap), $config);
     //$this->client->__getTypes();
 }
开发者ID:swanghyro,项目名称:Virtuemart2-all-in-one-joomla3,代码行数:24,代码来源:AddressServiceSoap.class.php

示例13: __construct

 /**
  * @param $cData
  */
 public function __construct($cData)
 {
     $this->path = JPATH_VMKLARNAPLUGIN . '/klarna/';
     if (!class_exists('ShopFunctions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php';
     }
     $this->cData = $cData;
     //$this->currencyId = ShopFunctions::getCurrencyIDByName($this->cData['currency_code']);
     vmdebug('klarna_productPrice', $this->cData);
     try {
         $this->klarna_virtuemart = new Klarna_virtuemart();
         $this->klarna_virtuemart->config($this->cData['eid'], $this->cData['secret'], $this->cData['country'], $this->cData['language'], $this->cData['currency'], $this->cData['mode'], VMKLARNA_PC_TYPE, KlarnaHandler::getKlarna_pc_type(), FALSE);
     } catch (Exception $e) {
         vmDebug('klarna_productPrice', $e->getMessage(), $this->cData);
         unset($this->klarna);
     }
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:20,代码来源:klarna_productprice.php

示例14: setStoreOwner

    /**
     * @author Max Milbers
     */
    function setStoreOwner($userId=-1) {

	    $allowInsert=FALSE;

	    if($userId===-1){
		    $allowInsert = TRUE;
		    $userId = 0;
	    }

		if (empty($userId)) {
		    $userId = $this->determineStoreOwner();
			vmdebug('setStoreOwner $userId = '.$userId.' by determineStoreOwner');
		}

		$db = JFactory::getDBO();
		$db->setQuery('SELECT * FROM  `#__virtuemart_vmusers` WHERE `virtuemart_user_id`= "' . $userId . '" ');
		$oldUserId = $db->loadResult();

		if (!empty($oldUserId) and !empty($userId)) {
		    $db->setQuery( 'UPDATE `#__virtuemart_vmusers` SET `virtuemart_vendor_id` = "0", `user_is_vendor` = "0" WHERE `virtuemart_vendor_id` ="1" ');
		    if ($db->execute() == false ) {
			    vmWarn( 'UPDATE __vmusers failed for virtuemart_user_id '.$userId);
			    return false;
		    }

			$db->setQuery( 'UPDATE `#__virtuemart_vmusers` SET `virtuemart_vendor_id` = "1", `user_is_vendor` = "1" WHERE `virtuemart_user_id` ="'.$userId.'" ');
			if ($db->execute() === false ) {
				vmWarn( 'UPDATE __vmusers failed for virtuemart_user_id '.$userId);
				return false;
			} else {
				vmInfo('setStoreOwner VmUser updated new main vendor has user id  '.$userId);
			}
		} else if($allowInsert){
			$db->setQuery('INSERT `#__virtuemart_vmusers` (`virtuemart_user_id`, `user_is_vendor`, `virtuemart_vendor_id`) VALUES ("' . $userId . '", "1","1")');
			if ($db->execute() === false ) {
				vmWarn( 'setStoreOwner was not possible to execute INSERT __vmusers for virtuemart_user_id '.$userId);
				return false;
			} else {
				vmInfo('setStoreOwner VmUser inserted new main vendor has user id  '.$userId);
			}
		}

	    return $userId;
    }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:47,代码来源:updatesmigration.php

示例15: renderVmSubLayout

 /**
  * Renders sublayouts
  *
  * @author Max Milbers
  * @param $name
  * @param int $viewData viewdata for the rendered sublayout, do not remove
  * @return string
  */
 public function renderVmSubLayout($name = 0, $viewData = 0)
 {
     if ($name === 0) {
         $name = $this->_name;
     }
     $lPath = self::getVmSubLayoutPath($name);
     if ($lPath) {
         if ($viewData !== 0 and is_array($viewData)) {
             foreach ($viewData as $k => $v) {
                 if ('_' != substr($k, 0, 1) and !isset($this->{$k})) {
                     $this->{$k} = $v;
                 }
             }
         }
         ob_start();
         include $lPath;
         return ob_get_clean();
     } else {
         vmdebug('renderVmSubLayout layout not found ' . $name);
     }
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:29,代码来源:vmview.php


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