survey_seahorse

Software Engineering Project - Fall 2018
Log | Files | Refs | README

commit 0ee62e8bccde46e4e70b8817aa7be30e438c7809
parent ed8a1d41d48ee3872dc50989c332383fce969f36
Author: John Kubach <johnkubach@gmail.com>
Date:   Mon, 17 Dec 2018 15:09:45 -0500

addiotion admin message logging

Diffstat:
Mwebsite/res/admin-message.php | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/website/res/admin-message.php b/website/res/admin-message.php @@ -1,11 +1,14 @@ <?php +session_start(); ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); if (!empty($_POST['message'])) { + $uid = $_SESSION['uid']; + $username = $_SESSION['username']; $message = $_POST['message']; $var_str = var_export($message, true); - $var = "<?php\n\n\$message = $var_str;\n\n?>"; + $var = "<?php\n\n\$message = $var_str;\n\n\$uid = $uid;\n\n\$user = '$username';\n\n?>"; file_put_contents("txt/msg.php",$var); header("Location: ../controlpanel.php?msg=success"); } elseif (isset($_POST['remove'])) {