示例#1
0
     $data['imgBaseDir'] = $_GET['imgBaseDir'];
     $data['imgBase'] = $_GET['imgBase'];
     // $data['imgExtension'] = $_GET['imgExtension'];
     $data['imgSuffix'] = $_GET['imgSuffix'];
 } else {
     // An additional image is being added
     $data['imgBaseDir'] = $_GET['imgBaseDir'];
     $data['imgBase'] = $_GET['imgBase'];
     // $data['imgExtension'] = $_GET['imgExtension'];
     // Image Suffix (if set)
     if ($_POST['imgSuffix'] != '') {
         $data['imgSuffix'] = '_' . $_POST['imgSuffix'];
     } else {
         // get directory list
         $array = array();
         find_additional_images($array, DIR_FS_CATALOG . DIR_WS_IMAGES . $data['imgBaseDir'], $data['imgExtension'], $data['imgBase']);
         echo "<!--  point 1" . $data['imgExtension'] . "-->";
         $c = sizeof($array);
         if ($c > 1) {
             sort($array);
         }
         // calculate the next suffix
         // (This is lame, unscalable, and inefficient, but effective)
         $suffix = 1;
         $m = 0;
         while ($m != 1) {
             if ($suffix < 10) {
                 $suffixStr = "0" . $suffix;
             } else {
                 $suffixStr = $suffix;
             }
示例#2
0
                $products_image_base = substr($products_image_base, strrpos($products_image_base, '/') + 1);
            }
            // sort out directory
            $products_image_directory = substr($products_image, 0, strrpos($products_image, '/'));
            // add slash to base dir
            if ($products_image_directory != '' && !ereg("\\/\$", $products_image_directory)) {
                $products_image_directory .= '/';
            }
            $products_image_directory_full = DIR_FS_CATALOG . DIR_WS_IMAGES . $products_image_directory;
            // Check that the image exists! (out of date Database)
            if (file_exists($products_image_directory_full . $products_image_base . $products_image_extension)) {
                // Add base image to array
                $products_image_match_array[] = $products_image_base . $products_image_extension;
                // $products_image_base .= "_";
                // Check for additional matching images
                find_additional_images($products_image_match_array, $products_image_directory_full, $products_image_extension, $products_image_base);
            }
        }
        // if products_image
        ?>

<?php 
        if ($pInfo->products_id != '') {
            ?>
    <h2>
      <?php 
            echo TEXT_PRODUCT_INFO . ': #' . $pInfo->products_id . '&nbsp;&nbsp;' . $pInfo->products_name;
            ?>
&nbsp;&nbsp;&nbsp;
      <?php 
            if ($pInfo->products_model != '') {