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


PHP CBPTXT::Th方法代码示例

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


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

示例1: drawUserSomethings

 /**
  * Draws the user profile tab "Subscriptions" (if enabled, user is the profile owner, and something to display.
  * 
  * @param  UserTable  $user
  * @param  boolean    $itsmyself
  * @param  string     $htmlSubscribed
  * @return string
  */
 public function drawUserSomethings($user, $itsmyself, $htmlSubscribed)
 {
     global $_CB_framework, $ueConfig;
     $this->htmlSubscribed = $htmlSubscribed;
     $subscriptions = $this->_model;
     if (count($subscriptions) == 1) {
         $subTxt = CBPTXT::T(cbpaidApp::settingsParams()->get('subscription_name', 'subscription'));
     } else {
         $subTxt = CBPTXT::T(cbpaidApp::settingsParams()->get('subscriptions_name', 'subscriptions'));
     }
     if ($itsmyself) {
         $userName = null;
     } else {
         $userName = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
     }
     if ($_CB_framework->getUi() == 1) {
         if ($itsmyself) {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("Your current %s"), $subTxt);
         } else {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("%s's current %s"), $userName, $subTxt);
         }
     } else {
         if ($itsmyself) {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("Your current and past %s"), $subTxt);
         } else {
             $this->htmlTabTitle = sprintf(CBPTXT::Th("%s's current and past %s"), $userName, $subTxt);
         }
     }
     return $this->display();
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:38,代码来源:usersubscriptions.php

示例2: drawTab

 /**
  * Draws the user profile tab "Subscriptions" (if enabled, user is the profile owner, and something to display.
  * 
  * @param  string  $htmlSubscriptionsAndUpgrades
  * @param  string  $htmlInvoicesLink
  * @param  string  $tabTitleText
  * @param  string  $htmlTabDescription
  * @return string
  */
 public function drawTab($htmlSubscriptionsAndUpgrades, $htmlInvoicesLink, $tabTitleText, $htmlTabDescription)
 {
     global $ueConfig;
     $this->htmlSubscriptionsAndUpgrades = $htmlSubscriptionsAndUpgrades;
     $this->htmlInvoicesLink = $htmlInvoicesLink;
     $this->htmlTabDescription = $htmlTabDescription;
     $user = $this->_model;
     $title = cbReplaceVars(CBPTXT::Th(cbUnHtmlspecialchars($tabTitleText)), $user);
     if ($title) {
         $name = getNameFormat($user->name, $user->username, $ueConfig['name_format']);
         $title = sprintf($title, $name);
     }
     $this->htmlTabTitle = $title;
     return $this->display();
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:24,代码来源:userprofilesubstab.php

示例3: drawUserUpgradePlans

 /**
  * Draws the plans upgrade proposals
  * 
  * @param  UserTable  $user
  * @param  int        $plansDisplayed
  * @param  string     $htmlUpgrades
  * @param  string     $htmlspecialcharedBaseUrl
  * @param  array      $hiddenFlds
  * @param  array      $buttonTexts
  * @param  string     $buttonName
  * @return string
  */
 public function drawUserUpgradePlans($user, $plansDisplayed, $htmlUpgrades, $htmlspecialcharedBaseUrl, $hiddenFlds, $buttonTexts, $buttonName)
 {
     $this->htmlUpgrades = $htmlUpgrades;
     $this->htmlspecialcharedBaseUrl = $htmlspecialcharedBaseUrl;
     $this->hiddenFlds = $hiddenFlds;
     $this->buttonName = $buttonName;
     $this->buttonText = implode(' / ', $buttonTexts);
     $subTxt = CBPTXT::T(cbpaidApp::settingsParams()->get('subscription_name', 'subscription'));
     if ($plansDisplayed == 1) {
         $this->htmlTitle = sprintf(CBPTXT::Th("Your current %s upgrade possibility:"), $subTxt);
     } else {
         $this->htmlTitle = sprintf(CBPTXT::Th("Your current %s upgrade possibilities:"), $subTxt);
     }
     return $this->display();
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:27,代码来源:userupgradeplans.php

示例4: renderColumn

 /**
  * Renders a $variable for an $output
  *
  * @param  string   $variable
  * @param  string   $output
  * @param  boolean  $rounded
  * @return string|null
  */
 public function renderColumn($variable, $output = 'html', $rounded = false)
 {
     $html = $output == 'html';
     switch ($variable) {
         case 'rate':
             $ret = $this->renderItemRate($html);
             break;
         case 'discount_amount':
         case 'tax_amount':
             $ret = $this->renderJustItemRates($variable, $html, $rounded);
             break;
         case 'first_rate':
         case 'first_discount_amount':
         case 'first_tax_amount':
             $ret = cbpaidMoney::getInstance()->renderPrice($this->{$variable}, $this->currency, $html, $rounded);
             break;
         case 'quantity':
             // removes insignifiant zeros after ., as well as the . itself if no decimals:
             $matches = null;
             $matched = preg_match("/^(.+?)[.]?[0]*\$/", $this->get($variable), $matches);
             $ret = $matched ? $matches[1] : null;
             break;
         case 'validity_period':
             if ($this->start_date && $this->stop_date && $this->start_date != '0000-00-00 00:00:00' && $this->stop_date != '0000-00-00 00:00:00') {
                 $showTime = false;
                 $startDate = cbFormatDate($this->start_date, 1, $showTime);
                 $stopDate = cbFormatDate($this->stop_date, 1, $showTime);
                 $ret = htmlspecialchars($startDate);
                 if ($stopDate && $startDate != $stopDate) {
                     $ret .= ($html ? ' - ' : ' - ') . htmlspecialchars($stopDate);
                 }
                 if ($this->second_stop_date && $this->second_stop_date != '0000-00-00 00:00:00') {
                     $secondStartDate = cbFormatDate($this->_db->getUtcDateTime(cbpaidTimes::getInstance()->strToTime($this->stop_date) + 1), 1, $showTime);
                     $secondStopDate = cbFormatDate($this->second_stop_date, 1, $showTime);
                     $retsecond = htmlspecialchars($secondStartDate) . ($html ? ' - ' : ' - ') . htmlspecialchars($secondStopDate);
                     $ret = sprintf($html ? CBPTXT::Th("%s, then %s") : CBPTXT::T("%s, then %s"), $ret, $retsecond);
                 }
             } else {
                 $ret = null;
             }
             break;
         case 'tax_rule_id':
             if ($this->tax_rule_id && is_callable(array('cbpaidTaxRule', 'getInstance'))) {
                 $ret = cbpaidTaxRule::getInstance((int) $this->tax_rule_id)->getShortCode();
             } else {
                 $ret = null;
             }
             break;
         case 'original_rate':
         case 'first_original_rate':
             $ret = null;
             break;
         case 'ordering':
         case 'artnum':
         case 'description':
         case 'discount_text':
         default:
             $value = $this->get($variable);
             if ($value !== null) {
                 $ret = htmlspecialchars($this->get($variable));
             } else {
                 $ret = null;
             }
             break;
     }
     return $ret;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:75,代码来源:cbpaidPaymentItem.php

示例5: saveRecordPaymentForm

 /**
  * Saves invoicing address, and if error, sets error to baseClass and
  * Renders the edit form for the invoicing address for that basket again.
  *
  * @return string|null                             NULL if no error, otherwise HTML for edit.
  */
 protected function saveRecordPaymentForm()
 {
     if ($this->authoriseAction('cbsubs.recordpayments')) {
         $return = $this->bindFromFormPost('recordpayment', 'recordpayment');
         if ($return === null) {
             $this->store();
         }
     } else {
         $return = CBPTXT::Th("Not authorized");
     }
     return $return;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:18,代码来源:cbpaidRecordBasketPayment.php

示例6: renderPeriodPrice

	/**
	 * Returns HTML or TEXT rendering the validity period and pricing for that given plan.
	 * (public because can be used as call-back in onCPayAfterDisplayProductPeriodPrice event handlers)
	 *
	 * @param  float        $price                 price of plan
	 * @param  float|null   $firstPeriodFullPrice  regular price of plan in first period
	 * @param  float|null   $firstPeriodPrice      real price of plan in first period (with discount)
	 * @param  boolean      $prorateDiscount       is a discount applied to first price ?
	 * @param  int          $expiryTime            expiry time of plan
	 * @param  int          $startTime             starting time of plan
	 * @param  boolean      $autorecurring         is plan autorecurring ?
	 * @param  int          $recurring_max_times   if autorecurring, maximum total number of occurrences
	 * @param  string       $reason                payment reason: 'N'=new subscription (default), 'R'=renewal, 'U'=update
	 * @param  int          $occurrence            Occurence of the payment for that item
	 * @param  boolean      $html                  TRUE for HTML, FALSE for TEXT
	 * @param  boolean      $roundings             TRUE: do round, FALSE: do not round display
	 * @param  boolean      $displayPeriod         TRUE: display price and period, FALSE: display price only (ONLY for single prices)
	 * @param  boolean       $displaySecondaryCurrency   TRUE: display secondary currencies, FALSE: only display in $this->currency()
	 * @return string                              HTML or TEXT
	 */
	public function renderPeriodPrice( $price, $firstPeriodFullPrice, $firstPeriodPrice, $prorateDiscount, $expiryTime, $startTime,
									   $autorecurring, $recurring_max_times, $reason, $occurrence, $html, $roundings = true, $displayPeriod = true, $displaySecondaryCurrency = true ) {
		global $_CB_framework;

		$params							=&	cbpaidApp::settingsParams();
		$return							=	'';

		$priceDisplay					=	$this->getPriceDisplay();	// This is used in this class if available (it's actually only available in derived class cbpaidProduct and in all its derived classes)
		if ( $priceDisplay == null ) {
			$priceDisplay				=	'[automatic]';
		} else {
			$priceDisplay				=	( $html ? CBPTXT::Th( $priceDisplay ) : CBPTXT::T( $priceDisplay ) );
		}
		$period_for_price_text			=	$params->get('period_for_price_text', '%1s%2s%3s' );
		$textFor						=	' ' . ( $html ? CBPTXT::Th($params->get('regtextFor')) : CBPTXT::T($params->get('regtextFor')) ) . ' ';

		$priceText						=	$this->renderPricesWithConversion( $price, $html, $roundings, $displaySecondaryCurrency );

		if ( $firstPeriodFullPrice !== null ) {
			$firstPeriodFullPriceText	=	$this->renderPricesWithConversion( $firstPeriodFullPrice, $html, $roundings, $displaySecondaryCurrency );
		} else {
			$firstPeriodFullPriceText	=	null;
		}
		if ( $firstPeriodPrice !== null ) {
			$discountedPriceText		=	$this->renderPricesWithConversion( $firstPeriodPrice, $html, $roundings, $displaySecondaryCurrency );
		} else {
			$discountedPriceText		=	null;
		}

		if ( $firstPeriodFullPrice !== null ) {
			$effectiveFirstPeriodFullPrice		=	$firstPeriodFullPrice;
			$effectiveFirstPeriodFullPriceText	=	$firstPeriodFullPriceText;
		} else {
			$effectiveFirstPeriodFullPrice		=	$price;
			$effectiveFirstPeriodFullPriceText	=	$priceText;
		}
		$firstPeriodRendered = null;
		if ( ( $this->bonustime!='0000-00-00 00:00:00' && $reason!='R') || ( ( $firstPeriodPrice || $prorateDiscount ) && ( $effectiveFirstPeriodFullPrice != $firstPeriodPrice ) ) ) {
			if ( ( $firstPeriodPrice || $prorateDiscount ) && ( $effectiveFirstPeriodFullPrice != $firstPeriodPrice ) ) {
				if ( $autorecurring ) {
					if ( $reason == 'U' ) {
						if ( $prorateDiscount ) {
							$subTxt				=	CBPTXT::T( $params->get( 'subscription_name', 'subscription' ) );
							$t	= sprintf( CBPTXT::T("The first payment of the upgrade for %s, taking in account your current %s, is %s instead of %s."), '%s', $subTxt, '%s', '%s' );
						} else {
							$t	= CBPTXT::T("The first payment of the upgrade for %s is %s instead of %s.");
						}
					} elseif ( $reason == 'R' ) {
						if ( $prorateDiscount ) {
							$t	= CBPTXT::T("The first payment of the renewal for %s, pro-rata temporis, is %s instead of %s.");
						} else {
							$t	= CBPTXT::T("The first payment of the renewal for %s is %s instead of %s.");
						}
					} else {
						if ( $prorateDiscount ) {
							$t	= CBPTXT::T("The first payment for %s, pro-rata temporis, is %s instead of %s.");
						} else {
							$t	= CBPTXT::T("The first payment for %s is %s instead of %s.");
						}
					}
				} else {
					if ( $reason == 'U' ) {
						if ( $prorateDiscount ) {
							$subTxt				=	CBPTXT::T( $params->get( 'subscription_name', 'subscription' ) );
							$t	= sprintf( CBPTXT::T("The price of the upgrade for %s, taking in account your current %s, is %s instead of %s."), '%s', $subTxt, '%s', '%s' );
						} else {
							$t	= CBPTXT::T("The price of the upgrade for %s is %s instead of %s.");
						}
					} elseif ( $reason == 'R' ) {
						if ( $prorateDiscount ) {
							$t	= CBPTXT::T("The price of the renewal for %s, pro-rata temporis, is %s instead of %s.");
						} else {
							$t	= CBPTXT::T("The price of the renewal for %s is %s instead of %s.");
						}
					} else {
						if ( $prorateDiscount ) {
							$t	= CBPTXT::T("The price for %s, pro-rata temporis, is %s instead of %s.");
						} else {
							$t	= CBPTXT::T("The price for %s is %s instead of %s.");
						}
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:cbpaidItem.php

示例7: if

?>
	<button type="submit" class="button" name="addcouponcode" value="1" style="position:absolute;left:-9999px;top:-9999px;height:0;width:0;">Add</button>
	<div class="cbregCouponsInputed">
		<ul class="cbregListOfCouponsInputed">
<?php 	foreach ( $this->couponsUsed as $coupon ) { ?>
			<li>
				<span class="cbregCouponCode"><?php echo $coupon->coupon_code; ?></span><span class="cbregCouponCodeSAeparator">:</span>
				<span class="cbregCouponName"><?php echo $coupon->name; ?></span>
				<span class="cb_button_wrapper_small cpay_button_couponcode_wrapper cbregCouponDelete"><button type="submit" class="button" name="deletecouponcode[<?php echo $coupon->id;?>]" value="1"><?php echo CBPTXT::Th( $this->couponRemoveButtonText ); ?></button></span>
			</li>
<?php	} ?>
		</ul>
	</div>
<?php } ?>
	<div class="cbregCouponInput">
		<label for="cbsubscouponcode"><span><?php echo CBPTXT::Th( $this->couponLabelText ); ?></span></label>
		<input name="couponcode" id="cbsubscouponcode" type="text" />
		<span class="cb_button_wrapper_small cpay_button_couponcode_wrapper"><button type="submit" class="button" name="addcouponcode" value="1"><?php echo CBPTXT::Th( $this->couponAddButtonText ); ?></button></span>
		<span class="cbsubscouponInstructions"><?php echo CBPTXT::Th( $this->couponDescription ); ?></span>
		<?php if ( count( $this->couponDescriptionHints ) > 0 ) { ?>
		<div class="cbsubscouponsHints">
			<?php foreach ( $this->couponDescriptionHints as $htmlDescription ) { ?>
			<div class="cbsubsCouponsHint">
				<?php echo $htmlDescription; ?>
			</div>
			<?php } ?>
		</div>
		<?php } ?>
	</div>
</div>
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:30,代码来源:coupon.php

示例8: renderMaintenanceButtonsHtml

	/**
	 * Gives links for maintenance of an invoice/basket in the list of invoices in frontend
	 *
	 * @return array   of HTML links
	 */
	public function renderMaintenanceButtonsHtml( ) {
		$html				=	array();
		if ( $this->authoriseAction( 'cbsubs.recordpayments' ) ) {
			if ( $this->payment_status == 'Pending') {
				$html[]		=	'<a href="' . cbpaidApp::getBaseClass()->getRecordPaymentUrl( $this ) . '" class="cbregLinkRecordPayment">'
					.	CBPTXT::Th("Record offline payment")
					.	'</a>';
			}
		}
		return $html;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:16,代码来源:cbpaidPaymentBasket.php

示例9: die

<?php

/**
* @version $Id: $
* @package CBSubs (TM) Community Builder Plugin for Paid Subscriptions (TM)
* @subpackage Template for Paid Subscriptions
* @copyright (C) 2007-2015 and Trademark of Lightning MultiCom SA, Switzerland - www.joomlapolis.com - and its licensors, all rights reserved
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
*/
/** ensure this file is being included by a parent file */
if (!(defined('_VALID_CB') || defined('_JEXEC') || defined('_VALID_MOS'))) {
    die('Direct Access to this location is not allowed.');
}
$tmplVersion = 1;
// This is the template version that needs to match
?>
	<div class="contentheading" id="cbregInvoicesTitle"><?php 
echo $this->plansTitle;
?>
</div>
	<div class="cbregLinkToInvoices">
		<a href="<?php 
echo $this->invoicesListUrl;
?>
">
			<?php 
echo CBPTXT::Th("Click here to view the list of invoices");
?>
		</a>
	</div>
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:30,代码来源:invoiceslistlink.php

示例10: getPayRadioRecepie

 /**
  * Returns an array for the 'radios' array of $redirectNow type:
  * return array( account_id, submethod, paymentMethod:'single'|'subscribe', array(cardtypes), 'label for radio', 'description for radio' )
  * 
  * @param  cbpaidPaymentBasket  $paymentBasket  paymentBasket object
  * @param  string               $subMethod
  * @param  string               $paymentType
  * @param  string               $defaultLabel
  * @return array
  */
 private function getPayRadioRecepie($paymentBasket, $subMethod, $paymentType, $defaultLabel)
 {
     if ($paymentType == 'psp') {
         $cardtypesString = $this->getAccountParam($paymentType . '_radio_cardtypes');
         $cardtypes = $cardtypesString ? explode('|*|', $cardtypesString) : array();
     } else {
         $cardtypes = array($paymentType);
     }
     $brandLabelHtml = $this->getAccountParam($paymentType . '_radio_name', $defaultLabel);
     // CBPTXT::T("Credit Card")
     $brandDescriptionHtml = CBPTXT::Th($this->getAccountParam($paymentType . '_radio_description'));
     if ($brandLabelHtml === null) {
         $brandLabelHtml = CBPTXT::Th($this->getAccountParam('psp_human_name'));
     } else {
         $brandLabelHtml = CBPTXT::Th($brandLabelHtml);
     }
     if ($this->getAccountParam('payment_methods_selection') == 'onsite') {
         $currencies = $this->getAccountParam($paymentType . '_currencies');
     } else {
         $currencies = $this->getAccountParam('currencies_accepted');
     }
     $payNameForCssClass = $this->getPayName();
     if ($currencies == '' || in_array($paymentBasket->mc_currency, explode('|*|', $currencies))) {
         $paySafelyWith = CBPTXT::T($this->getAccountParam('button_title_text'));
         $altText = strip_tags(sprintf($paySafelyWith, $brandLabelHtml));
     } else {
         if ($this->getAccountParam('payment_methods_selection') == 'onsite') {
             $altText = CBPTXT::T($this->getAccountParam($paymentType . '_currencies_description'));
         } else {
             $altText = CBPTXT::T($this->getAccountParam('currency_acceptance_text'));
         }
         $payNameForCssClass .= ' ' . 'cbregconfirmtitleonclick';
     }
     return cbpaidGatewaySelectorRadio::getPaymentRadio($this->getAccountParam('id'), $subMethod, $paymentType, $cardtypes, $brandLabelHtml, $brandDescriptionHtml, $altText, $payNameForCssClass);
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:45,代码来源:cbpaidsubscriptions.ogone.php

示例11: checkVatApprox

	/**
	 * Checks the VAT number using EU VIES checkVatApprox SOAP call
	 *
	 * @param  array                $params
	 * @param  cbpaidPaymentBasket  $paymentBasket
	 * @param  string               $vat_verification  OUTPUT: raw log of the verification for storage
	 * @return int                  1: Verification Passed, 0: not passed
	 */
	public function checkVatApprox( $params, $paymentBasket, &$vat_verification )
	{
		try {
			$client						=	new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl", array( 'exceptions' => true ) );
			/** @noinspection PhpUndefinedMethodInspection */
			$result						=	$client->checkVatApprox($params);
			$checked					=	true;
		}
		catch ( \SoapFault $e ) {
			$result						=	$e->getMessage();
			$checked					=	false;
		}

		/** @var StdClass $result */

		// log result
		// echo 'Params: '; var_export( $params ); echo "<br />\nResult: "; var_export( $result );

		if ( ( ! $checked ) || is_soap_fault( $result ) ) {
			// FaultString can take the following specific values:
			// - INVALID_INPUT: The provided Country Code is invalid or the VAT number is empty;  This is the only final error state.
			// - SERVICE_UNAVAILABLE: The EU VIES SOAP service is unavailable, try again later;
			// - MS_UNAVAILABLE: The Member State service is unavailable at this time, try again later: http://ec.europa.eu/taxation_customs/vies/viesspec.do
			// - TIMEOUT: The Member State service could not be reached in time, try again later;
			// - SERVER_BUSY: The service can't process your request. Try again latter.
			if ( ! $checked ) {
				$vat_verification		=	$this->encodeVatVerification( 'SOAPSERVERFAULT', null, $params, $result );
				$userMessage			=	CBPTXT::Th("EU VIES VAT number verification server unreachable. VAT number could not be checked. Proceed with VAT or try again later.");
			} elseif ( isset( $result->faultstring ) ) {
				$vat_verification		=	$this->encodeVatVerification( $result->faultstring, $result->faultcode, $params, $result );
				$userMessage			=	( $result->faultstring == 'INVALID_INPUT' ? CBPTXT::T("Invalid EU VAT Number. EU VAT numbers start with country code and must be valid.") : null );
			} else {
				$vat_verification		=	$this->encodeVatVerification( 'SOAPFAULT', null, $params, $result );
				$userMessage			=	null;
			}
			cbpaidApp::getBaseClass()->setLogErrorMSG( 5, $paymentBasket, sprintf( CBPTXT::T('EU VAT VIES error condition: "%s" for request on VAT: "%s%s", faultcode: "%"'), $result->faultstring, $params['countryCode'], $params['vatNumber'], $result->faultcode ), $userMessage );
			return 0;
		}

		if ( ! $result->valid ) {
			$vat_verification			=	$this->encodeVatVerification( 'INVALID', $params['countryCode'] . $params['vatNumber'], $params, $result );
			$userMessage				=	CBPTXT::T("Invalid EU VAT Number. EU VAT numbers start with country code and must be valid.");
			cbpaidApp::getBaseClass()->_setErrorMSG( $userMessage );
			return 0;
		} else {
			$matchesToCheck					=	array( 'traderNameMatch', /* 'traderCompanyTypeMatch', */ 'traderStreetMatch', 'traderPostcodeMatch', 'traderCityMatch' );
			foreach ( $matchesToCheck as $match ) {
				// 1=VALID, 2=INVALID:
				if ( isset( $result->$match ) && ( $result->$match == 2 ) ) {
					$vat_verification	=	$this->encodeVatVerification( 'MISMATCH', strtoupper( substr( $match, 6, -5 ) ), $params, $result );
					return 0;
				}
			}
			// requestIdentifier, requestDate, valid
			// countryCode vatNumber
			// traderName traderCompanyType traderAddress traderStreet traderPostcode traderCity

			$vat_verification			=	$this->encodeVatVerification( 'VALID', ( $result->requestIdentifier ? $result->requestIdentifier : '-' ) . ' / ' . $result->requestDate, $params, $result );
			return 1;
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:69,代码来源:validation.php

示例12:

?>
	<div class="cbregInvoicePaymentType">
		<span class="cbregInvTitle"><?php
			echo CBPTXT::Th("Payment method:");
		?>&nbsp;</span>
		<span class="cbregInvField"><?php
			echo $this->paymentType;
		?></span>
	</div>
<?php
		// Conditions:
		if ( $this->invoiceConditions ) {
?>
	<div class="cbregInvoiceConditions">
		<span class="cbregInvTitle"><?php
			echo CBPTXT::Th("Terms and conditions:");
		?>&nbsp;</span>
		<span class="cbregInvField"><?php
			echo $this->invoiceConditions;
		?></span>
	</div>
<?php
		}
		// Buttons:
		if ( $this->displayButtons ) {
?>
	<div id="cbpaidPrint"><p><a href="javascript:void(window.print())"><?php echo CBPTXT::T("PRINT"); ?></a></p></div>
	<div id="cbpaidClose"><p><a href="javascript:void(window.close())"><?php echo CBPTXT::T("CLOSE"); ?></a></p></div>
<?php
		}
?>
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:default.php

示例13: sprintf

			echo ' (' . sprintf( CBPTXT::Th("waiting for %s"), ( $i->pending_reason ? $i->pending_reason : CBPTXT::T("Payment") ) ) . ')';
		}
		$maintenanceButtonsHtml		=	$i->renderMaintenanceButtonsHtml();
		if ( $maintenanceButtonsHtml ) {
			echo '<div class="cbregMaintenanceButtons">' . implode( ' | ', $maintenanceButtonsHtml ) . '</div>';
		}
						?>
					</td>
					<td class="cbregInvoicePaymentType">
						<?php echo CBPTXT::Th( htmlspecialchars( $i->payment_type ) ); ?>
					</td>
				</tr>
<?php
		}
?>
			</tbody>
		</table>
	</div>
<?php
		global $_CB_framework;
		if ( $_CB_framework->getUi() == 1 ) {
?>
	<div class="cbControlButtonsLine">
		<a href="<?php echo $_CB_framework->userProfileUrl( $this->user->id, true, 'getcbpaidsubscriptionsTab' ); ?>">
			<?php echo CBPTXT::Th("Click here to go back to your user profile"); ?>
		</a>
	</div>
<?php
		}
?>
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:30,代码来源:default.php

示例14: drawInvoice

	/**
	 * Draws the invoice
	 *
	 * @param  UserTable  $user
	 * @param  array      $extraStrings
	 * @param  boolean    $displayButtons   Displays the PRINT and CLOSE buttons
	 * @return string                       HTML
	 */
	public function drawInvoice( $user, $extraStrings, $displayButtons = true ) {
		/** @var $invoice cbpaidPaymentBasket */
		$invoice					=	$this->_model;
		$this->user					=	$user;
		$this->extraStrings			=	$extraStrings;
		$this->displayButtons		=	$displayButtons;

		$params						=	cbpaidApp::settingsParams();

		$invoiceHeader				=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_header', '' ) ) ), $user, true, false, $extraStrings, false );
		$invoiceHeaderAltText		=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_header_alt_text' ) ) ), $user, false, false, $extraStrings, false );
		$this->invoiceHeaderAlign	=	trim( $params->get( 'invoice_header_align', '' ) );
		$invoiceFooter				=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_footer', '' ) ) ), $user, true, false, $extraStrings, false );
		$invoiceFooterAltText		=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_footer_alt_text' ) ) ), $user, false, false, $extraStrings, false );
		$this->invoiceFooterAlign	=	trim( $params->get( 'invoice_footer_align', '' ) );
		$this->invoicerAddress		=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoicer_address', '' ) ) ), $user, true, false, $extraStrings, false );
		$this->invoiceConditions	=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_conditions', '' ) ) ), $user, true, false, $extraStrings, false );

		if ( $invoiceHeader ) {
			if ( preg_match( "/(\\.jpg|\\.png|\\.gif)$/i", $invoiceHeader ) ) {
				$this->header		=	'<img src="' . htmlspecialchars( $invoiceHeader ) . '" alt="' . htmlspecialchars( CBPTXT::T( $invoiceHeaderAltText ) ) . "\" />\n";
			} else {
				$this->header		=	$invoiceHeader;
			}
		} else {
			$this->header			=	null;
		}
		if ( $invoiceFooter ) {
			if ( preg_match( "/(\\.jpg|\\.png|\\.gif)$/i", $invoiceFooter ) ) {
				$this->footer		=	'<img src="' . htmlspecialchars( $invoiceFooter ) . '" alt="' . htmlspecialchars( CBPTXT::T( $invoiceFooterAltText ) ) . "\" />\n";
			} else {
				$this->footer		=	$invoiceFooter;
			}
		} else {
			$this->footer			=	null;
		}

		$this->invoiceDate			=	cbFormatDate( $invoice->time_initiated, 1, false );
		$this->invoiceNumberTitle	=	CBPTXT::Th( $invoice->getInvoiceTitleFormat() );
		$this->invoiceNumber		=	$invoice->invoice;
		$this->invoiceNumberHtml	=	'<span class="cbregInvTitle">'
									.	str_replace( ' ', '&nbsp;', str_replace( '[INVOICENUMBER]', '<span class="cbregInvField">' . $invoice->invoice . '</span>', $this->invoiceNumberTitle ) )
									.	'</span>';
		
		$this->paymentType			=	CBPTXT::T( $invoice->payment_type );
/*
		$this->address				=	$invoice->payer_business_name
									.	"\n"
									.	$invoice->first_name . ' ' . $invoice->last_name
									.	"\n"
									.	$invoice->address_street
									.	"\n"
									.	$invoice->address_city . ( $invoice->address_state ? ', ' . $invoice->address_state : '' )
									.	"\n"
									.	$invoice->address_zip
									.	"\n"
									.	$invoice->address_country
									;
*/
		$this->address				=	cbReplaceVars( CBPTXT::T( trim( $params->get( 'invoice_address_format' ) ) ), $user, false, false, $extraStrings, false );
		if ( $this->address == strip_tags( $this->address ) ) {
			$this->address			=	nl2br( $this->address );
		}
		$this->basketHtml			=	$invoice->displayBasket( "Invoice details", '', 'invoice' );		// it's translated, this is for translations grabber: CBPTxt::Th("Invoice details");

		return $this->display();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:75,代码来源:invoice.php

示例15: loadGJParentGroupsList

	/**
	 * Function for the backend XML
	 *
	 * @param  string  $name          Name of the control
	 * @param  string  $value         Current value
	 * @param  string  $control_name  Name of the controlling array (if any)
	 * @return string                 HTML for the control data part or FALSE in case of error
	 */
	public function loadGJParentGroupsList( $name, $value, $control_name ) {
 		global $_CB_framework;

		$api							=	$_CB_framework->getCfg( 'absolute_path' ) . '/components/com_comprofiler/plugin/user/plug_cbgroupjive/cbgroupjive.class.php';

		if ( ! file_exists( $api ) ) {
			return CBPTXT::Th( 'GroupJive 2.x is not installed!' );
		}

		/** @noinspection PhpIncludeInspection */
		require_once( $api );

		$list_gj_groups					=	cbgjClass::getGroupOptions( null );

		if ( $list_gj_groups ) {
			array_unshift( $list_gj_groups, moscomprofilerHTML::makeOption( '0', CBTxt::T( 'No Parent' ) ) );

			if ( isset( $value ) ) {
				$valAsObj				=	array_map( create_function( '$v', '$o=new stdClass(); $o->value=$v; return $o;' ), explode( '|*|', $value ) );
			} else {
				$valAsObj				=	null;
			}

			$groups						=	moscomprofilerHTML::selectList( $list_gj_groups, $control_name ? $control_name .'['. $name .'][]' : $name, null, 'value', 'text', $valAsObj, 0, false, false );
		} else {
			$groups						=	CBPTXT::T( 'No groups exist!' );;
		}

		return $groups;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:38,代码来源:cbsubs.groupjive.php


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