3if ( !isset($c->page_title) ) {
4 $c->page_title = translate(
'DAViCal CalDAV Server');
7function make_help_link($matches)
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 ) .
'...' ;
24 $display_url =
'help';
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> ';
30if ( !function_exists(
'send_page_header') ) {
31function send_page_header() {
32 global $session, $c, $main_menu, $related_menu;
34 header(
'Content-type: text/html; charset="utf-8"' );
36 echo
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
40<meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8">
41<title>$c->page_title</title>
45 foreach ( $c->stylesheets AS $stylesheet ) {
46 echo
'<link rel="stylesheet" type="text/css" href="'.$stylesheet.
'">';
48 if ( isset($c->local_styles) ) {
50 foreach ( $c->local_styles AS $stylesheet ) {
51 echo
'<link rel="stylesheet" type="text/css" href="'.$stylesheet.
'">';
55 if ( isset($c->print_styles) ) {
57 foreach ( $c->print_styles AS $stylesheet ) {
58 echo
"<link rel=\"stylesheet\" type=\"text/css\" href=\"$stylesheet\" media=\"print\">\n";
62 echo
"</head>\n<body>\n";
63 echo
"<div id=\"pageheader\">\n";
65 if ( isset($main_menu) ) echo $main_menu->RenderAsCSS();
66 if ( isset($related_menu) && $related_menu->Size() > 0 ) {
67 echo $related_menu->Render(
true );
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 ) {
76 $msg = preg_replace_callback(
"/##([^#]+)##/",
"make_help_link", translate($msg));
77 echo
"<li class=\"messages\">$msg</li>\n";
79 echo
"</ul>\n</div>\n";