InfoFrame: Digitaler Bilderrahmen (Anzeige von Anrufen, E-Mails, Termine, Wetter...)

*räusper* Ja da fehlt noch mal was..... gaaanz unten im CalendarPlugin.php sind noch zwei Funktionen, die müssen auch noch in deine kopiert werden. Auch das füge ich gleich oben mit in mein post :D

Gut, daß du es gerade versuchst, os kann ich alles, was ich vergessen habe noch dazu schreiben :)

PHP:
	private function before_last ($needle, $inthat) {
        return substr($inthat, 0, $this->strrevpos($inthat, $needle));
 	}
 		  
	private function strrevpos($instr, $needle) {
    	$rev_pos = strpos (strrev($instr), strrev($needle));
    	if ($rev_pos===false) return false;
    	else return strlen($instr) - $rev_pos - strlen($needle);
	}
diese zwei Funktionen anstelle der private function addCalendar() hinzufügen

btw: Das ZendLoader gedöhns am Anfang kannst komplett löschen
PHP:
require_once 'Zend/Loader.php';

Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
 
Zuletzt bearbeitet:
Kein Problem.... Testen kann ich.....weil das andere was du machst kann ich nicht ....bin jetzt gerade unterwegs... Werde es nacher probieren.... Aber das erste passt wie ich es eingefügt habe?!
 
wtf, evtl sollte mehr schlafen!!! hast du mysqli oder mysql ?
AAAAAAALTER ich hab das falsche Plugin hochgeladen. Das ist mysqli und nicht mysql... so wird das nix.... verdammt brb :D
 
Zuletzt bearbeitet:
Ok .... Kann ich nacher nochmal machen... Sirry
 
Sory nochmal, hab eine neue CalendarPlugin01.zip hochgeladen. Hatte den Ordner zweimal geöffnet und aus dem falschen kopiert. :(
 
Also neue Plug rein und das abändern wie du es oben beschrieben hast... Korrekt?
 
So hier mal das veränderte Calendar.php - mit deinen Änderungen...

PHP:
<?php
/***************************************************************************
 * InfoFrame (image generator for digital picture frames)
 * Copyright (C) 2009  Tobias Kolb
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
 ***************************************************************************/



class CalendarPlugin implements IPlugin
{
    private $dbconn = NULL;
    private $config = NULL;
    
    public function __construct($dbconn, $config) {
        $this->dbconn = $dbconn;
        $this->config = $config;
    }
    
    
     public function doUpdate() {
    	
    	require_once 'google-api-php-client/autoload.php';
    	session_start();
		$client_id = $this->config['client_id'];
		$service_account_name = $this->config['account_name'];

        try {
			$client = new Google_Client();
			$client->setApplicationName($this->config['project_name']);
			$service = new Google_Service_Calendar($client);
        }
        catch (Exception $e) {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }

		if (isset($_SESSION['service_token']))
				$client->setAccessToken($_SESSION['service_token']);
	
		$key = file_get_contents($this->config['key_file']);
	
		$cred = new Google_Auth_AssertionCredentials(
							$service_account_name,
		    				array('https://www.googleapis.com/auth/calendar'),
		    				$key);
		    				
		$client->setAssertionCredentials($cred);
		if ($client->getAuth()->isAccessTokenExpired())
		 		$client->getAuth()->refreshTokenWithAssertion($cred);
	
		$_SESSION['service_token'] = $client->getAccessToken();
	
		//set startDate, endDate, eventParams
	  $now = new DateTime('NOW');
	 	$clone = clone $now;
	 	$clone = date_modify($clone, '+1 month');
		$startDate = date_format($now, DateTime::W3C);
		$endDate = date_format($clone, DateTime::W3C);
	
		$eventParams = array(
							'timeMin' => $startDate,
							'timeMax' => $endDate,
							'singleEvents' => 'true');
								
		//get Calendar Id´s	
		$calendarList = $service->calendarList->listCalendarList();
	
		// Set begin of querys
		$insertToken = "REPLACE INTO if_system (name, value) VALUES ";
		$insertCalendarData = "INSERT INTO if_calendar (color,begin,end,title,location) VALUES ";
		$deleteCalendarData = "DELETE FROM if_calendar WHERE ";
		
	/******************** Update every given time without checking for SyncToken ************************/
		$forceRefresh = $this->config['force_refresh'];
		$updateCalendar = FALSE;
		$query = "SELECT * FROM if_system WHERE name = 'CalendarUpdate'";
	  $result = mysql_query($query, $this->dbconn);
		if (mysql_num_rows($result) > 0) {
			$row = mysql_fetch_assoc($result);
			if ( ($row['name'] == 'CalendarUpdate') && ((time() - $row['value']) >= ($forceRefresh*3600)) ) {
				$updateCalendar = TRUE;
				$query = "REPLACE INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
		 		mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());					
			}
		}else{
			$updateCalendar = TRUE;
			$query = "INSERT INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
			mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());
		}
    
    public function doOutput($image, $style, $updateData, &$yoffset) {
        if ($updateData)
            $this->doUpdate();

        $query = "SELECT * FROM `if_calendar` WHERE (`end` > NOW()) ORDER BY `begin` ASC";
        $result = mysql_query($query, $this->dbconn);
        if (mysql_num_rows($result) > 0) {

            // define styles
            $opt_header = array(
                'width' => imagesx($image)-290,
                'line_height' => 18,
                'align' => ALIGN_LEFT
            );
            
            $opt_day = array(
                'width' => imagesx($image)-290,
                'height' => 14,
                'line_height' => 14,
                'align' => ALIGN_LEFT
            );

            $opt_entry = array(
                'width' => imagesx($image)-290,
                'height' => 12,
                'line_height' => 12,
                'align' => ALIGN_LEFT,
                'word_wrap_hyphen' => '...',
                'aggressive_word_wrap' => true,
            );

            // print header
            imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], "Nächste Termine", $opt_header);
            $icon = ImageCreateFromPNG ( 'resources/icons/clock.png' );
            ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
            ImageDestroy($icon);
            $yoffset += 26;
            
            // print calendar
            $counter = 0;
            $formatDate = "%d.%m.%Y";
            $formatTime = "%H:%M";
            $today = strftime( $formatDate );
            $tomorrow  = strftime( $formatDate, strtotime("+1 day", time() ) );
            $currently_displayed_day = 0;

            while ($row = mysql_fetch_assoc($result)) {
                $counter++;
                
                // if end of screen is reached and more than one items left -> cut off and show hint "x more appointments..."
                $rest = (mysql_num_rows($result) - $counter) + 1;
                if (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) {
                    $text = "... $rest weitere Termine";
                    imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_entry);
                    $yoffset += 20;
                    break;
                }
                
                // print day name
                $begin_date = strftime( $formatDate, strtotime($row['begin']));
                // if begin day is before today set begin to today
                if (strtotime($begin_date) < strtotime($today))
                    $begin_date = $today;
                // now if begin is after $currently_displayed_day update $currently_displayed_day
                if (strtotime($begin_date) > $currently_displayed_day) {
                    // update currently_displayed_day
                    $currently_displayed_day = strtotime($begin_date);
                    // print day name
                    if( $begin_date == $today )
                        $dayname = "Heute";
                    else if( $begin_date == $tomorrow )
                        $dayname = "Morgen";
                    else
                        $dayname = strftime("%A, ".$formatDate, strtotime($begin_date));

                    imagettftextboxopt($image, 14, 0, 50, $yoffset+4, $style['textcolor'], $style['fontb'], $dayname, $opt_day);
                    $yoffset += 27;
                }
                
                // build appointment time text
                $end_date = strftime( $formatDate, strtotime($row['end']));
                $begin_time = strftime( $formatTime, strtotime($row['begin']));
                $end_time = strftime( $formatTime, strtotime($row['end']));
                $text = $row['title'];
                //if ($row['location'] != null)
                    //$text = $text . ", " . $row['location'];
                if (($begin_time == "00:00") && ($end_time == "00:00")) {
                    // all day event (substract 1 second to get the real end date at 23:59) 
                    $end_date = strftime( $formatDate, strtotime($row['end'])-1);
                    // if all day event is longer than one day -> print end date
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text." (bis ".$end_date.")";
                        
                } else {
                    // normal event with start and end time
                    $text = $text." (".$begin_time." - ";
                    // if event ends not this day -> display end date additionally to time
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text.$end_date.", ";                    
                    $text = $text.$end_time.")";
                }
 // ------------------------------------------- M�llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304")
                {
                if (strpos($row['title'], 'Sperrmüll') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                if (strpos($row['title'], 'Grüne Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                if (strpos($row['title'], 'Gelber Sack') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                if (strpos($row['title'], 'Graue Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
				if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                }
                else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00")
                { $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } 
                else {
// ------------------------------------------- Standard - Button ----------------------------------------                
                // determine button color
                $colorArray = htmlColorToRgb($row['color']);
                $color = ImageColorAllocate ($image, $colorArray[0], $colorArray[1], $colorArray[2]);
                // print appointment text and button
                drawGlassButton($image, $color, 32, $yoffset+8);
                }
                }
                imagettftextboxopt($image, 13, 0, 50, $yoffset, $style['textcolorgrau'], $style['fontb'], $text, $opt_entry);
                $yoffset += 22;

            }
            $yoffset += 15;
            
            
        }
        mysql_free_result($result);

    }

     private function before_last ($needle, $inthat) { 
        return substr($inthat, 0, $this->strrevpos($inthat, $needle)); 
     } 
            
    private function strrevpos($instr, $needle) { 
        $rev_pos = strpos (strrev($instr), strrev($needle)); 
        if ($rev_pos===false) return false; 
        else return strlen($instr) - $rev_pos - strlen($needle); 
    }  
    
}


und hier mein Original....

PHP:
 <?php
/***************************************************************************
 * InfoFrame (image generator for digital picture frames)
 * Copyright (C) 2009  Tobias Kolb
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
 ***************************************************************************/

require_once 'Zend/Loader.php';

Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_AuthSub');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Calendar');


class CalendarPlugin implements IPlugin
{
    private $dbconn = NULL;
    private $config = NULL;
    
    public function __construct($dbconn, $config) {
        $this->dbconn = $dbconn;
        $this->config = $config;
    }
    
    
    public function doUpdate() {
    
        // get calendar entries
        try
        {
            $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; // predefined service name for calendar
            $client = Zend_Gdata_ClientLogin::getHttpClient($this->config['user'], $this->config['password'],$service);
        }
        catch (Exception $e)
        {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }
        $cal = new Zend_Gdata_Calendar($client);
        $calendarList = $cal->getCalendarListFeed();
        
        // delete all old calendar entries
        mysql_query("START TRANSACTION", $this->dbconn);
        $query = "Delete from if_calendar";
        mysql_query($query, $this->dbconn) or die('Error, delete query failed');
        // read calendars
        foreach ($calendarList as $calendar)
        {
            // skip unselected calendars
            if (!$calendar->selected->getValue())
                continue;
            // calendar color
            $color = $calendar->color;
            // get calendar id
            $cal_id = substr(strrchr($calendar->id, '/'), 1 );

            // set query parameter
            $startDate=strftime( '%Y-%m-%d');
            $endDate = strftime( '%Y-%m-%d', strtotime("+".$this->config['number_of_days']." day", time() ) );
            $query = $cal->newEventQuery();
            $query->setUser($cal_id); // set calendar id
            $query->setVisibility('private');
            $query->setProjection('full');
            $query->setOrderby('starttime');
            $query->setStartMin($startDate);
            $query->setStartMax($endDate);
            $query->setSortOrder('ascending');
            $query->setSingleEvents(true);
            
            $entries = $cal->getCalendarEventFeed($query);
            foreach ($entries as $entry)
            {
                // get entry data
                $title = $entry->title;
                $begin = strtotime($entry->when[0]->startTime);
                $end = strtotime($entry->when[0]->endTime);
                $location = $entry->where[0]->valueString;
                // add to database
                $this->addCalendar($color, $begin, $end, $title, $location);
            }
        }
        mysql_query("COMMIT", $this->dbconn);
        
        
    }
    
    public function doOutput($image, $style, $updateData, &$yoffset) {
        if ($updateData)
            $this->doUpdate();

        $query = "SELECT * FROM `if_calendar` WHERE (`end` > NOW()) ORDER BY `begin` ASC";
        $result = mysql_query($query, $this->dbconn);
        if (mysql_num_rows($result) > 0) {

            // define styles
            $opt_header = array(
                'width' => imagesx($image)-290,
                'line_height' => 18,
                'align' => ALIGN_LEFT
            );
            
            $opt_day = array(
                'width' => imagesx($image)-290,
                'height' => 14,
                'line_height' => 14,
                'align' => ALIGN_LEFT
            );

            $opt_entry = array(
                'width' => imagesx($image)-290,
                'height' => 12,
                'line_height' => 12,
                'align' => ALIGN_LEFT,
                'word_wrap_hyphen' => '...',
                'aggressive_word_wrap' => true,
            );

            // print header
            imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], "Nächste Termine", $opt_header);
            $icon = ImageCreateFromPNG ( 'resources/icons/clock.png' );
            ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
            ImageDestroy($icon);
            $yoffset += 26;
            
            // print calendar
            $counter = 0;
            $formatDate = "%d.%m.%Y";
            $formatTime = "%H:%M";
            $today = strftime( $formatDate );
            $tomorrow  = strftime( $formatDate, strtotime("+1 day", time() ) );
            $currently_displayed_day = 0;

            while ($row = mysql_fetch_assoc($result)) {
                $counter++;
                
                // if end of screen is reached and more than one items left -> cut off and show hint "x more appointments..."
                $rest = (mysql_num_rows($result) - $counter) + 1;
                if (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) {
                    $text = "... $rest weitere Termine";
                    imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_entry);
                    $yoffset += 20;
                    break;
                }
                
                // print day name
                $begin_date = strftime( $formatDate, strtotime($row['begin']));
                // if begin day is before today set begin to today
                if (strtotime($begin_date) < strtotime($today))
                    $begin_date = $today;
                // now if begin is after $currently_displayed_day update $currently_displayed_day
                if (strtotime($begin_date) > $currently_displayed_day) {
                    // update currently_displayed_day
                    $currently_displayed_day = strtotime($begin_date);
                    // print day name
                    if( $begin_date == $today )
                        $dayname = "Heute";
                    else if( $begin_date == $tomorrow )
                        $dayname = "Morgen";
                    else
                        $dayname = strftime("%A, ".$formatDate, strtotime($begin_date));

                    imagettftextboxopt($image, 14, 0, 50, $yoffset+4, $style['textcolor'], $style['fontb'], $dayname, $opt_day);
                    $yoffset += 27;
                }
                
                // build appointment time text
                $end_date = strftime( $formatDate, strtotime($row['end']));
                $begin_time = strftime( $formatTime, strtotime($row['begin']));
                $end_time = strftime( $formatTime, strtotime($row['end']));
                $text = $row['title'];
                //if ($row['location'] != null)
                    //$text = $text . ", " . $row['location'];
                if (($begin_time == "00:00") && ($end_time == "00:00")) {
                    // all day event (substract 1 second to get the real end date at 23:59) 
                    $end_date = strftime( $formatDate, strtotime($row['end'])-1);
                    // if all day event is longer than one day -> print end date
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text." (bis ".$end_date.")";
                        
                } else {
                    // normal event with start and end time
                    $text = $text." (".$begin_time." - ";
                    // if event ends not this day -> display end date additionally to time
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text.$end_date.", ";                    
                    $text = $text.$end_time.")";
                }
 // ------------------------------------------- M�llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304")
                {
                if (strpos($row['title'], 'Sperrmüll') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                if (strpos($row['title'], 'Grüne Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                if (strpos($row['title'], 'Gelber Sack') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                if (strpos($row['title'], 'Graue Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
				if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                }
                else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00")
                { $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } 
                else {
// ------------------------------------------- Standard - Button ----------------------------------------                
                // determine button color
                $colorArray = htmlColorToRgb($row['color']);
                $color = ImageColorAllocate ($image, $colorArray[0], $colorArray[1], $colorArray[2]);
                // print appointment text and button
                drawGlassButton($image, $color, 32, $yoffset+8);
                }
                }
                imagettftextboxopt($image, 13, 0, 50, $yoffset, $style['textcolorgrau'], $style['fontb'], $text, $opt_entry);
                $yoffset += 22;

            }
            $yoffset += 15;
            
            
        }
        mysql_free_result($result);

    }

    private function addCalendar($color, $begin, $end, $title, $location) {
        $query = "INSERT INTO `if_calendar` (`id`, `color`, `begin`, `end`, `title`, `location`) 
                  VALUES (NULL,
                  '".mysql_real_escape_string($color)."', FROM_UNIXTIME($begin), FROM_UNIXTIME($end),
                  '".mysql_real_escape_string($title)."',
                  '".mysql_real_escape_string($location)."'
                  )";
        mysql_query($query, $this->dbconn) or die('Error, insert query failed: '.mysql_error());
    }
    
}
 
das doUpdate passt ja vorne und hinten nicht... da fehlt ungefähr 2/3 des codes
 
Ich kann den Fehler nicht finden...SORRY...

Sitz schon die ganze Zeit davor.... :-(

PHP:
<?php
/***************************************************************************
 * InfoFrame (image generator for digital picture frames)
 * Copyright (C) 2009  Tobias Kolb
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
 ***************************************************************************/




class CalendarPlugin implements IPlugin
{
    private $dbconn = NULL;
    private $config = NULL;
    
    public function __construct($dbconn, $config) {
        $this->dbconn = $dbconn;
        $this->config = $config;
    }
    
    
    public function doUpdate() {
    
            public function doUpdate() {
    	
    	require_once 'google-api-php-client/autoload.php';
    	session_start();
		$client_id = $this->config['client_id'];
		$service_account_name = $this->config['account_name'];

        try {
			$client = new Google_Client();
			$client->setApplicationName($this->config['project_name']);
			$service = new Google_Service_Calendar($client);
        }
        catch (Exception $e) {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }

		if (isset($_SESSION['service_token']))
				$client->setAccessToken($_SESSION['service_token']);
	
		$key = file_get_contents($this->config['key_file']);
	
		$cred = new Google_Auth_AssertionCredentials(
							$service_account_name,
		    				array('https://www.googleapis.com/auth/calendar'),
		    				$key);
		    				
		$client->setAssertionCredentials($cred);
		if ($client->getAuth()->isAccessTokenExpired())
		 		$client->getAuth()->refreshTokenWithAssertion($cred);
	
		$_SESSION['service_token'] = $client->getAccessToken();
	
		//set startDate, endDate, eventParams
	  $now = new DateTime('NOW');
	 	$clone = clone $now;
	 	$clone = date_modify($clone, '+1 month');
		$startDate = date_format($now, DateTime::W3C);
		$endDate = date_format($clone, DateTime::W3C);
	
		$eventParams = array(
							'timeMin' => $startDate,
							'timeMax' => $endDate,
							'singleEvents' => 'true');
								
		//get Calendar Id´s	
		$calendarList = $service->calendarList->listCalendarList();
	
		// Set begin of querys
		$insertToken = "REPLACE INTO if_system (name, value) VALUES ";
		$insertCalendarData = "INSERT INTO if_calendar (color,begin,end,title,location) VALUES ";
		$deleteCalendarData = "DELETE FROM if_calendar WHERE ";
		
	/******************** Update every given time without checking for SyncToken ************************/
		$forceRefresh = $this->config['force_refresh'];
		$updateCalendar = FALSE;
		$query = "SELECT * FROM if_system WHERE name = 'CalendarUpdate'";
	  $result = mysql_query($query, $this->dbconn);
		if (mysql_num_rows($result) > 0) {
			$row = mysql_fetch_assoc($result);
			if ( ($row['name'] == 'CalendarUpdate') && ((time() - $row['value']) >= ($forceRefresh*3600)) ) {
				$updateCalendar = TRUE;
				$query = "REPLACE INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
		 		mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());					
			}
		}else{
			$updateCalendar = TRUE;
			$query = "INSERT INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
			mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());
		}
	 /*********************************************************************************************************/
	
		$i = 0;
		while(TRUE) {
			
		/***************** Loop through each Calendar, get id, and color **************************/
			foreach ($calendarList->getItems() as $calendarListEntry) {
			  	$calendarID = $calendarListEntry->getID();
			  	$color = $calendarListEntry->getBackgroundColor();
			 
			 	/***************** Get SysncToken to skip this calender at next update if nothing has changed **********/ 
			    $events = $service->events->listEvents($calendarID, $eventParams);	    
			    //If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken
			    try{	
			    	$NextSyncToken = $events->getNextSyncToken();
		        }
		        catch (Exception $e) {
		            if (strripos($e->getMessage(), "410") !== FALSE){
		            	$NextSyncToken = 'FEHLER';
		            }else{
		            	die ('Folgender Fehler trat auf: ' . $e->getMessage());
		            }
		        } 
			    $SyncToken = '';
			   //echo $NextSyncToken.PHP_EOL;
			   	if ($updateCalendar == FALSE) {
					$query = "SELECT value FROM if_system WHERE name = '".$calendarID."'";
					$result = mysql_query($query, $this->dbconn);
						if (mysql_num_rows($result) > 0) {
							$row = mysql_fetch_assoc($result);
						 	$SyncToken = $row['value'];
						}
				}	
				$insertToken .= "('".$calendarID."','".$NextSyncToken."'), ";	
				/***************** SysncToken check done *****************************************************/ 
					
				/**************** if SyncToken changed perform update ******************************/			
			    if ($NextSyncToken != $SyncToken) {
			    	$i++;
			    	$deleteCalendarData .= "color = '".$color."' OR ";	    	
					while(TRUE) {
					 	/************************ Get content from each Calendar *****************/
						foreach ($events->getItems() as $event) {
						  	//print_r($event);
					  		if (!empty($event['modelData']['start']['dateTime'])) {
					  			$begin = date_format(date_create($event['modelData']['start']['dateTime']), 'Y-m-d H:i:s');
					  			$end = date_format(date_create($event['modelData']['end']['dateTime']), 'Y-m-d H:i:s');
					  		}else{
					  			$begin = $event['modelData']['start']['date'];
					  			$end = $event['modelData']['end']['date'];
					  		}			  	
					  		$title = $event->getSummary();	
					 		$insertCalendarData .= "('".$color."','".$begin."','".$end."','".$title."',''), ";	
					  	}
					  	$pageToken = $events->getNextPageToken();
					  	if ($pageToken) {
					 		$optParams = array('pageToken' => $pageToken);
					    	$events = $service->events->listEvents($calendarListEntry->getID(), $optParams);
					  	}else{
					    break;
					  	}
					}
				} /********** if SysncToken changed perform update END  **********/
		  	} /*********** Loop through each Calendar, get id, and color END *************************/
		  
		  	$pageToken = $calendarList->getNextPageToken();
		  	if ($pageToken) {
		  		$optParams = array('pageToken' => $pageToken);
		    	$calendarList = $service->calendarList->listCalendarList($optParams);
		  	}else{
		    	break;
		  	}
		}
		
	/***************************** if SyncToken changed perform SQL-statement *********************/
		if ( $i > 0 ) {
			mysql_query($this->before_last('OR', $deleteCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
			mysql_query($this->before_last(',', $insertToken), $this->dbconn) or die('CalendarPlugin -> insertToken: '.mysql_error());
			mysql_query($this->before_last(',', $insertCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
		}
	       		             
    }
        
    }
    
    public function doOutput($image, $style, $updateData, &$yoffset) {
        if ($updateData)
            $this->doUpdate();

        $query = "SELECT * FROM `if_calendar` WHERE (`end` > NOW()) ORDER BY `begin` ASC";
        $result = mysql_query($query, $this->dbconn);
        if (mysql_num_rows($result) > 0) {

            // define styles
            $opt_header = array(
                'width' => imagesx($image)-290,
                'line_height' => 18,
                'align' => ALIGN_LEFT
            );
            
            $opt_day = array(
                'width' => imagesx($image)-290,
                'height' => 14,
                'line_height' => 14,
                'align' => ALIGN_LEFT
            );

            $opt_entry = array(
                'width' => imagesx($image)-290,
                'height' => 12,
                'line_height' => 12,
                'align' => ALIGN_LEFT,
                'word_wrap_hyphen' => '...',
                'aggressive_word_wrap' => true,
            );

            // print header
            imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], "Nächste Termine", $opt_header);
            $icon = ImageCreateFromPNG ( 'resources/icons/clock.png' );
            ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
            ImageDestroy($icon);
            $yoffset += 26;
            
            // print calendar
            $counter = 0;
            $formatDate = "%d.%m.%Y";
            $formatTime = "%H:%M";
            $today = strftime( $formatDate );
            $tomorrow  = strftime( $formatDate, strtotime("+1 day", time() ) );
            $currently_displayed_day = 0;

            while ($row = mysql_fetch_assoc($result)) {
                $counter++;
                
                // if end of screen is reached and more than one items left -> cut off and show hint "x more appointments..."
                $rest = (mysql_num_rows($result) - $counter) + 1;
                if (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) {
                    $text = "... $rest weitere Termine";
                    imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_entry);
                    $yoffset += 20;
                    break;
                }
                
                // print day name
                $begin_date = strftime( $formatDate, strtotime($row['begin']));
                // if begin day is before today set begin to today
                if (strtotime($begin_date) < strtotime($today))
                    $begin_date = $today;
                // now if begin is after $currently_displayed_day update $currently_displayed_day
                if (strtotime($begin_date) > $currently_displayed_day) {
                    // update currently_displayed_day
                    $currently_displayed_day = strtotime($begin_date);
                    // print day name
                    if( $begin_date == $today )
                        $dayname = "Heute";
                    else if( $begin_date == $tomorrow )
                        $dayname = "Morgen";
                    else
                        $dayname = strftime("%A, ".$formatDate, strtotime($begin_date));

                    imagettftextboxopt($image, 14, 0, 50, $yoffset+4, $style['textcolor'], $style['fontb'], $dayname, $opt_day);
                    $yoffset += 27;
                }
                
                // build appointment time text
                $end_date = strftime( $formatDate, strtotime($row['end']));
                $begin_time = strftime( $formatTime, strtotime($row['begin']));
                $end_time = strftime( $formatTime, strtotime($row['end']));
                $text = $row['title'];
                //if ($row['location'] != null)
                    //$text = $text . ", " . $row['location'];
                if (($begin_time == "00:00") && ($end_time == "00:00")) {
                    // all day event (substract 1 second to get the real end date at 23:59) 
                    $end_date = strftime( $formatDate, strtotime($row['end'])-1);
                    // if all day event is longer than one day -> print end date
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text." (bis ".$end_date.")";
                        
                } else {
                    // normal event with start and end time
                    $text = $text." (".$begin_time." - ";
                    // if event ends not this day -> display end date additionally to time
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text.$end_date.", ";                    
                    $text = $text.$end_time.")";
                }
 // ------------------------------------------- M�llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304")
                {
                if (strpos($row['title'], 'Sperrmüll') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                if (strpos($row['title'], 'Grüne Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                if (strpos($row['title'], 'Gelber Sack') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                if (strpos($row['title'], 'Graue Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
				if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                }
                else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00")
                { $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } 
                else {
// ------------------------------------------- Standard - Button ----------------------------------------                
                // determine button color
                $colorArray = htmlColorToRgb($row['color']);
                $color = ImageColorAllocate ($image, $colorArray[0], $colorArray[1], $colorArray[2]);
                // print appointment text and button
                drawGlassButton($image, $color, 32, $yoffset+8);
                }
                }
                imagettftextboxopt($image, 13, 0, 50, $yoffset, $style['textcolorgrau'], $style['fontb'], $text, $opt_entry);
                $yoffset += 22;

            }
            $yoffset += 15;
            
            
        }
        mysql_free_result($result);

    }

    private function before_last ($needle, $inthat) {
        return substr($inthat, 0, $this->strrevpos($inthat, $needle));
 	}
 		  
	private function strrevpos($instr, $needle) {
    	$rev_pos = strpos (strrev($instr), strrev($needle));
    	if ($rev_pos===false) return false;
    	else return strlen($instr) - $rev_pos - strlen($needle);
	}
    
}
 
ich häng mich mal mit ran:

Warum 2x

Code:
public function doUpdate() {

einmal reicht doch :) . Vielleicht liegt's daran.
 
PHP:
    public function doUpdate() {
    	
    	require_once 'google-api-php-client/autoload.php';
    	session_start();
		$client_id = $this->config['client_id'];
		$service_account_name = $this->config['account_name'];

        try {
			$client = new Google_Client();
			$client->setApplicationName($this->config['project_name']);
			$service = new Google_Service_Calendar($client);
        }
        catch (Exception $e) {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }

		if (isset($_SESSION['service_token']))
				$client->setAccessToken($_SESSION['service_token']);
	
		$key = file_get_contents($this->config['key_file']);
	
		$cred = new Google_Auth_AssertionCredentials(
							$service_account_name,
		    				array('https://www.googleapis.com/auth/calendar'),
		    				$key);
		    				
		$client->setAssertionCredentials($cred);
		if ($client->getAuth()->isAccessTokenExpired())
		 		$client->getAuth()->refreshTokenWithAssertion($cred);
	
		$_SESSION['service_token'] = $client->getAccessToken();
	
		//set startDate, endDate, eventParams
	  $now = new DateTime('NOW');
	 	$clone = clone $now;
	 	$clone = date_modify($clone, '+1 month');
		$startDate = date_format($now, DateTime::W3C);
		$endDate = date_format($clone, DateTime::W3C);
	
		$eventParams = array(
							'timeMin' => $startDate,
							'timeMax' => $endDate,
							'singleEvents' => 'true');
								
		//get Calendar Id´s	
		$calendarList = $service->calendarList->listCalendarList();
	
		// Set begin of querys
		$insertToken = "REPLACE INTO if_system (name, value) VALUES ";
		$insertCalendarData = "INSERT INTO if_calendar (color,begin,end,title,location) VALUES ";
		$deleteCalendarData = "DELETE FROM if_calendar WHERE ";
		
	/******************** Update every given time without checking for SyncToken ************************/
		$forceRefresh = $this->config['force_refresh'];
		$updateCalendar = FALSE;
		$query = "SELECT * FROM if_system WHERE name = 'CalendarUpdate'";
	  $result = mysql_query($query, $this->dbconn);
		if (mysql_num_rows($result) > 0) {
			$row = mysql_fetch_assoc($result);
			if ( ($row['name'] == 'CalendarUpdate') && ((time() - $row['value']) >= ($forceRefresh*3600)) ) {
				$updateCalendar = TRUE;
				$query = "REPLACE INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
		 		mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());					
			}
		}else{
			$updateCalendar = TRUE;
			$query = "INSERT INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
			mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());
		}
	 /*********************************************************************************************************/
	
		$i = 0;
		while(TRUE) {
			
		/***************** Loop through each Calendar, get id, and color **************************/
			foreach ($calendarList->getItems() as $calendarListEntry) {
			  	$calendarID = $calendarListEntry->getID();
			  	$color = $calendarListEntry->getBackgroundColor();
			 
			 	/***************** Get SysncToken to skip this calender at next update if nothing has changed **********/ 
			    $events = $service->events->listEvents($calendarID, $eventParams);	    
			    //If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken
			    try{	
			    	$NextSyncToken = $events->getNextSyncToken();
		        }
		        catch (Exception $e) {
		            if (strripos($e->getMessage(), "410") !== FALSE){
		            	$NextSyncToken = 'FEHLER';
		            }else{
		            	die ('Folgender Fehler trat auf: ' . $e->getMessage());
		            }
		        } 
			    $SyncToken = '';
			   //echo $NextSyncToken.PHP_EOL;
			   	if ($updateCalendar == FALSE) {
					$query = "SELECT value FROM if_system WHERE name = '".$calendarID."'";
					$result = mysql_query($query, $this->dbconn);
						if (mysql_num_rows($result) > 0) {
							$row = mysql_fetch_assoc($result);
						 	$SyncToken = $row['value'];
						}
				}	
				$insertToken .= "('".$calendarID."','".$NextSyncToken."'), ";	
				/***************** SysncToken check done *****************************************************/ 
					
				/**************** if SyncToken changed perform update ******************************/			
			    if ($NextSyncToken != $SyncToken) {
			    	$i++;
			    	$deleteCalendarData .= "color = '".$color."' OR ";	    	
					while(TRUE) {
					 	/************************ Get content from each Calendar *****************/
						foreach ($events->getItems() as $event) {
						  	//print_r($event);
					  		if (!empty($event['modelData']['start']['dateTime'])) {
					  			$begin = date_format(date_create($event['modelData']['start']['dateTime']), 'Y-m-d H:i:s');
					  			$end = date_format(date_create($event['modelData']['end']['dateTime']), 'Y-m-d H:i:s');
					  		}else{
					  			$begin = $event['modelData']['start']['date'];
					  			$end = $event['modelData']['end']['date'];
					  		}			  	
					  		$title = $event->getSummary();	
					 		$insertCalendarData .= "('".$color."','".$begin."','".$end."','".$title."',''), ";	
					  	}
					  	$pageToken = $events->getNextPageToken();
					  	if ($pageToken) {
					 		$optParams = array('pageToken' => $pageToken);
					    	$events = $service->events->listEvents($calendarListEntry->getID(), $optParams);
					  	}else{
					    break;
					  	}
					}
				} /********** if SysncToken changed perform update END  **********/
		  	} /*********** Loop through each Calendar, get id, and color END *************************/
		  
		  	$pageToken = $calendarList->getNextPageToken();
		  	if ($pageToken) {
		  		$optParams = array('pageToken' => $pageToken);
		    	$calendarList = $service->calendarList->listCalendarList($optParams);
		  	}else{
		    	break;
		  	}
		}
		
	/***************************** if SyncToken changed perform SQL-statement *********************/
		if ( $i > 0 ) {
			mysql_query($this->before_last('OR', $deleteCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
			mysql_query($this->before_last(',', $insertToken), $this->dbconn) or die('CalendarPlugin -> insertToken: '.mysql_error());
			mysql_query($this->before_last(',', $insertCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
		}
	       		             
    }
das sollte funktionieren. vergess nicht die zwei funktionen am ende
 
@Spoon3er

Super Arbeit, werds gleich mal testen
 
*daumnedrück*
Dank geht an bolle... Hab mein Post bestimmt 5 mal edtiert :D :p
 
PHP:
von wegen ...geht nicht an mich!!! Ich bin nur einer, der AUSFÜHREN kann.....und wenns dann hakt, habe ich schon Probleme;-)


Solange ich dein Plugin nehme funzt es ohne PROBLEME!
Nur wenn ich meine Ausgabe ändern will...kommt "Server nicht erreichbar"

Statt der Farben soll es Bildchen anzeigen für Müllabfuhr etc....


PHP:
		 // ------------------------------------------- M�llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304")
                {
                if (strpos($row['title'], 'Sperrmüll') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                if (strpos($row['title'], 'Grüne Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                if (strpos($row['title'], 'Gelber Sack') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                if (strpos($row['title'], 'Graue Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
				if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                }
                else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00")
                { $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } 
                else {


das ist dein Plugin lediglich verändert mit dem obigen PHP:

PHP:
<?php
/***************************************************************************
 * InfoFrame (image generator for digital picture frames)
 * Copyright (C) 2009  Tobias Kolb
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
 ***************************************************************************/


class CalendarPlugin implements IPlugin
{
    private $dbconn = NULL;
	private $config = NULL;
	
	public function __construct($dbconn, $config) {
		$this->dbconn = $dbconn;
		$this->config = $config;
	}
	
    public function doUpdate() {
    	
    	require_once 'google-api-php-client/autoload.php';
    	session_start();
		$client_id = $this->config['client_id'];
		$service_account_name = $this->config['account_name'];

        try {
			$client = new Google_Client();
			$client->setApplicationName($this->config['project_name']);
			$service = new Google_Service_Calendar($client);
        }
        catch (Exception $e) {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }

		if (isset($_SESSION['service_token']))
				$client->setAccessToken($_SESSION['service_token']);
	
		$key = file_get_contents($this->config['key_file']);
	
		$cred = new Google_Auth_AssertionCredentials(
							$service_account_name,
		    				array('https://www.googleapis.com/auth/calendar'),
		    				$key);
		    				
		$client->setAssertionCredentials($cred);
		if ($client->getAuth()->isAccessTokenExpired())
		 		$client->getAuth()->refreshTokenWithAssertion($cred);
	
		$_SESSION['service_token'] = $client->getAccessToken();
	
		//set startDate, endDate, eventParams
	  $now = new DateTime('NOW');
	 	$clone = clone $now;
	 	$clone = date_modify($clone, '+1 month');
		$startDate = date_format($now, DateTime::W3C);
		$endDate = date_format($clone, DateTime::W3C);
	
		$eventParams = array(
							'timeMin' => $startDate,
							'timeMax' => $endDate,
							'singleEvents' => 'true');
								
		//get Calendar Id´s	
		$calendarList = $service->calendarList->listCalendarList();
	
		// Set begin of querys
		$insertToken = "REPLACE INTO if_system (name, value) VALUES ";
		$insertCalendarData = "INSERT INTO if_calendar (color,begin,end,title,location) VALUES ";
		$deleteCalendarData = "DELETE FROM if_calendar WHERE ";
		
	/******************** Update every given time without checking for SyncToken ************************/
		$forceRefresh = $this->config['force_refresh'];
		$updateCalendar = FALSE;
		$query = "SELECT * FROM if_system WHERE name = 'CalendarUpdate'";
	  $result = mysql_query($query, $this->dbconn);
		if (mysql_num_rows($result) > 0) {
			$row = mysql_fetch_assoc($result);
			if ( ($row['name'] == 'CalendarUpdate') && ((time() - $row['value']) >= ($forceRefresh*3600)) ) {
				$updateCalendar = TRUE;
				$query = "REPLACE INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
		 		mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());					
			}
		}else{
			$updateCalendar = TRUE;
			$query = "INSERT INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
			mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());
		}
	 /*********************************************************************************************************/
	
		$i = 0;
		while(TRUE) {
			
		/***************** Loop through each Calendar, get id, and color **************************/
			foreach ($calendarList->getItems() as $calendarListEntry) {
			  	$calendarID = $calendarListEntry->getID();
			  	$color = $calendarListEntry->getBackgroundColor();
			 
			 	/***************** Get SysncToken to skip this calender at next update if nothing has changed **********/ 
			    $events = $service->events->listEvents($calendarID, $eventParams);	    
			    //If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken
			    try{	
			    	$NextSyncToken = $events->getNextSyncToken();
		        }
		        catch (Exception $e) {
		            if (strripos($e->getMessage(), "410") !== FALSE){
		            	$NextSyncToken = 'FEHLER';
		            }else{
		            	die ('Folgender Fehler trat auf: ' . $e->getMessage());
		            }
		        } 
			    $SyncToken = '';
			   //echo $NextSyncToken.PHP_EOL;
			   	if ($updateCalendar == FALSE) {
					$query = "SELECT value FROM if_system WHERE name = '".$calendarID."'";
					$result = mysql_query($query, $this->dbconn);
						if (mysql_num_rows($result) > 0) {
							$row = mysql_fetch_assoc($result);
						 	$SyncToken = $row['value'];
						}
				}	
				$insertToken .= "('".$calendarID."','".$NextSyncToken."'), ";	
				/***************** SysncToken check done *****************************************************/ 
					
				/**************** if SyncToken changed perform update ******************************/			
			    if ($NextSyncToken != $SyncToken) {
			    	$i++;
			    	$deleteCalendarData .= "color = '".$color."' OR ";	    	
					while(TRUE) {
					 	/************************ Get content from each Calendar *****************/
						foreach ($events->getItems() as $event) {
						  	//print_r($event);
					  		if (!empty($event['modelData']['start']['dateTime'])) {
					  			$begin = date_format(date_create($event['modelData']['start']['dateTime']), 'Y-m-d H:i:s');
					  			$end = date_format(date_create($event['modelData']['end']['dateTime']), 'Y-m-d H:i:s');
					  		}else{
					  			$begin = $event['modelData']['start']['date'];
					  			$end = $event['modelData']['end']['date'];
					  		}			  	
					  		$title = $event->getSummary();	
					 		$insertCalendarData .= "('".$color."','".$begin."','".$end."','".$title."',''), ";	
					  	}
					  	$pageToken = $events->getNextPageToken();
					  	if ($pageToken) {
					 		$optParams = array('pageToken' => $pageToken);
					    	$events = $service->events->listEvents($calendarListEntry->getID(), $optParams);
					  	}else{
					    break;
					  	}
					}
				} /********** if SysncToken changed perform update END  **********/
		  	} /*********** Loop through each Calendar, get id, and color END *************************/
		  
		  	$pageToken = $calendarList->getNextPageToken();
		  	if ($pageToken) {
		  		$optParams = array('pageToken' => $pageToken);
		    	$calendarList = $service->calendarList->listCalendarList($optParams);
		  	}else{
		    	break;
		  	}
		}
		
	/***************************** if SyncToken changed perform SQL-statement *********************/
		if ( $i > 0 ) {
			mysql_query($this->before_last('OR', $deleteCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
			mysql_query($this->before_last(',', $insertToken), $this->dbconn) or die('CalendarPlugin -> insertToken: '.mysql_error());
			mysql_query($this->before_last(',', $insertCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
		}
	       		             
    }

	
	
	public function doOutput($image, $style, $updateData, &$yoffset) {
		if ($updateData)
			$this->doUpdate();

		$query = "SELECT * FROM `if_calendar` WHERE (`end` > NOW()) ORDER BY `begin` ASC";
		$result = mysql_query($query, $this->dbconn);
		if (mysql_num_rows($result) > 0) {

			// define styles
			$opt_header = array(
				'width' => imagesx($image)-290,
				'line_height' => 18,
				'align' => ALIGN_LEFT
			);
			
			$opt_day = array(
				'width' => imagesx($image)-290,
				'height' => 14,
				'line_height' => 14,
				'align' => ALIGN_LEFT
			);

			$opt_entry = array(
				'width' => imagesx($image)-290,
				'height' => 12,
				'line_height' => 12,
				'align' => ALIGN_LEFT,
				'word_wrap_hyphen' => '...',
				'aggressive_word_wrap' => true,
			);

			// print header
			imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], "Nächste Termine", $opt_header);
			$icon = ImageCreateFromPNG ( 'resources/icons/clock.png' );
			ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
			ImageDestroy($icon);
			$yoffset += 26;
			
			// print calendar
			$counter = 0;
			$formatDate = "%d.%m.%Y";
			$formatTime = "%H:%M";
			$today = strftime( $formatDate );
			$tomorrow  = strftime( $formatDate, strtotime("+1 day", time() ) );
			$currently_displayed_day = 0;

			while ($row = mysql_fetch_assoc($result)) {
				$counter++;
				
				// if end of screen is reached and more than one items left -> cut off and show hint "x more appointments..."
				$rest = (mysql_num_rows($result) - $counter) + 1;
				if (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) {
					$text = "... $rest weitere Termine";
					imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_entry);
					$yoffset += 20;
					break;
				}
				
				// print day name
				$begin_date = strftime( $formatDate, strtotime($row['begin']));
				// if begin day is before today set begin to today
				if (strtotime($begin_date) < strtotime($today))
					$begin_date = $today;
				// now if begin is after $currently_displayed_day update $currently_displayed_day
				if (strtotime($begin_date) > $currently_displayed_day) {
					// update currently_displayed_day
					$currently_displayed_day = strtotime($begin_date);
					// print day name
					if( $begin_date == $today )
						$dayname = "Heute";
					else if( $begin_date == $tomorrow )
						$dayname = "Morgen";
					else
						$dayname = strftime("%A, ".$formatDate, strtotime($begin_date));

					imagettftextboxopt($image, 14, 0, 50, $yoffset+4, $style['textcolor'], $style['fontb'], $dayname, $opt_day);
					$yoffset += 22;
				}
				
				// build appointment time text
				$end_date = strftime( $formatDate, strtotime($row['end']));
				$begin_time = strftime( $formatTime, strtotime($row['begin']));
				$end_time = strftime( $formatTime, strtotime($row['end']));
				$text = $row['title'];
				if ($row['location'] != null)
					$text = $text . ", " . $row['location'];
				if (($begin_time == "00:00") && ($end_time == "00:00")) {
					// all day event (substract 1 second to get the real end date at 23:59) 
					$end_date = strftime( $formatDate, strtotime($row['end'])-1);
					// if all day event is longer than one day -> print end date
					if (strtotime($end_date) != $currently_displayed_day)
						$text = $text." (bis ".$end_date.")";
						
				} else {
					// normal event with start and end time
					$text = $text." (".$begin_time." - ";
					// if event ends not this day -> display end date additionally to time
					if (strtotime($end_date) != $currently_displayed_day)
						$text = $text.$end_date.", ";					
					$text = $text.$end_time.")";
				}
				 // ------------------------------------------- M�llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304")
                {
                if (strpos($row['title'], 'Sperrmüll') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                if (strpos($row['title'], 'Grüne Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                if (strpos($row['title'], 'Gelber Sack') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                if (strpos($row['title'], 'Graue Tonne') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
				if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                      $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                }
                else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00")
                { $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } 
                else {
				
                                
                                
                                // determine button color
				$colorArray = htmlColorToRgb($row['color']);
				$color = ImageColorAllocate ($image, $colorArray[0], $colorArray[1], $colorArray[2]);
				// print appointment text and button
				drawGlassButton($image, $color, 32, $yoffset+8);
				imagettftextboxopt($image, 12, 0, 50, $yoffset, $style['textcolor'], $style['font'], $text, $opt_entry);
				
				$yoffset += 18;
				
			
			}
			$yoffset += 26;
			
			
		}
		mysql_free_result($result);

	}

	private function before_last ($needle, $inthat) {
        return substr($inthat, 0, $this->strrevpos($inthat, $needle));
 	}
 		  
	private function strrevpos($instr, $needle) {
    	$rev_pos = strpos (strrev($instr), strrev($needle));
    	if ($rev_pos===false) return false;
    	else return strlen($instr) - $rev_pos - strlen($needle);
	}
	
}
 
versuchs mal mit diesem code hier. da haben zwei klammern bei dir gefehlt.

PHP:
 <?php
/***************************************************************************
 * InfoFrame (image generator for digital picture frames)
 * Copyright (C) 2009  Tobias Kolb
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/
 ***************************************************************************/


class CalendarPlugin implements IPlugin
{
    private $dbconn = NULL;
    private $config = NULL;
    
    public function __construct($dbconn, $config) {
        $this->dbconn = $dbconn;
        $this->config = $config;
    }
    
    public function doUpdate() {
        
        require_once 'google-api-php-client/autoload.php';
        session_start();
        $client_id = $this->config['client_id'];
        $service_account_name = $this->config['account_name'];

        try {
            $client = new Google_Client();
            $client->setApplicationName($this->config['project_name']);
            $service = new Google_Service_Calendar($client);
        }
        catch (Exception $e) {
            die ('Folgender Fehler trat auf: ' . $e->getMessage());
        }

        if (isset($_SESSION['service_token']))
                $client->setAccessToken($_SESSION['service_token']);
    
        $key = file_get_contents($this->config['key_file']);
    
        $cred = new Google_Auth_AssertionCredentials(
                            $service_account_name,
                            array('https://www.googleapis.com/auth/calendar'),
                            $key);
                            
        $client->setAssertionCredentials($cred);
        if ($client->getAuth()->isAccessTokenExpired())
                 $client->getAuth()->refreshTokenWithAssertion($cred);
    
        $_SESSION['service_token'] = $client->getAccessToken();
    
        //set startDate, endDate, eventParams
      $now = new DateTime('NOW');
         $clone = clone $now;
         $clone = date_modify($clone, '+1 month');
        $startDate = date_format($now, DateTime::W3C);
        $endDate = date_format($clone, DateTime::W3C);
    
        $eventParams = array(
                            'timeMin' => $startDate,
                            'timeMax' => $endDate,
                            'singleEvents' => 'true');
                                
        //get Calendar Id´s    
        $calendarList = $service->calendarList->listCalendarList();
    
        // Set begin of querys
        $insertToken = "REPLACE INTO if_system (name, value) VALUES ";
        $insertCalendarData = "INSERT INTO if_calendar (color,begin,end,title,location) VALUES ";
        $deleteCalendarData = "DELETE FROM if_calendar WHERE ";
        
    /******************** Update every given time without checking for SyncToken ************************/
        $forceRefresh = $this->config['force_refresh'];
        $updateCalendar = FALSE;
        $query = "SELECT * FROM if_system WHERE name = 'CalendarUpdate'";
      $result = mysql_query($query, $this->dbconn);
        if (mysql_num_rows($result) > 0) {
            $row = mysql_fetch_assoc($result);
            if ( ($row['name'] == 'CalendarUpdate') && ((time() - $row['value']) >= ($forceRefresh*3600)) ) {
                $updateCalendar = TRUE;
                $query = "REPLACE INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
                 mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());                    
            }
        }else{
            $updateCalendar = TRUE;
            $query = "INSERT INTO if_system (name,value) VALUES ('CalendarUpdate', '".time()."')";
            mysql_query($query, $this->dbconn) or die('CalendarPlugin: '.mysql_error());
        }
     /*********************************************************************************************************/
    
        $i = 0;
        while(TRUE) {
            
        /***************** Loop through each Calendar, get id, and color **************************/
            foreach ($calendarList->getItems() as $calendarListEntry) {
                  $calendarID = $calendarListEntry->getID();
                  $color = $calendarListEntry->getBackgroundColor();
             
                 /***************** Get SysncToken to skip this calender at next update if nothing has changed **********/ 
                $events = $service->events->listEvents($calendarID, $eventParams);        
                //If the syncToken expires, the server will respond with a 410 GONE response code and the client should clear its storage and perform a full synchronization without any syncToken
                try{    
                    $NextSyncToken = $events->getNextSyncToken();
                }
                catch (Exception $e) {
                    if (strripos($e->getMessage(), "410") !== FALSE){
                        $NextSyncToken = 'FEHLER';
                    }else{
                        die ('Folgender Fehler trat auf: ' . $e->getMessage());
                    }
                } 
                $SyncToken = '';
               //echo $NextSyncToken.PHP_EOL;
                   if ($updateCalendar == FALSE) {
                    $query = "SELECT value FROM if_system WHERE name = '".$calendarID."'";
                    $result = mysql_query($query, $this->dbconn);
                        if (mysql_num_rows($result) > 0) {
                            $row = mysql_fetch_assoc($result);
                             $SyncToken = $row['value'];
                        }
                }    
                $insertToken .= "('".$calendarID."','".$NextSyncToken."'), ";    
                /***************** SysncToken check done *****************************************************/ 
                    
                /**************** if SyncToken changed perform update ******************************/            
                if ($NextSyncToken != $SyncToken) {
                    $i++;
                    $deleteCalendarData .= "color = '".$color."' OR ";            
                    while(TRUE) {
                         /************************ Get content from each Calendar *****************/
                        foreach ($events->getItems() as $event) {
                              //print_r($event);
                              if (!empty($event['modelData']['start']['dateTime'])) {
                                  $begin = date_format(date_create($event['modelData']['start']['dateTime']), 'Y-m-d H:i:s');
                                  $end = date_format(date_create($event['modelData']['end']['dateTime']), 'Y-m-d H:i:s');
                              }else{
                                  $begin = $event['modelData']['start']['date'];
                                  $end = $event['modelData']['end']['date'];
                              }                  
                              $title = $event->getSummary();    
                             $insertCalendarData .= "('".$color."','".$begin."','".$end."','".$title."',''), ";    
                          }
                          $pageToken = $events->getNextPageToken();
                          if ($pageToken) {
                             $optParams = array('pageToken' => $pageToken);
                            $events = $service->events->listEvents($calendarListEntry->getID(), $optParams);
                          }else{
                        break;
                          }
                    }
                } /********** if SysncToken changed perform update END  **********/
              } /*********** Loop through each Calendar, get id, and color END *************************/
          
              $pageToken = $calendarList->getNextPageToken();
              if ($pageToken) {
                  $optParams = array('pageToken' => $pageToken);
                $calendarList = $service->calendarList->listCalendarList($optParams);
              }else{
                break;
              }
        }
        
    /***************************** if SyncToken changed perform SQL-statement *********************/
        if ( $i > 0 ) {
            mysql_query($this->before_last('OR', $deleteCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
            mysql_query($this->before_last(',', $insertToken), $this->dbconn) or die('CalendarPlugin -> insertToken: '.mysql_error());
            mysql_query($this->before_last(',', $insertCalendarData), $this->dbconn) or die('CalendarPlugin -> insertCalendarData:  '.mysql_error());
        }
                                
    }

    
    
    public function doOutput($image, $style, $updateData, &$yoffset) {
        if ($updateData)
            $this->doUpdate();

        $query = "SELECT * FROM `if_calendar` WHERE (`end` > NOW()) ORDER BY `begin` ASC";
        $result = mysql_query($query, $this->dbconn);
        if (mysql_num_rows($result) > 0) {

            // define styles
            $opt_header = array(
                'width' => imagesx($image)-290,
                'line_height' => 18,
                'align' => ALIGN_LEFT
            );
            
            $opt_day = array(
                'width' => imagesx($image)-290,
                'height' => 14,
                'line_height' => 14,
                'align' => ALIGN_LEFT
            );

            $opt_entry = array(
                'width' => imagesx($image)-290,
                'height' => 12,
                'line_height' => 12,
                'align' => ALIGN_LEFT,
                'word_wrap_hyphen' => '...',
                'aggressive_word_wrap' => true,
            );

            // print header
            imagettftextboxopt($image, 18, 0, 50, $yoffset, $style['textcolor'], $style['font'], "Nächste Termine", $opt_header);
            $icon = ImageCreateFromPNG ( 'resources/icons/clock.png' );
            ImageCopy($image, $icon, 20, $yoffset-3, 0, 0, imagesx($icon), imagesy($icon));
            ImageDestroy($icon);
            $yoffset += 26;
            
            // print calendar
            $counter = 0;
            $formatDate = "%d.%m.%Y";
            $formatTime = "%H:%M";
            $today = strftime( $formatDate );
            $tomorrow  = strftime( $formatDate, strtotime("+1 day", time() ) );
            $currently_displayed_day = 0;

            while ($row = mysql_fetch_assoc($result)) {
                $counter++;
                
                // if end of screen is reached and more than one items left -> cut off and show hint "x more appointments..."
                $rest = (mysql_num_rows($result) - $counter) + 1;
                if (($yoffset >= (imagesy($image) - 36)) && ($rest > 1)) {
                    $text = "... $rest weitere Termine";
                    imagettftextboxopt($image, 14, 0, 24, $yoffset, $style['textcolor'], $style['fontb'], $text, $opt_entry);
                    $yoffset += 20;
                    break;
                }
                
                // print day name
                $begin_date = strftime( $formatDate, strtotime($row['begin']));
                // if begin day is before today set begin to today
                if (strtotime($begin_date) < strtotime($today))
                    $begin_date = $today;
                // now if begin is after $currently_displayed_day update $currently_displayed_day
                if (strtotime($begin_date) > $currently_displayed_day) {
                    // update currently_displayed_day
                    $currently_displayed_day = strtotime($begin_date);
                    // print day name
                    if( $begin_date == $today )
                        $dayname = "Heute";
                    else if( $begin_date == $tomorrow )
                        $dayname = "Morgen";
                    else
                        $dayname = strftime("%A, ".$formatDate, strtotime($begin_date));

                    imagettftextboxopt($image, 14, 0, 50, $yoffset+4, $style['textcolor'], $style['fontb'], $dayname, $opt_day);
                    $yoffset += 22;
                }
                
                // build appointment time text
                $end_date = strftime( $formatDate, strtotime($row['end']));
                $begin_time = strftime( $formatTime, strtotime($row['begin']));
                $end_time = strftime( $formatTime, strtotime($row['end']));
                $text = $row['title'];
                if ($row['location'] != null)
                    $text = $text . ", " . $row['location'];
                if (($begin_time == "00:00") && ($end_time == "00:00")) {
                    // all day event (substract 1 second to get the real end date at 23:59) 
                    $end_date = strftime( $formatDate, strtotime($row['end'])-1);
                    // if all day event is longer than one day -> print end date
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text." (bis ".$end_date.")";
                        
                } else {
                    // normal event with start and end time
                    $text = $text." (".$begin_time." - ";
                    // if event ends not this day -> display end date additionally to time
                    if (strtotime($end_date) != $currently_displayed_day)
                        $text = $text.$end_date.", ";                    
                    $text = $text.$end_time.")";
                }
                 // ------------------------------------------- M?llabfuhr----------------------------------------                   
                 if (($row['color']) == "#6B3304") {
                        if (strpos($row['title'], 'Sperrmüll') !== false)
                              $icon = ImageCreateFromPNG ( 'resources/icons/tonne_blau.png' );
                        if (strpos($row['title'], 'Grüne Tonne') !== false)
                              $icon = ImageCreateFromPNG ( 'resources/icons/tonne_gruen.png' ); 
                        if (strpos($row['title'], 'Gelber Sack') !== false)
                              $icon = ImageCreateFromPNG ( 'resources/icons/gelber_sack.png' ); 
                        if (strpos($row['title'], 'Graue Tonne') !== false)
                              $icon = ImageCreateFromPNG ( 'resources/icons/tonne_schwarz.png' );
                        if (strpos($row['title'], 'Strauchgutabfuhr') !== false)
                              $icon = ImageCreateFromPNG ( 'resources/icons/strauch.png' );                                               
                        ImageCopy($image, $icon, 23, $yoffset-6, 0, 0, imagesx($icon), imagesy($icon));
                        ImageDestroy($icon);
                } else{  
// ------------------------------------------- Geburtstag ----------------------------------------     
                
                if (($row['color']) == "#AB8B00"){ 
                    $icon = ImageCreateFromPNG ( 'resources/icons/birth.png' );
                ImageCopy($image, $icon, 23, $yoffset+0, 0, 0, imagesx($icon), imagesy($icon));
                ImageDestroy($icon);
                } else {
                  
                // determine button color
                $colorArray = htmlColorToRgb($row['color']);
                $color = ImageColorAllocate ($image, $colorArray[0], $colorArray[1], $colorArray[2]);
                // print appointment text and button
                drawGlassButton($image, $color, 32, $yoffset+8);
                }
                }               
                imagettftextboxopt($image, 12, 0, 50, $yoffset, $style['textcolor'], $style['font'], $text, $opt_entry);
                
                $yoffset += 18;
            
            }
            $yoffset += 26;
            
            
        }
        mysql_free_result($result);

    }

    private function before_last ($needle, $inthat) {
        return substr($inthat, 0, $this->strrevpos($inthat, $needle));
     }
           
    private function strrevpos($instr, $needle) {
        $rev_pos = strpos (strrev($instr), strrev($needle));
        if ($rev_pos===false) return false;
        else return strlen($instr) - $rev_pos - strlen($needle);
    }
    
}
 
Zuletzt bearbeitet:
Ich habe das ganze mal getestet. Das Bild wird auch ausgegeben, aber leider werden die Termine nicht aktualisiert. Ok, also nochmal alles geprüft und zur Sicherheit mal die Datenbank gelöscht und neu erstellt. Dann noch mal aufgerufen. Aber immer noch keine Termine. MyphpAdmin zeigt mir folgendes an "if_calendar: MySQL lieferte ein leeres Resultat zurück (d.h. null Datensätze)".

Auf Google werden mir auch 0 Anfragen im Bereich Kontingent angezeigt. Irgendwo ist da noch der Wurm drin.
 
InfoFrame: Digitaler Bilderrahmen (Anzeige von Anrufen, E-Mails, Termine, Wet...

Stimmt bei mir das gleiche.... Auch mit Orginal Plugin ( spoon3er) werden Termine nicht aktualisiert...
 
Zuletzt bearbeitet:
habt ihr einträge in if_system?
hat einer von euch zugrif auf /var/log/apache/error.log? oder dem entsrechenden error.log von webserver?
 
Zuletzt bearbeitet:
ja in der MYSQL-DATENBANK

if_calendar
 

Statistik des Forums

Themen
246,085
Beiträge
2,245,799
Mitglieder
373,539
Neuestes Mitglied
Horst Fürst
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.