Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kubiczek

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 13
91
Discussion & Troubleshooting / Re: IMG mit DIV Überlagern in jpg.html
« on: December 08, 2010, 10:45:35 AM »
Ja solange der Dateiname ohne Leerzeichen ist,geht es einwandfrei. Habe schon überlegt alle zu ändern,aber es sind 900 Bilder.

92
Discussion & Troubleshooting / Re: IMG mit DIV Überlagern in jpg.html
« on: December 08, 2010, 06:21:09 AM »
habe mich vorgearbeitet

im FF CHROME ind safari geht es.  nur im IE will es nicht klappen. Da verschiebt sich der div Layer rechts neben das bild.
http://www.grosspeterwitz.org/friedhof/4images/details.php?image_id=2981&l=deutsch

in der jpg.html steht jetzt folgendes
<img style="float: left; z-index: 1;width:{width}px; height:{height}px;" src="{media_src}" border="0" alt="{image_name}">
        <
div id="container" style="float: left; z-index: 2; position:absolute;"></div>



wie bekomme ich es hin das die position:absolute; sich an dem img orientiert in der ausrichtung?

gruß

93
Chit Chat / Re: [TUT] Add own Language Text / Füge eigene Texte hinzu
« on: December 04, 2010, 06:42:45 PM »
Online Version  :arrow:

Dein Link geht nicht.

94
Chit Chat / Re: furchtbares Durcheinander
« on: November 30, 2010, 11:20:54 PM »
Hallo,

da ist was dran,  der folgende Mod ist bestimmt sehr Interessant,
   
[MOD] Multi-Language support for any text (updated 05-11-2005) http://www.4homepages.de/forum/index.php?topic=6749.0

Mann kann damit die Kategorienamen Mehrsprachig anzeigen,
nur das ist alles so durcheinander das ein Leihewie ich,
da so seine probleme hat ihn umzusetzten.

währe nett wenn sich jemad der sache annehmen könnte.

Mann kann sich manchmal TOTSUCHEN.

Gott sei Dank das es so was gibt http://www.4homepages.de/forum/index.php?topic=25661.msg140412#msg140412

gruß

PS: Das Leben währe nur halb so schön ohne 4Images

95
Discussion & Troubleshooting / IMG mit DIV Überlagern in jpg.html
« on: November 29, 2010, 03:58:20 AM »
Hallo,

ich will den PIN MOD von KurtW in meiner Friedhofsgalerie als Kerzenanzünder nutzen.
http://www.grosspeterwitz.org/friedhof/4images/details.php?image_id=386&l=deutsch

in der details.html wird der container für die pins erstellt

 <div id="click_container" style="position:absolute; width:{width}px; height:{height}px; cursor:crosshair;" onClick="displayOffsets(event);">

details.html  ORGINALL CODE
{ifnot pin_image_show}
                   </
div>
                   {
endifnot pin_image_show}
                   {if 
pin_image_show}
                   {if 
pin_image_show_access}
                   <
div id="click_container" style="position:absolute; width:{width}px; height:{height}px; cursor:crosshair;" onClick="displayOffsets(event);">
                   {endif 
pin_image_show_access}
                   {
ifnot pin_image_show_access}
                   <
div id="click_container" style="position:absolute; width:{width}px; height:{height}px;">
                   {
endifnot pin_image_show_access}
                   {
pin_image}
                   </
div></div>
                   {if 
pin_image_show_access}


in der media/jpg.html

ORGINAL CODE
<!-- Template file for JPG Files -->
<!-- 
Start ModPin images -->
<
div id="container" style="position:static; width:{width}px; height:{height}px; border:0px; background: url({media_src}) top left no-repeat; text-align:left;">
<!-- 
END ModPin images -->


Das problem ist, das dann die bilder in orginalgrösse in details fenster aufgehen.

habe mir dann überlegt das ich den container überlagere und die Bild grösse in jpg.html begrenze.

in details.html

<div id="click_container" style="position:absolute; width:500px; height:720px; cursor:crosshair;" onClick="displayOffsets(event);">

und jpg.html

<img style="float: left; z-index: 1;max-width: 500px; width: expression(this.width > 500 ? 500: true);" src="{media_src}" border="0" alt="{image_name}"/>
        <div id="container" style="float: left; z-index: 2; position:static; "></div>

mit der Breiten einstellung hat es auch hingehauen, nur die höhe des div container height:720px kann ich nicht an das bild anpasssen,
und dann bei kleineren bilder >720 das PIN KREUZ in den Kommentarbereich hineingeht.


HINWEISS: mit background: url({media_src}) kann ich nicht in jpeg.html arbeiten, da dann die bilder, die im data/ gespeichert sind, mit dateinamen test 1.jpg (also mit leerzeichen) nicht in details fenster aufgehen.

Hat jemand eine IDEE wie mann das lösen kann?



96
Mods & Plugins (Releases & Support) / Re: [MOD]Pictures Email Upload V1.7.6
« on: November 27, 2010, 10:26:26 PM »
Geschaft....

Beim email_upload werden jetzt die GPS Daten übernomen.


Voraussetzung ist der Einbau von den zwei folgenden erweiterungen

[MOD] Google-Maps Integration V.01 http://www.4homepages.de/forum/index.php?topic=16533.0
   
[MOD] Google-Maps / GPS Integration V1.2 http://www.4homepages.de/forum/index.php?topic=19926.0



danach bitte die email_upload im admin/plugins duch folgendes ersetzen.


<link rel="stylesheet" href="/admin/cpstyle.css">
<
body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<?
// PLUGIN_TITLE: eMail_upload.php 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: eMail_upload.php                                     *
 *        Copyright: (C) 2008 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *    File Version: 1.1 (by Rembrandt www.vienna-pictures.com)            *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
class receiveMail {
  var 
$server='';
  var 
$username='';
  var 
$password='';
        
  function 
receiveMail($server='localhost',$username,$password){
//  $strConnect='{'.$server.':143}INBOX';
//  $strConnect='{'.$server.':110}INBOX';
    
$strConnect='{'.$server.':110/pop3/notls}';
    
$this->server=$strConnect;
    
$this->username=$username;
    
$this->password=$password;
  }
  
  function 
connect(){
    
$this->mbox=imap_open($this->server,$this->username,$this->password);
  }
  
  function 
getHeaders($mid){
    
$mail_header=imap_header($this->mbox,$mid);
    
$sender=$mail_header->from[0];
    
$sender_replyto=$mail_header->reply_to[0];
    if(
strtolower($sender->mailbox)!='mailer-daemon' && strtolower($sender->mailbox)!='postmaster'){
      
$mail_details=array(
        
'from'=>strtolower($sender->mailbox).'@'.$sender->host,
        
'fromName'=>$sender->personal,
        
'toOth'=>strtolower($sender_replyto->mailbox).'@'.$sender_replyto->host,
        
'toNameOth'=>$sender_replyto->personal,
        
'subject'=>$mail_header->subject,
        
'to'=>strtolower($mail_header->toaddress)
      );
    }
    return 
$mail_details;
  }
  
  function 
get_mime_type($structure){
    
$primary_mime_type = array("TEXT""MULTIPART""MESSAGE""APPLICATION""AUDIO""IMAGE""VIDEO""OTHER");
    if(
$structure->subtype) {
      return 
$primary_mime_type[(int) $structure->type] . '/' $structure->subtype;
    }
    return 
"TEXT/PLAIN";
  }
  
  function 
get_part($mbox$mid$mime_type$structure false,$part_number false){
    if(!
$structure) {
      
$structure imap_fetchstructure($mbox$mid);
    }
    if(
$structure) {
      if(
$mime_type == $this->get_mime_type($structure)){
        if(!
$part_number){
          
$part_number "2";
        }
        
$text imap_fetchbody($mbox$mid$part_number);
        if(
$structure->encoding == 3){
          return 
imap_base64($text);
        }
        else if(
$structure->encoding == 4){
          return 
imap_qprint($text);
        }
        else{
          return 
$text;
        }
      }
      if(
$structure->type == 1){
        while(list(
$index$sub_structure) = each($structure->parts)){
          if(
$part_number){
            
$prefix $part_number '.';
          }
          
$data $this->get_part($mbox$mid$mime_type$sub_structure$prefix . ($index 1));
          if(
$data){
            return 
$data;
          }
        }
      }
    }
    return 
false;
  }
  
  function 
getTotalMails(){
    
$headers=imap_headers($this->mbox);
    return 
count($headers);
  }
  
  function 
GetAttach($mid,$path){
    
$structure imap_fetchstructure($this->mbox,$mid);
    
$ar="";
    foreach(
$structure->parts as $key => $value){
      
$enc=$structure->parts[$key]->encoding;
      if(
$structure->parts[$key]->ifdparameters){
        
$name=$structure->parts[$key]->dparameters[0]->value;
        
$message imap_fetchbody($this->mbox,$mid,$key+1);
        if (
$enc == 1)  $message imap_8bit($message);
        if (
$enc == 2)  $message imap_binary ($message);
        if (
$enc == 3)  $message imap_base64 ($message);
        if (
$enc == 4)  $message imap_qprint($message);
        if (
$enc == 5)  $message "$message";
        if (
file_exists($path.$name)){
          
$num '1';
          while (
file_exists ($path $num $name)){
            
$num++;
            
$name "Copy_from_$name";
          }
        }
        
$name $num $name;
        
$fp=fopen($path.$name,"w+");
        
chmod ($path.$name0666);
        
fwrite($fp,$message);
        
fclose($fp);
        
$ar=$ar.$name.",";
      }
    }
    
$ar=substr($ar,0,(strlen($ar)-1));
    return 
$ar;
  }
  
  function 
getBody($mid){
    
$body $this->get_part($this->mbox$mid"TEXT/HTML");
    if (
$body == "")
      
$body $this->get_part($this->mbox$mid"TEXT/PLAIN");
        if (
$body == ""){
          return 
"";
        }
        return 
$body;
  }
  
  function 
deleteMails($mid){
    
imap_delete($this->mbox,$mid);
  }
  
  function 
close_mailbox(){
    
imap_close($this->mbox,CL_EXPUNGE);
  }
}
flush();
//error_reporting(E_ALL);
$nozip 1;
define('IN_CP'1);
$root_path = (false === stristr($_SERVER['PHP_SELF'], "/plugins/")) ? "./../" "./../../";
define('ROOT_PATH'$root_path);
require(
ROOT_PATH.'admin/admin_global.php');
require(
ROOT_PATH.'includes/image_utils.php');

  
$obj= new receiveMail($config['pop_server'],$config['pop_username'],$config['pop_password']);
  
$obj->connect();
  
$tot=$obj->getTotalMails(); 
  
  echo 
"$tot Neue Nachrichten in ".$config['pop_server']."<br>";
  if(
$tot>0) {
    echo 
'<table cellpadding="0" cellspacing="0" border="0" width="100%">';
    echo 
'<tr>';
    echo 
'<td class="tableheader">';
    echo 
'<table width="100%" border="0" cellspacing="1" cellpadding="3">';
    echo 
'<tr class="tableborder">';
    echo 
'<td class="tableheader" width=3%>Nr.</td>';
    echo 
'<td class="tableheader" width=8%>'.$lang['field_username'].'</td>';
    echo 
'<td class="tableheader" width=15%>'.$lang['field_image_name'].'</td>';
    echo 
'<td class="tableheader" width=8%>'.$lang['field_category'].'</td>';
    echo 
'<td class="tableheader" width=30%>'.$lang['field_keywords'].'</td>';
    echo 
'<td class="tableheader" >'.$lang['field_description'].'</td>';
    echo 
'</tr>';
    
$bgcounter 0;
//  for($i=$tot;$i>=1;$i--) 
    
for($i=1;$i<=$tot;$i++){
      
$body=$obj->getBody($i);
      
$mes strip_tags($body);
      
$head=$obj->getHeaders($i);
      
$array explode ("*",$head['subject']);
   
      
$sql "SELECT u.user_id, u.user_name, c.cat_id, c.cat_name
              FROM ("
.USERS_TABLE." u, ".CATEGORIES_TABLE." c)
              WHERE user_name = '
$array[0]' AND cat_id = '$array[2]'
             "

      
$result $site_db->query($sql); 
      
$row $site_db->fetch_array($result);
      
$user_name $row[user_name];
      
$user_id $row[user_id];
      
$cat_name $row[cat_name];
      
$cat_id $row[cat_id];  
      
      if (
$array[0] == "$user_name&& $array[1] == $config['pop_code']){
        
$path MEDIA_TEMP_PATH."/";
        
$found   '*';
        
$pos strpos($mes"*");  
        
$image_keywords substr("$mes"0"$pos");  
        
$image_description substr("$mes""$pos"+1,-1); 
        
$str=$obj->GetAttach($i,$path); 
        
$br=explode(",",$str);
    
        foreach(
$br as $key=>$value){
          
$new_name "$value";
          
$pos strpos($new_name,".");
          
$image_name substr("$new_name",0,"$pos");
          
$src MEDIA_TEMP_PATH."/".$new_name;
          
$dest THUMB_TEMP_PATH."/".$new_name;
          
$image_info = @getimagesize($src);
          
          
$convert_options init_convert_options();
          
$dimension = (intval($config['auto_thumbnail_dimension'])) ? intval($config['auto_thumbnail_dimension']) : 100;
          
$resize_type = (intval($config['auto_thumbnail_resize_type'])) ? intval($config['auto_thumbnail_resize_type']) : 1;
          
$quality = (intval($config['auto_thumbnail_quality']) && intval($config['auto_thumbnail_quality']) <= 100) ? intval($config['auto_thumbnail_quality']) : 100;
          
create_thumbnail($src$dest$quality$dimension$resize_type);
          
$new_thumb_name $new_name;
            
          
$image_description preg_replace("/[\n\r]/is"""$image_description);
          
$image_description trim($image_description);
          
$image_description preg_replace("/&nbsp;/"""$image_description);
          
$image_keywords preg_replace("/[\n\r]/is"""$image_keywords);
       
$image_keywords str_replace(","," ",$image_keywords); 
          
$image_keywords trim($image_keywords);
      
$image_keywords preg_replace("/&nbsp;/"""$image_keywords); 
          
$row_bg_number = ($bgcounter++ % == 0) ?  "tablerow" "tablerow2";
          
          
          if (
function_exists('exif_read_data') && $exif_data = @exif_read_data($src'EXIF')) 
    {
      
$exif_array get_exif_info($exif_data);
	
foreach (
$exif_array as $key => $val){
	
if (
$key == "Make"){
            
$Make $val;
        
	
}
	
if (
$key == "Model"){
	
	
$Model $val;
        
	
}
	
if (
$key == "DateTimeOriginal"){
          
	
$DateTimeOriginal $val;
        
	
}
	
if (
$key == "ISOSpeedRatings"){
          
	
$ISOSpeedRatings $val;
        
	
}
	
if (
$key == "ExposureTime"){
	
	
$ExposureTime $val;
        
	
}
	
if (
$key == "FNumber"){
          
	
$FNumber $val;
        
	
}
	
if (
$key == "FocalLength"){
	
	
$FocalLength $val;
        
	
}
	
if (
$key == "ExposureBiasValue"){
          
	
$ExposureBiasValue $val;
        
	
}
	
if (
$key == "ApertureValue"){
	
	
$ApertureValue $val;
        
	
}
	
if (
$key == "MaxApertureValue"){
            
$MaxApertureValue $val;
        
	
}
	
if (
$key == "MeteringMode"){
	
	
$MeteringMode $val;
	
	
}
        if (
$key == "Flash"){
          
	
$Flash $val;
        
	
}
	
if (
$key == "ExposureProgram"){
	
	
$ExposureProgram $val;
        
	
}
	
if (
$key == "ExposureMode"){
          
	
$ExposureMode $val;
        
	
}
	
if (
$key == "WhiteBalance"){
	
	
$WhiteBalance $val;
        
	
}
	
if (
$key == "GPSLongitudeRef"){
	
	
$GPSLongitudeRef $val;
	
	
}
	
if (
$key == "GPSLatitudeRef"){
	
	
$GPSLatitudeRef $val;
	
	
}
	
if (
$key == "GPSLongitude"){
          
	
$gmap_longitude substr (strrchr($val"("), 1);
          
	
 
$gmap_longitude substr ($gmap_longitude,0strlen($gmap_longitude)-1);
          
	
}
        if (
$key == "GPSLatitude"){
            
$gmap_latitude substr (strrchr($val"("), 1);
          
	
 
$gmap_latitude substr ($gmap_latitude,0strlen($gmap_latitude)-1);
	
	
}
	
if (
$key == "GPSAltitude"){
	
	
 
$GPSAltitude $val;
        
	
}
	
if (
$key == "GPSTrack"){
	
	
$GPSTrack $val;
        
	
}
	
	
	

	
	
	

	
	
	
if ((
$gmap_longitude <> "") && ($gmap_latitude <>"")) {
	
	
        
$image_gmap_zoom 13;
	
	
        
$image_gmap_type 3;
	
	
        
$image_gmap_show 1;
	
	
      }
	
	
	

	
	
	

	
	
	

	
	
	

	
	
	

     }
  }

          
          
          
          
          
          
          
          echo 
'<tr class="' .$row_bg_number.'">';
          echo 
'<td width=3%>'.$i.'</td>';
          echo 
'<td width=8%>'.$user_name.'</td>';
          echo 
'<td width=15%>'.$image_name.'</td>';
          echo 
'<td width=8%>'.$cat_name.'</td>';
          echo 
'<td width=30%>'$image_keywords '</td>';
          echo 
'<td >'$image_description '</td>';
          echo 
'</tr>';
          
          
$current_time time();
          
$sql "INSERT INTO ".IMAGES_TEMP_TABLE."
                 (cat_id, user_id, image_name, image_description, image_keywords, image_date, image_media_file, image_thumb_file,image_gmap_longitude, image_gmap_latitude , image_gmap_zoom, image_gmap_type, image_gmap_show)
                  VALUES
                 ('
$cat_id','$user_id','$image_name','$image_description','$image_keywords','$current_time', '$new_name', '$new_thumb_name','$gmap_longitude','$gmap_latitude', '$image_gmap_zoom', '$image_gmap_type', '$image_gmap_show')";
          
$result $site_db->query($sql);
          
$image_id $site_db->get_insert_id();
        }
      } 
      else{
        
$obj->deleteMails($i);
        
$row_bg_number = ($bgcounter++ % == 0) ?  "tablerow" "tablerow2";
        echo 
'<tr class= "'.$row_bg_number.'">';
        echo 
'<td width=3%>'.$i.'</td>';
        echo 
'<td width=10%>'.$head['from'].'</td>';
        echo 
'<td width=15%>'.$image_name.'</td>';
        echo 
'<td width=8%>'.$cat_name.'</td>';
        echo 
'<td class="marktext">Falscher Benutzername oder Passwort!</td>';
        echo 
'<td class="marktext">Mail wurde gelöscht!</td>';
        echo 
'</tr>';
      } 
      
flush();
      
$obj->deleteMails($i); // Delete Mail from Mail box
    
}
    echo 
'</table></td></tr></table>';
  }
  
$obj->close_mailbox();   //Close Mail Box
?>
</body>


Danke an Rembrandt für die entscheidenden hinweise.

kubiczek

97
Mods & Plugins (Releases & Support) / Re: [MOD]Pictures Email Upload V1.7.6
« on: November 26, 2010, 11:17:16 PM »
Hi!
so funktioniert es:
........


jetzt habe ich 6 stunden getüftelt,  wenn ich jetzt ein bild mit GPS Daten einfüge erscheit es auf der google karte.

http://www.grosspeterwitz.org/friedhof/4images/details.php?image_id=3020

nur mit der übernahme der GPS Daten beim EMAIL UPLOAD will es ums verrecken nicht gehen :twisted:.
der upload funktioniert nur die GPS Daten werden nicht übernohmen.


Bin ratlos


98
Hallo,

sobald ich die upload.php bearbeite im DREAMWAVER tritt als hinweiss "Syntax fehler " auf.

hier meine upload.php

ich nutze zwar 1.7.4 Galerie,   das selbe problem habe ich auch mit 1.7.6

weiss jemand ein rat?

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: upload.php                                           *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

if (!
function_exists("is_uploaded_file")) {
  function 
is_uploaded_file($file_name) {
    if (!
$tmp_file = @get_cfg_var('upload_tmp_dir')) {
      
$tmp_file tempnam('','');
      
$deleted = @unlink($tmp_file);
      
$tmp_file dirname($tmp_file);
    }
    
$tmp_file .= '/'.get_basefile($file_name);
    return (
ereg_replace('/+''/'$tmp_file) == $file_name) ? 0;
  }

  function 
move_uploaded_file($file_name$destination) {
    return (
is_uploaded_file($file_name)) ? ((copy($file_name$destination)) ? 0) : 0;
  }
}

class 
Upload {

  var 
$upload_errors = array();
  var 
$accepted_mime_types = array();
  var 
$accepted_extensions = array();
  var 
$upload_mode 3;

  var 
$image_type "";
  var 
$max_width = array();
  var 
$max_height = array();
  var 
$max_size = array();
  var 
$upload_path = array();

  var 
$field_name;
  var 
$file_name;
  var 
$extension;

  var 
$image_size 0;
  var 
$image_size_ok 0;
  var 
$lang = array();

  function 
Upload() {
    global 
$config$lang;

    
$this->max_width['thumb'] = $config['max_thumb_width'];
    
$this->max_width['media'] = $config['max_image_width'];
    
$this->max_height['thumb'] = $config['max_thumb_height'];
    
$this->max_height['media'] = $config['max_image_height'];

    
$this->max_size['thumb'] = $config['max_thumb_size'] * 1024;
    
$this->max_size['media'] = $config['max_media_size'] * 1024;

    
$this->upload_mode $config['upload_mode'];
    
$this->lang $lang;

    
$this->set_allowed_filetypes();
  }

  function 
check_image_size() {
    
$this->image_size = @getimagesize($this->upload_file);
    
$ok 1;
    if (
$this->image_size[0] > $this->max_width[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_width']);
    }

    if (
$this->image_size[1] > $this->max_height[$this->image_type]) {
      
$ok 0;
      
$this->set_error($this->lang['invalid_image_height']);
    }
    return 
$ok;
  }

  function 
copy_file() {
    switch (
$this->upload_mode) {
    case 
1// overwrite mode
      
if (file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
        @
unlink($this->upload_path[$this->image_type]."/".$this->file_name);
      }
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
2// create new with incremental extention
      
$n 2;
      
$copy "";
      while (
file_exists($this->upload_path[$this->image_type]."/".$this->name.$copy.".".$this->extension)) {
        
$copy "_".$n;
        
$n++;
      }
      
$this->file_name $this->name.$copy.".".$this->extension;
      
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      break;
    case 
3// do nothing if exists, highest protection
    
default:
      if (
file_exists($this->upload_path[$this->image_type]."/".$this->file_name)) {
       
$this->set_error($this->lang['file_already_exists']);
       
$ok 0;
      }
      else {
        
$ok move_uploaded_file($this->upload_file$this->upload_path[$this->image_type]."/".$this->file_name);
      }
      break;
    }
    @
chmod($this->upload_path[$this->image_type]."/".$this->file_nameCHMOD_FILES);
    return 
$ok;
  }

  function 
check_max_filesize() {
    if (
$this->HTTP_POST_FILES[$this->field_name]['size'] > $this->max_size[$this->image_type]) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
save_file() {
    global 
$user_info;

    
$this->upload_file $this->HTTP_POST_FILES[$this->field_name]['tmp_name'];
    
$ok 1;
    if (empty(
$this->upload_file) || $this->upload_file == "none") {
      
$this->set_error($this->lang['no_image_file']);
      
$ok 0;
    }

    if (
$user_info['user_level'] != ADMIN) {
      if (!
$this->check_max_filesize()) {
        
$this->set_error($this->lang['invalid_file_size']);
        
$ok 0;
      }
      if (
eregi("image"$this->HTTP_POST_FILES[$this->field_name]['type'])) {
        if (!
$this->check_image_size()) {
          
$ok 0;
        }
      }
    }

    if (!
$this->check_file_extension() || !$this->check_mime_type()) {
      
$this->set_error($this->lang['invalid_file_type']. " (".$this->extension.", ".$this->mime_type.")");
      
$ok 0;
    }
    if (
$ok) {
      if (!
$this->copy_file()) {
        if (isset(
$this->lang['file_copy_error'])) {
          
$this->set_error($this->lang['file_copy_error']);
        }
        
$ok 0;
      }
    }
    return 
$ok;
  }

  function 
upload_file($field_name$image_type$cat_id 0$file_name "") {
    global 
$HTTP_COOKIE_VARS$HTTP_POST_VARS$HTTP_GET_VARS$HTTP_POST_FILES;

    
// Bugfix for: http://www.securityfocus.com/archive/1/80106
    
if (isset($HTTP_COOKIE_VARS[$field_name]) || isset($HTTP_POST_VARS  [$field_name]) || isset($HTTP_GET_VARS   [$field_name])) {
      die(
"Security violation");
    }

    
$this->HTTP_POST_FILES $HTTP_POST_FILES;
    
$this->image_type $image_type;
    
$this->field_name $field_name;

    if (
$cat_id) {
      
$this->upload_path['thumb'] = THUMB_PATH."/".$cat_id;
      
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
    }
    else {
      
$this->upload_path['thumb'] = THUMB_TEMP_PATH;
      
$this->upload_path['media'] = MEDIA_TEMP_PATH;
    }

    if (
$file_name != "") {
      
ereg("(.+)\.(.+)"$file_name$regs);
      
$this->name $regs[1];
      
ereg("(.+)\.(.+)"$this->HTTP_POST_FILES[$this->field_name]['name'], $regs);
      
$this->extension $regs[2];
      
$this->file_name $this->name.".".$this->extension ;
    }
    else {
      
$this->file_name $this->HTTP_POST_FILES[$this->field_name]['name'];
      
$this->file_name ereg_replace(" ""_"$this->file_name);
      
$this->file_name ereg_replace("%20""_"$this->file_name);
      
$this->file_name preg_replace("/[^-\._a-zA-Z0-9]/"""$this->file_name);

      
ereg("(.+)\.(.+)"$this->file_name$regs);
      
$this->name $regs[1];
      
$this->extension $regs[2];
    }

    
$this->mime_type $this->HTTP_POST_FILES[$this->field_name]['type'];
    
preg_match("/([a-z]+\/[a-z\-]+)/"$this->mime_type$this->mime_type);
    
$this->mime_type $this->mime_type[1];

    if (
$this->save_file()) {
      return 
$this->file_name;
    }
    else {
      return 
false;
    }
  }

  function 
check_file_extension($extension "") {
    if (
$extension == "") {
      
$extension $this->extension;
    }
    if (!
in_array(strtolower($extension), $this->accepted_extensions[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
check_mime_type() {
    if (!isset(
$this->accepted_mime_types[$this->image_type])) {
      return 
true;
    }
    if (!
in_array($this->mime_type$this->accepted_mime_types[$this->image_type])) {
      return 
false;
    }
    else {
      return 
true;
    }
  }

  function 
set_allowed_filetypes() {
    global 
$config;
    
//Thumbnails
    
$this->accepted_mime_types['thumb'] = array(
      
"image/jpg",
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
    
$this->accepted_extensions['thumb'] = array(
      
"jpg",
      
"jpeg",
      
"gif",
      
"png"
    
);

    
//Media
    
$this->accepted_extensions['media'] = $config['allowed_mediatypes_array'];

    
$mime_type_match = array();
    include(
ROOT_PATH.'includes/upload_definitions.php');

    foreach (
$mime_type_match as $key => $val) {
      if (
in_array($key$this->accepted_extensions['media'])) {
        if (
is_array($val)) {
          foreach (
$val as $key2 => $val2) {
            
$this->accepted_mime_types['media'][] = $val2;
          }
        }
        else {
          
$this->accepted_mime_types['media'][] = $val;
        }
      }
    }
  }

  function 
get_upload_errors() {
    if (empty(
$this->upload_errors[$this->file_name])) {
      return 
"";
    }
    
$error_msg "";
    foreach (
$this->upload_errors[$this->file_name] as $msg) {
      
$error_msg .= "<b>".$this->file_name.":</b> ".$msg."<br />";
    }
    return 
$error_msg;
  }

  function 
set_error($error_msg) {
    
$this->upload_errors[$this->file_name][] = $error_msg;
  } 
 
// EXIF Funktionen für das automatische einfügen der GPS Daten beim Upload - Groesstenteils aus der Functions.php übernommen.
  
function get_exif_info($exif) {
  
$exif_match = array();
  
$exif_match['Make'] = "make";
  
$exif_match['Model'] = "model";
  
$exif_match['DateTimeOriginal'] = "datetime";
  
$exif_match['ISOSpeedRatings'] = "isospeed";
  
$exif_match['ExposureTime'] = "exposure";
  
$exif_match['FNumber'] = "aperture";
  
$exif_match['FocalLength'] = "focallen";
// GPS EXIF Variablen Start  - Changes by Erik Groennerud - www.koelschwasser.de 8.2007
  
$exif_match['GPSLatitude'] = "GPSLatitude";
  
$exif_match['GPSLatitudeRef'] = "GPSLatitudeRef";
  
$exif_match['GPSLongitude'] = "GPSLongitude";
  
$exif_match['GPSLongitudeRef'] = "GPSLongitudeRef";
  
$exif_match['GPSAltitude'] = "GPSAltitude";
// GPS EXIF Variablen Ende

  
$exif_array = array();
  if (
is_array($exif)) {
    foreach (
$exif as $key => $val) {
      if (isset(
$exif_match[$key])) {
        
$exif_info $val;
        if (
$key == "DateTimeOriginal") {
          
$exif_array[$exif_match[$key]] = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/""\\3.\\2.\\1"$exif_info);
        }
        elseif (
$key == "ExposureTime") {
	
	
  
$exposure explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = "1/" . ($exposure[1] / $exposure[0]);
        }
        elseif (
$key == "FNumber") {
	
	
  
$aperture explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = "F/" . ($aperture[0] / $aperture[1]);
        }
        elseif (
$key == "FocalLength") {
	
	
  
$focalLen explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = ($focalLen[0] / $focalLen[1]) . "mm";
        }

// GPS EXIF START - Changes by Erik Groennerud - www.koelschwasser.de 8.2007
        
elseif ($key == "GPSLatitudeRef") {
	
	
  
	
	
if (
$exif_info == "N") {
	
	
  
	
	
	
$GPSLatitudeRef "Nord";
	
	
  
	
	
	
$GPSLatfaktor 1;
	
	
  
	
	
	
} else {
	
	
  
	
	
	
	
$GPSLatitudeRef "Süd";
	
	
  
	
	
	
	
$GPSLatfaktor = -1;
	
	
  
	
	
	
}
	
	
  
	
	
	

        }
        elseif (
$key == "GPSLongitudeRef") {
	
	
  
	
	
if (
$exif_info == "E") {
	
	
  
	
	
	
$GPSLongitudeRef "Ost";
	
	
  
	
	
	
$GPSLongfaktor 1;
	
	
  
	
	
	
} else { 
	
	
  
	
	
	
$GPSLongitudeRef "West";
	
	
  
	
	
	
$GPSLongfaktor = -1;
	
	
  
	
	
	
}
	
	
	
	
}
        elseif (
$key == "GPSLatitude") {
        
	
$GPSLatitude_h explode("/"$exif_info[0]);
        
	
$GPSLatitude_m explode("/"$exif_info[1]);
        
	
$GPSLatitude_s explode("/"$exif_info[2]);
        
	

        
	
$GPSLat_h $GPSLatitude_h[0] / $GPSLatitude_h[1];
        
	
$GPSLat_m $GPSLatitude_m[0] / $GPSLatitude_m[1];
        
	
$GPSLat_s $GPSLatitude_s[0] / $GPSLatitude_s[1];
        
	

        
	
$GPSLatGrad $GPSLatfaktor * ($GPSLat_h + ($GPSLat_m + ($GPSLat_s 60))/60);
        
	

        
	
$exif_array[$exif_match[$key]] =  $GPSLatitudeRef " " .$GPSLat_h "° "$GPSLat_m "' " $GPSLat_s "'' ($GPSLatGrad)";
        }
        elseif (
$key == "GPSLongitude") {
        
	
$GPSLongitude_h explode("/"$exif_info[0]);
        
	
$GPSLongitude_m explode("/"$exif_info[1]);
        
	
$GPSLongitude_s explode("/"$exif_info[2]);
        
	

        
	
$GPSLong_h $GPSLongitude_h[0] / $GPSLongitude_h[1];
        
	
$GPSLong_m $GPSLongitude_m[0] / $GPSLongitude_m[1];
        
	
$GPSLong_s $GPSLongitude_s[0] / $GPSLongitude_s[1];
        
	

        
	
$GPSLongGrad $GPSLatfaktor * ($GPSLong_h + ($GPSLong_m + ($GPSLong_s 60))/60);
        
	

        
	
$exif_array[$exif_match[$key]] =  $GPSLongitudeRef " " $GPSLong_h "° "$GPSLong_m "' " $GPSLong_s "'' ($GPSLongGrad)";
        }
        elseif (
$key == "GPSAltitude") {
   
	
	
	
  
$GPSAltitude explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = ($GPSAltitude[0] / $GPSAltitude[1]) . " Meter über NN";
        }  
// GPS EXIF ENDE

//end of class
?>

99
Mods & Plugins (Releases & Support) / Re: [MOD]More Pictures on Detail Page
« on: November 22, 2010, 10:18:56 PM »
wenn ich das update mache verschwinden alle Gruppen Hauptbilder aus der Gallerie.

habe schon ca. 500 Gruppen Bilder:

ist es überhaupt möglich nachträglich das Admin Plugin und Member Addon einzubauen?

mfg kubiczek

100
Mods & Plugins (Releases & Support) / Re: [MOD]More Pictures on Detail Page
« on: November 18, 2010, 01:52:58 PM »
Hallo,

im Admin bereich habe ich Gruppen Bild:35 und  Bild Gruppe: 35  eingestellt.

sobald ich als User das Bild bearbeite  und  ein hacken bei Gruppen Bild setze.

verschwindet das Bild. und im Adminbereich erscheind dann Gruppen Bild: 1

habe den Code jetzt 2 mal eingebaut, was kann die ursache dafür sein?

http://www.grosspeterwitz.org/friedhof/4images/categories.php?cat_id=463&l=deutsch

101
Discussion & Troubleshooting / Re: Totalausfall
« on: November 04, 2010, 04:26:27 PM »
geht leider immer noch nicht,  in der lang/deutsch/main.php ist alles in ordnung.

die hast du doch gemeint?


102
Discussion & Troubleshooting / Re: Totalausfall
« on: November 04, 2010, 07:03:17 AM »
Ja über PHP MYAdmin kann ich die datenbank erreichen.

103
Discussion & Troubleshooting / Totalausfall
« on: November 04, 2010, 06:32:07 AM »
Hallo,

ich habe nichts in den letzten tagen geändert, und bekomme folgende meldung. :cry: :cry: :cry:

Warningmysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/htdocs/**********/friedhof/4images/includes/db_mysql.php on line 92

An unexpected error occured
Please try again later.

An unexpected error occuredPlease try again later.

An unexpected error occuredPlease try again later.

An unexpected error occuredPlease try again later.

An unexpected error occuredPlease try again later.

An unexpected error occuredPlease try again later.

An unexpected error occuredPlease try again later.

Warningmysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/************/friedhof/4images/includes/db_mysql.php on line 116

An unexpected error occured
Please try again later.

Warningmysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/htdocs/***********/friedhof/4images/includes/db_mysql.php on line 116


sehe link http://www.grosspeterwitz.org/friedhof/4images/index.php


kann mir bitte jemand ein TIP geben, habe hier im forum nichts gefunden.

104
Hallo,

habe hier den überblick 8O verloren,   

im ACE wird bei mir beim bearbeiten von "Kategorie namen" der name nicht angezeigt, aber wohl abgespeichert. aber nicht in unterschiedlichen sprachen.



105
Mods & Plugins (Releases & Support) / Re: [MOD] Pagepeel Advertisement
« on: October 13, 2010, 10:23:20 PM »
Super,

in 1.7.6 geht es http://www.grosspeterwitz.org/gp/

aber in 1.7.4 will es nicht http://www.grosspeterwitz.org/friedhof/4images/
                                   http://www.grosspeterwitz.org/4images_neu/index.php?l=deutsch

in den admin settings wird nichts abgespeichert. immer wieder leeres feld.

hat einer eine idee?

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 13