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

PHP vmError函数代码示例

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

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



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

示例1: __construct

	function __construct($method,$paypalPlugin) {
		parent::__construct($method,$paypalPlugin);
		//Set the credentials
		if ($this->_method->sandbox  ) {
			$this->api_login_id = $this->_method->sandbox_api_login_id;
			$this->api_signature = $this->_method->sandbox_api_signature;
			$this->api_password = $this->_method->sandbox_api_password;
			$this->payflow_partner = $this->_method->sandbox_payflow_partner;
			$this->payflow_vendor = $this->_method->sandbox_payflow_vendor;
		} else {
			$this->api_login_id = $this->_method->api_login_id;
			$this->api_signature = $this->_method->api_signature;
			$this->api_password = $this->_method->api_password;
		}

		if (empty($this->api_login_id) || empty($this->api_signature) || empty($this->api_password)) {
			$text = JText::sprintf('VMPAYMENT_PAYPAL_CREDENTIALS_NOT_SET', $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
			vmError($text, $text);
		}
		if ((empty ($this->_method->payflow_partner) OR empty($this->_method->sandbox_payflow_partner))) {
			$sandbox = "";
			if ($this->_method->sandbox  ) {
				$sandbox = 'SANDBOX_';
			}
			$text = JText::sprintf('VMPAYMENT_PAYPAL_PARAMETER_REQUIRED', JText::_('VMPAYMENT_PAYPAL_' . $sandbox . 'PAYFLOW_PARTNER'), $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
			vmError($text);
		}
	}
开发者ID:sergy444,项目名称:joomla,代码行数:28,代码来源:paypalhosted.php


示例2: __construct

 function __construct($method, $paypalPlugin)
 {
     parent::__construct($method, $paypalPlugin);
     //Set the credentials
     if ($this->_method->sandbox) {
         $this->api_login_id = $this->_method->sandbox_api_login_id;
         if ($this->_method->authentication == 'signature') {
             $this->api_signature = trim($this->_method->sandbox_api_signature);
             $this->api_certificate = '';
         } else {
             $this->api_signature = '';
             $this->api_certificate = trim($this->_method->sandbox_api_certificate);
         }
         $this->api_password = trim($this->_method->sandbox_api_password);
         $this->merchant_email = trim($this->_method->sandbox_merchant_email);
     } else {
         $this->api_login_id = trim($this->_method->api_login_id);
         $this->api_signature = trim($this->_method->api_signature);
         $this->api_certificate = trim($this->_method->api_certificate);
         $this->api_password = trim($this->_method->api_password);
         $this->merchant_email = trim($this->_method->paypal_merchant_email);
     }
     if (!$this->ExpCredentialsValid() or !$this->isAacceleratedOnboardingValid()) {
         $text = vmText::sprintf('VMPAYMENT_PAYPAL_CREDENTIALS_NOT_SET', $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
         vmError($text, $text);
     }
     if (empty($this->_method->expected_maxamount)) {
         $text = vmText::sprintf('VMPAYMENT_PAYPAL_PARAMETER_REQUIRED', vmText::_('VMPAYMENT_PAYPAL_EXPECTEDMAXAMOUNT'), $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
         vmError($text, $text);
     }
 }
开发者ID:spiridonov-oa,项目名称:SheinCandles,代码行数:31,代码来源:paypalexp.php


示例3: check

 function check()
 {
     if (empty($this->shopper_group_name)) {
         vmError('COM_VIRTUEMART_SHOPPERGROUP_RECORDS_MUST_HAVE_NAME');
         return false;
     } else {
         if (function_exists('mb_strlen')) {
             $length = mb_strlen($this->shopper_group_name);
         } else {
             $length = strlen($this->shopper_group_name);
         }
         if ($length > 128) {
             vmError('COM_VIRTUEMART_SHOPPERGROUP_NAME_128');
         }
     }
     if ($this->virtuemart_shoppergroup_id == 1) {
         $this->default = 2;
         $this->sgrp_additional = 0;
     }
     if ($this->virtuemart_shoppergroup_id == 2) {
         $this->default = 1;
         $this->sgrp_additional = 0;
     }
     return parent::check();
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:25,代码来源:shoppergroups.php


示例4: check

 function check()
 {
     if (empty($this->shopper_group_name)) {
         vmError(JText::_('COM_VIRTUEMART_SHOPPERGROUP_RECORDS_MUST_HAVE_NAME'));
         return false;
     } else {
         if (function_exists('mb_strlen')) {
             if (mb_strlen($this->shopper_group_name) > 32) {
                 vmError(JText::_('COM_VIRTUEMART_SHOPPERGROUP_NAME_LESS_THAN_32_CHARACTERS'));
                 return false;
             }
         } else {
             if (strlen($this->shopper_group_name) > 32) {
                 vmError(JText::_('COM_VIRTUEMART_SHOPPERGROUP_NAME_LESS_THAN_32_CHARACTERS'));
                 return false;
             }
         }
     }
     /* commented by PATRICK This set always shoppergroup to 1 if you do a new shoppergroup
     		if(empty($this->virtuemart_shoppergroup_id)){
     			$q = 'SELECT `virtuemart_shoppergroup_id` FROM `#__virtuemart_shoppergroups` WHERE `default`="1" AND `virtuemart_vendor_id`="1" ';
     			$this->_db->setQuery($q);
     			$this->virtuemart_shoppergroup_id=$this->_db->loadResult();
     		}
     */
     return parent::check();
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:27,代码来源:shoppergroups.php


示例5: filterPath

 /**
  * This function does not allow unicode, replacement for JPath::clean
  * and makesafe
  * @param      $string
  * @param bool $forceNoUni
  * @return mixed|string
  */
 static function filterPath($str)
 {
     if (empty($str)) {
         vmError('filterPath empty string check your paths ');
         vmTrace('Critical error, empty string in filterPath');
         return VMPATH_ROOT;
     }
     $str = trim($str);
     // Delete all '?'
     $str = str_replace('?', '', $str);
     // Replace double byte whitespaces by single byte (East Asian languages)
     $str = preg_replace('/\\xE3\\x80\\x80/', ' ', $str);
     $unicodeslugs = VmConfig::get('transliterateSlugs', false);
     if ($unicodeslugs) {
         $lang = JFactory::getLanguage();
         $str = $lang->transliterate($str);
     }
     //This is a path, so remove all strange slashes
     $str = str_replace('/', DS, $str);
     //Clean from possible injection
     while (strpos($str, '..') !== false) {
         $str = str_replace('..', '', $str);
     }
     $str = preg_replace('#[/\\\\]+#', DS, $str);
     $str = filter_var($str, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
     return $str;
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:34,代码来源:vrequest.php


示例6: check

 function check()
 {
     if (empty($this->shopper_group_name)) {
         vmError(vmText::_('COM_VIRTUEMART_SHOPPERGROUP_RECORDS_MUST_HAVE_NAME'));
         return false;
     } else {
         if (function_exists('mb_strlen')) {
             if (mb_strlen($this->shopper_group_name) > 128) {
                 vmError(vmText::_('COM_VIRTUEMART_SHOPPERGROUP_NAME_LESS_THAN_32_CHARACTERS'));
                 return false;
             }
         } else {
             if (strlen($this->shopper_group_name) > 128) {
                 vmError(vmText::_('COM_VIRTUEMART_SHOPPERGROUP_NAME_LESS_THAN_32_CHARACTERS'));
                 return false;
             }
         }
     }
     if ($this->virtuemart_shoppergroup_id == 1) {
         $this->default = 2;
         $this->sgrp_additional = 0;
     }
     if ($this->virtuemart_shoppergroup_id == 2) {
         $this->default = 1;
         $this->sgrp_additional = 0;
     }
     return parent::check();
 }
开发者ID:lenard112,项目名称:cms,代码行数:28,代码来源:shoppergroups.php


示例7: 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


示例8: check

 function check()
 {
     if (empty($this->notify_email) || !filter_var($this->notify_email, FILTER_VALIDATE_EMAIL)) {
         vmError(tsmText::_('com_tsmart_ENTER_A_VALID_EMAIL_ADDRESS'), tsmText::_('com_tsmart_ENTER_A_VALID_EMAIL_ADDRESS'));
         return false;
     }
     return parent::check();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:8,代码来源:waitingusers.php


示例9: check

 function check()
 {
     if (empty($this->notify_email) || !filter_var($this->notify_email, FILTER_VALIDATE_EMAIL)) {
         vmError(JText::_('COM_VIRTUEMART_ENTER_A_VALID_EMAIL_ADDRESS'), JText::_('COM_VIRTUEMART_ENTER_A_VALID_EMAIL_ADDRESS'));
         return false;
     }
     return parent::check();
 }
开发者ID:Arturogcalleja,项目名称:herbolario,代码行数:8,代码来源:waitingusers.php


示例10: check

 /**
  * Validates the userfields record fields.
  *
  * @return boolean True if the table buffer is contains valid data, false otherwise.
  */
 function check($nrOfValues)
 {
     if (preg_match('/[^a-z0-9\\._\\-]/i', $this->group_name) > 0) {
         vmError(JText::_('COM_VIRTUEMART_PERMISSION_GROUP_NAME_INVALID_CHARACTERS'));
         return false;
     }
     return parent::check();
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:13,代码来源:usergroups.php


示例11: displayErrors

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


示例12: display

 function display($tpl = 'pdf')
 {
     if (!file_exists(JPATH_VM_LIBRARIES . '/tcpdf/tcpdf.php')) {
         vmError('View pdf: For the pdf invoice, you must install the tcpdf library at ' . JPATH_VM_LIBRARIES . '/tcpdf');
     } else {
         $viewName = jRequest::getWord('view', 'productdetails');
         $class = 'VirtueMartView' . ucfirst($viewName);
         JLoader::register($class, JPATH_VM_SITE . '/views/' . $viewName . '/view.html.php');
         $view = new $class();
         $view->display($tpl);
     }
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:12,代码来源:view.pdf.php


示例13: bindChecknStore

 public function bindChecknStore(&$data, $preload = false)
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('products_en_gb.tsmart_product_id')->from('#__tsmart_products AS products')->leftJoin('#__tsmart_products_en_gb AS products_en_gb USING(tsmart_product_id)')->where('products_en_gb.tsmart_product_id!=' . (int) $data['tsmart_product_id'])->where('products_en_gb.product_name = ' . $query->q("{$data['product_name']}"));
     $db->setQuery($query);
     $list_tour = $db->loadObjectList();
     if (count($list_tour) > 0) {
         vmError('tour name exists, please select other tour name');
         return false;
     }
     return parent::bindChecknStore($data, $preload);
     // TODO: Change the autogenerated stub
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:14,代码来源:products.php


示例14: display

 function display($tpl = 'pdf')
 {
     if (!file_exists(JPATH_VM_LIBRARIES . DS . 'tcpdf' . DS . 'tcpdf.php')) {
         vmError('View pdf: For the pdf invoice, you must install the tcpdf library at ' . JPATH_VM_LIBRARIES . DS . 'tcpdf');
     } else {
         $viewName = jRequest::getWord('view', 'productdetails');
         $class = 'VirtueMartView' . ucfirst($viewName);
         if (!class_exists($class)) {
             require JPATH_VM_SITE . DS . 'views' . DS . $viewName . DS . 'view.html.php';
         }
         $view = new $class();
         $view->display($tpl);
     }
 }
开发者ID:jdrzaic,项目名称:joomla-dummy,代码行数:14,代码来源:view.pdf.php


示例15: bindChecknStore

 public function bindChecknStore(&$data, $preload = false)
 {
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('itinerary.tsmart_itinerary_id')->from('#__tsmart_itinerary AS itinerary')->where('itinerary.tsmart_itinerary_id!=' . (int) $data['tsmart_itinerary_id'])->where('itinerary.tsmart_product_id=' . (int) $data['tsmart_product_id'])->where('itinerary.title = ' . $query->q("{$data['title']}"));
     $db->setQuery($query);
     $list_itinerary = $db->loadObjectList();
     if (count($list_itinerary) > 0) {
         vmError('itinerary title exists, please select other itinerary title');
         return false;
     }
     return parent::bindChecknStore($data, $preload);
     // TODO: Change the autogenerated stub
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:14,代码来源:itinerary.php


示例16: remove

 /**
  * Delete all record ids selected
  *
  * @return boolean True is the remove was successful, false otherwise.
  */
 function remove($categoryIds)
 {
     $table = $this->getTable('manufacturercategories');
     foreach ($categoryIds as $categoryId) {
         if ($table->checkManufacturer($categoryId)) {
             if (!$table->delete($categoryId)) {
                 return false;
             }
         } else {
             vmError(get_class($this) . '::remove ' . $categoryId . ' failed');
             return false;
         }
     }
     return true;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:20,代码来源:manufacturercategories.php


示例17: check

 /**
  * Validates the order status record fields.
  *
  * @return boolean True if the table buffer is contains valid data, false otherwise.
  */
 function check()
 {
     $db = JFactory::getDBO();
     $q = 'SELECT count(*),virtuemart_orderstate_id FROM `#__virtuemart_orderstates` ';
     $q .= 'WHERE `order_status_code`="' . $this->order_status_code . '"';
     $db->setQuery($q);
     $row = $db->loadRow();
     if (is_array($row)) {
         if ($row[0] > 0) {
             if ($row[1] != $this->virtuemart_orderstate_id) {
                 vmError(vmText::_('COM_VIRTUEMART_ORDER_STATUS_CODE_EXISTS'));
                 return false;
             }
         }
     }
     return parent::check();
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:22,代码来源:orderstates.php


示例18: __construct

 /**
  * @param $cData
  */
 public function __construct($cData)
 {
     $this->path = JPATH_VMKLARNAPLUGIN . '/klarna/';
     if (!class_exists('ShopFunctions')) {
         require VMPATH_ADMIN . 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(), $e->getFile(), $e->getLine(), $this->cData);
         vmError('klarna_productPrice', 'klarna_productPrice: ' . $e->getMessage() . " country:" . $this->cData['country_code_3']);
         unset($this->klarna);
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:21,代码来源:klarna_productprice.php


示例19: __construct

	function __construct($method, $paypalPlugin) {
		parent::__construct($method, $paypalPlugin);
		//Set the credentials
		if ($this->_method->sandbox) {
			$this->merchant_email = $this->_method->sandbox_merchant_email;
		} else {
			$this->merchant_email = $this->_method->paypal_merchant_email;
		}
		if (empty($this->merchant_email)) {
			$sandbox = "";
			if ($this->_method->sandbox) {
				$sandbox = 'SANDBOX_';
			}
			$text = vmText::sprintf('VMPAYMENT_PAYPAL_PARAMETER_REQUIRED', vmText::_('VMPAYMENT_PAYPAL_' . $sandbox . 'MERCHANT'), $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
			vmError($text, $text);
			return FALSE;
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:18,代码来源:paypalstd.php


示例20: __construct

 function __construct($method, $paypalPlugin)
 {
     parent::__construct($method, $paypalPlugin);
     //Set the credentials
     if ($this->_method->sandbox) {
         $this->api_login_id = trim($this->_method->sandbox_api_login_id);
         $this->api_signature = trim($this->_method->sandbox_api_signature);
         $this->api_password = trim($this->_method->sandbox_api_password);
     } else {
         $this->api_login_id = trim($this->_method->api_login_id);
         $this->api_signature = trim($this->_method->api_signature);
         $this->api_password = trim($this->_method->api_password);
     }
     if (empty($this->api_login_id) || empty($this->api_signature) || empty($this->api_password)) {
         $text = tsmText::sprintf('VMPAYMENT_PAYPAL_CREDENTIALS_NOT_SET', $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
         vmError($text, $text);
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:18,代码来源:paypalapi.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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