From b283598a07dfdd4e54f01f514b1bf8ae891b3a1d Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 21 Nov 2013 05:03:47 -0500
Subject: [PATCH] interface/web/dns/dns_wizard.php

---
 interface/web/content.php |   46 +++++++++++++++++++++++++---------------------
 1 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/interface/web/content.php b/interface/web/content.php
index 2e9bbc5..ea23f5a 100644
--- a/interface/web/content.php
+++ b/interface/web/content.php
@@ -1,7 +1,7 @@
 <?php
 
 /*
-Copyright (c) 2005, Till Brehm, projektfarm Gmbh
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
@@ -28,52 +28,56 @@
 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-require_once('../lib/config.inc.php');
-require_once('../lib/app.inc.php');
+require_once '../lib/config.inc.php';
+require_once '../lib/app.inc.php';
 
+/*
 $module = $_REQUEST["s_mod"];
 $page = $_REQUEST["s_pg"];
+*/
 
-if(!preg_match("/^[a-z]{0,20}$/i", $module)) die('module name contains unallowed chars.');
-if(!preg_match("/^[a-z]{0,20}$/i", $page)) die('module name contains unallowed chars.');
+$module = 'login';
+$page = 'index';
 
-if(is_file("$module/$page.php")) {
-	
-	include_once("$module/$page.php");
+if(!preg_match("/^[a-z]{2,20}$/i", $module)) die('module name contains unallowed chars.');
+if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('page name contains unallowed chars.');
+
+if(is_file(ISPC_WEB_PATH."/$module/$page.php")) {
+
+	include_once ISPC_WEB_PATH."/$module/$page.php";
 
 	$classname = $module.'_'.$page;
 	$page = new $classname();
-	
+
 	$content = $page->render();
 	if($page->status == 'OK') {
 		echo $content;
 	} elseif($page->status == 'REDIRECT') {
-		$target_parts = explode(':',$page->target);
+		$target_parts = explode(':', $page->target);
 		$module = $target_parts[0];
 		$page = $target_parts[1];
 		if(!preg_match("/^[a-z]{2,20}$/i", $module)) die('target module name contains unallowed chars.');
-		if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('target module name contains unallowed chars.');
-		
-		if(is_file("$module/$page.php")) {
-			include_once("$module/$page.php");
-			
+		if(!preg_match("/^[a-z]{2,20}$/i", $page)) die('target page name contains unallowed chars.');
+
+		if(is_file(ISPC_WEB_PATH."/$module/$page.php")) {
+			include_once ISPC_WEB_PATH."/$module/$page.php";
+
 			$classname = $module.'_'.$page;
 			$page = new $classname();
-			
+
 			$content = $page->render();
 			if($page->status == 'OK') {
 				echo $content;
 			}
 		}
-		
+
 	}
-	
+
 } elseif (is_array($_SESSION["s"]['user']) or is_array($_SESSION["s"]["module"])) {
 	// If the user is logged in, we try to load the default page of the module
-	die('hhhhh');
-	
+	die('- error -');
 } else {
 	die('Page does not exist.');
 }
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1