Einzelnen Beitrag anzeigen
Alt 10.02.2010, 11:13  
leandy20
Neuer Benutzer
 
Registriert seit: 10.02.2010
Beiträge: 3
PHP-Kenntnisse:
Anfänger
leandy20 befindet sich auf einem aufstrebenden Ast
Standard

Ich danke Dir für die schnelle Antwort !
Der Fehler ist weg. Nur habe ich jetzt einen Neuen
Tut mir leid, bin aber leider ein blutiger Anfänger...

In Zeile 252 kommt nun das hier:
Fatal error: Cannot redeclare quoted_printable_encode() in C:\xampp\htdocs\joomla\includes\vcard.class.php on line 252

-----
Code:

PHP-Code:
        // UNTESTED !!!
        
function setPhoto($type$photo)
        { 
// $type = "GIF" | "JPEG"
                
$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo);
        }



        function 
setFormattedName($name)
        {
                
$this->properties['FN'] = quoted_printable_encode($name);
        }



        function 
setName($family=''$first=''$additional=''$prefix=''$suffix='')
        {
                
$this->properties['N'] = "$family;$first;$additional;$prefix;$suffix";
                
$this->filename "$first%20$family.vcf";
                if (
$this->properties['FN']=='')
                {
                        
$this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
                }
        }



        function 
setBirthday($date)
        { 
// $date format is YYYY-MM-DD
                
$this->properties['BDAY'] = $date;
        }



        function 
setAddress($postoffice=''$extended=''$street=''$city=''$region=''$zip=''$country=''$type='HOME;POSTAL')
        {
        
// $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL"
                
$key 'ADR';
                if (
$type!='')
                {
                        
$key.= ";$type";
                }



                
$key.= ';ENCODING=QUOTED-PRINTABLE';
                
$this->properties[$key] = encode($name).';'.encode($extended).';'.encode($street).';'.encode($city).';'.encode($region).';'.encode($zip).';'.encode($country);

                if (
$this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] == '')
                {
                        
//$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type);
                
}
        }



        function 
setLabel($postoffice=''$extended=''$street=''$city=''$region=''$zip=''$country=''$type='HOME;POSTAL')
        {
                
$label '';
                if (
$postoffice!='')
                {
                        
$label.= $postoffice;
                        
$label.= "\r\n";
                }

                if (
$extended!='')
                {
                        
$label.= $extended;
                        
$label.= "\r\n";
                }

                if (
$street!='')
                {
                        
$label.= $street;
                        
$label.= "\r\n";
                }

                if (
$zip!='')
                {
                        
$label.= $zip .' ';
                }

                if (
$city!='')
                {
                        
$label.= $city;
                        
$label.= "\r\n";
                }

                if (
$region!='')
                {
                        
$label.= $region;
                        
$label.= "\r\n";
                }

                if (
$country!='')
                {
                        
$country.= $country;
                        
$label.= "\r\n";
                }

                
$this->properties["LABEL;$type;ENCODING=QUOTED-PRINTABLE"] = quoted_printable_encode($label);
        }



        function 
setEmail($address)
        {
                
$this->properties['EMAIL;INTERNET'] = $address;
        }



        function 
setNote($note)
        {
                
$this->properties['NOTE;ENCODING=QUOTED-PRINTABLE'] = quoted_printable_encode($note);
        }

  }

        function 
setURL($url$type='')
        {
        
// $type may be WORK | HOME
                
$key 'URL';
                if (
$type!='')
                {
                        
$key.= ";$type";
                }

                
$this->properties[$key] = $url;
        }



        function 
getVCard()
        {
                
$text 'BEGIN:VCARD';
                
$text.= "\r\n";
                
$text.= 'VERSION:2.1';
                
$text.= "\r\n";

                foreach(
$this->properties as $key => $value)
                {
                        
$text.= "$key:$value\r\n";
                }

                
$text.= 'REV:'date('Y-m-d') .'T'date('H:i:s') .'Z';
                
$text.= "\r\n";
                
$text.= 'MAILER:PHP vCard class by Kai Blankenhorn';
                
$text.= "\r\n";
                
$text.= 'END:VCARD';
                
$text.= "\r\n";

                return 
$text;
        }



        function 
getFileName()
        {
                return 
$this->filename;
        }
} [
b]<-- DAS IST ZEILE 252[/b
leandy20 ist offline