title) ) { $c->title = translate("Really Simple CalDAV Store"); } function make_help_link($matches) { global $c; // as usual: $matches[0] is the complete match // $matches[1] the match for the first subpattern // enclosed in '##...##' and so on // Use like: $s = preg_replace_callback("/##([^#]+)##", "make_help_link", $s); // $help_topic = preg_replace( '/^##(.+)##$/', '$1', $matches[1]); $help_topic = $matches[1]; $display_url = $help_topic; if ( $GLOBALS['session']->AllowedTo("Admin") || $GLOBALS['session']->AllowedTo("Support") ) { if ( strlen($display_url) > 30 ) { $display_url = substr( $display_url, 0, 28 ) . "..." ; } } else { $display_url = "help"; } return " base_url/help.php?h=$help_topic\" title=\"".translate("Show help on")." '$help_topic'\" target=\"_new\">[$display_url] "; } function send_page_header() { global $session, $c, $page_menu, $user_menu, $role_menu, $relationship_menu, $active_menu_pattern; // echo ''; echo << $c->page_title EOHDR; foreach ( $c->stylesheets AS $stylesheet ) { echo "\n"; } if ( isset($c->local_styles) ) { // Always load local styles last, so they can override prior ones... foreach ( $c->local_styles AS $stylesheet ) { echo "\n"; } } if ( isset($c->print_styles) ) { // Finally, load print styles last, so they can override all of the above... foreach ( $c->print_styles AS $stylesheet ) { echo "\n"; } } if ( isset($c->scripts) && is_array($c->scripts) ) { foreach ( $c->scripts AS $script ) { echo "\n"; } } echo "\n\n"; echo "
\n"; if ( isset($page_menu) && is_object($page_menu) ) { $page_menu->AddSubMenu( $relationship_menu, translate("Relationships"), "$c->base_url/relationship_types.php", translate("Browse all relationship types"), false, 4050 ); $page_menu->AddSubMenu( $user_menu, translate("Users"), "$c->base_url/users.php", translate("Browse all users"), false, 4100 ); // $page_menu->AddSubMenu( $role_menu, "Roles", "/roles.php", "Browse all roles", false, 4300 ); $page_menu->MakeSomethingActive($active_menu_pattern); echo $page_menu->Render(); } echo "
\n"; if ( isset($c->messages) && is_array($c->messages) && count($c->messages) > 0 ) { echo "
\n
\n"; } } send_page_header(); ?>