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: if ( !isset($c->page_title) ) {
 4:   $c->page_title = translate('DAViCal CalDAV Server');
 5: }
 6: 
 7: function make_help_link($matches)
 8: {
 9:   global $c;
10: 
11:   // as usual: $matches[0] is the complete match
12:   // $matches[1] the match for the first subpattern
13:   // enclosed in '##...##' and so on
14:   // Use like: $s = preg_replace_callback('/##([^#]+)##', 'make_help_link', $s);
15: //  $help_topic = preg_replace( '/^##(.+)##$/', '$1', $matches[1]);
16:   $help_topic = $matches[1];
17:   $display_url = $help_topic;
18:   if ( $GLOBALS['session']->AllowedTo('Admin') || $GLOBALS['session']->AllowedTo('Support') ) {
19:     if ( strlen($display_url) > 30 ) {
20:       $display_url = substr( $display_url, 0, 28 ) . '...' ;
21:     }
22:   }
23:   else {
24:     $display_url = 'help';
25:   }
26:   return ' <a class="help" href="'.$c->base_url.'/help.php?h='.$help_topic.'" title="'.translate('Show help on').' &39;'.$help_topic.'&39;" target="_new">['.$display_url.']</a> ';
27: }
28: 
29: 
30: if ( !function_exists('send_page_header') ) {
31: function send_page_header() {
32:   global $session, $c, $main_menu, $related_menu;
33: 
34:   header( 'Content-type: text/html; charset="utf-8"' );
35: 
36:   echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
37:   echo <<<EOHDR
38: <html>
39: <head>
40: <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
41: <title>$c->page_title</title>
42: 
43: EOHDR;
44: 
45:   foreach ( $c->stylesheets AS $stylesheet ) {
46:     echo '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'">';
47:   }
48:   if ( isset($c->local_styles) ) {
49:     // Always load local styles last, so they can override prior ones...
50:     foreach ( $c->local_styles AS $stylesheet ) {
51:       echo '<link rel="stylesheet" type="text/css" href="'.$stylesheet.'">';
52:     }
53:   }
54: 
55:   if ( isset($c->print_styles) ) {
56:     // Finally, load print styles last, so they can override all of the above...
57:     foreach ( $c->print_styles AS $stylesheet ) {
58:       echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$stylesheet\" media=\"print\">\n";
59:     }
60:   }
61: 
62:   echo "</head>\n<body>\n";
63:   echo "<div id=\"pageheader\">\n";
64: 
65:   if ( isset($main_menu) ) echo $main_menu->RenderAsCSS();
66:   if ( isset($related_menu) && $related_menu->Size() > 0 ) {
67:     echo $related_menu->Render( true );
68:   }
69: 
70:   echo "</div>\n";
71: 
72:   if ( isset($c->messages) && is_array($c->messages) && count($c->messages) > 0 ) {
73:     echo "<div id=\"messages\"><ul class=\"messages\">\n";
74:     foreach( $c->messages AS $i => $msg ) {
75:       // ##HelpTextKey## gets converted to a "/help.phph=HelpTextKey" link
76:       $msg = preg_replace_callback("/##([^#]+)##/", "make_help_link", translate($msg));
77:       echo "<li class=\"messages\">$msg</li>\n";
78:     }
79:     echo "</ul>\n</div>\n";
80:   }
81: 
82: }
83: }
84: 
85: send_page_header();
86: 
87: 
DAViCal API documentation generated by ApiGen 2.8.0