php-integration #21

Closed
fred.boniface wants to merge 146 commits from php-integration into main
Showing only changes of commit 46841c465e - Show all commits

View File

@ -16,6 +16,26 @@
<body> <body>
<?php
// define form variables and set to empty values (or to the UA)
$subject = $detail = "";
$ua_str = $_SERVER["HTTP_USER_AGENT"];
if ($_SERVER["REQUEST_METHOD"] == "POST" ) {
$subject = validate($_POST["subject"]);
$detail = validate($_POST["detail"]);
// ENTER CODE TO SUBMIT TO GITEA HERE
}
function validate($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<!-- Main Content Begins --> <!-- Main Content Begins -->
<img class="titleimg" src="/assets/title/title.webp"></img> <img class="titleimg" src="/assets/title/title.webp"></img>
@ -23,7 +43,7 @@
<p>Give as much detail as possible so we can try to fix the problem.</p> <p>Give as much detail as possible so we can try to fix the problem.</p>
<form action="/report-issue/submit.php" method="post"> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
Subject: Subject:
<br> <br>
<input type="text" name="subject"> <input type="text" name="subject">
@ -37,7 +57,10 @@
collected alongside the information you provide above and will be collected alongside the information you provide above and will be
posted to git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues. posted to git.fjla.uk/fred.boniface/athena.fb-infra.uk/issues.
<br> <br>
Your user agent is: <?php echo $_SERVER["HTTP_USER_AGENT"]; ?> <br>
Your user agent is:
<br>
<?php echo $ua_str; ?>
<br> <br>
<input type="submit"> <input type="submit">
</form> </form>