TV Home Forum

Overnight Shutdown

(June 2001)

This site closed in March 2021 and is now a read-only archive
MJ
MJL
I noticed the forum is closed overnight...can you tell me what you installed to do this?
AS
Asa Admin
$report=0;

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# There is nothing further that should be modified unless you want to modify
# the logic of the script.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Print content header

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

# Look for over-ride via run-time parameter

$newrpt = $ARGV[0];
if ( $newrpt ) {
@parms = split(/=/, $newrpt);
$parms[0] =~ tr/a-z/A-Z/;
if ($parms[0] eq 'REPORT' ) {
$report=$parms[1];
}
else {
print '<b>invalid run-time parameter</b>n';
exit;
}
}

if ( $report > 3 ) {
print '<b>invalid Report value</b>n';
exit;
}

# Sample result returned by localtime: Sun Dec 1 04:59:12 1996
# See page 185 of the Camel book

$time=localtime;
@DATE = split(/[t ]+/, $time);
@UNITS = split(/:/, $DATE[3]);
$hours = $UNITS[0];
$minutes = $UNITS[1];
$seconds = $UNITS[2];

# Print the text without any accompanying HTML so the user can embellish it
# as desired on the front end.

if ($hours >= 1 ) {
#print 'AFTER OR EQUAL TO 1am!n';

if ($hours <= 7) {
#print 'CLOSED!n';
print '<body bgcolor=#2864D0><font color=#2864D0>n';
print 'document.writeln('<meta http-equiv=REFRESH content=1;URL=http://www.tvhome.co.uk/forum/nighttime.shtml>');n';
exit;
}
}

######

I just put that into forums.cgi Ikonboard file and voila! (The coding is scrappy, I'm not that good with nicking scripts and editing them!)

Cheers, Asa
SZ
Sub Zero
MJL posted:
I noticed the forum is closed overnight...can you tell me what you installed to do this?

I bet you wish you'd never asked!
Smile
MV
Mr Voiceover
But the Night-Time thingy is still functioning - does the TV Home forum think its ITV or something? Wink

Will we get the NT screen tonight???

Newer posts