Clean up some php warnings.

This commit is contained in:
Retro_Guy 2024-03-17 11:22:00 -07:00
parent ffb899d6e0
commit 50bd662e99
3 changed files with 13 additions and 8 deletions

View File

@ -1589,7 +1589,7 @@ function threads_db_open($database, $table = "threads")
echo 'Connection failed: ' . $e->getMessage();
exit();
}
$dbh->exec("CREATE TABLE IF NOT EXISTS $table(
$dbh->exec("CREATE TABLE IF NOT EXISTS threads(
id INTEGER PRIMARY KEY,
headers TEXT,
unique (headers))");
@ -1604,7 +1604,7 @@ function history_db_open($database, $table = 'history')
echo 'Connection failed: ' . $e->getMessage();
exit();
}
$dbh->exec("CREATE TABLE IF NOT EXISTS $table(
$dbh->exec("CREATE TABLE IF NOT EXISTS history(
id INTEGER PRIMARY KEY,
newsgroup TEXT,
number TEXT,
@ -1636,7 +1636,7 @@ function overview_db_open($database, $table = 'overview')
echo 'Connection failed: ' . $e->getMessage();
exit();
}
$dbh->exec("CREATE TABLE IF NOT EXISTS $table(
$dbh->exec("CREATE TABLE IF NOT EXISTS overview(
id INTEGER PRIMARY KEY,
newsgroup TEXT,
number TEXT,
@ -1672,7 +1672,7 @@ function article_db_open($database, $table = 'articles')
echo 'Connection failed: ' . $e->getMessage();
exit();
}
$dbh->exec("CREATE TABLE IF NOT EXISTS $table(
$dbh->exec("CREATE TABLE IF NOT EXISTS articles(
id INTEGER PRIMARY KEY,
newsgroup TEXT,
number TEXT UNIQUE,
@ -1967,7 +1967,7 @@ function get_user_mail_auth_data($user)
$userfile = $spooldir . '/' . $user . '-articleviews.dat';
if (is_file($userfile)) {
$userdata = unserialize(file_get_contents($userfile));
if (! $userdata['DO.NOT.DELETE']) {
if (isset($userdata['DO.NOT.DELETE'])) {
$userdata['DO.NOT.DELETE'] = time();
}
} else {

View File

@ -291,6 +291,9 @@ if (isset($_POST['sendMessage'])) {
}
}
if (isset($_POST['command']) && $_POST['command'] == 'Send') {
$mail_to = '';
$subject = '';
$message = '';
if (isset($_POST['id'])) {
$database = $spooldir . '/mail.db3';
$dbh = mail_db_open($database);
@ -336,7 +339,7 @@ view_mailbox($user);
// Show My Messages
function view_mailbox($user)
{
global $spooldir, $offset;
global $spooldir, $offset, $rslight_version;
$database = $spooldir . '/mail.db3';
$dbh = mail_db_open($database);
echo '<hr><h1 class="np_thread_headline">My Messages:</h1>';

View File

@ -198,6 +198,8 @@ if ($_POST['command'] != 'Configuration' && $_POST['command'] != 'SaveConfig') {
if (isset($_POST['source'])) {
$link = explode(':', $_POST['source']);
$golink = '<a href="' . $link[1] . '">Continue to ' . $link[0] . '</a>';
} else {
$golink = '';
}
echo "<center>";
echo "<hr><p>You are logged in as " . $_POST['username'] . "</p>";