Subversion Repositories Sites.outils-naturalistes.fr

Rev

Rev 39 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 39 Rev 41
Line 1... Line 1...
1
<?php $auteur_session = '[(#SESSION{login})]'; 
1
<?php $auteur_session = '[(#SESSION{login})]'; 
2
?>
2
?>
Line 3... Line 3...
3
 
3
 
4
<BOUCLE_gen(RUBRIQUES){id_rubrique}{tout}>
4
<BOUCLE_gen(RUBRIQUES){id_rubrique}>
5
 	<div class="rubrique" id="rubrique#ID_RUBRIQUE">
5
 	<div class="rubrique" id="rubrique#ID_RUBRIQUE">
6
			[<h4>(#SOUSTITRE)</h4>]
6
			[<h4>(#SOUSTITRE)</h4>]
7
			[(#TEXTE|paragrapher)]
7
			[(#TEXTE|paragrapher)]
8
   </div>
8
   </div>
9
</BOUCLE_gen>
-
 
10
<BOUCLE_titre(RUBRIQUES){id_rubrique}{par num titre}{id_mot=1}>
-
 
11
	<!-- contenu court avec date -->
-
 
12
	<BOUCLE_afficheDesc(ARTICLES){id_rubrique}{par num titre}{doublons}>
-
 
13
    	<div class="article_date" id="article#ID_ARTICLE">
-
 
14
		[<h3>(#TITRE|supprimer_numero)</h3>] 
-
 
15
		<span class="details_date">[(#DATE|affdate)]</span>
-
 
16
		[<h4>(#SOUSTITRE)</h4>]
-
 
17
		[(#CHAPO|sinon{#INTRODUCTION}|paragrapher)]
-
 
18
		<span class="details"><a href="#URL_ARTICLE"><:lire_plus:></a></span>
9
</BOUCLE_gen>
19
		</div>
-
 
20
	</BOUCLE_afficheDesc>
-
 
21
</BOUCLE_titre>
10
 
22
<BOUCLE_identification(RUBRIQUES){id_rubrique} {titre_mot=identification} {tout}>
11
<BOUCLE_identification(RUBRIQUES){id_rubrique} {titre_mot=identification} {tout}>
23
<?php
12
<?php
24
define ('PAP_CHEMIN_API_PEAR', 'api/pear/');
13
define ('PAP_CHEMIN_API_PEAR', 'api/pear/');
25
define ('PAP_CHEMIN_RACINE', '');
14
define ('PAP_CHEMIN_RACINE', '');
Line 30... Line 19...
30
 
19
 
Line 31... Line 20...
31
include_once 'authentification.php';
20
include_once 'authentification.php';
Line 32... Line 21...
32
 
21
 
33
?>
-
 
34
 
-
 
Line 35... Line 22...
35
<div id="contenu" >
22
?>
36
 
23
 
37
 
-
 
38
 
24
<div >
39
	<?php 
25
 
Line 40... Line -...
40
if ($auteur_session) {
-
 
41
 
26
	<?php 
42
	 ?>
27
		if ($auteur_session) {
43
	Vous &ecirc;tes authentifi&eacute: avec l'identifiant <b><?php echo $auteur_session?></b>  <a href='#URL_LOGOUT'>cliquez ici pour vous déconnecter</a>
28
	 ?>
44
 
-
 
45
 
29
	Vous &ecirc;tes authentifi&eacute: avec l'identifiant <b><?php echo $auteur_session?></b>  <a href='#URL_LOGOUT'>cliquez ici pour vous déconnecter</a>
Line 46... Line 30...
46
	<?php } 
30
 
47
	else {
31
	<?php } 
48
	      $GLOBALS['AUTH']->logout();
32
	else {
49
 
33
	      $GLOBALS['AUTH']->logout();
50
	?>
34
	?>
51
	
35
	
52
	<div id="login_public" class="formulaire">
36
	<div id="login_public" class="formulaire">
53
				[(#LOGIN_PUBLIC)]
37
				[(#LOGIN_PUBLIC)]
54
	</div>
38
	</div>
Line 55... Line 39...
55
	<div id="inscription_public" class="formulaire">
39
	<div id="inscription_public" class="formulaire">
-
 
40
				[(#FORMULAIRE_INSCRIPTION)]
-
 
41
	</div>
-
 
42
	<?php } ?>
-
 
43
</div>
-
 
44
</BOUCLE_identification>    
-
 
45
 
-
 
46
<BOUCLE_afficheArt(ARTICLES){id_rubrique}{par num titre}{doublons}{0,1}>		
-
 
47
	<BOUCLE_mots_cles(MOTS){id_article=#ID_ARTICLE}>
-
 
48
		<?php 
-
 
49
			$mots_cles[] = "#TITRE";
-
 
50
		?>	
-
 
51
</BOUCLE_mots_cles>
-
 
52
 
-
 
53
 
-
 
54
<?php
-
 
55
	if($mots_cles && in_array('bazar',$mots_cles)) {
-
 
56
		define ('PAP_CHEMIN_API_PEAR', 'api/pear/');
-
 
57
		define ('PAP_CHEMIN_RACINE', '');
-
 
58
		define ('GEN_SEP', '/');
-
 
59
		define ('GEN_CHEMIN_API', 'api/');
-
 
60
		define ('PAP_CHEMIN_API_PEARDB', PAP_CHEMIN_API_PEAR);
-
 
61
		set_include_path('.:'.PAP_CHEMIN_API_PEAR);
-
 
62
 
-
 
63
		include_once 'authentification.php';
-
 
64
		include_once 'api/formulaire/formulaire.fonct.inc.php';
-
 
65
		$GLOBALS['_GEN_commun']['info_application']->categorie_nature = '0';
-
 
66
		include_once 'client/bazar/bazar.php';
-
 
67
 
-
 
68
		// Vue fonction de l'article 
-
 
69
		/*define ('BAZ_VOIR_TOUTES_ANNONCES', 1) ;
-
 
70
		define ('BAZ_ACTION_VOIR_VOS_ANNONCES', 2);
-
 
71
		define ('BAZ_DEPOSER_ANNONCE', 3) ;
-
 
72
		define ('BAZ_ANNONCES_A_VALIDER', 4) ;
-
 
73
		define ('BAZ_GERER_DROITS', 5) ;
-
 
74
		define ('BAZ_ADMINISTRER_ANNONCES', 6) ;
-
 
75
		define ('BAZ_MODIFIER_FICHE', 7) ;
-
 
76
		if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ;
-
 
77
		define ('BAZ_SUPPRIMER_FICHE', 9) ;*/
-
 
78
 
-
 
79
		$normal = false;;
-
 
80
		
-
 
81
		if(isset($_GET[BAZ_VARIABLE_ACTION])) {
-
 
82
			$normal = false;
-
 
83
		}
-
 
84
		else {
-
 
85
			if(isset($mots_cles) && count($mots_cles > 1)) {
-
 
86
				foreach($mots_cles as $mot) {
-
 
87
				
-
 
88
					switch ($mot) {
-
 
89
					   case 'bazar_consultation': // Consultation.
-
 
90
							$_GET['vue']=2; 
-
 
91
					   break;
-
 
92
					   
-
 
93
					   case 'bazar_administration': // Administrer fiches.
-
 
94
						$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']);
-
 
95
						if($utilisateur->isSuperAdmin()) {
-
 
96
							$_GET['vue']=5; 
-
 
97
						}
-
 
98
						else {
-
 
99
							$normal=true;
-
 
100
						}
-
 
101
					   break;
-
 
102
					   
-
 
103
					   case 'bazar_saisie': // Saisir fiche.
-
 
104
							$_GET['vue']=4; 
-
 
105
					   break;
-
 
106
					   
-
 
107
					   case 'bazar_voir_fiches': // Voir les fiches.
-
 
108
							$_GET['vue']=3; 
-
 
109
					   break;
-
 
110
					   
-
 
111
					   default:
-
 
112
						$_GET['vue']=1; 
-
 
113
						$normal=false;
-
 
114
					   break;
-
 
115
					}
-
 
116
				}
-
 
117
			}
-
 
118
		}
-
 
119
		
-
 
120
		if(!$normal) {
-
 
121
			$html = afficherContenuCorps();
-
 
122
		} else {
-
 
123
			$html = "";
-
 
124
		}
-
 
125
 
-
 
126
	}
-
 
127
	
-
 
128
	if (isset($normal) && !$normal) {
56
				[(#FORMULAIRE_INSCRIPTION)]
129
	echo '<link rel="stylesheet" href="[(#CHEMIN{css/bazar.css})]" type="text/css" media="screen" />
-
 
130
		  <div id="contenu">'. 
-
 
131
				$html 
-
 
132
		  .'</div>';
-
 
133
	}
-
 
134
	else { 
-
 
135
?>
-
 
136
	<div class="article" id="article#ID_ARTICLE">
-
 
137
	[<h3>(#TITRE|supprimer_numero)</h3>]
-
 
138
	[<p><strong>(#CHAPO)</strong></p>]
-
 
139
	[(#TEXTE|paragrapher)]
-
 
140
	[<div class="ps">(#PS)</div>]
-
 
141
	</div>
-
 
142
<?php 
-
 
143
	} 
57
	</div>
144
?>
-
 
145
 
-
 
146
<BOUCLE_titre(RUBRIQUES){id_rubrique}{par num titre}{id_mot=1}>
-
 
147
	<!-- contenu court avec date -->
-
 
148
	<BOUCLE_afficheDesc(ARTICLES){id_rubrique}{par num titre}{doublons}>
-
 
149
	
-
 
150
    	<div class="article_date" id="article#ID_ARTICLE">
-
 
151
		[<h3>(#TITRE|supprimer_numero)</h3>] 
-
 
152
		<?php
-
 
153
			if (isset($normal) && !$normal) {
-
 
154
				echo $html;
58
<?php } ?>
155
				$normal = true; 
59
</div>
156
			}
-
 
157
		 else { ?>
60
</BOUCLE_identification>    
158
			<span class="details_date">[(#DATE|affdate)]</span>
61
 
159
			<BOUCLE_auteurs(AUTEURS) {id_article} {par nom} {", "}>
-
 
160
				[<span class="auteur">- (#NOM)</span>]
-
 
161
			</BOUCLE_auteurs>
-
 
162
			[<h4>(#SOUSTITRE)</h4>]
62
<BOUCLE_afficheArt(ARTICLES){id_rubrique}{par num titre}{doublons}{0,1}>
163
			[(#CHAPO|sinon{#INTRODUCTION}|paragrapher)]