Overview

Packages

  • awl
    • caldav-client-v2
    • RRule
  • davical
    • authentication
      • drivers
    • caldav
    • DAViCalSession
    • DAVTicket
    • external-bind
    • feed
    • HTTPAuthSession
    • iSchedule
    • iSchedule-POST
    • logging
    • metrics
    • Principal
    • propfind
    • PublicSession
    • Request
    • Resource
    • tzservice
  • None
  • PHP

Classes

  • CalDAVClient
  • CheckResult
  • setupFakeSession
  • VCard
  • VTimezone

Functions

  • access_ticket_browser
  • binding_row_editor
  • bindings_to_other_browser
  • bindings_to_us_browser
  • build_dependencies_table
  • build_privileges_html
  • build_site_statistics
  • BuildSqlFilter
  • calquery_apply_filter
  • cardquery_apply_filter
  • catch_setup_errors
  • check_awl_version
  • check_calendar
  • check_curl
  • check_database_connection
  • check_datetime
  • check_davical_version
  • check_gettext
  • check_iconv
  • check_ldap
  • check_magic_quotes_gpc
  • check_magic_quotes_runtime
  • check_pdo
  • check_pdo_pgsql
  • check_pgsql
  • check_real_php
  • check_schema_version
  • check_string
  • check_suhosin_server_strip
  • check_xml
  • collection_privilege_format_function
  • confirm_delete_bind_in
  • confirm_delete_binding
  • confirm_delete_collection
  • confirm_delete_principal
  • confirm_delete_ticket
  • do_error
  • edit_binding_row
  • edit_grant_row_collection
  • edit_grant_row_principal
  • edit_group_row
  • edit_ticket_row
  • errorResponse
  • expand_properties
  • fetch_external
  • get_address_properties
  • get_freebusy
  • get_href_containers
  • get_phpinfo
  • grant_row_editor
  • group_members_browser
  • group_memberships_browser
  • group_row_editor
  • handle_subaction
  • i18n
  • ischedule_get
  • log_setup_error
  • make_help_link
  • principal_collection_browser
  • principal_editor
  • principal_grants_browser
  • principal_privilege_format_function
  • send_page_header
  • SqlFilterCardDAV
  • SqlFilterFragment
  • ticket_row_editor
  • unicodeToUtf8
  • update_external
  • utf8ToUnicode
  • Overview
  • Package
  • Function
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: 
  3: dbg_error_log( 'well-known', 'iSchedule requested' );
  4: 
  5: require_once('HTTPAuthSession.php');
  6: $c->allow_unauthenticated = true;
  7: $session = new HTTPAuthSession();
  8: 
  9: if ( ! isset ( $request ) ) {
 10:  require_once('CalDAVRequest.php');
 11:  $request = new CalDAVRequest();
 12: }
 13: 
 14: 
 15: switch ( $request->path ) {
 16:   case '/.well-known/caldav':
 17:   case '/.well-known/carddav':
 18:     header('Location: ' . $c->protocol_server_port . ConstructURL('/',true) );
 19:     $request->DoResponse(301); // Moved permanently
 20:     // does not return.
 21:   case '/.well-known/timezone':
 22:     $parameters = '';
 23:     foreach( $_GET as $k => $v ) {
 24:       $parameters .= ($parameters == '' ? '?' : '&' );
 25:       $parameters .= $k.'='.rawurlencode($v);
 26:     }
 27:     header('Location: ' . $c->protocol_server_port . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters );
 28:     $request->DoResponse(301); // Moved permanently
 29:     // does not return.
 30: }
 31: 
 32: 
 33: 
 34: if ( $c->enable_scheduling != true )
 35: {
 36:  $request->DoResponse( 404, translate('The application program does not understand that request.') );
 37:  // Does not return
 38: }
 39: dbg_log_array( 'well-known', 'method:'. $request->method );
 40: switch ( $request->method ) {
 41:   case 'GET':        ischedule_get();                      break;
 42:   case 'POST':       include('iSchedule-POST.php');             break;
 43: 
 44:   default:
 45:     dbg_error_log( 'well-known', 'Unhandled request method >>%s<<', $request->method );
 46:     dbg_log_array( 'well-known', '_SERVER', $_SERVER, true );
 47:     dbg_error_log( 'well-known', 'RAW: %s', str_replace("\n", '',str_replace("\r", '', $request->raw_post)) );
 48: }
 49: 
 50: $request->DoResponse( 500, translate('The application program does not understand that request.') );
 51: 
 52: 
 53: 
 54: 
 55: 
 56: function ischedule_get ( )
 57: {
 58:  global $request,$c;
 59:  if ( $request->path != '/.well-known/ischedule' || $_GET['query'] != 'capabilities' )
 60:  {
 61:   $request->DoResponse( 404, translate('The application program does not understand that request.' . $request->path ) );
 62:   return false;
 63:  }
 64:  header ( 'iSchedule-Version: 1.0' );
 65:  header ( 'Content-Type: application/xml; charset=utf-8' );
 66:  echo '<?xml version="1.0" encoding="utf-8" ?>';
 67:  echo <<<RESPONSE
 68:   <query-result xmlns="urn:ietf:params:xml:ns:ischedule">
 69:     <capability-set>
 70:       <supported-version-set>
 71:         <version>1.0</version>
 72:       </supported-version-set>
 73:       <supported-scheduling-message-set>
 74:         <comp name="VEVENT">
 75:           <method name="REQUEST"/>
 76:           <method name="ADD"/>
 77:           <method name="REPLY"/>
 78:           <method name="CANCEL"/>
 79:         </comp>
 80:         <comp name="VTODO"/>
 81:         <comp name="VFREEBUSY"/>
 82:       </supported-scheduling-message-set>
 83:       <supported-calendar-data-type>
 84:         <calendar-data-type content-type="text/calendar" version="2.0"/>
 85:       </supported-calendar-data-type>
 86:       <supported-attachment-values>
 87:         <inline-attachment/>
 88:       </supported-attachment-values>
 89:       <supported-recipient-uri-scheme-set>
 90:         <scheme>mailto</scheme>
 91:       </supported-recipient-uri-scheme-set>
 92:       <max-content-length>102400</max-content-length>
 93:       <min-date-time>19910101T000000Z</min-date-time>
 94:       <max-date-time>20381231T000000Z</max-date-time>
 95:       <max-instances>150</max-instances>
 96:       <max-recipients>250</max-recipients>
 97: 
 98: RESPONSE;
 99:  //  <external-attachment/> // TODO: figure out if we actually support this
100:  echo '      <administrator>mailto:' . $c->admin_email . '</administrator>' . "\n";
101:  echo <<<RESPONSE
102:     </capability-set>
103:  </query-result>
104: RESPONSE;
105: 
106:   @ob_flush();   exit(0);
107: }
108: 
DAViCal API documentation generated by ApiGen 2.8.0