[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/modules/ -> extra_functions.php (source)

   1  <?php
   2  /**

   3   * Load in any user functions

   4   * see  {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.

   5   *

   6   * @package initSystem

   7   * @copyright Copyright 2003-2006 Zen Cart Development Team

   8   * @copyright Portions Copyright 2003 osCommerce

   9   * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

  10   * @version $Id: extra_functions.php 3012 2006-02-11 16:34:02Z wilt $

  11   */
  12  // must be called appropriately

  13  if (!defined('IS_ADMIN_FLAG')) {
  14    die('Illegal Access');
  15  }
  16  // set directories to check for function files

  17  $extra_functions_directory = DIR_FS_CATALOG . DIR_WS_FUNCTIONS . 'extra_functions/';
  18  $ws_extra_functions_directory = DIR_WS_FUNCTIONS . 'extra_functions/';
  19  
  20  // Check for new functions in extra_functions directory

  21  $directory_array = array();
  22  
  23  if ($dir = @dir($extra_functions_directory)) {
  24    while ($file = $dir->read()) {
  25      if (!is_dir($extra_functions_directory . $file)) {
  26        if (preg_match('/\.php$/', $file) > 0) {
  27          $directory_array[] = $file;
  28        }
  29      }
  30    }
  31    if (sizeof($directory_array)) {
  32      sort($directory_array);
  33    }
  34    $dir->close();
  35  }
  36  
  37  $file_cnt=0;
  38  for ($i = 0, $n = sizeof($directory_array); $i < $n; $i++) {
  39    $file_cnt++;
  40    $file = $directory_array[$i];
  41  
  42    //      echo 'LOADING: ' . $ws_extra_functions_directory . $file . ' ' . $file_cnt . '<br />';

  43    if (file_exists($ws_extra_functions_directory . $file)) {
  44      include($ws_extra_functions_directory . $file);
  45    }
  46  }
  47  ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics