Subversion Repositories ALCASAR

Rev

Rev 1559 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1559 Rev 1578
Line 85... Line 85...
85
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
85
			$line ="\nuamdomain=\"" . trim($_POST['add_uamdomain']) . "\" #" . trim($_POST['add_domain_comment']);
86
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
86
			$pointeur=fopen(DOMAIN_ALLOWED_LIST,"a");
87
			fwrite ($pointeur, $line);
87
			fwrite ($pointeur, $line);
88
			fclose ($pointeur);
88
			fclose ($pointeur);
89
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
89
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
90
			exec ("sudo service chilli restart");
90
			exec ("sudo /usr/bin/systemctl restart chilli");
91
			}
91
			}
92
		}
92
		}
93
	break;
93
	break;
94
	case 'change_uamdomain' :
94
	case 'change_uamdomain' :
95
	$tab=file(DOMAIN_ALLOWED_LIST);
95
	$tab=file(DOMAIN_ALLOWED_LIST);
Line 118... Line 118...
118
				fwrite($pointeur,$ligne);
118
				fwrite($pointeur,$ligne);
119
				}
119
				}
120
			}
120
			}
121
		fclose($pointeur);
121
		fclose($pointeur);
122
		}
122
		}
123
	exec ("sudo service chilli restart");
123
	exec ("sudo /usr/bin/systemctl restart chilli");
124
	break;
124
	break;
125
	case 'new_ip' :
125
	case 'new_ip' :
126
	if (trim($_POST['add_ip']) != "") 
126
	if (trim($_POST['add_ip']) != "") 
127
		{
127
		{
128
		$tab=file(IP_ALLOWED_LIST);
128
		$tab=file(IP_ALLOWED_LIST);
Line 144... Line 144...
144
			$line ="\nuamallowed=\"" . trim($_POST['add_ip']) ."\" #" . trim($_POST['add_ip_comment']);
144
			$line ="\nuamallowed=\"" . trim($_POST['add_ip']) ."\" #" . trim($_POST['add_ip_comment']);
145
			$pointeur=fopen(IP_ALLOWED_LIST,"a");
145
			$pointeur=fopen(IP_ALLOWED_LIST,"a");
146
			fwrite ($pointeur, $line);
146
			fwrite ($pointeur, $line);
147
			fclose ($pointeur);
147
			fclose ($pointeur);
148
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
148
			exec ("sudo /usr/local/bin/alcasar-file-clean.sh");
149
			exec ("sudo service chilli restart");
149
			exec ("sudo /usr/bin/systemctl restart chilli");
150
			}
150
			}
151
		}
151
		}
152
	break;
152
	break;
153
	case 'change_ip' :
153
	case 'change_ip' :
154
	$tab=file(IP_ALLOWED_LIST);
154
	$tab=file(IP_ALLOWED_LIST);
Line 177... Line 177...
177
				fwrite($pointeur,$ligne);
177
				fwrite($pointeur,$ligne);
178
				}
178
				}
179
			}
179
			}
180
		fclose($pointeur);
180
		fclose($pointeur);
181
		}
181
		}
182
	exec ("sudo service chilli restart");
182
	exec ("sudo /usr/bin/systemctl restart chilli");
183
	break;
183
	break;
184
	}
184
	}
185
}
185
}
186
?>
186
?>
187
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>
187
<TABLE width="100%" border=0 cellspacing=0 cellpadding=0>