Freebusy Tools

This commit is contained in:
Andreas Österreicher
2012-03-20 08:23:19 +00:00
parent e44ad1d4d9
commit a9f080e610
5 changed files with 428 additions and 24 deletions
+37 -16
View File
@@ -53,25 +53,46 @@ $ical = new ical();
foreach($freebusy->result as $row)
{
$fp = fopen($row->url,'r');
if (!$fp)
if($row->aktiv)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$doc = '';
while (!feof($fp))
{
$line = fgets($fp);
$doc.=$line;
}
fclose($fp);
$ical->importFreeBusy($doc, $row->freebusytyp_kurzbz);
$fp = fopen($row->url,'r');
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$doc = '';
while (!feof($fp))
{
$line = fgets($fp);
$doc.=$line;
}
fclose($fp);
$ical->importFreeBusy($doc, $row->freebusytyp_kurzbz);
}
}
}
//Pers. LVplan
$fp = fopen(APP_ROOT.'cis/public/freebusy_lvplan.php/'.$uid,'r');
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$doc = '';
while (!feof($fp))
{
$line = fgets($fp);
$doc.=$line;
}
fclose($fp);
$ical->importFreeBusy($doc, $row->freebusytyp_kurzbz);
}
echo $ical->getFreeBusy();
echo "\nEND:VCALENDAR";
?>