<?
$fn = "/var/www/edit/restricted-sites.squid";
$content = stripslashes($_POST['content']);
$fp = fopen($fn,"w") or die ("Error opening file in write mode!");
fputs($fp,$content);
fclose($fp) or die ("Error closing file!");
$pmt = array("-", "\\", "|", "/" );
for( $i = 0; $i <40; $i ++ ){
sleep(1);
print "Ukládám a restartuji SQUID ".$pmt[$i % 4]."<br>\n";
ob_flush();
flush();
}
system ("/var/www/edit/restart_squid.sh");
sleep(4);
echo "<meta http-equiv=\"refresh\" content=\"0; /edit/form.php\" />\n";
