All pastes #280391 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-15 21:46 UTC
rendered paste body
// To see one "other image" below the other

  if( $image_id == "product" ) {
    echo "<div style=\"text-align:center;overflow:auto;\">";
    $ps_product->show_image($db->f("product_full_image"), "alt=\"$alt\" align=\"center\" border=\"0\"", 0);
    echo "</div>";
  }
  else {
    if( !empty($image_id) ) {
      // Get that image!
      $dbi->query( "SELECT * FROM #__{vm}_product_files WHERE file_product_id='$product_id' AND file_is_image='1' AND file_id='$image_id'" );
    }
    else {
      // Get the first image
      $dbi->query( "SELECT * FROM #__{vm}_product_files WHERE file_product_id='$product_id' AND file_is_image='1'" );
    }

        $show_img = $dbi->record[$i];
        $i = ++$i;

    if( $show_img ) {
      $src = str_replace( $mosConfig_absolute_path, $mosConfig_live_site, $show_img->file_name );
      if( strstr( $src, $mosConfig_live_site.$show_img->file_name))
        $src = str_replace( $mosConfig_live_site.$show_img->file_name, $mosConfig_live_site."/".$show_img->file_name, $src );
      $alt = $show_img->file_title;
      $height = $show_img->file_image_height;
      $width = $show_img->file_image_width;

        // change the image size:
      //$height = $height*0.7;
      //$width = $width*0.7;

          echo "<div style=\"text-align:left;overflow:auto;\"><img src=\"$src\" alt=\"$alt\" width=\"115\" height=\"150\" border=\"0\" /></div>";
  echo "<hr/>\n";
      }
          }
  }
}