#!/usr/bin/perl ###################################################### ## ## ## AreaBoard ## ## ## ## Area-based message board system ## ## ## ## (c) 2000, Uplink Productions ## ## uplink@uplink.com.au ## ## www.uplink.com.au ## ## ## ## Australian-made software. ## ## ## ## See Readme.txt for installation/setup details. ## ## ## ###################################################### #------------ do not edit below this line ------------ print "Content-type:text/html\n\n"; open(INF,"areaboard.ini") or &ini; $home = ; $fc = ; close(INF); open(INF,"msgheader.txt"); @lh = ; close(INF); foreach $lh (@lh) { print $lh } ($sec,$min,$hr,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $longyr = $year + 1900; $fixmo = $mon + 1; if ($isdst == 1) { $tz = "CDT"; } else { $tz = "CST"; } $yr2 = substr($longyr,2,2); $date2 = "$mday/$fixmo/$longyr"; @first = (); @reply = (); opening: open(INF,"areas.txt") or retry(); @areasl1 = ; close(INF); $loop = 0; foreach $temp (@areasl1) { $areax = $areax + 1; if ($areax <= 10) { push(@areas,"$temp"); } } opening2: open(INF,"msgindex.txt") or retry2(); @msgs = ; close(INF); #if (substr(@msgs[0],0,3) eq "%%%") { shift(@msgs) } foreach $iii (@msgs) { $total = $total + 1; $test = substr($iii,0,6); if ($test eq "first|") { push(@first,"$iii|$total"); } if ($test eq "reply|") { push(@reply,"$iii|$total"); } } print "Forum oversikt

"; print ""; print ""; foreach $ex1 (@areas) { ($acode,$aname) = split(/\|/,$ex1); $ldate = "Ingen meldinger."; foreach $dtc (@msgs) { ($rtype,$rarea,$rdate,$rtitle,$rname,$rtime,$rcounter) = split(/\|/,$dtc); if ($rarea eq $acode) { $ldate = $rdate } } $ex22 = 0; $ff = 0; $rr = 0; foreach $ex2 (@first) { ($rtype,$rarea,$rdate,$rtitle,$rname,$rtime,$rcounter) = split(/\|/,$ex2); if ($rarea eq $acode) { $ex22 = $ex22 + 1; $ff = $ff + 1 } } foreach $ex2 (@reply) { ($rtype,$rarea,$rdate,$rtitle,$rname,$rtime,$rcounter) = split(/\|/,$ex2); if ($rarea eq $acode) { $ex22 = $ex22 + 1; $rr = $rr + 1 } } $ex23 = $ex22; #if ($ex22 > 50) { $ex22 = 50} print ""; } print "
    Emne

meldinger/svar


$ff/$rr
"; print ""; print ""; print ""; print "

"; print ""; print "Copyright 20©00 Samliv.net
"; print "Samliv.net, Postboks 76, 3351 Prestfoss"; print "

"; exit; sub dienice { my($errmsg) = @_; print "

Error

\n"; print "$errmsg

\n"; print "\n"; exit; } sub retry { goto("opening") } sub retry2 { goto("opening2") } sub ini { print "Error! Can not open AreaBoard config file!"; exit; }