Change link on page after posting to return to previous location

This commit is contained in:
Retro_Guy 2021-04-16 18:23:13 -07:00
parent 5c7c5e2396
commit 3b21c05889
4 changed files with 13 additions and 2 deletions

View File

@ -40,6 +40,11 @@
exit(0);
}
$location = $_SERVER['REQUEST_URI'].$_SERVER['REQUEST_STRING'];
preg_match('/id=(.*)&/', $location, $hash);
$_SESSION['return_page'] = $location.'#'.$hash[1];
if(isset($frames_on) && $frames_on === true) {
?>
<script>

View File

@ -27,6 +27,10 @@ if(isset($frames_on) && $frames_on === true) {
<?php
}
$location = $_SERVER['REQUEST_URI'].$_SERVER['REQUEST_STRING'];
preg_match('/id=(.*)&/', $location, $hash);
$_SESSION['return_page'] = $location.'#'.$hash[1];
$message=message_read($id,0,$group);
if (!$message) {
header ("HTTP/1.0 404 Not Found");

View File

@ -64,7 +64,6 @@ include $file_newsportal;
include "head.inc";
global $synchro_user,$synchro_pass;
// check to which groups the user is allowed to post to
$thisgroup=_rawurldecode($_REQUEST['group']);
if($testgroup) {
@ -260,7 +259,8 @@ if ($type=="post") {
echo 'Please wait '.round($wait).' minutes before posting again.<br />';
}
}
echo '<p><a href="'.$file_thread.'?group='.urlencode($returngroup[0]).'">'.$text_post["button_back"].'</a> '.$text_post["button_back2"].' '.group_display_name($returngroup[0]).'</p>';
// echo '<p><a href="'.$file_thread.'?group='.urlencode($returngroup[0]).'">'.$text_post["button_back"].'</a> '.$text_post["button_back2"].' '.group_display_name($returngroup[0]).'</p>';
echo '<p><a href="'.$_SESSION['return_page'].'">Back to Previous Page</a></p>';
} else {
// article not accepted by the newsserver
$type="retry";

View File

@ -47,6 +47,8 @@ if(isset($frames_on) && $frames_on === true) {
<?php
}
$_SESSION['return_page'] = $_SERVER['REQUEST_URI'].$_SERVER['REQUEST_STRING'];
echo '<a name="top"></a>';
echo '<h1 class="np_thread_headline">';