Initial commit
This commit is contained in:
commit
529efd53a1
140 changed files with 10310 additions and 0 deletions
109
squid-acl.php
Normal file
109
squid-acl.php
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
|
||||
# ver. 20070427-01
|
||||
|
||||
|
||||
include_once("./include/cfg-petar.php");
|
||||
include_once("./include/layout.php");
|
||||
include_once("./include/users.php");
|
||||
include_once("./include/cfg-squid.php");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-header.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-top.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<tr bgcolor=navy align=center>
|
||||
<td colspan=4><font color=yellow><b>configurazione acl squid</b></font></td>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
if ($check_pkg_install == true ) {
|
||||
|
||||
$result = shell_exec("pkg_info | grep squid ");
|
||||
if ( $result == "" ) {
|
||||
$errore .= "- squid non e' installato<br>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($errore) {
|
||||
|
||||
echo "<tr><td colspan=4><font color=red><b>Errori rilevati:<br>".$errore."</b></font></td></tr>".
|
||||
"<tr><td colspan=4>questo check puo' essere evitato settando la variabile <b>check_pkg_install=false</b> ".
|
||||
"in <b>include/cfg-squid.php</b></td></tr>";
|
||||
"</table>";
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if ( !$_REQUEST["step"] ){
|
||||
|
||||
echo "<FORM NAME=writeme ACTION=".$_SERVER["PHP_SELF"]." METHOD=POST>";
|
||||
|
||||
echo "<tr>".
|
||||
"<td><font color=green>IP abilitati ovunque:<p>".
|
||||
"<textarea name=good_users rows=20 cols=15>".
|
||||
file_get_contents($good_users_file).
|
||||
"</textarea>".
|
||||
"<td><font color=red>IP NON abilitati:<p>".
|
||||
"<textarea name=bad_users rows=20 cols=15>".
|
||||
file_get_contents($bad_users_file).
|
||||
"</textarea>".
|
||||
"<td><font color=navy>IP limitati:<p>".
|
||||
"<textarea name=middle_users rows=20 cols=15>".
|
||||
file_get_contents($middle_users_file).
|
||||
"</textarea>".
|
||||
"<td><font color=navy>Navigazione negata su:<p>".
|
||||
"<textarea name=middle_url rows=20 cols=15>".
|
||||
file_get_contents($middle_url_file).
|
||||
"</textarea>";
|
||||
|
||||
echo "<tr><font color=green><td align=center colspan=4>".
|
||||
"[ <a href='javascript:document.writeme.submit();'>Riscrivi ACL</a> ]".
|
||||
"<input type=hidden name=step value=2>".
|
||||
"</table><p></FORM>";
|
||||
}
|
||||
|
||||
if ( $_REQUEST["step"] == "2" ){
|
||||
|
||||
|
||||
$handle = fopen($good_users_file, "w");
|
||||
fwrite($handle,$_REQUEST["good_users"]);
|
||||
fclose($handle);
|
||||
|
||||
$handle = fopen($bad_users_file, "w");
|
||||
fwrite($handle,$_REQUEST["bad_users"]);
|
||||
fclose($handle);
|
||||
|
||||
$handle = fopen($middle_users_file, "w");
|
||||
fwrite($handle,$_REQUEST["middle_users"]);
|
||||
fclose($handle);
|
||||
|
||||
$handle = fopen($middle_url_file, "w");
|
||||
fwrite($handle,$_REQUEST["middle_url"]);
|
||||
fclose($handle);
|
||||
|
||||
echo "<tr><td>Scrittura Completata. Premi <a href=squid-acl.php>qui</a><br>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
|
||||
<?php require 'include/inc-footer.php';?>
|
||||
|
||||
<!-- ------------------------------------------------------------------------ -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue