[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/modules/payment/ -> ccerr.php (source)

   1  <?php
   2  /*

   3    $Id: cod.php,v 1.28 2003/02/14 05:51:31 hpdl Exp $

   4  

   5    osCommerce, Open Source E-Commerce Solutions

   6    http://www.oscommerce.com

   7  

   8    Copyright (c) 2003 osCommerce

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    class ccerr {
  14      var $code, $title, $description, $enabled;
  15  
  16  // class constructor

  17      function ccerr() {
  18        global $order;
  19  
  20        $this->code = 'ccerr';
  21        $this->title = MODULE_PAYMENT_CCERR_TEXT_TITLE;
  22        $this->description = MODULE_PAYMENT_CCERR_TEXT_DESCRIPTION;
  23        $this->sort_order = MODULE_PAYMENT_CCERR_SORT_ORDER;
  24        $this->enabled = false;
  25      }
  26  
  27  // class methods

  28      function update_status() {
  29            $this->enabled = false;
  30      }
  31  
  32      function javascript_validation() {
  33        return false;
  34      }
  35  
  36      function selection() {
  37        return array('id' => $this->code,
  38                     'module' => $this->title);
  39      }
  40  
  41      function pre_confirmation_check() {
  42        return false;
  43      }
  44  
  45      function confirmation() {
  46        return false;
  47      }
  48  
  49      function process_button() {
  50        return false;
  51      }
  52  
  53      function before_process() {
  54        return false;
  55      }
  56  
  57      function after_process() {
  58        return false;
  59      }
  60  
  61      function get_error() {
  62        global $HTTP_GET_VARS;
  63  
  64        $error = array('title' => 'Error',
  65                       'error' => stripslashes(urldecode($HTTP_GET_VARS['error'])));
  66  
  67        return $error;
  68      }
  69  
  70      function check() {
  71      // Check if module is installed or not

  72        if (!isset($this->_check)) {
  73          $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_CCERR_SORT_ORDER'");
  74          $this->_check = tep_db_num_rows($check_query);
  75        }
  76        return $this->_check;
  77      }
  78  
  79      function install() {
  80        tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_CCERR_SORT_ORDER', '99', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
  81     }
  82  
  83      function remove() {
  84        tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
  85      }
  86  
  87      function keys() {
  88        return array('MODULE_PAYMENT_CCERR_SORT_ORDER');
  89      }
  90    }
  91  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7