\n
\n".translate($application_name)."\n";
// Any other includes?
if ( is_array ( $includes ) ) {
foreach( $includes as $inc ){
include_once 'includes/'.$inc;
}
}
// Specify the charset via a meta tag.
// The charset is defined in the translation file.
if ( ! empty ( $LANGUAGE ) ) {
$charset = translate ( "charset" );
if ( $charset != "charset" ) {
echo "\n";
} else {
echo "\n";
}
}
// Do we need anything else inside the header tag?
if ($HeadX) echo $HeadX."\n";
// Include the styles
include_once 'includes/styles.php';
// Add custom script/stylesheet if enabled
if ( $CUSTOM_SCRIPT == 'Y' && ! $disableCustom ) {
$res = dbi_query (
"SELECT cal_template_text FROM webcal_report_template " .
"WHERE cal_template_type = 'S' and cal_report_id = 0" );
if ( $res ) {
if ( $row = dbi_fetch_row ( $res ) ) {
echo $row[0];
}
dbi_free_result ( $res );
}
}
// Finish the header
echo "\n\n";
// Add custom header if enabled
if ( $CUSTOM_HEADER == 'Y' && ! $disableCustom ) {
include_once "includes/header.php";
$res = dbi_query (
"SELECT cal_template_text FROM webcal_report_template " .
"WHERE cal_template_type = 'H' and cal_report_id = 0" );
if ( $res ) {
if ( $row = dbi_fetch_row ( $res ) ) {
echo $row[0];
}
dbi_free_result ( $res );
}
}
}
// Print the common trailer.
// Include custom trailer if enabled
function print_trailer ( $include_nav_links=true, $closeDb=true,
$disableCustom=false )
{
global $CUSTOM_TRAILER, $c, $friendly, $STARTVIEW;
global $login, $user, $cat_id, $categories_enabled, $thisyear,
$thismonth, $thisday, $DATE_FORMAT_MY, $WEEK_START, $DATE_FORMAT_MD,
$readonly, $is_admin, $is_moderator, $public_access, $public_access_can_add,
$single_user, $use_http_auth, $login_return_path, $require_approvals,
$is_nonuser_admin, $public_access_others, $allow_view_other,
$views, $reports_enabled, $LAYER_STATUS, $nonuser_enabled,
$groups_enabled, $fullname, $has_boss;
if ( $include_nav_links && empty ( $friendly ) ) {
include_once "includes/trailer.php";
}
// Add custom trailer if enabled
if ( $CUSTOM_TRAILER == 'Y' && ! $disableCustom && isset ( $c ) ) {
$res = dbi_query (
"SELECT cal_template_text FROM webcal_report_template " .
"WHERE cal_template_type = 'T' and cal_report_id = 0" );
if ( $res ) {
if ( $row = dbi_fetch_row ( $res ) ) {
echo $row[0];
}
dbi_free_result ( $res );
}
}
if ( $closeDb ) {
if ( isset ( $c ) )
dbi_close ( $c );
unset ( $c );
}
}
?>