* * Open this file in a webbrowser to view a list of all accessible calendars * on the server and the information related to those calendars. It can be used * to determine the calendar-id, needed for SimpleCalDAV. * * @package simpleCalDAV */ require_once("session_init.php"); require_once("config.inc.php"); require_once('SimpleCalDAVClient.php'); require_once('fonctions.php'); $param = array( "url::", "user::", "help::", "pass::", ); $optind=null; if ( !($opt = getopt( 'h::', $param, $optind)) ) { echo "erreur de paramètre de la commande" . EOL; exit(1); } if( !empty(getopt("h")) or !empty(getopt("help")) ) { echo "les arguments sont: --url= --user= --pass="; }else { $url = getpost("url"); $user = getpost("user"); $pass = getpost("pass"); if( empty($url)) { echo '

This formular can be used to view a list of all accessible calendars on the server and the information related to those calendars. It can be used to determine the calendar-id, needed for SimpleCalDAV.

Calendar-URL:

Username:

Password:

'; } else { $client = new SimpleCalDAVClient(); try { $client->connect($url, $user, $pass); $calendars = $client->findCalendars(); echo' '; $i = 0; foreach($calendars as $cal) { $i++; echo ' '; } echo '
Calendar #'.$i.'
URL: '.$cal->getURL().'
Display Name: '.$cal->getDisplayName().'
Calendar ID: '.$cal->getCalendarID().'
CTAG: '.$cal->getCTag().'
RBG-Color: '.$cal->getRBGcolor().'
Order: '.$cal->getOrder().'
'; }catch (Exception $e) { echo $e->__toString(); } } } ?>