Subversion Repositories ALCASAR

Rev

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

Rev 1326 Rev 1377
Line 3... Line 3...
3
//gestion de la langue
3
//gestion de la langue
4
if (is_file("../lib/langues.php"))
4
if (is_file("../lib/langues.php"))
5
	include("../lib/langues.php");
5
	include("../lib/langues.php");
6
 
6
 
7
require('/etc/freeradius-web/config.php');
7
require('/etc/freeradius-web/config.php');
8
if ($show == 1){
-
 
9
	header("Location: user_admin.php?login=$login");
-
 
10
	exit;
-
 
11
}
-
 
12
if($show == 2)
8
if($show == 2)
13
{
9
{
14
	header("Location: user_new2.php");
10
	header("Location: user_new2.php");
15
	exit;
11
	exit;
16
}
12
}
Line 35... Line 31...
35
/*Insertion du calendrier */
31
/*Insertion du calendrier */
36
	var dp_cal;      
32
	var dp_cal;      
37
window.onload = function () {
33
window.onload = function () {
38
	dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
34
	dp_cal  = new Epoch('epoch_popup','popup',document.getElementById('popup_container'));
39
};
35
};
40
/*Fin calendrier*/
-
 
41
function createTickets(arg){
-
 
42
	var nbtickets = prompt("Saisissez le nombre d'utilisateurs à créer", "");
-
 
43
	// On test la pression sur le boutton "annuler"
-
 
44
	if (nbtickets===null){
-
 
45
		alert('nbtickets===null');
-
 
46
		return false;
-
 
47
	}
-
 
48
	// On test la valeur saisie n'est pas un nombre
-
 
49
	if (isNaN(nbtickets)===true){
-
 
50
		return false;
-
 
51
	}	
-
 
52
	// Conversion en entier de nbtickets 
-
 
53
	nbtickets = parseInt(nbtickets)
-
 
54
	// Configuration et envoie du formulaire
-
 
55
	arg.nbtickets.value = nbtickets
-
 
56
	arg.action = "ticket_voucher.php";
-
 
57
	arg.submit();
-
 
58
	return true;
-
 
59
}
-
 
60
</script>
36
</script>
61
</head>
37
</head>
62
<body>
38
<body>
63
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
39
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
64
	<tr><th><?php  echo"$l_users_managment"; ?></th></tr>
40
	<tr><th><?php  echo"$l_users_managment"; ?></th></tr>
Line 103... Line 79...
103
if ($create == 1){
79
if ($create == 1){
104
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
80
	if (is_file("../lib/$config[general_lib_type]/user_info.php"))
105
		include("../lib/$config[general_lib_type]/user_info.php");
81
		include("../lib/$config[general_lib_type]/user_info.php");
106
	if ($user_exists != "no"){
82
	if ($user_exists != "no"){
107
		echo <<<EOM
83
		echo <<<EOM
108
<b><i>$login</i> $l_user_exist</b>
84
<b><i>$login</i> $l_user_exists</b>
109
EOM;
85
EOM;
110
	}
86
	}
111
	else{
87
	else{
112
		if (is_file("../lib/$config[general_lib_type]/create_user.php"))
88
		if (is_file("../lib/$config[general_lib_type]/create_user.php"))
113
			include("../lib/$config[general_lib_type]/create_user.php");
89
			include("../lib/$config[general_lib_type]/create_user.php");
Line 162... Line 138...
162
      <input type=hidden name=create value="0">
138
      <input type=hidden name=create value="0">
163
      <input type=hidden name=show value="0">
139
      <input type=hidden name=show value="0">
164
	  <input type=hidden name=langue_imp value='fr'>
140
	  <input type=hidden name=langue_imp value='fr'>
165
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
141
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
166
<?php 
142
<?php 
-
 
143
if($create==0){
167
	echo <<<EOM
144
	echo <<<EOM
168
	<tr>
145
	<tr>
169
		<td class="etiquette" colspan=$colspan>
146
		<td class="etiquette" colspan=$colspan>
170
		$l_login
147
		$l_login
171
		</td><td>
148
		</td><td>
Line 258... Line 235...
258
			case 'Expiration' :
235
			case 'Expiration' :
259
				$advanced=1;
236
				$advanced=1;
260
				$help_link="help/expiration_help.html";
237
				$help_link="help/expiration_help.html";
261
				$desc=$l_expiration;
238
				$desc=$l_expiration;
262
				break;
239
				break;
-
 
240
			case 'Filter-Id' :
-
 
241
				$advanced=1;
-
 
242
				$help_link="help/filtering_help.html";
-
 
243
				$desc=$l_filtering;
-
 
244
				break;
263
			default:
245
			default:
264
				$advanced=1;
246
				$advanced=1;
265
				break;
247
				break;
266
		}
248
		}
267
		if ($show_ops && $advanced){
249
		if ($show_ops && $advanced){
Line 279... Line 261...
279
				case 'Max-Monthly-Session' :
261
				case 'Max-Monthly-Session' :
280
				case 'Login-Time' : 
262
				case 'Login-Time' : 
281
				case 'Expiration' :
263
				case 'Expiration' :
282
					echo "<input type=\"hidden\" name=$oper_name value=\":=\">";
264
					echo "<input type=\"hidden\" name=$oper_name value=\":=\">";
283
					break;
265
					break;
-
 
266
				case 'Filter-Id' :
-
 
267
					echo "<input type=\"hidden\" name=$oper_name value=\":=\">";
-
 
268
					break;
284
				case 'Session-Timeout' :
269
				case 'Session-Timeout' :
285
				case 'ChilliSpot-Max-Input-Octets' :
270
				case 'ChilliSpot-Max-Input-Octets' :
286
				case 'ChilliSpot-Max-Output-Octets' :
271
				case 'ChilliSpot-Max-Output-Octets' :
287
				case 'ChilliSpot-Max-Total-Octets' :
272
				case 'ChilliSpot-Max-Total-Octets' :
288
				case 'ChilliSpot-Bandwidth-Max-Up' :
273
				case 'ChilliSpot-Bandwidth-Max-Up' :
Line 358... Line 343...
358
					/*Pré-remplissage avec la date du lendemain*/
343
					/*Pré-remplissage avec la date du lendemain*/
359
					$val=date("d F Y",strtotime("+1 day"));//<--en commentant cette ligne la valeur n'est plus pré-remplie
344
					$val=date("d F Y",strtotime("+1 day"));//<--en commentant cette ligne la valeur n'est plus pré-remplie
360
					/*Ajout du calendrier pour choisir la date*/
345
					/*Ajout du calendrier pour choisir la date*/
361
					echo"<input id=\"popup_container\" type=text name=\"$name\" value=\"$val\" size=20>";
346
					echo"<input id=\"popup_container\" type=text name=\"$name\" value=\"$val\" size=20>";
362
					break;
347
					break;
-
 
348
				case 'Filter-Id' :
-
 
349
					echo "<select name='Filter-Id'>";
-
 
350
					echo "<option>$l_filtering_none</option>";
-
 
351
					echo "<option value=\"00000001\">$l_filtering_havp</option>";
-
 
352
					echo "<option value=\"00000011\">$l_filtering_havp_bl</option>";
-
 
353
					echo "<option value=\"00000101\">$l_filtering_havp_wl</option>";
-
 
354
					echo "</select>";
-
 
355
					break;
363
				default :
356
				default :
364
					if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>";
357
					if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>";
365
					break;
358
					break;
366
			}
359
			}
367
		}else{
-
 
368
		/*Pas de gestion de remplissage lors de la visualisation*/
-
 
369
			if ($advanced) echo"<input type=text name=\"$name\" value=\"$val\" size=20>";
-
 
370
		
-
 
371
/*fin Ajout*/
-
 
372
		}
360
		}
373
	}
361
	}
374
if ($create==0){
-
 
375
	print <<<EOM
362
	print <<<EOM
376
	<tr>
363
	<tr>
377
		<td class="etiquette" colspan=$colspan>
364
		<td class="etiquette" colspan=$colspan>
378
			$l_lang_ticket
365
			$l_lang_ticket
379
		</td>
366
		</td>
Line 387... Line 374...
387
			<option value=\"de\" >Deutsch</option>
374
			<option value=\"de\" >Deutsch</option>
388
			<option value=\"es\" >Espa&ntilde;ol</option>
375
			<option value=\"es\" >Espa&ntilde;ol</option>
389
			<option value=\"it\" >Italiano</option>
376
			<option value=\"it\" >Italiano</option>
390
			<option value=\"pt\" >Portugês</option>
377
			<option value=\"pt\" >Portugês</option>
391
		</select></td></tr>";	
378
		</select></td></tr>";	
392
	}
379
}
393
echo "</table><BR>";
380
echo "</table>";
394
if($create == 1)
381
if($create == 1)
395
{
382
{
396
	echo "<a href=\"ticket.pdf\">Ticket</a><br>";
383
	echo "<a href=\"ticket.pdf\">Ticket</a><br/><br/>";
397
	echo "<input type=submit class=button value=\"$l_show_profile\" OnClick=\"this.form.show.value=1\">";
384
	echo "<center><a href=\"user_admin.php?login=$login\">$l_show_profile</a></center>";
398
}
385
}
399
else
386
else
400
{
387
{
401
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
388
	echo "<input type=submit class=button value=\"$l_create\" OnClick=\"return formControl('newuser');\">";
402
	echo "<input type='hidden' name='nbtickets' value=''>";
389
	echo "<input type='hidden' name='nbtickets' value=''>";
403
	echo "<input type=submit class=button value=\"$l_advanced_menu\" style=\"float: right;\" OnClick=\"this.form.show.value=2\">";
390
	echo "<input type=submit class=button value=\"$l_advanced_menu\" style=\"float: right;\" OnClick=\"this.form.show.value=2\">";
404
	echo "<br>$l_or :<br>";
391
	echo "<br>$l_or :<br>";
405
	echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form);\">";
392
	echo "<input type=button class=button value=\"$l_create_multiple\" OnClick=\"return createTickets(this.form, '$l_createTicketsMSG');\">";
406
	echo $l_create_multiple_comment;
393
	echo $l_create_multiple_comment;
407
}
394
}
408
?>
395
?>
409
</form>
396
</form>
410
</td></tr>
397
</td></tr>