Subversion Repositories ALCASAR

Rev

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

Rev 584 Rev 587
Line 26... Line 26...
26
  $l_db_import = "Importer à partir d'une sauvegarde de la base d'usagers (format SQL)";
26
  $l_db_import = "Importer à partir d'une sauvegarde de la base d'usagers (format SQL)";
27
  $l_db_import_help = "Afin de pouvoir imputer les dernière traces de connexion, une sauvegarde de la base actuelle sera automatiquement réalisée.";
27
  $l_db_import_help = "Afin de pouvoir imputer les dernière traces de connexion, une sauvegarde de la base actuelle sera automatiquement réalisée.";
28
  $l_db_reset = "Remise à zéro de la base usagers";
28
  $l_db_reset = "Remise à zéro de la base usagers";
29
  $l_error_ext_txt = "Erreur! Veuillez sélectionner un fichier de type csv ou txt";
29
  $l_error_ext_txt = "Erreur! Veuillez sélectionner un fichier de type csv ou txt";
30
  $l_error_ext_sql = "Erreur! Veuillez sélectionner un fichier de type sql";
30
  $l_error_ext_sql = "Erreur! Veuillez sélectionner un fichier de type sql";
-
 
31
  $l_group_empty = "La liste des groupes est vide";
31
}
32
}
32
else {
33
else {
33
  $l_title = "Users import";
34
  $l_title = "Users import";
34
  $l_database_state ="State of the database : number of groups =";
35
  $l_database_state ="State of the database : number of groups =";
35
  $l_number_of_users = "Number of users";
36
  $l_number_of_users = "Number of users";
Line 43... Line 44...
43
  $l_db_import = "Import from a saved users database file (SQL format)";
44
  $l_db_import = "Import from a saved users database file (SQL format)";
44
  $l_db_import_help = "In order to impute the last connections, the actual users database will be automaticly saved.";
45
  $l_db_import_help = "In order to impute the last connections, the actual users database will be automaticly saved.";
45
  $l_db_reset = "Reset the users database";
46
  $l_db_reset = "Reset the users database";
46
  $l_error_ext_txt = "Error! Please select a txt or csv file";
47
  $l_error_ext_txt = "Error! Please select a txt or csv file";
47
  $l_error_ext_sql = "Error! Please select a sql file";
48
  $l_error_ext_sql = "Error! Please select a sql file";
-
 
49
  $l_group_empty = "The group list is empty";
48
}
50
}
49
function getImportFileList(){
51
function getImportFileList(){
50
	$importFile = array();
52
	$importFile = array();
51
	if ($handle = opendir('/tmp')) {
53
	if ($handle = opendir('/tmp')) {
52
		while (false !== ($file = readdir($handle))) {
54
		while (false !== ($file = readdir($handle))) {
Line 251... Line 253...
251
echo "$l_text_import_help<br>";
253
echo "$l_text_import_help<br>";
252
echo "<tr><td valign=\"middle\" align=\"left\">";
254
echo "<tr><td valign=\"middle\" align=\"left\">";
253
echo "<br><FORM action='$_SERVER[PHP_SELF]' method=POST ENCTYPE=\"multipart/form-data\">";
255
echo "<br><FORM action='$_SERVER[PHP_SELF]' method=POST ENCTYPE=\"multipart/form-data\">";
254
echo "$l_file (.txt) : <input type=\"file\" name=\"import-users\"><br>";
256
echo "$l_file (.txt) : <input type=\"file\" name=\"import-users\"><br>";
255
echo "$l_users_service : <input type=\"input\" name=\"service\" value=\"\"><br>";
257
echo "$l_users_service : <input type=\"input\" name=\"service\" value=\"\"><br>";
-
 
258
echo "$l_users_group : ";
-
 
259
require("../lib/defaults.php");
-
 
260
include_once("../lib/$config[general_lib_type]/group_info.php");
-
 
261
if (isset($existing_groups)){
256
echo "$l_users_group : <input type=\"input\" name=\"groupe\" value=\"\"><br>";
262
	echo "<select name=\"groupe\">";
-
 
263
	echo "<option value=\"\" selected>";
-
 
264
	foreach ($member_groups as $group)
-
 
265
		echo "<option value=\"$group\">$group\n";
-
 
266
	echo " </select>";
-
 
267
	}
-
 
268
else echo "$l_group_empty";
-
 
269
echo "<br>";
257
echo "<input type='hidden' name='choix' value='csv'>";
270
echo "<input type='hidden' name='choix' value='csv'>";
258
if (($choix == "csv") && isset($result)) echo "<b>".$result."</b><BR>";
271
if (($choix == "csv") && isset($result)) echo "<b>".$result."</b><BR>";
259
echo "<input type=\"submit\" value=\"$l_send\">";
272
echo "<input type=\"submit\" value=\"$l_send\">";
260
echo "</FORM></td>";
273
echo "</FORM></td>";
261
echo "<td>";
274
echo "<td>";