From 1f9344bbe9ce092522b4765ecf5a30764d273500 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sat, 13 Nov 2021 04:37:33 +0000 Subject: [PATCH] Minor code cleanup in mail.php and user.php --- Rocksolid_Light/spoolnews/mail.php | 7 ++++--- Rocksolid_Light/spoolnews/user.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Rocksolid_Light/spoolnews/mail.php b/Rocksolid_Light/spoolnews/mail.php index b84e998..b9a51d0 100644 --- a/Rocksolid_Light/spoolnews/mail.php +++ b/Rocksolid_Light/spoolnews/mail.php @@ -13,7 +13,6 @@ include "newsportal.php"; $keyfile = $spooldir.'/keys.dat'; $keys = unserialize(file_get_contents($keyfile)); -include "head.inc"; // How long should cookie allow user to stay logged in? // 14400 = 4 hours @@ -42,6 +41,8 @@ include "head.inc"; $logged_in = true; } } +include "head.inc"; + echo '

'; echo 'mail / '; @@ -77,7 +78,7 @@ if(isset($_POST['username'])) { $name = $_POST['username']; // Save name in cookie if ($setcookies==true) { - setcookie("mail_name",stripslashes($name),time()+(3600*24*90)); + setcookie("mail_name",stripslashes($name),time()+(3600*24*90),"/"); } } else { if ($setcookies) { @@ -176,7 +177,7 @@ echo ''; $dbh = null; } - if (isSet($_POST['sendMessage'])) { + if (isset($_POST['sendMessage'])) { if (isSet($_POST['to']) && $_POST['to'] != '' && isSet($_POST['from']) && $_POST['from'] != '' && isSet($_POST['message']) && $_POST['message'] != '') { if(($to = get_config_value('aliases.conf', strtolower($_POST['to']))) == false) { $to = strtolower($_POST['to']); diff --git a/Rocksolid_Light/spoolnews/user.php b/Rocksolid_Light/spoolnews/user.php index 95825a4..fb08899 100644 --- a/Rocksolid_Light/spoolnews/user.php +++ b/Rocksolid_Light/spoolnews/user.php @@ -64,7 +64,7 @@ echo ''; if($logged_in == true) { echo '
'; echo '
'; - echo ''; + echo ''; echo ""; echo ""; echo '';