alter popupviewer

Gesperrt
jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

alter popupviewer

Beitrag von jacke » Di 27. Jan 2009, 18:35

Hallo,

ich habe ein Problem mit dem alten popupviewer:

Code: Alles auswählen

<?php 
/* Variables: 
* $_GET['img']   HTTP-Code for image "<img ....>" 
*/ 
if ( $_GET['img'] ) 
{ 
   $img = substr( $_GET['img'], 0, 1024 ); 
   $img = strip_tags ( urldecode($img) ); 
   $url = parse_url($img); 
   if ( $url['host'] && $url['host'] != $_SERVER['HTTP_HOST'] ) exit(0); 
} 
else 
{ 
   exit(0); 
} 
?> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<title>Bildbetrachter</title> 
</head> 
<body> 
<table cellpadding="4" cellspacing="4" border="0"> 
   <tr> 
      <td><img src="<?php echo $img; ?>"></td> 
   </tr> 
   <tr> 
      <td><div align="right" style="font:Verdana, sans-serif;font-size:11px;font-weight:bold;text-transform:uppercase;"><a href="javascript:window.close();">&raquo;&nbsp;Fenster schliessen</a></div></td> 
   </tr> 
</table> 
</body> 
</html>
Der gehört zu folgendem Modul:

Code: Alles auswählen

* Modulname   :     Bild mit Thumb 
* Author      :     Gerhard Müller 
* Copyright   :     MKO 
* Created     :     4.3.2005 
* Version     :     $Id$ 
* Modified    :     $Date$


 
Das Problem ist aufgetaucht nachdem ich von (ich glaube 4.6) auf 4.8.10 updatet (was für ein Wort) habe. Ich habe auch von PHP4 auf PHP5 umgestellt.
Gibt es da eie Lösung????

Danke schon mal!

Dinkel
Beiträge: 565
Registriert: Di 22. Mär 2005, 14:52
Kontaktdaten:

Beitrag von Dinkel » Di 27. Jan 2009, 21:31

Was genau ist denn Dein Problem?!?
selbstentwickelte Module:
Downloads und Infos zu den Modulen: gibt es hier.
Modul: Forum | Version 0.9 | getestet: 4.6.24 MR, 4.8.11, 4.8.11 AMR
Modul: Galleriffic | Version: 0.3.4 BETA | getestet: 4.8.11, 4.8.11 AMR, 4.8.12, 4.8.12 AMR
Modul: Metadata | Version: 2.0 | getestet: 4.9.7, 4.9.7 AMR
Modul: Slider Gallery | Version: 1.0 | getestet: 4.9.12 AMR
Modul: Up- & Download | Version: 4.1 | getestet: 4.9.12 AMR

jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

Beitrag von jacke » Di 27. Jan 2009, 22:20

...hier z.B. sind meine Probleme:

http://www.torzurwelt.de/contenidoawo/a ... ontent.php

gaaanz furchtbar

jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

Beitrag von jacke » Di 27. Jan 2009, 22:44

Hier noch der Code zum Modul:

Beschreibung:

Code: Alles auswählen

<- Maximale Bildgröße (Breite und/oder Höhe) und Qualität des verkleinerten Bildes einstellbar 
- Verkleinerte Bilder werden in Thumbnailverzeichnis gestellt 
- Popup ein/aus (mit externem Viewer)
- geändert für Version 4.6.8.5. aus Forum
- erweitert auf 8 Bilder von Jacke 

Input:

Code: Alles auswählen

/*********************************************** 
* CONTENIDO MODUL - INPUT 
* 
* Modulname   :     Bild mit Thumb 
* Author      :     Gerhard Müller 
* Copyright   :     MKO 
* Created     :     4.3.2005 
* Version     :     $Id$ 
* Modified    :     $Date$ 
************************************************/ 

if ( "CMS_VALUE[5]" ) 
{ 
   $thm_dir="CMS_VALUE[5]"; 
} 
else 
{ 
   $thm_dir = defined(THUMB_DIR)? THUMB_DIR: "thm";      // thumb dir - default "thm" 
} 

echo '<table cellspacing="0" cellpadding="10" border="0">'; 

echo '<tr><td>Thumb Verzeichnis (optional):</td>'; 
echo '<td><input type="text" name="CMS_VAR[5]" value="CMS_VALUE[5]" size="30" /></td></tr>'; 

echo '<tr><td>Maximale Breite Thumbs:</td>'; 
echo '<td><input type="text" name="CMS_VAR[6]" value="CMS_VALUE[6]" size="4" />px</td></tr>'; 

echo '<tr><td>Maximale Höhe Thumbs:</td>'; 
echo '<td><input type="text" name="CMS_VAR[7]" value="CMS_VALUE[7]" size="4" />px</td></tr>'; 

echo '<tr><td>Qualität Thumbs (optional):</td>'; 
echo '<td><input type="text" name="CMS_VAR[9]" value="CMS_VALUE[9]" size="3" />%</td></tr>'; 

$align = "CMS_VALUE[10]"; 
$opts = array ( "","absbottom","absmiddle","baseline","bottom","left","middle","right","texttop","top" ); 
echo '<tr><td>Ausrichtung Thumb (optional):</td>'; 
echo '<td><select name="CMS_VAR[10]">'; 
foreach ( $opts as $v ) 
{ 
   $sel = ( $align==$v? "selected": "" ); 
   echo "<option value=\"$v\" $sel>$v</option>"; 
} 
echo '</select></td></tr>'; 

echo "<tr><td>Popup aktivieren:</td>"; 
$pop = "CMS_VALUE[8]"; 
$chk = ( $pop>""? "checked": "" ); 
echo '<td><input type="checkbox" name="CMS_VAR[8]" value="true" size="3" '.$chk.' /></td></tr>'; 

echo "</table>";

Output:




Code: Alles auswählen

<?php
    
   $viewer = "/contenidoawo/awo/js/viewer.php";                           // image viewer for popups 

   $thm_dir = "CMS_VALUE[5]"? "CMS_VALUE[5]": "thumb";      // thumb dir - default "thm" 
   $thm_maxw = intval("CMS_VALUE[6]");                   // max width thumb 
   $thm_maxh = intval("CMS_VALUE[7]");                     // max height thumb 
   $thm_qual = "CMS_VALUE[9]"? intval("CMS_VALUE[9]"): 80;   //quality jpeg 
   $show_popup = "CMS_VALUE[8]"? true: false;            // show popup yes/no 
   $align = "CMS_VALUE[10]"? 'align="CMS_VALUE[10]"': "";   // align thumb 


   $img_src = "CMS_IMG[10]";                              // src of image 
   $img_lnk = "CMS_LINK[10]";                              // image link 
   $img_tgt = "CMS_LINKTARGET[10]";                        // target of imagelink 
    
    
   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src); 
   if ( $img_src && file_exists($img_path) ) 
   { 
      unset ($ratio); 
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 ) 
      { 
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw; 
         $thm_h = round($ratio*$img_size[1]); 
      } 
      if ( $thm_maxh>0 ) 
      { 
         $rh = $thm_maxh/$img_size[1]; 
         $ratio = ( $ratio>$rh? $rh: $ratio ); 
         $thm_w = round($ratio*$img_size[0]); 
         $thm_h = $thm_maxh; 
      } 
      $thm_src = $img_src; 
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM: 
               case IMAGETYPE_JPC: 
               case IMAGETYPE_JP2: 
               case IMAGETYPE_JPX: 
               case IMAGETYPE_SWC: 
               default: 
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img ); 
      } 
        
      echo $img; 
   } // $img_src!="" 
    
   if ( $contenido || "CMS_IMGDESCR[10]" ) 
   { 
      echo "<br>"; 
      echo "CMS_IMGDESCR[10]"; 
   } 
   if ( $contenido || "CMS_LINKDESCR[10]" ) 
   { 
      echo "<br>"; 
      echo "CMS_LINKDESCR[10]"; 
   } 
   echo "<br>"; 




    ////zweites Bild


   $img_src = "CMS_IMG[11]";                              // src of image
   $img_lnk = "CMS_LINK[11]";                              // image link
   $img_tgt = "CMS_LINKTARGET[11]";                        // target of imagelink


   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src);
   if ( $img_src && file_exists($img_path) )
   {
      unset ($ratio);
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 )
      {
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw;
         $thm_h = round($ratio*$img_size[1]);
      }
      if ( $thm_maxh>0 )
      {
         $rh = $thm_maxh/$img_size[1];
         $ratio = ( $ratio>$rh? $rh: $ratio );
         $thm_w = round($ratio*$img_size[0]);
         $thm_h = $thm_maxh;
      }
      $thm_src = $img_src;
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM:
               case IMAGETYPE_JPC:
               case IMAGETYPE_JP2:
               case IMAGETYPE_JPX:
               case IMAGETYPE_SWC:
               default:
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img );
      }

      echo $img;
   } // $img_src!=""

   if ( $contenido || "CMS_IMGDESCR[11]" )
   {
      echo "<br>";
      echo "CMS_IMGDESCR[11]";
   }
   if ( $contenido || "CMS_LINKDESCR[11]" )
   {
      echo "<br>";
      echo "CMS_LINKDESCR[11]";
   }
   echo "<br>";



////drittes Bild


   $img_src = "CMS_IMG[12]";                              // src of image 
   $img_lnk = "CMS_LINK[12]";                              // image link 
   $img_tgt = "CMS_LINKTARGET[12]";                        // target of imagelink 
    
   
   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src); 
   if ( $img_src && file_exists($img_path) ) 
   { 
      unset ($ratio); 
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 ) 
      { 
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw; 
         $thm_h = round($ratio*$img_size[1]); 
      } 
      if ( $thm_maxh>0 ) 
      { 
         $rh = $thm_maxh/$img_size[1]; 
         $ratio = ( $ratio>$rh? $rh: $ratio ); 
         $thm_w = round($ratio*$img_size[0]); 
         $thm_h = $thm_maxh; 
      } 
      $thm_src = $img_src; 
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM: 
               case IMAGETYPE_JPC: 
               case IMAGETYPE_JP2: 
               case IMAGETYPE_JPX: 
               case IMAGETYPE_SWC: 
               default: 
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img ); 
      } 
        
      echo $img; 
   } // $img_src!="" 
    
   if ( $contenido || "CMS_IMGDESCR[12]" ) 
   { 
      echo "<br>"; 
      echo "CMS_IMGDESCR[12]"; 
   } 
   if ( $contenido || "CMS_LINKDESCR[12]" ) 
   { 
      echo "<br>"; 
      echo "CMS_LINKDESCR[12]"; 
   } 
   echo "<br>";


////viertes Bild


   $img_src = "CMS_IMG[13]";                              // src of image 
   $img_lnk = "CMS_LINK[13]";                              // image link 
   $img_tgt = "CMS_LINKTARGET[13]";                        // target of imagelink 
    
   
   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src); 
   if ( $img_src && file_exists($img_path) ) 
   { 
      unset ($ratio); 
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 ) 
      { 
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw; 
         $thm_h = round($ratio*$img_size[1]); 
      } 
      if ( $thm_maxh>0 ) 
      { 
         $rh = $thm_maxh/$img_size[1]; 
         $ratio = ( $ratio>$rh? $rh: $ratio ); 
         $thm_w = round($ratio*$img_size[0]); 
         $thm_h = $thm_maxh; 
      } 
      $thm_src = $img_src; 
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM: 
               case IMAGETYPE_JPC: 
               case IMAGETYPE_JP2: 
               case IMAGETYPE_JPX: 
               case IMAGETYPE_SWC: 
               default: 
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img ); 
      } 
        
      echo $img; 
   } // $img_src!="" 
    
   if ( $contenido || "CMS_IMGDESCR[13]" ) 
   { 
      echo "<br>"; 
      echo "CMS_IMGDESCR[13]"; 
   } 
   if ( $contenido || "CMS_LINKDESCR[13]" ) 
   { 
      echo "<br>"; 
      echo "CMS_LINKDESCR[13]"; 
   } 
   echo "<br>";


////fünftes Bild


   $img_src = "CMS_IMG[14]";                              // src of image 
   $img_lnk = "CMS_LINK[14]";                              // image link 
   $img_tgt = "CMS_LINKTARGET[14]";                        // target of imagelink 
    
  
   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src); 
   if ( $img_src && file_exists($img_path) ) 
   { 
      unset ($ratio); 
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 ) 
      { 
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw; 
         $thm_h = round($ratio*$img_size[1]); 
      } 
      if ( $thm_maxh>0 ) 
      { 
         $rh = $thm_maxh/$img_size[1]; 
         $ratio = ( $ratio>$rh? $rh: $ratio ); 
         $thm_w = round($ratio*$img_size[0]); 
         $thm_h = $thm_maxh; 
      } 
      $thm_src = $img_src; 
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM: 
               case IMAGETYPE_JPC: 
               case IMAGETYPE_JP2: 
               case IMAGETYPE_JPX: 
               case IMAGETYPE_SWC: 
               default: 
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img ); 
      } 
        
      echo $img; 
   } // $img_src!="" 
    
   if ( $contenido || "CMS_IMGDESCR[14]" ) 
   { 
      echo "<br>"; 
      echo "CMS_IMGDESCR[14]"; 
   } 
   if ( $contenido || "CMS_LINKDESCR[14]" ) 
   { 
      echo "<br>"; 
      echo "CMS_LINKDESCR[14]"; 
   } 
   echo "<br>";

       ////sechstes Bild


   $img_src = "CMS_IMG[15]";                              // src of image
   $img_lnk = "CMS_LINK[15]";                              // image link
   $img_tgt = "CMS_LINKTARGET[15]";                        // target of imagelink


   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src);
   if ( $img_src && file_exists($img_path) )
   {
      unset ($ratio);
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 )
      {
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw;
         $thm_h = round($ratio*$img_size[1]);
      }
      if ( $thm_maxh>0 )
      {
         $rh = $thm_maxh/$img_size[1];
         $ratio = ( $ratio>$rh? $rh: $ratio );
         $thm_w = round($ratio*$img_size[0]);
         $thm_h = $thm_maxh;
      }
      $thm_src = $img_src;
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM:
               case IMAGETYPE_JPC:
               case IMAGETYPE_JP2:
               case IMAGETYPE_JPX:
               case IMAGETYPE_SWC:
               default:
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img );
      }

      echo $img;
   } // $img_src!=""

   if ( $contenido || "CMS_IMGDESCR[15]" )
   {
      echo "<br>";                                            
      echo "CMS_IMGDESCR[15]";
   }
   if ( $contenido || "CMS_LINKDESCR[15]" )
   {
      echo "<br>";
      echo "CMS_LINKDESCR[15]";
   }
   echo "<br>";

    ////siebentes Bild


   $img_src = "CMS_IMG[16]";                              // src of image
   $img_lnk = "CMS_LINK[16]";                              // image link
   $img_tgt = "CMS_LINKTARGET[16]";                        // target of imagelink


   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src);
   if ( $img_src && file_exists($img_path) )
   {
      unset ($ratio);
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 )
      {
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw;
         $thm_h = round($ratio*$img_size[1]);
      }
      if ( $thm_maxh>0 )
      {
         $rh = $thm_maxh/$img_size[1];
         $ratio = ( $ratio>$rh? $rh: $ratio );
         $thm_w = round($ratio*$img_size[0]);
         $thm_h = $thm_maxh;
      }
      $thm_src = $img_src;
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM:
               case IMAGETYPE_JPC:
               case IMAGETYPE_JP2:
               case IMAGETYPE_JPX:
               case IMAGETYPE_SWC:
               default:
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img );
      }

      echo $img;
   } // $img_src!=""

   if ( $contenido || "CMS_IMGDESCR[16]" )
   {
      echo "<br>";
      echo "CMS_IMGDESCR[16]";
   }
   if ( $contenido || "CMS_LINKDESCR[16]" )
   {
      echo "<br>";
      echo "CMS_LINKDESCR[16]";
   }
   echo "<br>";


        ////zweites Bild


   $img_src = "CMS_IMG[17]";                              // src of image
   $img_lnk = "CMS_LINK[17]";                              // image link
   $img_tgt = "CMS_LINKTARGET[17]";                        // target of imagelink


   $img_path = str_replace($cfgClient[$client]["path"]["htmlpath"], $cfgClient[$client]["path"]["frontend"], $img_src);
   if ( $img_src && file_exists($img_path) )
   {
      unset ($ratio);
      $img_size = getimagesize ($img_path); 
      if ( $thm_maxw>0 )
      {
         $ratio = $thm_maxw/$img_size[0]; 
         $thm_w = $thm_maxw;
         $thm_h = round($ratio*$img_size[1]);
      }
      if ( $thm_maxh>0 )
      {
         $rh = $thm_maxh/$img_size[1];
         $ratio = ( $ratio>$rh? $rh: $ratio );
         $thm_w = round($ratio*$img_size[0]);
         $thm_h = $thm_maxh;
      }
      $thm_src = $img_src;
      if ( is_numeric($ratio) && $ratio<1 ) 
      { 
         // use thumb, resize image 
         $thm_src = dirname($img_src)."/$thm_dir/".basename($img_src); 
         $thm_path = dirname($img_path)."/$thm_dir/".basename($img_path); 
         $flag_create = !file_exists($thm_path); 
         if ( !$flag_create ) 
         { 
            $thm_size = getimagesize ( $thm_path ); 
            if ( !$thm_size || $thm_size[0]!=$thm_w ) 
            { 
               $flag_create = true; 
            } 
         } 
         if ( $flag_create ) 
         { // make thumb 
            if ( !file_exists(dirname($thm_path)) ) mkdir(dirname($thm_path),0777); 
            unset($i); 
            switch ( exif_imagetype($img_path) ) 
            { 
               case IMAGETYPE_GIF: 
                  $i = imagecreatefromgif($img_path); 
                  break; 
               case IMAGETYPE_JPEG: 
                  $i = imagecreatefromjpeg($img_path); 
                  break; 
               case IMAGETYPE_PNG: 
                  $i = imagecreatefrompng($img_path); 
                  break; 
               case IMAGETYPE_BMP: 
                  $i = imagecreatefromwbmp($img_path); 
                  break; 
               case IMAGETYPE_SWF: 
               case IMAGETYPE_PSD: 
               case IMAGETYPE_TIFF_II: 
               case IMAGETYPE_TIFF_MM:
               case IMAGETYPE_JPC:
               case IMAGETYPE_JP2:
               case IMAGETYPE_JPX:
               case IMAGETYPE_SWC:
               default:
                  $i = imagecreatefromxbm($fsrc); 
            } //detect image type 
            if ( $i ) 
            { 
               $thm = imagecreatetruecolor($thm_w,$thm_h); 
               imagecolortransparent($thm,imagecolorat($i,0,0)); 
               imagecopyresampled($thm,$i,0,0,0,0,$thm_w,$thm_h,$img_size[0],$img_size[1]) && 
                  imagejpeg($thm,$thm_path,$thm_qual); 
               imagedestroy($thm); 
               imagedestroy($i); 
            } 
         } // create thumb 
      } // $ratio<1 

      $img =  sprintf('<img src="%s" border="0" %s>',$thm_src,$align); 
        
      $slf = "http://" . $_SERVER['HTTP_HOST'] . dirname($PHP_SELF) . "/"; 
      if ( $img_lnk != "http://" && $img_lnk != $slf ) 
      { 
        $img = sprintf('<a href="%s" target="%s">%s</a>',$img_lnk,$img_tgt,$img); 
      } 
      elseif ( $show_popup ) 
      { 
        $img = sprintf('<a href="%s?img=%s" target="_blank">%s</a>',$viewer,urlencode($img_src),$img );
      }

      echo $img;
   } // $img_src!=""

   if ( $contenido || "CMS_IMGDESCR[17]" )
   {
      echo "<br>";
      echo "CMS_IMGDESCR[17]";
   }
   if ( $contenido || "CMS_LINKDESCR[17]" )
   {
      echo "<br>";
      echo "CMS_LINKDESCR[17]";
   }
   echo "<br>";
?>
.. ich hoffe ich hab jetzt alles...

Dinkel
Beiträge: 565
Registriert: Di 22. Mär 2005, 14:52
Kontaktdaten:

Beitrag von Dinkel » Mi 28. Jan 2009, 09:14

Hast Du die Meldungen mal angesehen?

Code: Alles auswählen

Warning: getimagesize(/home/confixx/web503/html/contenidoawo/awo/upload/bilder/Haus_vorn_P1010006.JPG) [function.getimagesize]: failed to open stream: Permission denied in /home/confixx/web503/html/contenidoawo/awo/front_content.php(980) : eval()'d code on line 830

Warning: Division by zero in /home/confixx/web503/html/contenidoawo/awo/front_content.php(980) : eval()'d code on line 833
Offensichtlich stimmen die Ordner-/Dateiberechtigungen nicht. Das Bild kann nicht gelesen werden, daher auch die Fehlermeldung "Permission denied".

Schau mal, dass die Ordner- und Dateirechte stimmen.
selbstentwickelte Module:
Downloads und Infos zu den Modulen: gibt es hier.
Modul: Forum | Version 0.9 | getestet: 4.6.24 MR, 4.8.11, 4.8.11 AMR
Modul: Galleriffic | Version: 0.3.4 BETA | getestet: 4.8.11, 4.8.11 AMR, 4.8.12, 4.8.12 AMR
Modul: Metadata | Version: 2.0 | getestet: 4.9.7, 4.9.7 AMR
Modul: Slider Gallery | Version: 1.0 | getestet: 4.9.12 AMR
Modul: Up- & Download | Version: 4.1 | getestet: 4.9.12 AMR

jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

Beitrag von jacke » Mi 28. Jan 2009, 09:35

Danke,

das habe ich auch schon vermutet und gedacht gerichtet zu haben. Allerdings - so sagte mir eben der Provider - habe ich keine Rechte die Rechte der Bilder zu ändern. Da Contenido die Rechte an den Bildern hat und ich weder löschen noch die Dateiattribute per FTP ändern kann. Alles Mist - ich kann dochnicht ständig der Provider die Rechte ändern lassen.

Ich hoffe es gibt da eine Möglichkeit das umzustellen.

Danke schon mal

Dodger77
Beiträge: 3626
Registriert: Di 12. Okt 2004, 20:00
Wohnort: Voerde (Niederrhein)
Kontaktdaten:

Beitrag von Dodger77 » Mi 28. Jan 2009, 09:52

jacke hat geschrieben:Alles Mist - ich kann dochnicht ständig der Provider die Rechte ändern lassen.

Ich hoffe es gibt da eine Möglichkeit das umzustellen.
Ja, die Möglichkeit gibt es:

http://forum.contenido.org/viewtopic.php?p=84167#84167

Grundsätzlich sollte der Provider aber dafür sorgen, dass per Webserver hochgeladene Dateien per FTP geändert werden können und umgekehrt.

jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

Beitrag von jacke » Mi 28. Jan 2009, 18:26

Danke,
ich habe es mal so vorgenommen und es geht leidlich. Ich musste allerdings alle Dateien löschen, wieder hochladen, Rechte vergeben.

Allerdings geht der popupviewer viewer.php immer noch nicht.


Gruß jacke

volleyass
Beiträge: 27
Registriert: Mi 6. Okt 2004, 18:53
Kontaktdaten:

Beitrag von volleyass » Mi 28. Jan 2009, 18:27

jacke hat geschrieben:Danke,

Alles Mist - ich kann dochnicht ständig der Provider die Rechte ändern lassen.
Ich hoffe es gibt da eine Möglichkeit das umzustellen.
Na diese Aussage finde ich recht heftig. Die Dateirechte auf dem Server per FTP zu ändern sollte auch für einen Nichtprogrammierer möglich sein. Sofern Du dafür den Provider benötigst, solltest Du mal über einen Wechsel nachdenken sonst hast Du immer mal wieder Probleme.

Ist ja kein Hexenwerk.

Volleyass

jacke
Beiträge: 303
Registriert: Mi 25. Sep 2002, 19:37
Kontaktdaten:

Beitrag von jacke » Mi 28. Jan 2009, 18:36

Hallo,
der Provoider ist candan oder canhost. Einzig die Erreichbarkeit, die Leute vom Support und die Preise sind gut. Im Sommer wurden sämtlich index.html gehackt. Das war schon ein riesen Aufwand alle zu finden und wieder zu erstetzen.

Zu meinem Problem meinen sie, das der Eigentümer der Dateien der apache-Server von contenido ist (oder so ähnlich). Deshalb kann ich die Dateien nicht per FTP verändern. Kann ich mir die Rechte an allen Dateien und Ordnern wieder geben lassen oder läuft dann contenido nicht mehr??

Danke

Gesperrt