Subversion Repositories ALCASAR

Rev

Rev 890 | Rev 911 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 890 Rev 907
Line 84... Line 84...
84
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
84
if (is_file("../lib/$config[general_lib_type]/group_info.php"))
85
	include("../lib/$config[general_lib_type]/group_info.php");
85
	include("../lib/$config[general_lib_type]/group_info.php");
86
if ($create == 1){
86
if ($create == 1){
87
	if ($group_exists != "no"){
87
	if ($group_exists != "no"){
88
		echo <<<EOM
88
		echo <<<EOM
89
<b>Le groupe <i>$login</i> existe d&eacute;j&agrave;.</b>
89
<b><i>$login</i> $l_already_exist</b>
90
EOM;
90
EOM;
91
	}
91
	}
92
	else{
92
	else{
93
		if (is_file("../lib/$config[general_lib_type]/create_group.php"))
93
		if (is_file("../lib/$config[general_lib_type]/create_group.php"))
94
			include("../lib/$config[general_lib_type]/create_group.php");
94
			include("../lib/$config[general_lib_type]/create_group.php");
Line 103... Line 103...
103
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
103
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
104
<?php
104
<?php
105
	echo <<<EOM
105
	echo <<<EOM
106
	<tr>
106
	<tr>
107
		<td class="etiquette" colspan=$colspan>
107
		<td class="etiquette" colspan=$colspan>
108
		Groupe(s) d&eacute;j&agrave; cr&eacute;&eacute;(s)
108
		$l_created_groups
109
		</td><td>
109
		</td><td>
110
EOM;
110
EOM;
111
		if (!isset($existing_groups))
111
		if (!isset($existing_groups))
112
			echo "<b>Aucun groupe d&eacute;j&agrave; cr&eacute;&eacute;</b>\n";
112
			echo "<b>$l_group_empty</b>\n";
113
		else{
113
		else{
114
			echo "<select name=\"existing_groups\">\n";	
114
			echo "<select name=\"existing_groups\">\n";	
115
			foreach ($existing_groups as $group => $count)
115
			foreach ($existing_groups as $group => $count)
116
				echo "<option value=\"$group\">$group\n";
116
				echo "<option value=\"$group\">$group\n";
117
			echo "</select>\n";
117
			echo "</select>\n";
Line 119... Line 119...
119
	echo <<<EOM
119
	echo <<<EOM
120
		</td>
120
		</td>
121
	</tr>
121
	</tr>
122
	<tr>
122
	<tr>
123
		<td class="etiquette" colspan=$colspan>
123
		<td class="etiquette" colspan=$colspan>
124
		Nom du groupe
124
		$l_group_name
125
		</td><td>
125
		</td><td>
126
		<input type=text name="login" value="$login" size=35>
126
		<input type=text name="login" value="$login" size=35>
127
		</td>
127
		</td>
128
	</tr>
128
	</tr>
129
	<tr>
129
	<tr>
130
		<td class="etiquette" colspan=$colspan>
130
		<td class="etiquette" colspan=$colspan>
131
		Membres du groupe : s&eacute;par&eacute;s par un espace ou un 'retour chariot'.
131
		$l_group_members
132
		</td><td>
132
		</td><td>
133
		<textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
133
		<textarea name=members cols="15" wrap="PHYSICAL" rows=5></textarea>
134
		</td>
134
		</td>
135
	</tr>
135
	</tr>
136
		
136
		
Line 139... Line 139...
139
		$name = $attrmap["$key"];
139
		$name = $attrmap["$key"];
140
		if ($name == 'none')
140
		if ($name == 'none')
141
			continue;
141
			continue;
142
		$oper_name = $name . '_op';
142
		$oper_name = $name . '_op';
143
		$val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
143
		$val = ($item_vals["$key"][0] != "") ? $item_vals["$key"][0] : $default_vals["$key"][0];
144
		/*
-
 
145
		Gestion d'un mode simple ou d'un mode avancé
-
 
146
		Définition du mode avancé les attributs concernant la gestion des octets, de la bande passante
-
 
147
		*/
-
 
148
		switch ($key)
144
		switch ($key)
149
		{
145
		{
-
 
146
		// $advanced = 1 : champs de saisie amélioré (calendrier, convertisseur, etc.) 
-
 
147
			case 'Simultaneous-Use' : 
-
 
148
				$advanced=1;
-
 
149
				$help_link="help/simultaneous_use_help.html";
-
 
150
				$desc=$l_simultaneous_use;
-
 
151
				break;
-
 
152
			case 'Max-All-Session' :
-
 
153
				$advanced=1;
-
 
154
				$help_link="help/max_all_session_help.html";
-
 
155
				$desc=$l_max_all_session;
-
 
156
				break;
-
 
157
			case 'Session-Timeout' : 
-
 
158
				$advanced=1;
-
 
159
				$help_link="help/session_timeout_help.html";
-
 
160
				$desc=$l_session_timeout;
-
 
161
				break;
-
 
162
			case 'Max-Daily-Session' :
-
 
163
				$advanced=1;
-
 
164
				$help_link="help/session_timeout_help.html";
-
 
165
				$desc=$l_daily_timeout;
-
 
166
				break;
-
 
167
			case 'Max-Monthly-Session' :
-
 
168
				$advanced=1;
-
 
169
				$help_link="help/session_timeout_help.html";
-
 
170
				$desc=$l_monthly_timeout;
-
 
171
				break;
-
 
172
			case 'Login-Time' : 
-
 
173
				$advanced=1;
-
 
174
				$help_link="help/login_time_help.html";
-
 
175
				$desc=$l_login_time;
-
 
176
				break;
-
 
177
			case 'Expiration' :
-
 
178
				$advanced=1;
-
 
179
				$help_link="help/expiration_help.html";
-
 
180
				$desc=$l_expiration;
-
 
181
				break;
150
			case 'ChilliSpot-Max-Input-Octets' :
182
			case 'ChilliSpot-Max-Input-Octets' :
-
 
183
				$advanced=1;
-
 
184
				$help_link="help/chillispot_max_input_octets_help.html";
-
 
185
				$desc=$l_max_input_octets;
-
 
186
				break;
151
			case 'ChilliSpot-Max-Output-Octets' :
187
			case 'ChilliSpot-Max-Output-Octets' :
-
 
188
				$advanced=1;
-
 
189
				$help_link="help/chillispot_max_output_octets_help.html";
-
 
190
				$desc=$l_max_output_octets;
-
 
191
				break;
152
			case 'ChilliSpot-Max-Total-Octets' :
192
			case 'ChilliSpot-Max-Total-Octets' :
-
 
193
				$advanced=1;
-
 
194
				$help_link="help/chillispot_max_total_octets_help.html";
-
 
195
				$desc=$l_max_total_octets;
-
 
196
				break;
153
			case 'ChilliSpot-Bandwidth-Max-Up' :
197
			case 'ChilliSpot-Bandwidth-Max-Up' :
-
 
198
				$advanced=1;
-
 
199
				$help_link="help/chillispot_bandwidth_max_up_help.html";
-
 
200
				$desc=$l_max_bandwidth_up;
-
 
201
				break;
154
			case 'ChilliSpot-Bandwidth-Max-Down' :
202
			case 'ChilliSpot-Bandwidth-Max-Down' :
-
 
203
				$advanced=1;
-
 
204
				$help_link="help/chillispot_bandwidth_max_down_help.html";
-
 
205
				$desc=$l_max_bandwidth_down;
-
 
206
				break;
155
			case 'WISPr-Redirection-URL' :
207
			case 'WISPr-Redirection-URL' :
-
 
208
				$advanced=1;
156
				$advanced=1; //<-- Valeur à mettre à '0' pour limiter les fonctionnalités
209
				$help_link="help/wispr_redirection_url_help.html";
-
 
210
				$desc=$l_wispr_redirection;
157
				break;
211
				break;
158
			default:
212
			default:
159
				$advanced=1;
213
				$advanced=1;
160
				break;
214
				break;
161
		}
215
		}
162
		if ($advanced){
216
//		if ($advanced){
-
 
217
//			print <<<EOM
-
 
218
//			<tr>
-
 
219
//				<td class="etiquette">
-
 
220
//				$desc
-
 
221
//				</td>
-
 
222
//EOM;
-
 
223
//		}
-
 
224
		if ($show_ops && $advanced){
163
			print <<<EOM
225
		print <<<EOM
164
			<tr>
226
			<tr>
165
				<td class="etiquette">
227
			<td class="etiquette">
166
				$desc
-
 
-
 
228
			<a href="$help_link" target=help onclick=window.open("$help_link","help","width=600,height=250,toolbar=no,scrollbars=no,resizable=yes") title="$l_click_for_help"><font color="blue">$desc</font></a>
167
				</td>
229
			</td>
168
EOM;
230
EOM;
169
		}
-
 
170
		if ($show_ops && $advanced){
-
 
171
			switch ($key)
231
			switch ($key){
172
			{
-
 
173
				case 'Simultaneous-Use' : 
232
				case 'Simultaneous-Use' : 
174
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
175
					break;
-
 
176
				case 'Login-Time' : 
-
 
177
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
178
					break;
-
 
179
				case 'Expiration' :
-
 
180
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
181
					break;
-
 
182
				case 'Max-All-Session' :
233
				case 'Max-All-Session' :
183
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
184
					break;
-
 
185
				case 'Session-Timeout' :
-
 
186
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
187
					break;
-
 
188
				case 'Max-Daily-Session' :
234
				case 'Max-Daily-Session' :
189
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
190
					break;
-
 
191
				case 'Max-Weekly-Session' :
235
				case 'Max-Weekly-Session' :
192
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
-
 
193
					break;
-
 
194
				case 'Max-Monthly-Session' :
236
				case 'Max-Monthly-Session' :
-
 
237
				case 'Login-Time' : 
-
 
238
				case 'Expiration' :
195
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
239
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
196
					break;
240
					break;
-
 
241
				case 'Session-Timeout' :
197
				case 'ChilliSpot-Max-Input-Octets' :
242
				case 'ChilliSpot-Max-Input-Octets' :
198
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
199
					break;
-
 
200
				case 'ChilliSpot-Max-Output-Octets' :
243
				case 'ChilliSpot-Max-Output-Octets' :
201
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
202
					break;
-
 
203
				case 'ChilliSpot-Max-Total-Octets' :
244
				case 'ChilliSpot-Max-Total-Octets' :
204
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
205
					break;
-
 
206
				case 'ChilliSpot-Bandwidth-Max-Up' :
245
				case 'ChilliSpot-Bandwidth-Max-Up' :
207
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
208
					break;
-
 
209
				case 'ChilliSpot-Bandwidth-Max-Down' :
246
				case 'ChilliSpot-Bandwidth-Max-Down' :
210
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
211
					break;
-
 
212
				case 'WISPr-Redirection-URL' :
247
				case 'WISPr-Redirection-URL' :
213
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
248
					echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
214
					break;
249
					break;
215
				default :
250
				default :
216
					print <<<EOM
251
					print <<<EOM
217
					<td>
252
					<td>
218
					<select name=$oper_name>
253
						<select name=$oper_name>
219
					<option $selected[$op_eq] value="=">=
254
							<option $selected[$op_eq] value="=">=
220
					<option $selected[$op_set] value=":=">:=
255
							<option $selected[$op_set] value=":=">:=
221
					<option $selected[$op_add] value="+=">+=
256
							<option $selected[$op_add] value="+=">+=
222
					<option $selected[$op_eq2] value="==">==
257
							<option $selected[$op_eq2] value="==">==
223
					<option $selected[$op_ne] value="!=">!=
258
							<option $selected[$op_ne] value="!=">!=
224
					<option $selected[$op_gt] value=">">&gt;
259
							<option $selected[$op_gt] value=">">&gt;
225
					<option $selected[$op_ge] value=">=">&gt;=
260
							<option $selected[$op_ge] value=">=">&gt;=
226
					<option $selected[$op_lt] value="<">&lt;
261
							<option $selected[$op_lt] value="<">&lt;
227
					<option $selected[$op_le] value="<=">&lt;=
262
							<option $selected[$op_le] value="<=">&lt;=
228
					<option $selected[$op_regeq] value="=~">=~
263
							<option $selected[$op_regeq] value="=~">=~
229
					<option $selected[$op_regne] value="!~">!~
264
							<option $selected[$op_regne] value="!~">!~
230
					<option $selected[$op_exst] value="=*">=*
265
							<option $selected[$op_exst] value="=*">=*
231
					<option $selected[$op_nexst] value="!*">!*
266
							<option $selected[$op_nexst] value="!*">!*
232
					</select>
267
						</select>
233
					</td>
268
					</td>
234
EOM;
269
EOM;
235
					break;
270
					break;
236
			}
271
			}
237
		}
272
		}
Line 248... Line 283...
248
			pour les durées limites de session,journée et de mois	
283
			pour les durées limites de session,journée et de mois	
249
			*/	
284
			*/	
250
			case 'Session-Timeout' :
285
			case 'Session-Timeout' :
251
			case 'Max-Daily-Session' :
286
			case 'Max-Daily-Session' :
252
			case 'Max-Monthly-Session' :
287
			case 'Max-Monthly-Session' :
-
 
288
			case 'Max-All-Session' :
253
				/*valeur d'origine de durée limite */
289
				/*valeur d'origine de durée limite */
254
				echo"<input id =\"$name\" type=text name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=28>";
290
				echo"<input id =\"$name\" type=text name=\"$name\" onfocus=\"this.value=''\" value=\"$val\" size=28>";
255
				/* Choix d'unité*/
291
				/* Choix d'unité*/
256
				echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newgroup')\">
292
				echo" <select name=\"$name"."_opt"."\" onchange=\"temps(this,'$name','newgroup')\">
257
						<option value=\"s\" selected>s</option>
293
						<option value=\"s\" selected>s</option>
Line 273... Line 309...
273
	}
309
	}
274
/*fin Ajout*/
310
/*fin Ajout*/
275
}
311
}
276
echo "</table><BR>";
312
echo "</table><BR>";
277
if ($create == 1)
313
if ($create == 1)
278
	echo "<input type=submit class=button value=\"Afficher le groupe\" OnClick=\"this.form.show.value=1\">";
314
	echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";
279
	else
315
	else
280
	echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"return formControl('newgroup');\">";
316
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newgroup');\">";
281
?>
317
?>
282
<br><br>
318
<br><br>
283
</form>
319
</form>
284
	</td></tr>
320
	</td></tr>
285
</table>
321
</table>