]> git.p6c8.net - jirafeau_project.git/blob - lib/template/header.php
[BUGFIX] Remove redundant header variable
[jirafeau_project.git] / lib / template / header.php
1 <?php
2 header('Content-Type: text/html; charset=utf-8');
3 header('x-ua-compatible: ie=edge');
4
5 $protocol = (bool)is_ssl() ? 'https' : 'http';
6
7 if ( !empty($cfg['web_root']) ) {
8 $cfg['web_root'] = preg_replace('#https?://#', $protocol . '://', $cfg['web_root'], 1);
9 }
10
11 /* Avoids irritating errors with the installer (no conf file is present then). */
12 if (!isset ($cfg['web_root']))
13 $web_root = $protocol+'://' . $_SERVER['HTTP_HOST'] . '/';
14 else
15 $web_root = $cfg['web_root'];
16
17 ?>
18 <!DOCTYPE html>
19 <html>
20 <head>
21 <meta charset="utf-8">
22 <title><?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?></title>
23 <link href="<?php echo $web_root . 'media/' . $cfg['style'] . '/style.css.php'; ?>" rel="stylesheet" type="text/css" />
24 </head>
25 <body>
26 <script type="text/javascript" src="lib/functions.js.php"></script>
27 <div id="content">
28 <h1>
29 <a href="<?php echo $web_root; ?>">
30 <?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?>
31 </a>
32 </h1>

patrick-canterino.de