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

PHP vmdebug函数代码示例

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

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



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


示例16: remove

	/**
	* Delete all calcs selected
	*
	* @author Max Milbers
	* @param  array $cids categories to remove
	* @return boolean if the item remove was successful
	*/
	public function remove($cids) {

		JRequest::checkToken() or jexit( 'Invalid Token, in remove category');

		$table = $this->getTable($this->_maintablename);
		$cat = $this->getTable('calc_categories');
		$sgrp = $this->getTable('calc_shoppergroups');
		$countries = $this->getTable('calc_countries');
		$states = $this->getTable('calc_states');

		$ok = true;

		foreach($cids as $id) {
			$id = (int)$id;
			vmdebug('remove '.$id);
			if (!$table->delete($id)) {
				vmError(get_class( $this ).'::remove '.$id.' '.$table->getError());
				$ok = false;
			}

			if (!$cat->delete($id)) {
				vmError(get_class( $this ).'::remove '.$id.' '.$cat->getError());
				$ok = false;
			}

			if (!$sgrp->delete($id)) {
				vmError(get_class( $this ).'::remove '.$id.' '.$sgrp->getError());
				$ok = false;
			}

			if (!$countries->delete($id)) {
				vmError(get_class( $this ).'::remove '.$id.' '.$countries->getError());
				$ok = false;
			}

			if (!$states->delete($id)) {
				vmError(get_class( $this ).'::remove '.$id.' '.$states->getError());
				$ok = false;
			}

// 			if(!class_exists('vmPSPlugin')) require(JPATH_VM_PLUGINS.DS.'vmpsplugin.php');
			JPluginHelper::importPlugin('vmcalculation');
			$dispatcher = JDispatcher::getInstance();
			$returnValues = $dispatcher->trigger('plgVmDeleteCalculationRow', array( $id));

		}

		return $ok;
	}
开发者ID:rubengarcia0510,项目名称:tienda,代码行数:56,代码来源:calc.php


示例17: vmdebug

        }
        if (!empty($productfile->file_is_forSale)) {
            echo vmText::_('COM_VIRTUEMART_FOR_SALE');
        }
        ?>

				</td>
				<!-- Preview -->
				<td>
				<?php 
        if (file_exists($fullSizeFilenamePath)) {
            echo $productfile->displayMediaThumb();
        } else {
            $file_url = $productfile->theme_url . 'assets/images/vmgeneral/' . VmConfig::get('no_image_found');
            $file_alt = vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . ' ' . $productfile->file_description;
            vmdebug('check path $file_url', $file_url);
            echo $productfile->displayIt($file_url, $file_alt, '', false);
        }
        ?>

				</td>
				<!-- File title -->
				<td><?php 
        echo $productfile->file_name;
        ?>
</td>
				<!-- File extension -->
				<td style="overflow:hidden;"><span class="vmicon vmicon-16-ext_<?php 
        echo $productfile->file_extension;
        ?>
"></span><?php 
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:31,代码来源:default.php


示例18: getUserInfoInUserFields

 /**
  *
  * @author Max Milbers
  */
 function getUserInfoInUserFields($layoutName, $type, $uid, $cart = true, $isVendor = false)
 {
     // 		if(!class_exists('VirtueMartModelUserfields')) require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'userfields.php' );
     // 		$userFieldsModel = new VirtuemartModelUserfields();
     $userFieldsModel = VmModel::getModel('userfields');
     $prepareUserFields = $userFieldsModel->getUserFieldsFor($layoutName, $type);
     if ($type == 'ST') {
         $preFix = 'shipto_';
     } else {
         $preFix = '';
     }
     /*
      * JUser  or $this->_id is the logged user
      */
     if (!empty($this->_data->JUser)) {
         $JUser = $this->_data->JUser;
     } else {
         $JUser = JUser::getInstance($this->_id);
     }
     $data = null;
     $userFields = array();
     if (!empty($uid)) {
         $dataT = $this->getTable('userinfos');
         $data = $dataT->load($uid);
         if ($data->virtuemart_user_id !== 0 and !$isVendor) {
             $user = JFactory::getUser();
             if (!($user->authorise('core.admin', 'com_virtuemart') or $user->authorise('core.manage', 'com_virtuemart'))) {
                 if ($data->virtuemart_user_id != $this->_id) {
                     vmError('Hacking attempt loading userinfo, you got logged');
                     echo 'Hacking attempt loading userinfo, you got logged';
                     return false;
                 }
             }
         }
         if ($data->address_type != 'ST') {
             $BTuid = $uid;
             $data->name = $JUser->name;
             $data->email = $JUser->email;
             $data->username = $JUser->username;
             $data->address_type = 'BT';
         }
         vmdebug('getUserInfoInUserFields !$uid', $data->name);
     } else {
         vmdebug('getUserInfoInUserFields case empty $uid');
         //New Address is filled here with the data of the cart (we are in the userview)
         if ($cart) {
             if (!class_exists('VirtueMartCart')) {
                 require JPATH_VM_SITE . DS . 'helpers' . DS . 'cart.php';
             }
             $cart = VirtueMartCart::getCart();
             $adType = $type . 'address';
             if (empty($cart->{$adType})) {
                 $data = $cart->{$type};
                 if (empty($data)) {
                     $data = array();
                 }
                 if ($JUser) {
                     if (empty($data['name'])) {
                         $data['name'] = $JUser->name;
                     }
                     if (empty($data['email'])) {
                         $data['email'] = $JUser->email;
                     }
                     if (empty($data['username'])) {
                         $data['username'] = $JUser->username;
                     }
                     if (empty($data['virtuemart_user_id'])) {
                         $data['virtuemart_user_id'] = $JUser->id;
                     }
                 }
                 $data = (object) $data;
             }
         } else {
             if ($JUser) {
                 if (empty($data['name'])) {
                     $data['name'] = $JUser->name;
                 }
                 if (empty($data['email'])) {
                     $data['email'] = $JUser->email;
                 }
                 if (empty($data['username'])) {
                     $data['username'] = $JUser->username;
                 }
                 if (empty($data['virtuemart_user_id'])) {
                     $data['virtuemart_user_id'] = $JUser->id;
                 }
                 $data = (object) $data;
             }
         }
     }
     if (empty($data)) {
         vmdebug('getUserInfoInUserFields $data empty', $uid, $data);
         $cart = VirtueMartCart::getCart();
         $data = $cart->BT;
     }
     $userFields[$uid] = $userFieldsModel->getUserFieldsFilled($prepareUserFields, $data, $preFix);
//.........这里部分代码省略.........
开发者ID:lenard112,项目名称:cms,代码行数:101,代码来源:user.php


示例19: _modifyColumn

 /**
  * Add, change or drop userfields
  *
  * @param string $_act Action: ADD, DROP or CHANGE (synonyms available, see the switch cases)
  * @param string $_col Column name
  * @param string $_type fieldtype
  * @param string $_col2 Second Column name
  * @return boolean True on success
  * @author Oscar van Eijk
  *
  * stAn - note: i disabled deleting of user data when a column (shopper field) is deleted. If a deletion of specific user or order is needed, it can be done separatedly
  * The column if not set with $_col2 will be renamed to ORIGINALNAME_DELETED_{timestamp()} and depending on mysql version it's definition will change
  */
 function _modifyColumn($_act, $_col, $_type = '', $_col2 = '')
 {
     $_sql = 'ALTER TABLE `' . $this->_tbl . '` ';
     $_check_act = strtoupper(substr($_act, 0, 3));
     //Check if a column is there
     //$columns = $this->_db->getTableColumns($this->_tbl);
     $columns = $this->showFullColumns('Field', 'Type', false);
     $res = array_key_exists($_col, $columns);
     if ($_check_act != 'ADD' and $_check_act != 'CRE') {
         if (!$res) {
             vmdebug('_modifyColumn Command was ' . $_check_act . ' column does not exist, changed to ADD');
             $_check_act = 'ADD';
         }
     } else {
         if ($res) {
             vmdebug('_modifyColumn Command was ' . $_check_act . ' column already exists, changed to MOD');
             $_check_act = 'UPD';
         }
     }
     switch ($_check_act) {
         case 'ADD':
         case 'CRE':
             // Create
             $_sql .= "ADD {$_col} {$_type} ";
             break;
         case 'DRO':
             // Drop
         // Drop
         case 'DEL':
             // Delete
             //stAn, i strongly do not recommend to delete customer information only because a field was deleted
             if (empty($_col2)) {
                 $_col2 = $_col . '_DELETED_' . time();
                 vmInfo('Be aware the column of table ' . $this->_tbl . ' is not deleted, only renamed to ' . $_col2);
             }
             if (!$this->isMysql51Plus()) {
                 if (empty($_type)) {
                     $_type = 'TEXT CHARACTER SET utf8';
                 }
             }
             // NOT NULL not allowed for deleted columns
             //$t_type = str_ireplace(' NOT ', '', $_type);
             $_sql .= "CHANGE {$_col} {$_col2} {$_type} ";
             //was: $_sql .= "DROP $_col ";
             break;
         case 'MOD':
             // Modify
         // Modify
         case 'UPD':
             // Update
         // Update
         case 'CHA':
             // Change
             if (empty($col2)) {
                 $_col2 = $_col;
             }
             // change type only
             $_sql .= "CHANGE {$_col} {$_col2} {$_type} ";
             break;
     }
     $this->_db->setQuery($_sql);
     $this->_db->execute();
     if ($this->_db->getErrorNum() != 0) {
         vmError(get_class($this) . '::modify table - ' . $this->_db->getErrorMsg() . '<br /> values: action ' . $_act . ', columname: ' . $_col . ', type: ' . $_type . ', columname2: ' . $_col2);
         return false;
     }
     vmdebug('_modifyColumn executed successfully ' . $_sql);
     return true;
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:82,代码来源:vmtable.php


示例20: updateCustomsOrderItems

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vote函数代码示例发布时间:2022-05-23
下一篇:
PHP vmWarn函数代码示例发布时间: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