CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
	POSSIBILITY OF SUCH DAMAGE.
*/
$pgtitle = "Surftool: Log page";
require_once 'guiconfig.inc';
require_once 'notices.inc';
if (file_exists("/usr/local/pkg/surftool.inc")) {
    require_once "/usr/local/pkg/surftool.inc";
}
require_once 'surftool_class.inc';
//Read configuration
$surftool_config = parse_ini_file("surftool.ini");
$sgconf = new surftoolSquidGuardConf($surftool_config);
//Prepare GUI functions
$surftoolGUI = new surftoolGUI($sgconf);
//Read changes from POST-data
$change_msg = $surftoolGUI->changes();
# ------------------------------------------------------------------------------
# defines
# ------------------------------------------------------------------------------
$selfpath = "/surftool/surftool_set.php";
# ------------------------------------------------------------------------------
# functions
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# HTML Page
# ------------------------------------------------------------------------------
$closehead = false;
include "head.inc";
echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n";
Beispiel #2
0
$encoding = "ISO-8859-1";
mb_internal_encoding("{$encoding}");
require_once 'surftool_class.inc';
//Read configuration
$surftool_config = parse_ini_file("surftool.ini");
$debug = 1;
if (isset($config["debuglevel"])) {
    $debug = $config["debuglevel"];
}
$switchtime = 2;
if (isset($config["refresh_time"])) {
    $switchtime = $config["refresh_time"] + 1;
}
$sgconf = new surftoolSquidGuardConf($surftool_config);
//Prepare GUI functions
$surftoolGUI = new surftoolGUI($sgconf);
//Read changes from POST-data
$change_msg = $surftoolGUI->changes();
function print_header($surftoolGUI, $meta)
{
    echo "<head>\n";
    echo $surftoolGUI->get_java_script();
    echo $surftoolGUI->get_style();
    echo $meta;
    echo "\n</head>\n<body>\n";
}
if (!isset($_SESSION["login"])) {
    $meta = "<meta http-equiv='refresh' content='0; URL=index.php'>";
    print_header($surftoolGUI, $meta);
    echo "login first <a href='index.php'> weiter </a>";
    exit(0);