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

PHP vmText类代码示例

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

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



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

示例1: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     $cid = vRequest::getvar('cid', NULL, 'array');
     if (is_Array($cid)) {
         $virtuemart_paymentmethod_id = $cid[0];
     } else {
         $virtuemart_paymentmethod_id = $cid;
     }
     $http = JURI::root() . 'index.php?option=com_virtuemart&view=vmplg&task=notify&nt=ipn&tmpl=component&pm=' . $virtuemart_paymentmethod_id;
     $https = str_replace('http://', 'https://', $http);
     $class = $node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"';
     if ($node->attributes('editable') == 'true') {
         $size = $node->attributes('size') ? 'size="' . $node->attributes('size') . '"' : '';
         return '<input type="text" name="' . $control_name . '[' . $name . ']" id="' . $control_name . $name . '" value="' . $value . '" ' . $class . ' ' . $size . ' />';
     } else {
         $string = "<div " . $class . ">";
         $string .= '<div class="ipn-sandbox">' . $http . ' <br /></div>';
         if (strcmp($https, $http) !== 0) {
             $string .= '<div class="ipn-sandbox">' . vmText::_('VMPAYMENT_AMAZON_OR') . '<br /></div>';
             $string .= $https;
             $string .= "</div>";
         }
         return $string;
     }
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:25,代码来源:ipnurl.php


示例2: display

 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $this->vendorId = VmConfig::isSuperVendor();
     // TODO add icon for media view
     $this->SetViewTitle();
     $model = VmModel::getModel('media');
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $this->media = $model->getFile();
         $this->addStandardEditViewCommands();
     } else {
         $virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
         if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
             $virtuemart_product_id = (int) $virtuemart_product_id[0];
         } else {
             $virtuemart_product_id = (int) $virtuemart_product_id;
         }
         $cat_id = vRequest::getInt('virtuemart_category_id', 0);
         JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
         $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
         $options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
         $this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
         $this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:33,代码来源:view.html.php


示例3: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     // Base name of the HTML control.
     $ctrl = $control_name . '[' . $name . ']';
     // Construct an array of the HTML OPTION statements.
     $options = array();
     foreach ($node->children() as $option) {
         $val = $option->attributes('value');
         $text = $option->data();
         $options[] = JHTML::_('select.option', $val, vmText::_($text));
     }
     // Construct the various argument calls that are supported.
     $attribs = ' ';
     if ($v = $node->attributes('size')) {
         $attribs .= 'size="' . $v . '"';
     }
     if ($v = $node->attributes('class')) {
         $attribs .= 'class="' . $v . '"';
     } else {
         $attribs .= 'class="inputbox"';
     }
     if ($m = $node->attributes('multiple')) {
         $attribs = 'multiple="true"   data-placeholder="' . vmText::_('COM_VIRTUEMART_DRDOWN_SELECT_SOME_OPTIONS') . '"';
         $ctrl .= '[]';
     }
     // Render the HTML SELECT list.
     return JHTML::_('select.genericlist', $options, $ctrl, $attribs, 'value', 'text', $value, $control_name . $name);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:28,代码来源:klarnamultilist.php


示例4: 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);
     if (!empty($data['file_description'])) {
         $data['file_description'] = JComponentHelper::filterText($data['file_description']);
         //vRequest::filter(); vRequest::getHtml('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'];
     }
     $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:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:28,代码来源:media.php


示例5: displayMediaFull

 function displayMediaFull($imageArgs = '', $lightbox = true, $effect = "class='modal'", $description = true)
 {
     if (!$this->file_is_forSale) {
         // Remote image URL
         if (substr($this->file_url, 0, 4) == "http") {
             $file_url = $this->file_url;
             $file_alt = $this->file_title;
         } else {
             $rel_path = str_replace('/', DS, $this->file_url_folder);
             $fullSizeFilenamePath = VMPATH_ROOT . DS . $rel_path . $this->file_name . '.' . $this->file_extension;
             if (!file_exists($fullSizeFilenamePath)) {
                 $file_url = $this->theme_url . 'assets/images/vmgeneral/' . VmConfig::get('no_image_found');
                 $file_alt = vmText::_('COM_VIRTUEMART_NO_IMAGE_FOUND') . ' ' . $this->file_description;
             } else {
                 $file_url = $this->file_url;
                 $file_alt = $this->file_meta;
             }
         }
         $postText = false;
         if ($description) {
             $postText = $this->file_description;
         }
         if (!empty($this->file_class)) {
             $imageArgs = $this->filterImageArgs($imageArgs);
         }
         return $this->displayIt($file_url, $file_alt, $imageArgs, $lightbox, $effect, $postText);
     } else {
         //Media which should be sold, show them only as thumb (works as preview)
         return $this->displayMediaThumb(array('id' => 'vm_display_image'), false);
     }
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:31,代码来源:image.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: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         // 			echo '<pre>'.print_r($image,1).'</pre>';
         $this->json = $image[0];
         //echo json_encode($this->json);
         if (isset($this->json->file_url)) {
             $this->json->file_root = JURI::root(true) . '/';
             $this->json->msg = 'OK';
             echo @json_encode($this->json);
         } else {
             $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo @json_encode($this->json);
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo @json_encode($list);
     }
     jExit();
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:30,代码来源:view.json.php


示例8: getInput

 function getInput()
 {
     $dynamic_url = JURI::root() . 'index.php?option=com_virtuemart&amp;view=pluginresponse&amp;task=pluginnotification&amp;tmpl=component&amp;po=';
     $accepted_url = JURI::root() . 'index.php?option=com_virtuemart&amp;view=pluginresponse&amp;task=pluginresponsereceived&amp;po=';
     $refused_url = JURI::root() . 'index.php?option=com_virtuemart&amp;view=pluginresponse&amp;task=pluginUserPaymentCancel&amp;po=';
     $msg = "";
     $msg .= '<div>';
     $msg .= "<strong>" . vmText::_('VMPAYMENT_KLIKANDPAY_CONF_DYNAMIC_RETURN_URL') . "</strong>";
     $msg .= "<br />";
     $msg .= vmText::_('VMPAYMENT_KLIKANDPAY_CONF_DYNAMIC_RETURN_URL_TIP');
     $msg .= "<br />";
     $msg .= '<input class="required" readonly size="180" value="' . $dynamic_url . '" />';
     $msg .= "</div>";
     $msg .= '<div style="margin-top: 10px ;">';
     $msg .= "<strong>" . vmText::_('VMPAYMENT_KLIKANDPAY_CONF_URL_TRANSACTION_ACCEPTED') . "</strong>";
     $msg .= "<br />";
     $msg .= vmText::_('VMPAYMENT_KLIKANDPAY_CONF_URL_TRANSACTION_ACCEPTED_TIP');
     $msg .= "<br />";
     $msg .= '<input class="required" readonly size="180" value="' . $accepted_url . '" />';
     $msg .= "</div>";
     $msg .= '<div style="margin-top: 10px ;">';
     $msg .= "<strong>" . vmText::_('VMPAYMENT_KLIKANDPAY_CONF_URL_TRANSACTION_REFUSED') . "</strong>";
     $msg .= "<br />";
     $msg .= vmText::_('VMPAYMENT_KLIKANDPAY_CONF_URL_TRANSACTION_REFUSED_TIP');
     $msg .= "<br />";
     //$msg .=   $refused_url  ;
     $msg .= '<input class="required" readonly size="180" value="' . $refused_url . '" />';
     $msg .= "</div>";
     return $msg;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:30,代码来源:urls.php


示例9: __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);
         $this->payflow_partner = trim($this->_method->sandbox_payflow_partner);
         $this->payflow_vendor = trim($this->_method->sandbox_payflow_vendor);
     } 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 = vmText::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 = vmText::sprintf('VMPAYMENT_PAYPAL_PARAMETER_REQUIRED', vmText::_('VMPAYMENT_PAYPAL_' . $sandbox . 'PAYFLOW_PARTNER'), $this->_method->payment_name, $this->_method->virtuemart_paymentmethod_id);
         vmError($text);
     }
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:28,代码来源:paypalhosted.php


示例10: linkIcon

 function linkIcon($link, $altText = '', $boutonName, $verifyConfigValue = false, $modal = true, $use_icon = true, $use_text = false, $class = '')
 {
     if ($verifyConfigValue) {
         if (!VmConfig::get($verifyConfigValue, 0)) {
             return '';
         }
     }
     $folder = 'media/system/images/';
     //shouldn't be root slash before media, as it automatically tells to look in root directory, for media/system/ which is wrong it should append to root directory.
     $text = '';
     if ($use_icon) {
         $text .= JHtml::_('image', $folder . $boutonName . '.png', vmText::_($altText), null, false, false);
     }
     //$folder shouldn't be as alt text, here it is: image(string $file, string $alt, mixed $attribs = null, boolean $relative = false, mixed $path_rel = false) : string, you should change first false to true if images are in templates media folder
     if ($use_text) {
         $text .= '&nbsp;' . vmText::_($altText);
     }
     if ($text == '') {
         $text .= '&nbsp;' . vmText::_($altText);
     }
     if ($modal) {
         return '<a ' . $class . ' class="modal" rel="{handler: \'iframe\', size: {x: 700, y: 550}}" title="' . vmText::_($altText) . '" href="' . JRoute::_($link, FALSE) . '">' . $text . '</a>';
     } else {
         return '<a ' . $class . ' title="' . vmText::_($altText) . '" href="' . JRoute::_($link, FALSE) . '">' . $text . '</a>';
     }
 }
开发者ID:lenard112,项目名称:cms,代码行数:26,代码来源:vmview.php


示例11: onResponseUpdateOrderHistory

	/**
	 * if asynchronous mode= state= pending
	 * if asynchronous mode=> timeOut was set to > 0
	 * if synchronous mode=> timeOut ==0
	 * -- if InvalidPaymentMethod and asynchronous mode, the state= suspended ==> send an email
	 * -- if InvalidPaymentMethod and synchronous mode: return to cart, redisplay wallet widget
	 * -- AmazonRejected: if state == open, then retry authorization, else Declined
	 * -- Processing failure: retry the request in 2 minutes ???
	 * --
	 * @return mixed
	 */


	public function onResponseUpdateOrderHistory ($order) {

		$order_history = array();
		$amazonState = "";
		$reasonCode = "";
		$authorizeResponse = $this->amazonData;
		// if am

		$authorizeResult = $authorizeResponse->getAuthorizeResult();
		$authorizationDetails = $authorizeResult->getAuthorizationDetails();
		if ($authorizationDetails->isSetAuthorizationStatus()) {
			$authorizationStatus = $authorizationDetails->getAuthorizationStatus();
			if (!$authorizationStatus->isSetState()) {
				return false;
			}
			$amazonState = $authorizationStatus->getState();

			if ($authorizationStatus->isSetReasonCode()) {
				$reasonCode = $authorizationStatus->getReasonCode();
			}
		}
		// In asynchronous mode, AuthorizationResponse is always Pending. Order status is not updated
		if ($amazonState == 'Pending') {
			return $amazonState;
		}

		// SYNCHRONOUS MODE: amazon returns in real time the final process status
		if ($amazonState == 'Open') {
			// it should always be the case if the CaptureNow == false
			$order_history['order_status'] = $this->_currentMethod->status_authorization;
			$order_history['comments'] = vmText::_('VMPAYMENT_AMAZON_COMMENT_STATUS_AUTHORIZATION_OPEN');
			$order_history['customer_notified'] = 1;
		} elseif ($amazonState == 'Closed') {
			// it should always be the case if the CaptureNow == true
			if (!($authorizationDetails->isSetCaptureNow() and $authorizationDetails->getCaptureNow())) {
				$this->debugLog('SYNCHRONOUS , capture Now, and Amazon State is NOT CLOSED' . __FUNCTION__ . var_export($authorizeResponse, true), 'error');
				return $amazonState;
			}
			$order_history['order_status'] = $this->_currentMethod->status_capture;
			$order_history['comments'] = vmText::_('VMPAYMENT_AMAZON_COMMENT_STATUS_CAPTURED');
			$order_history['customer_notified'] = 1;

		} elseif ($amazonState == 'Declined') {
			// handling Declined Authorizations
			$order_history['order_status'] = $this->_currentMethod->status_cancel;
			$order_history['comments'] = $reasonCode;
			if ($authorizationStatus->isSetReasonDescription()) {
				$order_history['comments'] .= " " . $authorizationStatus->getReasonDescription();
			}
			$order_history['customer_notified'] = 0;

		}
		$order_history['amazonState'] = $amazonState;
		$modelOrder = VmModel::getModel('orders');
		$modelOrder->updateStatusForOneOrder($order['details']['BT']->virtuemart_order_id, $order_history, false);


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


示例12: fetchElement

 function fetchElement($name, $value, &$node, $control_name)
 {
     if (!function_exists('curl_init') or !function_exists('curl_exec')) {
         return vmText::_('VMPAYMENT_AUTHORIZENET_CURL_LIBRARY_NOT_INSTALLED');
     } else {
         return vmText::_('VMPAYMENT_AUTHORIZENET_CURL_LIBRARY_INSTALLED');
     }
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:8,代码来源:authorizenetcurl.php


示例13: check

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


示例14: onResponseUpdateOrderHistory

 /**
  * Only send an email if the ERP is enabled, and authorization is done by ERP
  * IN all other cases, there will be an authorization after OrderConfirmed, that will send an email
  * @param $order
  */
 function onResponseUpdateOrderHistory($order)
 {
     $order_history['order_status'] = $this->_currentMethod->status_orderconfirmed;
     $order_history['customer_notified'] = $this->getCustomerNotified();
     $order_history['comments'] = vmText::_('VMPAYMENT_AMAZON_COMMENT_STATUS_ORDERCONFIRMED');
     $modelOrder = VmModel::getModel('orders');
     $modelOrder->updateStatusForOneOrder($order['details']['BT']->virtuemart_order_id, $order_history, false);
 }
开发者ID:proyectoseb,项目名称:Matrix,代码行数:13,代码来源:confirmorderreferenceresponse.php


示例15: 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	= JPath::clean( 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:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:view.json.php


示例16: getInput

 function getInput()
 {
     $flag = $this->value;
     if ($this->value == 'NB') {
         $flag = 'NO';
     }
     $flagImg = JURI::root(TRUE) . '/media/mod_languages/images/' . strtolower($flag) . '.gif';
     return '<strong>' . vmText::_('VMPAYMENT_KLARNA_CONF_SETTINGS_' . $this->value) . '</strong><img style="margin-left: 5px;" src="' . $flagImg . '" />';
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:9,代码来源:klarnacountrylogo.php


示例17: getOptions

 protected function getOptions()
 {
     $creditcards = PaypalHelperPaypal::getPaypalCreditCards();
     $prefix = 'VMPAYMENT_PAYPAL_CC_';
     foreach ($creditcards as $creditcard) {
         $options[] = JHtml::_('select.option', $creditcard, vmText::_($prefix . strtoupper($creditcard)));
     }
     return $options;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:9,代码来源:paypalcreditcards.php


示例18: getOptions

 protected function getOptions()
 {
     $creditcards = RealexHelperRealex::getRealexCreditCards();
     $prefix = 'VMPAYMENT_REALEX_HPP_API_CC_';
     foreach ($creditcards as $creditcard) {
         $options[] = JHtml::_('select.option', $creditcard, vmText::_($prefix . strtoupper($creditcard)));
     }
     return $options;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:9,代码来源:creditcards.php


示例19: ValidateCouponCode

 /**
  * Check if the given coupon code exists, is (still) valid and valid for the total order amount
  * @param string $_code Coupon code
  * @param float $_billTotal Total amount for the order
  * @author Oscar van Eijk
  * @author Max Milbers
  * @return string Empty when the code is valid, otherwise the error message
  */
 public static function ValidateCouponCode($_code, $_billTotal)
 {
     if (empty($_code) or $_code == vmText::_('COM_VIRTUEMART_COUPON_CODE_ENTER')) {
         return '';
     }
     $couponData = 0;
     JPluginHelper::importPlugin('vmcoupon');
     $dispatcher = JDispatcher::getInstance();
     $returnValues = $dispatcher->trigger('plgVmValidateCouponCode', array($_code, $_billTotal));
     if (!empty($returnValues)) {
         foreach ($returnValues as $returnValue) {
             if ($returnValue !== null) {
                 //Take a look on this seyi, I am not sure about that, but it should work at least simular note by Max
                 return $returnValue;
             }
         }
     }
     if (empty($couponData)) {
         $_db = JFactory::getDBO();
         $_q = 'SELECT IFNULL( NOW() >= `coupon_start_date` OR `coupon_start_date`="0000-00-00 00:00:00" , 1 ) AS started
 				, `coupon_start_date`
 				,  IFNULL (`coupon_expiry_date`!="0000-00-00 00:00:00" and NOW() > `coupon_expiry_date`,0) AS `ended`
 				, `coupon_expiry_date`
 				, `coupon_value_valid`
 				, `coupon_used`
 				FROM `#__virtuemart_coupons`
 				WHERE `coupon_code` = "' . $_db->escape($_code) . '"';
         $_db->setQuery($_q);
         $couponData = $_db->loadObject();
     }
     if (!$couponData) {
         return vmText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
     }
     if ($couponData->coupon_used) {
         $session = JFactory::getSession();
         $session_id = $session->getId();
         if ($couponData->coupon_used != $session_id) {
             return vmText::_('COM_VIRTUEMART_COUPON_CODE_INVALID');
         }
     }
     if (!$couponData->started) {
         return vmText::_('COM_VIRTUEMART_COUPON_CODE_NOTYET') . $couponData->coupon_start_date;
     }
     if ($couponData->ended) {
         self::RemoveCoupon($_code, true);
         return vmText::_('COM_VIRTUEMART_COUPON_CODE_EXPIRED');
     }
     if ($_billTotal < $couponData->coupon_value_valid) {
         if (!class_exists('CurrencyDisplay')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
         }
         $currency = CurrencyDisplay::getInstance();
         $coupon_value_valid = $currency->priceDisplay($couponData->coupon_value_valid);
         return vmText::_('COM_VIRTUEMART_COUPON_CODE_TOOLOW') . " " . $coupon_value_valid;
     }
     return '';
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:65,代码来源:coupon.php


示例20: mailAskquestion

 /**
  * Send the ask question email.
  * @author Kohl Patrick, Christopher Roussel
  */
 public function mailAskquestion()
 {
     vRequest::vmCheckToken();
     if (!class_exists('shopFunctionsF')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     $model = VmModel::getModel('vendor');
     $mainframe = JFactory::getApplication();
     $vars = array();
     $min = VmConfig::get('asks_minimum_comment_length', 50) + 1;
     $max = VmConfig::get('asks_maximum_comment_length', 2000) - 1;
     $commentSize = vRequest::getString('comment');
     if (function_exists('mb_strlen')) {
         $commentSize = mb_strlen($commentSize);
     } else {
         $commentSize = strlen($commentSize);
     }
     $validMail = filter_var(vRequest::getVar('email'), FILTER_VALIDATE_EMAIL);
     $virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id', 1);
     if (!class_exists('VirtueMartModelVendor')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
     }
     $userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id);
     //$vendorUser = JFactory::getUser($userId);
     if ($commentSize < $min || $commentSize > $max || !$validMail) {
         $this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=vendor&task=contact&virtuemart_vendor_id=' . $virtuemart_vendor_id, FALSE), vmText::_('COM_VIRTUEMART_COMMENT_NOT_VALID_JS'));
         return;
     }
     $user = JFactory::getUser();
     $fromMail = vRequest::getVar('email');
     //is sanitized then
     $fromName = vRequest::getVar('name', '');
     //is sanitized then
     $fromMail = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
     $fromName = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
     if (!empty($user->id)) {
         if (empty($fromMail)) {
             $fromMail = $user->email;
         }
         if (empty($fromName)) {
             $fromName = $user->name;
         }
     }
     $vars['user'] = array('name' => $fromName, 'email' => $fromMail);
     $VendorEmail = $model->getVendorEmail($virtuemart_vendor_id);
     $vars['vendor'] = array('vendor_store_name' => $fromName);
     if (shopFunctionsF::renderMail('vendor', $VendorEmail, $vars, 'vendor')) {
         $string = 'COM_VIRTUEMART_MAIL_SEND_SUCCESSFULLY';
     } else {
         $string = 'COM_VIRTUEMART_MAIL_NOT_SEND_SUCCESSFULLY';
     }
     $mainframe->enqueueMessage(vmText::_($string));
     // Display it all
     $view = $this->getView('vendor', 'html');
     $view->setLayout('mail_confirmed');
     $view->display();
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:61,代码来源:vendor.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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