Пример #1
0
 function http_parse_headers($header)
 {
     return http\Header::parse($header);
 }
Пример #2
0
    <link rel="alternate" type="<?php 
        esc($types[$ext]);
        ?>
" href="<?php 
        esc($user->id);
        ?>
.<?php 
        esc($ext);
        ?>
" />
  <?php 
    }
}
function content()
{
    global $user;
    page_header($user->name);
}
preload_user();
# RDF content negotiation
$accept = new http\Header('Accept', $_SERVER['HTTP_ACCEPT']);
$ct = $accept->negotiate(array('text/html', 'application/rdf+xml', 'application/x-gedcom'));
header('Vary: Accept');
if ($ct == 'application/rdf+xml') {
    return do_redirect('accounts/' . $user->id . '.rdf');
} else {
    if ($ct == 'application/x-gedcom') {
        return do_redirect('accounts/' . $user->id . '.ged');
    }
}
include 'include/template.php';