Guest User

head.php

a guest
Apr 2nd, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. <?php
  2. /*
  3. * This file is a part of GCweb (unoffical web render for GCstar)
  4. * Copyright (c) 2007 Jonas Fourquier <http://jonas.tuxfamily.org> and contributors
  5. *
  6. * GCweb is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20.  
  21. /*
  22. * Partie se trouvant en haut de chaque page
  23. * - Seul les variables du tableau $info peuvent être utilisées
  24. */
  25. ?>
  26. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  27. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  28. <head>
  29. <title><?php aff($info['title']) ?></title>
  30. <meta http-equiv="Content-Type" content="application/x-php;charset=UTF-8" />
  31. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  32. <meta http-equiv="Content-Style-Type" content="text/css" />
  33. <link rel="icon" type="image/png" href="<?php echo URL_GCWEB ?>templates/<?php echo $conf['template'] ?>/img/book.png" />
  34. <link rel="stylesheet" type="text/css" href="<?php echo URL_GCWEB ?>templates/<?php echo $conf['template'] ?>/style.css" media="screen, print" />
  35. <link rel="stylesheet" type="text/css" href="<?php echo URL_GCWEB ?>templates/<?php echo $conf['template'] ?>/style_print.css" media="print" />
  36. <!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="<?php echo URL_GCWEB ?>templates/<?php echo $conf['template'] ?>/style_ie.css" media="screen, print" /><![endif]-->
  37. <?php if ($modelname == 'main') {
  38. foreach ($info['collections'] as $collectmp ) {
  39. if (!$collectmp['private'])
  40. echo ' <link rel="alternate" type="application/rss+xml" title="'.$info['title'].' - '.$collectmp['title'].' (Toute la collection)" href="'.hrefmodel('rss').'" />';
  41. }
  42. } else { ?>
  43. <link rel="alternate" type="application/rss+xml" title="<?php echo $info['title'].' - '.$collec['title'] ?> (Toute la collection)" href="<? aff_hrefmodel('rss') ?>" />
  44. <link rel="alternate" type="application/rss+xml" title="<?php echo $info['title'].' - '.$collec['title'] ?> (Éléments affichés)" href="<? aff_hrefmodel('rss',True) ?>" />
  45. <script type="text/javascript">
  46. <!--
  47. FuncOL = new Array();
  48. function addFuncOL(fct) {
  49. FuncOL[FuncOL.length] = fct;
  50. }
  51.  
  52. window.onload = function() {
  53. for(var i = 0, longueur = FuncOL.length; i < longueur; i++)
  54. FuncOL[i]();
  55. };
  56.  
  57. addFuncOL(function() {
  58. hide('chargement');
  59. });
  60.  
  61. if (window.innerWidth <= 1100) {
  62. document.write('<link href="<?php echo DIR_GCWEB ?>templates/<?php echo $conf['template'] ?>/styleLowRes.css" rel="stylesheet" type="text/css" media="screen, print, handheld" />');
  63. }
  64. //-->
  65. </script>
  66. <?php }
  67. if ((strpos($_SERVER['HTTP_USER_AGENT'],'Gecko') | strpos($_SERVER['HTTP_USER_AGENT'],'WebKit')) && !(strpos($_SERVER['HTTP_USER_AGENT'],'Konqueror') | strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')))
  68. // Javascript amélioré pour firefox et compatible (safari, midori ...)
  69. echo '<script type="text/javascript" src="'.TEMPLATE_MODEL_URL_GCWEB.'/javascript.js"></script>';
  70. else
  71. echo '<script type="text/javascript" src="'.TEMPLATE_MODEL_URL_GCWEB.'/javascript_light.js"></script>';
  72.  
  73. echo join("\n",$info['array_add_header']) ?>
  74. </head>
  75.  
  76. <body class="type_<?php echo $collec['type'] ?>">
  77. <div id="title">
  78. <div class="box">
  79. <h1><a href="/accueil.html"><?php aff($info['title']) ?></a></h1>
  80. <p><?php aff($info['description']) ?></p>
  81. <fieldset id="collec-selector"><legend><?php echo __('Collections') ?></legend>
  82. <?php aff_chooseCollec() ?>
  83. </fieldset>
  84. </div>
  85. </div>
  86.  
  87. <?php aff_noIE() ?>
  88.  
  89. <noscript>
  90. <div id="noscript" class="box">
  91. <?php echo __('Vous avez désactivé javascript. Certaines parties du site seront inaccessibles.') ?>
  92. </div>
  93. </noscript>
  94.  
  95. <!--Affichage des éventuels messages d'erreur ou d'avertissement -->
  96. <?php if ($msg) { ?><div id="error" class="box">
  97. <?php aff($msg); ?>
  98. <p>[<a href="#" onclick="javascript:hide('error')"><?php echo __('Fermer') ?></a>]</p>
  99. </div><?php } ?>
Add Comment
Please, Sign In to add comment