Add unsubscribe link to subscribed groups
This commit is contained in:
parent
e7f232d7ac
commit
d28ba18c47
|
@ -683,7 +683,7 @@ table.np_results_table {
|
|||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-highlight);
|
||||
color: var(--color-highlight) !important;
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
|
|
|
@ -683,7 +683,7 @@ table.np_results_table {
|
|||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-highlight);
|
||||
color: var(--color-highlight) !important;
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
|
|
|
@ -683,7 +683,7 @@ table.np_results_table {
|
|||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-highlight);
|
||||
color: var(--color-highlight) !important;
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
|
|
|
@ -683,7 +683,7 @@ table.np_results_table {
|
|||
margin-bottom: 10;
|
||||
margin-right: 10;
|
||||
text-decoration: none;
|
||||
color: var(--color-highlight);
|
||||
color: var(--color-highlight) !important;
|
||||
text-align: left;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 1em;
|
||||
|
|
|
@ -41,6 +41,22 @@ echo '<table cellpadding="0" cellspacing="0" class="np_buttonbar"><tr>';
|
|||
|
||||
include("$file_newsportal");
|
||||
flush();
|
||||
if(isset($_GET['unsub'])) {
|
||||
if(isset($_COOKIE['mail_name'])) {
|
||||
if($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) {
|
||||
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||
$newsubs = array();
|
||||
foreach($userdata as $key => $usertime) {
|
||||
if($key !== $_GET['unsub']) {
|
||||
$newsubs[$key] = $usertime;
|
||||
}
|
||||
}
|
||||
$userfile=$spooldir.'/'.strtolower($_COOKIE['mail_name']).'-articleviews.dat';
|
||||
file_put_contents($userfile, serialize($newsubs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$newsgroups=groups_read($server,$port);
|
||||
echo '<div class="np_index_groups">';
|
||||
if(isset($frames_on) && $frames_on === true) {
|
||||
|
|
|
@ -621,9 +621,12 @@ function groups_show($gruppen) {
|
|||
$lastarticleinfo->date = 0;
|
||||
}
|
||||
if(isset($userdata[$g->name])) {
|
||||
$groupdisplay.='</span><p class="np_group_desc">';
|
||||
$groupdisplay.='<a class="np_group_desc" href="index.php?unsub='.$g->name.'">(unsubscribe)</a>';
|
||||
if($userdata[$g->name] < $lastarticleinfo->date) {
|
||||
$groupdisplay.='</span><p class="np_group_desc"><a href="overboard.php?thisgroup='._rawurlencode($g->name).'&time='.$userdata[$g->name].'">(new)</a></p>';
|
||||
}
|
||||
$groupdisplay.='<a href="overboard.php?thisgroup='._rawurlencode($g->name).'&time='.$userdata[$g->name].'">(new)</a> ';
|
||||
}
|
||||
$groupdisplay.='</p';
|
||||
}
|
||||
/* Display article count */
|
||||
$groupdisplay.='</td><td class="'.$lineclass.'">';
|
||||
|
|
Loading…
Reference in New Issue