#!/usr/bin/perl #------------------------------------------------------------------------------ # mwForum - Web-based discussion forum # Copyright (c) 1999-2002 Markus Wichitill # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. #------------------------------------------------------------------------------ use strict; # Imports use MwfConfig; use MwfMain; #------------------------------------------------------------------------------ # Init init(); # Get CGI parameters my $cookie = cgiBool('cookie'); # Print HTTP header printHttpHeader(); # Check whether cookies work if ($cookie) { my $cookies = getCookies(); my $id = $cookies->{"$cfg{'forumId'}id"}; $id or userError($lng->{'errNoCookies'}); } # Update last read time if (!$user->{'default'}) { my $now = time(); my $query = " UPDATE users SET lastReadTime = $user->{'lastOnTime'} WHERE id = $user->{'id'}"; $dbh->do($query) or dbError(); } # Log action logAction(2, 'forum', 'enter', $user->{'id'}); # Redirect to main page redirect("forum_show.pl");