Skip to content

Commit

Permalink
2.11.22 Add first last name output
Browse files Browse the repository at this point in the history
  • Loading branch information
webpwnized committed Oct 8, 2024
1 parent 1302b04 commit 8a4a8a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
7 changes: 4 additions & 3 deletions src/set-up-database.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ function format($pMessage, $pLevel) {
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
<html lang="en" xml:lang="en">
<head>
<title>Set Up Database</title>
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="./styles/global-styles.css" />
</head>
<body>
Expand Down
34 changes: 17 additions & 17 deletions src/user-info.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
switch ($_SESSION["security-level"]){
default: // Default case: This code is insecure
case "0": // This code is insecure
$lEnableHTMLControls = FALSE;
$lEnableHTMLControls = false;
$lFormMethod = "GET";
$lEnableJavaScriptValidation = FALSE;
$lProtectAgainstMethodTampering = FALSE;
$lEncodeOutput = FALSE;
$lProtectAgainstPasswordLeakage = FALSE;
$lEnableJavaScriptValidation = false;
$lProtectAgainstMethodTampering = false;
$lEncodeOutput = false;
$lProtectAgainstPasswordLeakage = false;
break;

case "1": // This code is insecure
$lEnableHTMLControls = true;
$lFormMethod = "GET";
$lEnableJavaScriptValidation = true;
$lProtectAgainstMethodTampering = FALSE;
$lEncodeOutput = FALSE;
$lProtectAgainstPasswordLeakage = FALSE;
$lProtectAgainstMethodTampering = false;
$lEncodeOutput = false;
$lProtectAgainstPasswordLeakage = false;
break;

case "2":
Expand All @@ -35,7 +35,7 @@
break;
}//end switch

$lFormSubmitted = FALSE;
$lFormSubmitted = false;
if (isset($_POST["user-info-php-submit-button"]) || isset($_REQUEST["user-info-php-submit-button"])) {
$lFormSubmitted = true;
}// end if
Expand Down Expand Up @@ -63,7 +63,7 @@
echo "var lValidateInput = \"TRUE\"" . PHP_EOL;
}else{
echo "var lValidateInput = \"FALSE\"" . PHP_EOL;
}// end if
}// end if
?>

function onSubmitOfForm(/*HTMLFormElement*/ theForm){
Expand Down Expand Up @@ -168,7 +168,7 @@ function onSubmitOfForm(/*HTMLFormElement*/ theForm){

$lQueryResult = $SQLQueryHandler->getUserAccount($lUsername, $lPassword);

$lResultsFound = FALSE;
$lResultsFound = false;
$lRecordsFound = 0;
if (isset($lQueryResult->num_rows)){
if ($lQueryResult->num_rows > 0) {
Expand All @@ -182,11 +182,11 @@ function onSubmitOfForm(/*HTMLFormElement*/ theForm){
$lUsername = $Encoder->encodeForHTML($lUsername);
}// end if

echo ' <div class="report-header">
Results for &quot;<span style="color:#770000;">'
.$lUsername.
'</span>&quot;.'.$lRecordsFound.' records found.
</div>';
echo '<div class="report-header">
Results for &quot;<span style="color:#770000;">'
.$lUsername.
'</span>&quot;. '.$lRecordsFound.' records found.
</div>';

/* Print out results */
if ($lResultsFound){
Expand Down Expand Up @@ -225,5 +225,5 @@ function onSubmitOfForm(/*HTMLFormElement*/ theForm){
echo $CustomErrorHandler->FormatError($e, "Error attempting to display user information");
}// end try;

}// end if (isset($_POST))
}// end if (isset($_POST))
?>

0 comments on commit 8a4a8a7

Please sign in to comment.