2013-03-04 19:46:06 +01:00
|
|
|
<?php
|
2014-07-04 11:21:31 +02:00
|
|
|
/* This software is governed by the CeCILL-B license. If a copy of this license
|
|
|
|
* is not distributed with this file, you can obtain one at
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
|
|
|
|
*
|
|
|
|
* Authors of STUdS (initial project) : Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
|
|
|
* Authors of OpenSondage : Framasoft (https://github.com/framasoft)
|
|
|
|
*
|
|
|
|
* =============================
|
|
|
|
*
|
|
|
|
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
|
|
|
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
|
|
|
* http://www.cecill.info/licences/Licence_CeCILL_V2.1-fr.txt
|
|
|
|
*
|
|
|
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
|
|
|
* Auteurs d'OpenSondage : Framasoft (https://github.com/framasoft)
|
|
|
|
*/
|
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
include_once('fonctions.php');
|
|
|
|
|
2011-06-23 16:52:10 +02:00
|
|
|
function framanav()
|
|
|
|
{
|
2014-06-11 19:19:17 +02:00
|
|
|
if (file_exists($_SERVER['DOCUMENT_ROOT']."/nav/nav.js")) {
|
|
|
|
echo "\n".'<!-- Framanav --> '."\n";;
|
2013-11-21 15:02:46 +01:00
|
|
|
echo '<script src="/nav/nav.js" id="nav_js" type="text/javascript" charset="utf-8"></script>'."\n";
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<!-- /Framanav --> '."\n";
|
|
|
|
}
|
2011-06-23 16:52:10 +02:00
|
|
|
}
|
|
|
|
|
2011-06-24 16:42:53 +02:00
|
|
|
function gAnalytics() {
|
2011-07-02 23:13:56 +02:00
|
|
|
if (GOOGLE_ANALYTICS_ID !== false) {
|
|
|
|
echo '
|
2011-06-24 16:42:53 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var _gaq = _gaq || [];
|
2011-07-02 23:13:56 +02:00
|
|
|
_gaq.push([\'_setAccount\', \''.GOOGLE_ANALYTICS_ID.'\']);
|
|
|
|
_gaq.push([\'_trackPageview\']);
|
2011-06-24 16:42:53 +02:00
|
|
|
|
|
|
|
(function() {
|
2011-07-02 23:13:56 +02:00
|
|
|
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
|
|
|
|
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
|
|
|
|
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
|
2011-06-24 16:42:53 +02:00
|
|
|
})();
|
|
|
|
|
2011-07-02 23:13:56 +02:00
|
|
|
</script>';
|
|
|
|
}
|
2011-06-24 16:42:53 +02:00
|
|
|
}
|
|
|
|
|
2011-06-23 16:52:10 +02:00
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
//le logo
|
2011-05-15 03:56:54 +02:00
|
|
|
function logo ()
|
|
|
|
{
|
2013-11-21 15:02:46 +01:00
|
|
|
/* if(defined('LOGOBANDEAU')) {
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<div class="logo"><img src="/' . LOGOBANDEAU . '" height="74" alt=""></div>'."\n";
|
2013-11-21 15:02:46 +01:00
|
|
|
}*/
|
2011-05-15 01:32:47 +02:00
|
|
|
}
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
#le bandeau principal
|
2011-05-15 03:56:54 +02:00
|
|
|
function bandeau_tete()
|
|
|
|
{
|
2011-12-30 03:34:02 +01:00
|
|
|
if ( IMAGE_TITRE ) {
|
|
|
|
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<div role="banner" class="bandeau"><h1><a href="'.str_replace('/admin','',get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'"><img src="'.get_server_name(). IMAGE_TITRE. '" title="'._("Home").' - '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></h1></div>'."\n";
|
2011-12-30 03:34:02 +01:00
|
|
|
|
|
|
|
} else {
|
|
|
|
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<div role="banner" class="bandeau"><h1><a href="'.str_replace('/admin','',get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.NOMAPPLICATION.'</a></h1></div>'."\n";
|
2011-12-30 03:34:02 +01:00
|
|
|
|
|
|
|
} ;
|
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
}
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
// bandeaux de titre
|
2011-05-15 03:56:54 +02:00
|
|
|
function bandeau_titre($titre)
|
|
|
|
{
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<p class="bandeautitre">'. $titre .'</p>'."\n";
|
2011-05-15 01:32:47 +02:00
|
|
|
}
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
|
|
|
|
function liste_lang()
|
|
|
|
{
|
2014-07-04 11:21:31 +02:00
|
|
|
global $ALLOWED_LANGUAGES; global $lang;
|
2011-05-15 01:32:47 +02:00
|
|
|
$str = '';
|
2011-05-15 03:56:54 +02:00
|
|
|
foreach ($ALLOWED_LANGUAGES as $k => $v ) {
|
2014-07-04 11:21:31 +02:00
|
|
|
if (substr($k,0,2)==$lang) {
|
|
|
|
$str .= '<option lang="'.substr($k,0,2).'" selected value="' . $k . '">' . $v . '</option>' . "\n" ;
|
|
|
|
} else {
|
|
|
|
$str .= '<option lang="'.substr($k,0,2).'" value="' . $k . '">' . $v . '</option>' . "\n" ;
|
|
|
|
}
|
2011-05-15 03:56:54 +02:00
|
|
|
}
|
2013-03-04 19:46:06 +01:00
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
#Les sous-bandeaux contenant les boutons de navigation
|
2011-05-15 03:56:54 +02:00
|
|
|
function sous_bandeau()
|
|
|
|
{
|
2011-05-29 05:13:58 +02:00
|
|
|
/*echo '<div class="sousbandeau">' .
|
2014-06-11 19:19:17 +02:00
|
|
|
'<a href="./">'. _("Home") .'</a>' .
|
2011-05-20 02:52:22 +02:00
|
|
|
'<a href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a>' .
|
2013-11-21 15:02:46 +01:00
|
|
|
'<a href="http://contact.framasoft.org" target="_new">'. _("Contact") .'</a>' .
|
2013-03-04 19:46:06 +01:00
|
|
|
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
|
|
|
|
'<a href="/apropos.php">'. _("About") .'</a>' .
|
|
|
|
'<a href="/admin/index.php">'. _("Admin") .'</a>' .
|
2011-05-15 03:56:54 +02:00
|
|
|
'<span class="sousbandeau sousbandeaulangue">' .
|
|
|
|
liste_lang() . '</span>'.
|
2011-05-29 05:13:58 +02:00
|
|
|
'</div>' . "\n";*/
|
2011-05-15 03:56:54 +02:00
|
|
|
}
|
2011-05-15 01:32:47 +02:00
|
|
|
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
function sous_bandeau_admin()
|
|
|
|
{
|
2011-05-15 01:32:47 +02:00
|
|
|
echo '<div class="sousbandeau">' .
|
2014-06-11 19:19:17 +02:00
|
|
|
'<a class="button small gray" href="'.str_replace('/admin','',get_server_name()).'">'. _("Home") .'</a>';
|
2013-03-04 19:46:06 +01:00
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
if(is_readable('logs_studs.txt')) {
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<a role="button" class="button small gray" href="'.str_replace('/admin','',get_server_name()).'admin/logs_studs.txt">'. _("Logs") .'</a>';
|
2011-05-15 03:56:54 +02:00
|
|
|
}
|
2013-03-04 19:46:06 +01:00
|
|
|
|
2014-06-11 19:19:17 +02:00
|
|
|
echo '<a role="button" class="button small gray" href="'.str_replace('/admin','',get_server_name()).'scripts/nettoyage_sondage.php">'. _("Cleaning") .'</a>' .
|
|
|
|
'<ul class="sousbandeau sousbandeaulangue">' .
|
|
|
|
liste_lang() . '</ul>'.
|
2011-05-15 03:56:54 +02:00
|
|
|
'</div>'."\n";
|
2013-03-04 19:46:06 +01:00
|
|
|
|
|
|
|
gAnalytics();
|
2011-05-15 03:56:54 +02:00
|
|
|
}
|
2011-05-15 01:32:47 +02:00
|
|
|
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
function sous_bandeau_choix()
|
|
|
|
{
|
2011-05-29 05:13:58 +02:00
|
|
|
/*echo '<div class="sousbandeau">' .
|
2013-03-04 19:46:06 +01:00
|
|
|
'<a href="/">'. _("Home") .'</a>' .
|
2011-05-29 05:13:58 +02:00
|
|
|
'</div>'."\n";*/
|
2011-05-15 01:32:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#les bandeaux de pied
|
2011-05-15 03:56:54 +02:00
|
|
|
function sur_bandeau_pied()
|
|
|
|
{
|
|
|
|
echo '<div class="surbandeaupied"></div>'."\n";
|
2011-05-15 01:32:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
function bandeau_pied()
|
|
|
|
{
|
2011-05-29 05:13:58 +02:00
|
|
|
//echo '<div class="bandeaupied">'. _("Université de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";
|
|
|
|
echo '<div class="sousbandeau">' .
|
2014-06-11 19:19:17 +02:00
|
|
|
'<ul>' .
|
|
|
|
'<li><a class="button small gray" href="'.get_server_name().'">'. _("Home") .'</a></li>' .
|
|
|
|
'<li><a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a></li>' .
|
|
|
|
'<li><a class="button small gray" href="http://contact.framasoft.org">'. _("Contact") .'</a></li>' .
|
2013-03-04 19:46:06 +01:00
|
|
|
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
|
2014-06-11 19:19:17 +02:00
|
|
|
'<li><a class="button small gray" href="'.get_server_name().'apropos.php">'. _("About") .'</a></li>' .
|
|
|
|
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a></li>' .
|
|
|
|
'</ul>' .
|
2014-07-04 11:21:31 +02:00
|
|
|
'<ul class="sousbandeau sousbandeaulangue"><li><form method="post" action=""><select name="lang" title="'. _("Change the language") .'" class="small white" >' .
|
|
|
|
liste_lang() . '</select><input type="submit" value="OK" class="small white" /></form></li></ul>'.
|
2011-05-29 05:13:58 +02:00
|
|
|
'</div>' . "\n";
|
2013-03-04 19:46:06 +01:00
|
|
|
gAnalytics();
|
2011-05-15 03:56:54 +02:00
|
|
|
}
|
|
|
|
|
2011-05-15 01:32:47 +02:00
|
|
|
|
2011-05-15 03:56:54 +02:00
|
|
|
function bandeau_pied_mobile()
|
|
|
|
{
|
2011-05-29 05:13:58 +02:00
|
|
|
/*echo '<div class="surbandeaupiedmobile"></div>'."\n" .
|
|
|
|
'<div class="bandeaupiedmobile">'. _("Université de Strasbourg. Creation: Guilhem BORGHESI. 2008-2009") .'</div>'."\n";*/
|
2011-06-23 01:21:56 +02:00
|
|
|
echo '<div class="separateur"> </div>';
|
2011-05-29 05:13:58 +02:00
|
|
|
echo '<div class="sousbandeau">' .
|
2014-06-11 19:19:17 +02:00
|
|
|
'<ul>' .
|
|
|
|
'<li><a class="button small gray" href="'.get_server_name().'">'. _("Home") .'</a></li>' .
|
|
|
|
'<li><a class="button small gray" href="' . getUrlSondage('aqg259dth55iuhwm').'">'. _("Example") .'</a></li>' .
|
|
|
|
'<li><a class="button small gray" href="http://contact.framasoft.org">'. _("Contact") .'</a></li>' .
|
2013-03-04 19:46:06 +01:00
|
|
|
//'<a href="/sources/sources.php">'. _("Sources") .'</a>' . //not implemented
|
2014-06-11 19:19:17 +02:00
|
|
|
'<li><a class="button small gray" href="'.get_server_name().'apropos.php">'. _("About") .'</a></li>' .
|
|
|
|
//'<a class="button small gray" href="/admin/index.php">'. _("Admin") .'</a></li>' .
|
|
|
|
'</ul>' .
|
2014-07-04 11:21:31 +02:00
|
|
|
'<ul class="sousbandeau sousbandeaulangue"><li><form method="post" action=""><select name="lang" title="'. _("Change the language") .'" class="small white" >' .
|
|
|
|
liste_lang() . '</select><input type="submit" value="OK" class="small white" /></form></li></ul>'.
|
2011-05-29 05:13:58 +02:00
|
|
|
'</div>' . "\n";
|
2013-03-04 19:46:06 +01:00
|
|
|
gAnalytics();
|
2011-12-30 03:34:02 +01:00
|
|
|
}
|