rocksolid-light/Rocksolid_Light/rocksolid/index.php

74 lines
2.4 KiB
PHP
Raw Normal View History

<?php
2020-11-29 01:55:31 +01:00
session_start();
2023-08-04 15:49:48 +02:00
2020-11-29 01:55:31 +01:00
$_SESSION['isframed'] = 1;
include "config.inc.php";
include "auth.inc";
2020-11-29 01:55:31 +01:00
if (isset($frames_on) && $frames_on === true) {
?>
2020-11-29 01:55:31 +01:00
<script>
var contentURL=window.location.pathname+window.location.search+window.location.hash;
if ( window.self !== window.top ) {
/* Great! now we move along */
} else {
window.location.href = '../index.php?menu='+encodeURIComponent(contentURL);
}
top.history.replaceState({}, 'Title', 'index.php?content='+encodeURIComponent(contentURL));
</script>
<?php
}
$title .= ' - ' . basename(getcwd());
2020-11-29 01:55:31 +01:00
include "head.inc";
echo '<h1 class="np_thread_headline">' . basename(getcwd()) . '</h1>';
2020-11-29 01:55:31 +01:00
echo '<table cellpadding="0" cellspacing="0" class="np_buttonbar"><tr>';
// View Latest button
if (isset($overboard) && ($overboard == true)) {
2020-11-29 01:55:31 +01:00
echo '<td>';
echo '<form target="' . $frame['content'] . '" action="overboard.php">';
echo '<button class="np_button_link" type="submit">' . $text_thread["button_overboard"] . '</button>';
2020-11-29 01:55:31 +01:00
echo '</form>';
echo '</td>';
} else {
// echo htmlspecialchars($CONFIG['title_full']);
}
2020-11-29 01:55:31 +01:00
// Search button
echo '<td>';
echo '<form target="' . $frame['content'] . '" action="search.php">';
echo '<button class="np_button_link" type="submit">' . $text_thread["button_search"] . '</button>';
echo '</form>';
echo '</td>';
echo '<td width=100%></td></tr></table>';
2020-11-29 01:55:31 +01:00
include ("$file_newsportal");
2020-11-29 01:55:31 +01:00
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);
2020-11-29 01:55:31 +01:00
echo '<div class="np_index_groups">';
if (isset($frames_on) && $frames_on === true) {
groups_show_frames($newsgroups);
2020-11-29 01:55:31 +01:00
} else {
groups_show($newsgroups);
2020-11-29 01:55:31 +01:00
}
echo '</div>';
$sessions_data = file_get_contents($spooldir . '/sessions.dat');
echo '<h1 class="np_thread_headline">' . $sessions_data . '</h1>';
2020-11-29 01:55:31 +01:00
include "tail.inc";
?>