Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/docs/website/menu.html
blob: 717b6ee6b2bfa40d254dc0b180eaeaef4596ff87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
if(floor(phpversion()) < 4)	{
	// La version de PHP est inférieure à 4,
	// la fonction in_array n'existe donc pas
	function in_array($member, $array)
	{
		reset($array);
		while (list($k, $v) = each($array)) {
			if ($v == $member) return true;
		}
		return false;
	}
}


// récupération de la hiérarchie courante
$hierarchie = array();
<BOUCLE_principale(RUBRIQUES){id_rubrique}>
	<BOUCLE_hierarchie(HIERARCHIE){id_rubrique}>
		$hierarchie[] = #ID_RUBRIQUE;
	</BOUCLE_hierarchie>
	$hierarchie[] = #ID_RUBRIQUE;
	$actuelle = #ID_RUBRIQUE;
</BOUCLE_principale>

// inclusion du script de gestion des layers de SPIP
$flag_ecrire = false;
include 'inc_layer.php3';
afficher_script_layer();
?>
<table border="0" cellpadding="2" cellspacing="0">

<BOUCLE_principale2(RUBRIQUES){id_rubrique}>
<BOUCLE_hierarchie2(HIERARCHIE){id_rubrique}{0,1}>

<BOUCLE_secteurs(RUBRIQUES){id_rubrique} {par num titre}>
	<?php $id = #ID_RUBRIQUE; ?>
	<BOUCLE_nb_rubriques(RUBRIQUES){id_parent}><?php ${'nb'.$id} = #TOTAL_BOUCLE; ?></BOUCLE_nb_rubriques>
	<tr>
		<td valign="top">
			<?php
			if ($nb#ID_RUBRIQUE > 0) {
				if (in_array(#ID_RUBRIQUE, $hierarchie)) {
					echo debut_block_visible('rub#ID_RUBRIQUE');
				} else {
					echo debut_block_invisible('rub#ID_RUBRIQUE');
				}
				?>
				<table border="0" cellpadding="2" cellspacing="0">
				<BOUCLE_rubriques(RUBRIQUES){id_parent}{par num titre}>
					<?php $id = #ID_RUBRIQUE; ?>
					<BOUCLE_nb_sous_rubriques(RUBRIQUES){id_parent} {par num titre}><?php ${'nb'.$id} = #TOTAL_BOUCLE; ?></BOUCLE_nb_sous_rubriques>
					<tr>
						<td valign="top">
							<?php
							if ($nb#ID_RUBRIQUE > 0) {
								if (in_array(#ID_RUBRIQUE, $hierarchie)) {
									echo bouton_block_visible('rub#ID_RUBRIQUE');
								} else {
									echo bouton_block_invisible('rub#ID_RUBRIQUE');
								}
							} else {
								echo '<img src="img_pack/puce'.(#ID_RUBRIQUE == $actuelle ? 'on' : 'off').'.gif" alt=""/>';
							}
							?>
						</td>
						<td valign="top">
							<a href="#URL_RUBRIQUE" class="rubrique<?php echo (#ID_RUBRIQUE == $actuelle ? '' : (in_array(#ID_RUBRIQUE, $hierarchie) ? 'on' : 'off')); ?>" >[(#TITRE|supprimer_numero)]</a>
							<?php
							if ($nb#ID_RUBRIQUE > 0) {
								if (in_array(#ID_RUBRIQUE, $hierarchie)) {
									echo debut_block_visible('rub#ID_RUBRIQUE');
								} else {
									echo debut_block_invisible('rub#ID_RUBRIQUE');
								}
								?>
								<table border="0" cellpadding="2" cellspacing="0"><BOUCLE_sous_rubriques(BOUCLE_rubriques)></BOUCLE_sous_rubriques></table>
								<?php
								echo fin_block('rub#ID_RUBRIQUE');
							}
							?>
						</td>
					</tr>
					<?php
					echo fin_block('rub#ID_RUBRIQUE');
					?>
				</BOUCLE_rubriques>
				</table>
			<?php
			}
			?>
		</td>
	</tr>
</BOUCLE_secteurs>
</BOUCLE_hierarchie2>
</B_hierarchie2>
<BOUCLE_secteurs2(RUBRIQUES){id_rubrique} {par num titre}>
	<?php $id = #ID_RUBRIQUE; ?>
	<BOUCLE_nb_rubriques2(RUBRIQUES){id_parent}><?php ${'nb'.$id} = #TOTAL_BOUCLE; ?></BOUCLE_nb_rubriques2>
	<tr>
		<td valign="top">
			<?php
			if ($nb#ID_RUBRIQUE > 0) {
				if (in_array(#ID_RUBRIQUE, $hierarchie)) {
					echo debut_block_visible('rub#ID_RUBRIQUE');
				} else {
					echo debut_block_invisible('rub#ID_RUBRIQUE');
				}
				?>
				<table border="0" cellpadding="2" cellspacing="0">
				<BOUCLE_rubriques2(RUBRIQUES){id_parent}{par num titre}>
					<?php $id = #ID_RUBRIQUE; ?>
					<BOUCLE_nb_sous_rubriques2(RUBRIQUES){id_parent} {par num titre}><?php ${'nb'.$id} = #TOTAL_BOUCLE; ?></BOUCLE_nb_sous_rubriques2>
					<tr>
						<td valign="top">
							<?php
							if ($nb#ID_RUBRIQUE > 0) {
								if (in_array(#ID_RUBRIQUE, $hierarchie)) {
									echo bouton_block_visible('rub#ID_RUBRIQUE');
								} else {
									echo bouton_block_invisible('rub#ID_RUBRIQUE');
								}
							} else {
								echo '<img src="img_pack/puce'.(#ID_RUBRIQUE == $actuelle ? 'on' : 'off').'.gif" alt=""/>';
							}
							?>
						</td>
						<td valign="top">
							<a href="#URL_RUBRIQUE" class="rubrique<?php echo (#ID_RUBRIQUE == $actuelle ? '' : (in_array(#ID_RUBRIQUE, $hierarchie) ? 'on' : 'off')); ?>" >[(#TITRE|supprimer_numero)]</a>
							<?php
							if ($nb#ID_RUBRIQUE > 0) {
								if (in_array(#ID_RUBRIQUE, $hierarchie)) {
									echo debut_block_visible('rub#ID_RUBRIQUE');
								} else {
									echo debut_block_invisible('rub#ID_RUBRIQUE');
								}
								?>
								<table border="0" cellpadding="2" cellspacing="0"><BOUCLE_sous_rubriques2(BOUCLE_rubriques2)></BOUCLE_sous_rubriques2></table>
								<?php
								echo fin_block('rub#ID_RUBRIQUE');
							}
							?>
						</td>
					</tr>
					<?php
					echo fin_block('rub#ID_RUBRIQUE');
					?>
				</BOUCLE_rubriques2>
				</table>
			<?php
			}
			?>
		</td>
	</tr>
</BOUCLE_secteurs2>
<//B_hierarchie2>
</BOUCLE_principale2>
</table>