home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (uc_credit.pages.inc)

This example Drupal source code file (uc_credit.pages.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

align, br, card, for, if, is, on, output, php, the, type, valid_types

The uc_credit.pages.inc Drupal example source code

// $Id: uc_credit.pages.inc,v 2010/07/12 01:57:43 tr Exp $

 * @file
 * Credit menu items.

// Prints the contents of the CVV information popup window.
function uc_credit_cvv_info() {
  $output = '<b>'. t('What is the CVV?') .'</b><p>'. t('CVV stands for Card Verification Value. This number is used as a security feature to protect you from credit card fraud.  Finding the number on your card is a very simple process.  Just follow the directions below.') .'</p>';
  $cc_types = array('visa', 'mastercard', 'discover');
  foreach ($cc_types as $type) {
    if (variable_get('uc_credit_'. $type, TRUE)) {
      $valid_types[] = ucfirst($type);
  if (count($valid_types) > 0) {
    $output .= '<br /><b>'. implode(', ', $valid_types) .':</b><p><img src="'
             . base_path() . drupal_get_path('module', 'uc_credit')
              .'/images/visa_cvv.jpg" align="left" />'
            . t('The CVV for these cards is found on the back side of the card.  It is only the last three digits on the far right of the signature panel box.') .'</p>';

  if (variable_get('uc_credit_amex', TRUE)) {
    $output .= '<br /><p><b>'. t('American Express') .':</b><p><img src="'
             . base_path() . drupal_get_path('module', 'uc_credit')
              .'/images/amex_cvv.jpg" align="left" />'
             . t('The CVV on American Express cards is found on the front of the card.  It is a four digit number printed in smaller text on the right side above the credit card number.') .'</p>';

  $output .= '<p><div align="right"><input type="button" onclick="self.close();" '
            .'value="'. t('Close this window') .'" /></div></p>';

  print $output;

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal uc_credit.pages.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.