$filename=$_GET['filename']; $lang=$_GET['lang']; $sub=$_GET['sub']; if(!(isset($lang))) $lang="de"; if(!(isset($filename))) $filename="main"; if(!(isset($sub))) $sub=0; if (!isset($filename) || $filename=="" || $filename== "/") { $filename="main"; } //security check $valid_pages = array( "main" => "", "news" => "", "knowhow" => "", "agb" => "", "betrieb" => "", "suche" => "", "leistungen" => "", "kontakt" => "", "fernw" => "", "fachbuecher" => "", "mitarbeiter" => ""); if ( (!isset($valid_pages[$filename]))) { // Abort the script // You should probably write a log message here too $log_file = "secure/ip_log.txt"; $remoteIP=getenv('REMOTE_ADDR'); $date = date("Y-m-d@H:m"); $logentry= $date." : " .$remoteIP." : parameters: ".$filename." \r\n"; $fp = fopen("$log_file", "a"); fputs($fp, "$logentry"); flock($fp, 3); fclose($fp); die("Invalid request, Your Ip was logged for security reasons"); } ?>
require("top.php");?> | |
require("top_language.php");?> | |
require("submenu.php");?> | |
require("menu.php");?> | ">
require($filename.".php");?> |