Git Codebase - Sn0wlink IT
Ticket Maker
Code:
Download ZIP
🗀 Tickets
🗀 admin
CODE_OF_CONDUCT.md
LICENSE
README.md
admin-screenshot.png
config.php
index.php
layout.php
style.php
success.php
text.php
ticket-layout.php
ticketmaker-screenshot.png
index.php
<?php // Pull in data include 'layout.php'; include 'config.php'; $username = ''; $email = ''; $problem = ''; if (isset($_POST['username'])) { $username = $_POST['username']; } if (isset($_POST['email'])) { $email = $_POST['email']; } if (isset($_POST['summary'])) { $summary = $_POST['summary']; } if (isset($_POST['problem'])) { $problem = $_POST['problem']; } include 'ticket-layout.php'; if ($_POST) { // Gets date and time $datetime= date("ymd-His"); // Open the folder and create file $ticketfile = fopen("Tickets/$datetime.txt", "w") or die("Failed!"); // Write to file and and close fwrite($ticketfile, $ticket); fclose($ticketfile); // the message $msg = "$username submitted a support request"; // send email mail("david486038@googlemail.com","Test Email",$msg); // Load sucess page header('Location: success.php'); } ?>