Subversion Repositories ALCASAR

Rev

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

Rev 2857 Rev 2952
Line 101... Line 101...
101
					}
101
					}
102
				}
102
				}
103
			}
103
			}
104
		if ($insert == true) 
104
		if ($insert == true) 
105
			{
105
			{
-
 
106
			if (trim($_POST['add_domain_comment']))
-
 
107
			{			
106
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
108
				$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
-
 
109
			}
-
 
110
			else
-
 
111
			{
-
 
112
				$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\"";
-
 
113
			}
107
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
114
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
108
			fwrite ($pointeur, $line);
115
			fwrite ($pointeur, $line);
109
			fclose ($pointeur);
116
			fclose ($pointeur);
110
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
117
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh"); # Clean & sort conf files. Add uamallowed domains to the dns-blackhole conf
111
			sleep (1); # be sure that dnsmasq-blackhole is restarted before killing tun0 ! 
118
			sleep (1); # be sure that dnsmasq-blackhole is restarted before killing tun0 !