From 26e0ea79e031b62f8c4f10418c7c5ba78ac9a5d4 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Wed, 20 Nov 2024 05:36:49 -0700 Subject: [PATCH] Make sure links after login direct properly in mail/user/upload. --- Rocksolid_Light/spoolnews/mail.php | 11 ++-- Rocksolid_Light/spoolnews/upload.php | 29 +++++---- Rocksolid_Light/spoolnews/user.php | 96 +++++++++++++++++----------- 3 files changed, 80 insertions(+), 56 deletions(-) diff --git a/Rocksolid_Light/spoolnews/mail.php b/Rocksolid_Light/spoolnews/mail.php index 6d0afda..a3dabda 100644 --- a/Rocksolid_Light/spoolnews/mail.php +++ b/Rocksolid_Light/spoolnews/mail.php @@ -81,15 +81,14 @@ echo ''; if ($logged_in !== true) { echo '
'; echo ''; - echo ''; + echo ''; echo ''; - echo ''; echo ''; echo ''; echo ''; - echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -309,6 +308,7 @@ if (isset($_POST['command']) && $_POST['command'] == 'Send') { } $dbh = null; } + echo '
'; echo '

Send Message:

'; echo ""; echo ''; @@ -335,6 +335,7 @@ if (isset($_POST['command']) && $_POST['command'] == 'Send') { echo ""; echo ""; echo '
'; + echo '
'; } view_mailbox($user); @@ -346,7 +347,7 @@ function view_mailbox($user) $database = $spooldir . '/mail.db3'; $dbh = mail_db_open($database); echo '

My Messages:

'; - echo ''; + echo '
'; $query = $dbh->prepare('SELECT * FROM messages WHERE mail_from=:mail_from OR rcpt_to=:mail_from ORDER BY date DESC'); $query->execute([ 'mail_from' => $user diff --git a/Rocksolid_Light/spoolnews/upload.php b/Rocksolid_Light/spoolnews/upload.php index 441472e..8cab9af 100644 --- a/Rocksolid_Light/spoolnews/upload.php +++ b/Rocksolid_Light/spoolnews/upload.php @@ -23,7 +23,7 @@ if (! isset($_COOKIE['mail_auth'])) { } $logged_in = verify_logged_in(trim(strtolower($name))); -if(!$logged_in) { +if (!$logged_in) { if ((password_verify($name . $keys[0] . get_user_config($name, 'encryptionkey'), $_COOKIE['mail_auth'])) || (password_verify($name . $keys[1] . get_user_config($name, 'encryptionkey'), $_COOKIE['mail_auth']))) { $logged_in = true; } @@ -73,12 +73,12 @@ if (isset($_FILES['photo'])) { echo 'There was an error saving ' . $_FILES['photo']['name']; } } - ?> - +?> + '; - echo '
'; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; - echo ''; - echo ''; + echo ''; + echo ''; echo ''; - echo ''; + + echo ''; echo ''; echo ''; echo ''; @@ -123,4 +124,4 @@ if (! $logged_in && ! check_bbs_auth($_POST['username'], $_POST['password'])) { echo ''; echo ''; echo ''; -?> +?> \ No newline at end of file diff --git a/Rocksolid_Light/spoolnews/user.php b/Rocksolid_Light/spoolnews/user.php index 0e252bd..179276d 100644 --- a/Rocksolid_Light/spoolnews/user.php +++ b/Rocksolid_Light/spoolnews/user.php @@ -156,15 +156,17 @@ if (isset($_POST['username'])) { } } } + if ($logged_in !== true) { echo '
'; - echo ''; - echo ''; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; - echo ''; + echo ''; echo ''; - echo ''; + + echo ''; echo ''; echo ''; echo ''; @@ -383,24 +385,26 @@ if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'Configuration') { } // Show Config echo '

'; - echo ''; - echo ''; + echo '

Settings for ' . $_POST['username'] . ':

'; + echo ''; echo ''; - echo ''; + echo ''; if ($OVERRIDES['disable_change_name'] != true) { // User Display Name - echo ''; echo ''; // User Display Email - echo ''; + echo ''; echo ''; // Send Mail by Email if ($OVERRIDES['disable_mail_to_email'] !== true) { if (get_user_config($_POST['username'], 'email_verified') == 'true') { if ($email_address = get_user_config($_POST['username'], 'email')) { - echo ''; + echo ''; } // Signature - echo ''; - echo ''; echo ''; // X-Face if ($OVERRIDES['disable_xface'] != true) { - echo ''; + echo ''; + echo ''; $xflink = $config_dir . 'xface.txt'; if (file_exists($xflink)) { - echo ''; + echo ''; } - echo ''; } - echo ''; // Theme + echo ''; if (isset($user_config['theme']) && trim($user_config['theme']) != '') { - echo ''; + echo ''; } else { - echo ''; + echo ''; } - echo ''; + echo ''; + echo ''; - echo ''; + echo ''; + echo ''; + echo ''; + echo ''; - echo ''; - echo ''; echo ''; - echo ''; // Blocklist if ($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) { @@ -508,8 +525,11 @@ if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'Configuration') { $blocked_users_config = null; } } - echo ''; - echo '

Settings for ' . $_POST['username'] . ':

Display Name for posts:

'; + echo '

Display Name for posts:

'; echo '

Display Email for posts:

'; + echo '

Display Email for posts:

'; echo '

Send Mail to my Internet Email:

'; + echo '

Send Mail to my Internet Email:

'; if (! isset($user_config['send_mail_to_email'])) { $user_config['send_mail_to_email'] = 'false'; } @@ -425,28 +429,36 @@ if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'Configuration') { echo '

Signature:

X-Face:

X-Face:

' . file_get_contents($xflink) . '
' . file_get_contents($xflink) . '

Theme: (' . $user_config['theme'] . ')

Theme: (' . $user_config['theme'] . ')

Theme:

Theme:

'; + echo '
'; echo '

Subscriptions:

'; + echo '

Subscriptions:

'; echo ' While viewing section pages:
'; if ($user_config['hide_unsub'] == 'hide') { @@ -481,8 +496,11 @@ if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'Configuration') { echo ''; echo '

Subscribed groups:

Blocklist:

(you may only remove from this list)