Some coder for testing the calender:
create a file calles cal.php on the main level.
Check your staff_id
go to your calender-application,
create new network/file-based calender
Setup the URL: http://your.osticket.com/cal.php?user=
Check "read only calender"
and have fun.
All task's appear like ' Description'
<?
require_once('main.inc.php');
require_once('settings.php');
require_once('mysql.php');
if(!$_REQUEST)
{
echo "No user-ID!";
}
else
{
$user=$_REQUEST;
?>
BEGIN
PRODID Calender
VERSION.0
<?
//Showing only departments the user has access to...
$sql='select ost_department.dept_name as dept_name, subject,date_format(ost_ticket.updated,"%Y%m%dT%H%i00Z") as lastmodified,ticket_id,date_format(ost_ticket.created,"%Y%m%dT080000Z") '.
'as created,firstname,lastname,date_format(duedate,"%Y%m%dT080000Z") as duedate, ost_ticket.staff_id as staff_id, username, ost_staff.email as '.
'email from ost_ticket LEFT JOIN ost_staff on ost_ticket.staff_id=ost_staff.staff_id LEFT JOIN ost_department on ost_ticket.dept_id=ost_department.dept_id '.
'where ost_ticket.staff_id='.$user.' and closed IS NULL';
$list= db_query($sql);
while ($row = db_fetch_array($list)){
echo "BEGIN\n";
echo "DTSTAMP:".date("Ygd",time())."T".date("Hi",time())."00Z\n";
echo "ORGANIZER;CN=\"".$row."-".$row." ".$row."\":".$row."\n";
echo "CREATED:".$row."\n";
echo "UID:".$row."\n";
echo "LAST-MODIFIED:".$row."\n";
echo "SUMMARY:[".$row: ".$row."\n";
echo "DESCRIPTION http://tracker.osticketdomain.de/scp/tickets.php?id=".$row."\n";
echo "PRIORITY:".$row."\n";
echo "DUE;TZID=Europe/Berlin:".$row."\n";
echo "PERCENT-COMPLETE\n";
echo "END\n";
}
}
echo "END\n";
?>