Subversion Repositories ALCASAR

Rev

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

Rev 1975 Rev 2005
Line 264... Line 264...
264
	$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
264
	$file_name = str_replace (".", "_",basename($_FILES['fichier_ip']['name']));
265
	if(!empty($file_name))
265
	if(!empty($file_name))
266
	{	
266
	{	
267
		$dest_dir = $dir_blacklist."ossi-wl-".$file_name;
267
		$dest_dir = $dir_blacklist."ossi-wl-".$file_name;
268
		exec ("mkdir $dest_dir");
268
		exec ("mkdir $dest_dir");
-
 
269
		$file=$_FILES['fichier_ip']['tmp_name'];
-
 
270
                exec("/usr/bin/dos2unix $file $file");
269
		if(move_uploaded_file($_FILES['fichier_ip']['tmp_name'], $dest_dir."/domains"))
271
		if(move_uploaded_file($_FILES['fichier_ip']['tmp_name'], $dest_dir."/domains"))
270
		{
272
		{
271
			touch ($dest_dir."/urls"); // create the URL file even if it isn't used
273
			touch ($dest_dir."/urls"); // create the URL file even if it isn't used
272
			file_put_contents ($wl_categories, $dest_dir."\n", FILE_APPEND);
274
			file_put_contents ($wl_categories, $dest_dir."\n", FILE_APPEND);
273
			file_put_contents ($wl_categories_enabled, "ossi-wl-".$file_name."\n", FILE_APPEND); //Enabled by default
275
			file_put_contents ($wl_categories_enabled, "ossi-wl-".$file_name."\n", FILE_APPEND); //Enabled by default