Subversion Repositories ALCASAR

Rev

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

Rev 40 Rev 113
Line 59... Line 59...
59
  var pass=''
59
  var pass=''
60
  while(pass.length < size)
60
  while(pass.length < size)
61
  {
61
  {
62
    pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
62
    pass+=chars.charAt(Math.round(Math.random() * (chars.length)))
63
  }
63
  }
64
  document.form1.passwd.value=pass
64
  document.newuser.passwd.value=pass
65
  document.form1.pwdgene.value=pass
65
  document.newuser.pwdgene.value=pass
-
 
66
}
-
 
67
function formControl(){
-
 
68
	var myregex = /[\S]+/gi; //un ou plusieurs caractères non blanc" (tous les caractères sauf espace, retour chariot, tabulation, saut de ligne, saut de page).
-
 
69
	if (myregex.test(document.newuser.login.value)){
-
 
70
		document.newuser.create.value=1;
-
 
71
		return true;
-
 
72
	} else {
-
 
73
		alert("Votre identifiant est invalide.");//non internationnalisé
-
 
74
		return false;
-
 
75
	}
66
}
76
}
67
</script>
77
</script>
68
</head>
78
</head>
69
<body>
79
<body>
70
 
80
 
Line 111... Line 121...
111
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
121
		if (is_file("../lib/$config[general_lib_type]/user_info.php"))
112
			include("../lib/$config[general_lib_type]/user_info.php");
122
			include("../lib/$config[general_lib_type]/user_info.php");
113
	}
123
	}
114
}
124
}
115
?>
125
?>
116
   <form name="form1" method=post>
126
   <form name="newuser" method=post>
117
      <input type=hidden name=create value="0">
127
      <input type=hidden name=create value="0">
118
      <input type=hidden name=show value="0">
128
      <input type=hidden name=show value="0">
119
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
129
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
120
<?php
130
<?php
121
	echo <<<EOM
131
	echo <<<EOM
Line 237... Line 247...
237
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
247
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
238
						break;
248
						break;
239
					case 'Max-Monthly-Session' :
249
					case 'Max-Monthly-Session' :
240
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
250
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\":=\">:=";
241
						break;
251
						break;
-
 
252
					case 'ChilliSpot-Max-Input-Octets' :
-
 
253
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
254
						break;
-
 
255
					case 'ChilliSpot-Max-Output-Octets' :
-
 
256
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
257
						break;
-
 
258
					case 'ChilliSpot-Max-Total-Octets' :
-
 
259
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
260
						break;
-
 
261
					case 'ChilliSpot-Bandwidth-Max-Up' :
-
 
262
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
263
						break;
-
 
264
					case 'ChilliSpot-Bandwidth-Max-Down' :
-
 
265
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
266
						break;
-
 
267
					case 'WISPr-Redirection-URL' :
-
 
268
						echo "<td><select name=$oper_name><option $selected[$op_eq] value=\"=\">=";
-
 
269
						break;
242
					default :
270
					default :
243
						print <<<EOM
271
						print <<<EOM
244
<td>
272
<td>
245
<select name=$oper_name>
273
<select name=$oper_name>
246
<option $selected[$op_eq] value="=">=
274
<option $selected[$op_eq] value="=">=
Line 271... Line 299...
271
	}
299
	}
272
echo "</table><BR>";
300
echo "</table><BR>";
273
if ($create == 1)
301
if ($create == 1)
274
	echo "<input type=submit class=button value=\"Afficher le profil de l'utilisateur\" OnClick=\"this.form.show.value=1\">";
302
	echo "<input type=submit class=button value=\"Afficher le profil de l'utilisateur\" OnClick=\"this.form.show.value=1\">";
275
	else{
303
	else{
276
	echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"this.form.create.value=1\">";}
304
	//echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"this.form.create.value=1\">";}
-
 
305
	echo "<input type=submit class=button value=\"Cr&eacute;er\" OnClick=\"return formControl();\">";}
277
?>
306
?>
278
</form>
307
</form>
279
	</td></tr>
308
	</td></tr>
280
</table>
309
</table>
281
</tr>
310
</tr>