[ 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/ -> media_manager.php (source)

   1  <?php
   2  /**

   3   * iterates thru media collections/clips

   4   *

   5   * @package productTypes

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

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

   8   * @version $Id: media_manager.php 3231 2006-03-21 08:28:29Z drbyte $

   9   */
  10  if (!defined('IS_ADMIN_FLAG')) {
  11    die('Illegal Access');
  12  }
  13  $zv_collection_query = "select * from " . TABLE_MEDIA_TO_PRODUCTS . "
  14                          where product_id = '" . (int)$_GET['products_id'] . "'";
  15  $zq_collections = $db->Execute($zv_collection_query);
  16  $zv_product_has_media = false;
  17  if ($zq_collections->RecordCount() > 0) {
  18    $zv_product_has_media = true;
  19    while (!$zq_collections->EOF) {
  20      $zf_media_manager_query = "select * from " . TABLE_MEDIA_MANAGER . "
  21                                 where media_id = '" . (int)$zq_collections->fields['media_id'] . "'";
  22  
  23      $zq_media_manager = $db->Execute($zf_media_manager_query);
  24      $za_media_manager[$zq_media_manager->fields['media_id']] = array('text' => $zq_media_manager->fields['media_name']);
  25      if ($zq_media_manager->RecordCount() < 1) {
  26        $zv_product_has_media = false;
  27      } else {
  28        $zv_clips_query = "select * from " . TABLE_MEDIA_CLIPS . "
  29                           where media_id = '" . (int)$zq_media_manager->fields['media_id'] . "'";
  30  
  31        $zq_clips = $db->Execute($zv_clips_query);
  32        if ($zq_clips->RecordCount() < 1) {
  33          $zv_product_has_media = false;
  34        } else {
  35          while (!$zq_clips->EOF) {
  36  
  37            $zf_clip_type_query = "select * from " . TABLE_MEDIA_TYPES . "
  38                                   where type_id = '" . (int)$zq_clips->fields['clip_type'] . "'";
  39  
  40            $zq_clip_type = $db->Execute($zf_clip_type_query);
  41  
  42            $za_media_manager[$zq_media_manager->fields['media_id']]['clips'][$zq_clips->fields['clip_id']] =
  43                  array('clip_filename' => $zq_clips->fields['clip_filename'], 
  44                        'clip_type' => $zq_clip_type->fields['type_name']);
  45            $zq_clips->MoveNext();
  46          }
  47        }
  48      }
  49      $zq_collections->MoveNext();
  50    }
  51  }
  52  ?>


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