-
Notifications
You must be signed in to change notification settings - Fork 0
/
styling-frame.php
executable file
·59 lines (50 loc) · 1.81 KB
/
styling-frame.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
try{
switch ($_SESSION["security-level"]){
case "0": // This code is insecure
case "1": // This code is insecure
$lProtectAgainstMethodTampering = FALSE;
$lEncodeOutput = FALSE;
break;
case "2":
case "3":
case "4":
case "5": // This code is fairly secure
$lProtectAgainstMethodTampering = TRUE;
$lEncodeOutput = TRUE;
break;
};//end switch
$lParameterSubmitted = FALSE;
if (isset($_GET["page-to-frame"]) || isset($_POST["page-to-frame"]) || isset($_REQUEST["page-to-frame"])) {
$lParameterSubmitted = TRUE;
}// end if
$lPageToFrame = "styling.php?page-title=Styling+with+Mutillidae";
if ($lParameterSubmitted){
if ($lProtectAgainstMethodTampering) {
$lPageToFrame = $_GET["page-to-frame"];
}else{
$lPageToFrame = $_REQUEST["page-to-frame"];
};// end if $lProtectAgainstMethodTampering
if($lEncodeOutput){
$lPageToFrame = $Encoder->encodeForHTML($lPageToFrame);
};// end if
};// end if $lFormSubmitted
try {
$LogHandler->writeToLog("Styling Frame: Framing URL " . $lPageToFrame . " based on user choice.");
} catch (Exception $e) {
//Do nothing. Do not interrupt page for failed log attempt.
}//end try
} catch (Exception $e) {
echo $CustomErrorHandler->FormatError($e, $lQueryString);
};// end try;
?>
<?php include_once (__SITE_ROOT__.'/includes/back-button.inc');?>
<?php include_once (__SITE_ROOT__.'/includes/hints/hints-menu-wrapper.inc'); ?>
<!-- Note: To encourage IE into compatibility mode add the following
meta tag into the HTML head section -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<iframe src="<?php echo $lPageToFrame; ?>"
style="margin-left:auto; margin-right:auto; border:none; overflow:hidden;"
PathRelativeStylesheetInjectionArea="1"
width="100%" height="600px"
></iframe>