/**
  * Utility to determine custom image depending on brand name and settings
  * 
  * @param  string  $brandName
  * @return string
  */
 private function customImage($brandName)
 {
     $prmCustImg = 'custom_image';
     $prmImg = 'image';
     if ($brandName) {
         $customImage = cbpaidApp::getLiveSiteFilePath('icons/cards/cc_3d_' . preg_replace('/[^a-z0-9]/', '', strtolower($brandName)) . '.png');
     } else {
         $customImage = trim($this->getAccountParam($prmCustImg));
         if ($customImage == "") {
             $customImage = trim($this->getAccountParam($prmImg));
         }
     }
     return $customImage;
 }
예제 #2
0
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

$cssId		=	'paym' . $this->radioValue;

$images		=	array();
foreach ( $this->cardtypes as $cardtype ) {
	if ( $cardtype[0] == '/' ) {
		$url			=	cbpaidApp::getLiveSiteFilePath( substr( $cardtype, 1 ) );
	} elseif ( cbStartOfStringMatch( $cardtype, 'http' ) ) {
		$url			=	$cardtype;
	} else {
		$url			=	$this->getMediaUrl( 'icons/cards/cc_' . $cardtype . '.png' );
		if ( $url == null ) {
			$url		=	cbpaidApp::getLiveSiteFilePath( 'icons/cards/cc_' . $cardtype . '.gif' );
		}
	}
	if ( $url ) {
		$images[$cardtype]	=	$url;
	}
}

$cssClass	=	'cbregCCselInput';
if ( $this->payNameForCssClass ) {
	$cssClass			.=	' ' . $this->payNameForCssClass;
}
?>
	<div class="<?php echo htmlspecialchars( $cssClass ); ?>">
		<input type="radio" class="cbpaidCCpaymethod" name="payment_method" value="<?php echo htmlspecialchars( $this->radioValue ); ?>" id="<?php echo htmlspecialchars( $cssId ); ?>" <?php if ( $this->selected ) { ?>checked="checked"<?php } ?> />
		<label for="<?php echo htmlspecialchars( $cssId ); ?>" title="<?php echo htmlspecialchars( $this->altText ); ?>">