forked from webpwnized/mutillidae
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hints-page-wrapper.php
executable file
·78 lines (67 loc) · 2.6 KB
/
hints-page-wrapper.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
try{
/* ------------------------------------------
* Constants used in application
* ------------------------------------------ */
require_once ('./includes/constants.php');
/* We use the session on this page */
if (!isset($_SESSION["security-level"])){
session_start();
$_SESSION["security-level"] = 0;
}// end if
/* ------------------------------------------
* initialize custom error handler
* ------------------------------------------ */
require_once (__ROOT__.'/classes/CustomErrorHandler.php');
if (!isset($CustomErrorHandler)){
$CustomErrorHandler =
new CustomErrorHandler(__ROOT__.'/owasp-esapi-php/src/', $_SESSION["security-level"]);
}// end if
/* ------------------------------------------
* initialize SQL Query Handler
* ------------------------------------------ */
require_once (__ROOT__.'/classes/SQLQueryHandler.php');
$SQLQueryHandler = new SQLQueryHandler(__ROOT__."/owasp-esapi-php/src/", $_SESSION["security-level"]);
/* ------------------------------------------
* initialize You Tube Video Handler Handler
* ------------------------------------------ */
require_once (__ROOT__.'/classes/YouTubeVideoHandler.php');
$YouTubeVideoHandler = new YouTubeVideoHandler("owasp-esapi-php/src/", $_SESSION["security-level"]);
if (isset($_REQUEST["level1HintIncludeFile"])) {
$lIncludeFileKey = $_REQUEST["level1HintIncludeFile"];
}else{
$lIncludeFileKey = 52; // hints-not-found.inc;
}// end if
$lIncludeFileRecord = $SQLQueryHandler->getLevelOneHelpIncludeFile($lIncludeFileKey);
if ($SQLQueryHandler->affected_rows()>0) {
$lRecord = $lIncludeFileRecord->fetch_object();
$lIncludeFile = $lRecord->level_1_help_include_file;
$lIncludeFileDescription = $lRecord->level_1_help_include_file_description;
}else{
$lIncludeFile = 'hint-not-found.inc';
$lIncludeFileDescription = 'Hint Not Found';
}// end if
} catch (Exception $e) {
echo $CustomErrorHandler->FormatError($e, $lQueryString);
}// end try;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="./styles/global-styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><?php echo $lIncludeFileDescription; ?></title>
</head>
<body>
<table class="hint-table">
<tr class="hint-header">
<td><?php echo $lIncludeFileDescription; ?></td>
</tr>
<tr>
<td class="hint-body">
<?php include_once ('./includes/hints/'.$lIncludeFile); ?>
</td>
</tr>
</table>
</body>
</html>