first commit

This commit is contained in:
2019-08-13 23:32:13 +02:00
commit 89ae9f3a3a
141 changed files with 168907 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
if(isset($_REQUEST ['sysType'], $_REQUEST ['sysID'], $_REQUEST ['location'], $_REQUEST ['rusername'], $_REQUEST ['requestype'])){
require_once "config.php";
// Escape user inputs for security
$sysID = mysqli_real_escape_string($link, $_REQUEST['sysType'].$_REQUEST['sysID']);
$location = mysqli_real_escape_string($link, $_REQUEST['location']);
$rusername = mysqli_real_escape_string($link, $_REQUEST['rusername']);
$remail = mysqli_real_escape_string($link, $_REQUEST['remail']);
$reason = mysqli_real_escape_string($link, $_REQUEST['reason']);
if($_REQUEST['requestype'] == 'other') {
$requestype = mysqli_real_escape_string($link, $_REQUEST['otherrequest']);
} else {
$requestype = mysqli_real_escape_string($link, $_REQUEST['requestype']);
}
// Attempt insert query execution
$sql = "INSERT INTO tickets (sysID, location, rusername, remail, reason, requestype ) VALUES ('$sysID', '$location', '$rusername', '$remail', '$reason', '$requestype')";
if(mysqli_query($link, $sql)){
echo "Records added successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
// Close connection
mysqli_close($link);
if($_REQUEST['backendreq'] == '1') {
header("location: ../../backend/tickets.php");
exit;
}
header("location: ../../thanks.html");
}
?>