############################################################################### # Admin.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 1 Gold - SP 1.1 # # Released: December 2001; Updated March 22, 2002 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2002 Xnull (www.xnull.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # ############################################################################### $adminplver = "1 Gold - SP 1.1"; sub Admin { &is_admin; my( $l, $ban_user, $ban_time, $ban_date, @lines, @lines_email ); # Load data for the 'remove old messages' feature, get totals, and get moderators fopen(FILE, "$vardir/oldestmes.txt"); $maxdays = ; fclose(FILE); $yymain .= qq~
$txt{'208'}

$txt{'428'}
- $txt{'222'}
- $blinkstxt{'01'}
- $asmtxt{'01'}
- $txt{'19a'}
- $txt{'7'}
- $txt{'216'}
- $txt{'764'}
- $CDtxt{'01'}
- $ecaltxt{'60'}
~; # Only show when Guestnotification is on if ($enable_notification_guest) { $yymain .= qq~ - $txt{'135'}
- $notify_txt{'62'} ~; } else { $yymain .= qq~ - $txt{'135'} ~; } $yymain .= qq~

$txt{'427'}
- $txt{'3'}
- $txt{'4'}

~; if ($enable_mailinglist == 1) { # Open default Mailinglist Text fopen(FILE, "$vardir/mailtext.txt"); @mailtext = ; fclose(FILE); # Get date ($dummy1, $dummy2, $dummy3, $ml_date) = split(/\|/, @mailtext[0]); chomp($ml_date); &timeformat($ml_date,0); $newml_date = $newformat; $yymain .= qq~
$txt{'426'}
- $txt{'5'}
- Tarkastele virhelokia
- $txt{'8'}
- $IPLtxt{'02'}
- $amgtxt{'01'}
- $amgtxt{'30'}
- $txt{'6'}
- $mstxt{'01'}
- $txt{'206'}
- $txt{'207'}

~; } $yymain .= qq~
$notify_txt{'58'}
$notify_txt{'33'} $newml_date
- $notify_txt{'20'}
- $notify_txt{'21'}

$txt{'501'}
- $txt{'202'}
- $txt{'502'}
- $txt{'504'}
- $membtxt{'25'}
- $txt{'593'}
- ($txt{'595'})
$txt{'124'} $txt{'579'}
 
$txt{'248'} $settings[1] ($username)!

$txt{'644'}

$txt{'645'}
$txt{'795'}
$txt{'693'}
$regtxt{'22'}
$txt{'425'}: $YaBBversion/
($txt{'429'})

$txt{'571'}

Service Pack l: Special thanks to Corey Chapman, Bjoern Berg, Dave Baughman, Tim Ceuppens, Jay Silverman and Gunther Meyer.

YaBB 1 Gold: Corey Chapman, Darya Misse, Popeye, Michael Prager, Dave Baughman, Dave G, Carey P, Christian Land, Tim Ceuppens, ejdmoo, StarSaber, Parham and the rest for helping out with graphics, code and other things :-)

YaBB 1 Final: Zef Hemel, Jeff Lewis, Christian Land, Corey Chapman, Peter Crouch and a bunch of others we want to thank!
~; $yytitle = "$txt{'208'}"; &template; exit; } sub FullStats { &is_admin; my($numcats, $numboards, @categories, @catboards, @curcataccess, $curcat, $curcatname, $curcataccess, $curboard, $threadcount, $messagecount, $maxdays, $totalt, $totalm, $avgt, $avgm); my($memcount, $latestmember) = &MembershipGet; &LoadUser($latestmember); $thelatestmember = qq~$txt{'656'} $userprofile{$latestmember}->[1]~; $memcount ||= 1; fopen(FILE, "$vardir/cat.txt"); @categories = ; fclose(FILE); $numcats = @categories; # get the number of categories foreach $curcat (@categories) { chomp $curcat; fopen(CATFILE, "$boardsdir/$curcat.cat"); $curcatname = ; $curcataccess = ; @catboards = ; fclose(CATFILE); chomp $curcatname; chomp $curcataccess; $yyAccessCat{$curcat} = $settings[7] eq 'Administrator' || $moderators{$username} || ! $curcataccess; unless( $yyAccessCat{$curcat} ) { foreach ( split(/\,/, $curcataccess) ) { if( $_ && $_ eq $settings[7] ) { $yyAccessCat{$curcat} = 1; last; } } } foreach $curboard (@catboards) { chomp $curboard; $numboards++; ( $threadcount, $messagecount ) = &BoardCountGet($curboard); $totalt += $threadcount; $totalm += $messagecount; } } $avgt = $totalt / $memcount; $avgm = $totalm / $memcount; &LoadAdmins; &LoadLogCount; &LoadIPCount; &LoadErrorLog; $yymain .= qq~
$txt{'645'}
$txt{'94'}
~; require "$sourcedir/LogInOut.pl"; $yymain .= qq~
$txt{'488'} $memcount
$txt{'489'} $totalm
$txt{'490'} $totalt
$txt{'658'} $numcats
$txt{'665'} $numboards
$IPLtxt{'01'} $yyips
Virheitä lokissa: $errorslog
$txt{'691'} ($txt{'692'}): $yyclicks  ($txt{'693'})
$txt{'657'}
$thelatestmember
$txt{'659'} ~; require "$sourcedir/Recent.pl"; $recentsender = "admin"; &LastPost; $yymain .= qq~

$txt{'684'}: $administrators

$txt{'425'}: $YaBBversion/
($txt{'429'})
~; $yytitle = "$txt{'208'}"; &template; exit; } sub DeleteLog { &is_admin; unlink("$memberdir/newreg.txt"); $yySetLocation = qq~$cgi;action=showadminlog~; &redirectexit; } sub ShowAdminLog { &is_admin; if (-e "$memberdir/newreg.txt") { fopen(FILE, "$memberdir/newreg.txt"); @loglist = ; fclose(FILE); @loglist = reverse(@loglist); $count = @loglist; $deletelog = qq( $regtxt{'28'} ); } $yytitle = $regtxt{'22'}; $yymain .= qq~
$regtxt{'23'}

$regtxt{'29'}

~; foreach $curmem (@loglist) { chomp $curmem; ($regmem, $aname, $ip, $logdate) = split(/\|/, $curmem); if ($logdate eq '') { $logdate = "no entry"; } &FormatUserName($curmem); if (-e "$memberdir/$regmem.dat") { $profileurl = qq($regmem); } else { $profileurl = "$regmem"; } $temp = qq(); $yymain .= qq~ $temp ~; $count--; } $yymain .= qq~ $deletelog
# $regtxt{'24'} $regtxt{'25'} $regtxt{'26'} $regtxt{'27'}
$count$profileurl$aname$ip$logdate


$regtxt{'30'}

~; &template; exit; } sub ShowClickLog { &is_admin; my($totalip,$totalclick,$totalbrow,$totalos,@log,@iplist,$date,@to,@from,@info,@os,@browser,@newiplist,@newbrowser,@newoslist,@newtolist,@newfromlist,$i,$curentry); fopen(LOG, "$vardir/clicklog.txt"); @log = ; fclose(LOG); $i = 0; foreach $curentry (@log) { ($iplist[$i],$date,$to[$i],$from[$i],$info[$i]) = split(/\|/, $curentry); $i++; } $i = 0; foreach $curentry (@info) { if ($curentry !~ /\s\(Win/i || $curentry !~ /\s\(mac/) { $curentry =~ s/\s\((compatible;\s)*/ - /ig; } else { $curentry =~ s/(\S)*\(/; /g; } if ($curentry =~ /\s-\sWin/i) { $curentry =~ s/\s-\sWin/; win/ig; } if ($curentry =~ /\s-\sMac/i) { $curentry =~ s/\s-\sMac/; mac/ig; } ($browser[$i],$os[$i]) = split(/\;\s/, $curentry); if($os[$i] =~ /\)\s\S/) { ($os[$i],$browser[$i]) = split(/\)\s/, $os[$i]); } $os[$i] =~ s/\)//g; $i++; } $yymain .= qq~
  $txt{'693'}

$txt{'697'}

$txt{'694'}
~; for($i = 0; $i < @iplist; $i++) { $iplist{$iplist[$i]}++; } $i = 0; while(($key, $val ) = each(%iplist)) { $newiplist[$i] = [ $key, $val ]; $i++; } $totalclick = @iplist; $totalip = @newiplist; $yymain .= qq~$txt{'742'}: $totalclick
~; $yymain .= qq~$txt{'743'}: $totalip

~; for($i = 0; $i < @newiplist; $i++) { if($newiplist[$i]->[0] =~ /\S+/) { $yymain .= "$newiplist[$i]->[0]  ($newiplist[$i]->[1])
\n"; } } $yymain .= qq~
$txt{'695'}
~; for($i = 0; $i < @browser; $i++) { $browser{$browser[$i]}++; } $i = 0; while(($key, $val ) = each(%browser)) { $newbrowser[$i] = [ $key, $val ]; $i++; } $totalbrow = @newbrowser; $yymain .= qq~$txt{'744'}: $totalbrow

~; for($i = 0; $i < @newbrowser; $i++) { if($newbrowser[$i]->[0] =~ /\S+/) { $yymain .= "$newbrowser[$i]->[0]  ($newbrowser[$i]->[1])
\n"; } } $yymain .= qq~
$txt{'696'}
~; for($i = 0; $i < @os; $i++) { $os{$os[$i]}++; } $i = 0; while(($key, $val ) = each(%os) ) { $newoslist[$i] = [ $key, $val ]; $i++; } $totalos = @newoslist; $yymain .= qq~$txt{'745'}: $totalos

~; for($i = 0; $i < @newoslist; $i++) { if($newoslist[$i]->[0] =~ /\S+/) { $yymain .= "$newoslist[$i]->[0]  ($newoslist[$i]->[1])
\n"; } } $yymain .= qq~
Pages Visited
~; for($i = 0; $i < @to; $i++) { $to{$to[$i]}++; } $i = 0; while(($key, $val ) = each(%to)) { $newtolist[$i] = [ $key, $val ]; $i++; } for($i = 0; $i < @newtolist; $i++) { if($newtolist[$i]->[0] =~ /\S+/) { $yymain .= "[0] target=_blank>$newtolist[$i]->[0]  ($newtolist[$i]->[1])
\n"; } } $yymain .= qq~
Referring Pages
~; for($i = 0; $i < @from; $i++) { $from{$from[$i]}++; } $i = 0; while(($key, $val ) = each(%from)) { $newfromlist[$i] = [ $key, $val ]; $i++; } for($i = 0; $i < @newfromlist; $i++) { if($newfromlist[$i]->[0] =~ /\S+/ && $newfromlist[$i]->[0] !~ m~$boardurl~i) { $yymain .= "[0] target=_blank>$newfromlist[$i]->[0]  ($newfromlist[$i]->[1])
\n"; } } $yymain .= qq~
~; $yytitle = $txt{'693'}; &template; exit; } sub AdminMembershipRecount { &is_admin; &MembershipCountTotal; $yymain .= qq~$txt{'505'}~; $yytitle = $txt{'504'}; &template; exit; } sub AdminBoardRecount { &is_admin; my( $curcat, $curcatname, $curcataccess ); my( @categories, @catboards ); fopen(FILE, "$vardir/cat.txt"); @categories = ; fclose(FILE); foreach $curcat (@categories) { chomp $curcat; fopen(FILE, "$boardsdir/$curcat.cat"); chomp( $curcatname = ); chomp( $curcataccess = ); @catboards = ; fclose(FILE); foreach (@catboards) { chomp; &BoardCountTotals($_); } } $yymain .= qq~$txt{'503'}~; $yytitle = $txt{'502'}; &template; exit; } sub RebuildMemList { &is_admin; opendir(DIR, "$memberdir") || die "$txt{'230'} ($memberdir) :: $!"; @contents = readdir(DIR); closedir(DIR); fopen(MEMLIST, ">$memberdir/memberlist.txt", 1); foreach $line (sort @contents){ $line =~ m~(.+)\.(.+)~; if ($2 eq 'dat'){ print MEMLIST "$1\n"; } } fclose(MEMLIST); $yymain .= qq~$txt{'594'}~; $yytitle = "$txt{'593'}"; &template; exit; } sub RebuildMemNumb { &is_admin; fopen(FILE, "$memberdir/memberlist.txt"); @memberlist = ; $memcount = @memberlist; fclose(FILE); fopen(FILE, "$memberdir/membernumb.txt"); @membernumb = ; $numcount = @membernumb; fclose(FILE); $membxadmin = $memcount - 1; $numbxadmin = $numcount - 1; $yymain .= qq~ ~; $numcount = $memcount; if ($membxadmin == $numcount) { $yymain .= qq~ ~; } else { $yymain .= qq~ ~; } $yymain .= qq~
  $membtxt{'25'}
$membtxt{'26'}: $membxadmin
$membtxt{'27'}: $numbxadmin
$membtxt{'28'}
$membtxt{'29'}
~; $yytitle = "$membtxt{'25'}"; &template; exit; } sub RebuildMemNumb2 { &is_admin; if(-e "$memberdir/membernumb.txt") { unlink("$memberdir/membernumb.txt"); } &LoadMembNumber; } sub ViewMembers { &is_admin; $yytitle = "$txt{'9'}"; # Load MemberGroups if(!$MemStatAdmin) { fopen(FILE, "$vardir/membergroups.txt"); @membergroups = ; fclose(FILE); } # Load member list fopen(FILE, "$memberdir/memberlist.txt"); @memberlist = ; fclose(FILE); $memcount = @memberlist; # Create memberlist @tmplist = @memberlist; $date2 = $date; for($i=0;$i<$memcount;$i++) { $membname = $memberlist[$i]; chomp($membname); fopen(MEMBERFILE,"$memberdir/$membname.dat"); @member = ; fclose(MEMBERFILE); chomp @member; $date1 = $member[14]; &calcdifference; $days_reg = $result; fopen(FILE,"$memberdir/$membname.ll"); my ($userlastonline, $userlastpost, $userlastim) = ; fclose(FILE); chomp($userlastonline); chomp($userlastpost); chomp($userlastim); if ($userlastonline eq "") {$userlastonline = "-"; $tmpa = $days_reg;} else {$date1 = $userlastonline; &calcdifference; $userlastonline = $result; $tmpa = $userlastonline;} if ($userlastpost eq "") {$userlastpost = "-"; $tmpb = $days_reg;} else {$date1 = $userlastpost; &calcdifference; $userlastpost = $result; $tmpb = $userlastpost; } if ($userlastim eq "") { $userlastim = "-"; $tmpc = $days_reg;} else { $date1 = $userlastim; &calcdifference; $userlastim = $result; $tmpc = $userlastim; } $lastindex = 1000000 * $tmpa + 1000 * $tmpb + $tmpc; my ($emailname, $emaildomain) = split(/\@/, $member[2]); $tmplist[$i] = qq~$membname|$member[1]|$member[6]|$member[7]|$member[14]|$days_reg|$userlastonline|$userlastpost|$userlastim|$lastindex|$member[2]|$emailname|$emaildomain|\n~; } # Sort memberlist $sortmode = $INFO{'sort'}; $sortorder = $INFO{'order'}; if($sortmode eq "name") {@sortlist = sort{uc($a) cmp uc($b)} (@tmplist);} elsif($sortmode eq "posts") {@sortlist = map {$_->[0]} sort{($b->[3])<=>($a->[3])} map { [ $_, (split /\|/)[0..$#tmplist] ] } (@tmplist);} elsif($sortmode eq "reg") {@sortlist = map {$_->[0]} sort{($b->[6])<=>($a->[6])} map { [ $_, (split /\|/)[0..$#tmplist] ] } (@tmplist);} elsif($sortmode eq "last") {@sortlist = map {$_->[0]} sort{($a->[10])<=>($b->[10])} map { [ $_, (split /\|/)[0..$#tmplist] ] } (@tmplist);} elsif($sortmode eq "email") {@sortlist = map {$_->[0]} sort{uc($a->[12]) cmp uc($b->[12]) || uc($a->[13]) cmp uc($b->[13])} map { [ $_, (split /\|/)[0..$#tmplist] ] } (@tmplist);} elsif($sortmode eq "domain") {@sortlist = map {$_->[0]} sort{uc($a->[13]) cmp uc($b->[13]) || uc($a->[12]) cmp uc($b->[12])} map { [ $_, (split /\|/)[0..$#tmplist] ] } (@tmplist);} else {@sortlist = @tmplist;} if ($INFO{'order'} eq "reverse") { @sortlist = reverse @sortlist; } else { if ($sortmode eq "name") {$order_name = ";order=reverse";} elsif ($sortmode eq "posts") {$order_posts = ";order=reverse";} elsif ($sortmode eq "reg") {$order_reg = ";order=reverse";} elsif ($sortmode eq "last") {$order_last = ";order=reverse";} } if ($sortmode ne "") {$sortmode = ";sort=".$INFO{'sort'};} if ($sortorder ne "") {$sortorder = ";order=".$INFO{'order'};} # fopen(FILE,">$memberdir/memberlist.plus"); # print FILE @sortlist; # fclose(FILE); # Construct the page links for this board. if($INFO{'start'} eq "") { $start = 0; } else { $start="$INFO{'start'}"; } $numshown=0; $numbegin = ($start + 1); $numend = ($start + $MembersPerPage); if($numend > $memcount) { $numend = $memcount; } $b = $start; $indexdisplaynum = 3; # max number of pages to display $startpage = 0; $tmpa = 1; $tmpx = int( $memcount / $MembersPerPage); if ($start >= (($indexdisplaynum-1) * $MembersPerPage)) { $startpage = $start - (($indexdisplaynum-1) * $MembersPerPage); $tmpa = int( $startpage / $MembersPerPage) + 1; } if ( $memcount >= $start + ($indexdisplaynum * $MembersPerPage)) {$endpage = $start + ($indexdisplaynum * $MembersPerPage); } else { $endpage = $memcount } if ($startpage > 0) { $pageindex = qq~1 ... ~; } if ($startpage == $MembersPerPage) { $pageindex = qq~1 ~;} for( $counter = $startpage; $counter < $endpage; $counter += $MembersPerPage) { $pageindex .= $start == $counter && $start ne "all"? qq~$tmpa ~ : qq~$tmpa ~; ++$tmpa; } $tmpx = $memcount - 1 - $MembersPerPage; $outerpn = int($tmpx / $MembersPerPage); $lastpn = int(($memcount - 1) / $MembersPerPage) + 1; $lastptn = ($lastpn - 1) * $MembersPerPage; if ($endpage < $memcount - $MembersPerPage) {$pageindexadd = qq~... ~;} if ($endpage != $memcount) {$pageindexadd .= qq~$lastpn ~;} $pageindex .= $pageindexadd; if ($start eq "all"){$pageindex .= qq~$txt{'190'}~; $MembersPerPage = $memcount; $startmode = qq~;start=all~; $heading = qq~$amv_txt{'16'} $memcount $amv_txt{'17'}~;} else {$pageindex .= qq~$txt{'190'}~; $heading = qq~$txt{'308'} $numbegin $txt{'311'} $numend ($txt{'309'} $memcount $txt{'310'})~;} # Display Page. $yymain = qq~
$heading
~; while($numshown < $MembersPerPage) { $numshown++; my ($tmp_username, $tmp_name, $tmp_posts, $tmp_memgroup, $tmp_reg, $tmp_days, $tmp_lastonline, $tmp_lastpost, $tmp_lastim, $tmp_lastindex, $tmp_email, $tmp_emailname, $tmp_emaildomain) = split(/\|/, $sortlist[$b]); if (!$tmp_username) {next;} $tmp_username =~ s/[\n\r]//g; &FormatUserName($tmp_username); $b++; # Get Membergroup Info if ($MemStatAdmin) { if ($tmp_memgroup eq "Administrator") {$memberinfo = qq~$MemStatAdmin~;} elsif ($tmp_memgroup eq "Global Moderator") {$memberinfo = qq~$MemStatGMod~;} elsif ($tmp_memgroup ne "") {$memberinfo = $tmp_memgroup;} elsif ($showallgroups eq "1") { $msstatcount = "0"; if( $tmp_posts >= $MemPostNewbie) {$memberinfo = "$MemStatNewbie";} while($MemStat[$msstatcount]) { if( $tmp_posts >= $MemPostNum[$msstatcount] && $MemPostNum[$msstatcount] ne "x") {$memberinfo = "$MemStat[$msstatcount]";} ++$msstatcount; } } else {$memberinfo = "";} } else { if ($tmp_memgroup eq "Administrator") {$memberinfo = qq~$membergroups[0]~;} elsif ($tmp_memgroup ne "") {$memberinfo = $tmp_memgroup;} elsif ($showallgroups eq "1") { if($tmp_posts > $GodPostNum) {$memberinfo = "$membergroups[6]";} elsif($tmp_posts > $SrPostNum) {$memberinfo = "$membergroups[5]";} elsif($tmp_posts > $FullPostNum) {$memberinfo = "$membergroups[4]";} elsif($tmp_posts > $JrPostNum) {$memberinfo = "$membergroups[3]";} else {$memberinfo = "$membergroups[2]";} } else {$memberinfo = "";} } if ($tmp_username eq 'admin') { $addel = qq~~; } else { $addel = qq~~; } if ($tmp_lastonline > 90) { $tmp_lastonline = qq~$tmp_lastonline~; } elsif ($tmp_lastonline > 30) { $tmp_lastonline = qq~$tmp_lastonline~; } if ($tmp_lastpost > 90) { $tmp_lastpost = qq~$tmp_lastpost~; } elsif ($tmp_lastpost > 30) { $tmp_lastpost = qq~$tmp_lastpost~; } if ($tmp_lastim > 90) { $tmp_lastim = qq~$tmp_lastim~; } elsif ($tmp_lastim > 30) { $tmp_lastim = qq~$tmp_lastim~; } $yymain .= qq~ $addel ~; } $yymain .= qq~
$txt{'35'} $txt{'86'} $txt{'69'}@$amv_txt{'18'} $txt{'233'} ($amv_txt{'4'})
$amv_txt{'5'} / $amv_txt{'6'} / $amv_txt{'7'}
$txt{'87'} $amv_txt{'8'}?
 
$tmp_name $tmp_posts  $tmp_email $tmp_reg $tmp_lastonline $tmp_lastpost $tmp_lastim $memberinfo 
$amv_txt{'1'}:
$amv_txt{'2'}:
($amv_txt{'3'})
$txt{'139'}: $pageindex  
~; &template; exit; } sub DeleteMultiMembers { &is_admin; my($count, $memnum, $currentmem, $start, $sortmode, $sortorder); chomp $FORM{"button"}; chomp $FORM{"emailsubject"}; chomp $FORM{"emailtext"}; if ($FORM{"button"} ne "1" && $FORM{"button"} ne "2") {&fatal_error($txt{'1'});} fopen(FILE, "$memberdir/memberlist.txt"); @memnum = ; fclose(FILE); $count = 0; while (@memnum >= $count) { $currentmem = $FORM{"member$count"}; if (exists $FORM{"member$count"}) { fopen(FILE, "$memberdir/$currentmem.dat"); @memsettings=; fclose(FILE); foreach (@memsettings) { $_ =~ s~[\n\r]~~g; } unlink("$memberdir/$currentmem.off"); $emailsubject = $FORM{"emailsubject"}; $emailsubject =~ s~\[name\]~$memsettings[1]~ig; $emailsubject =~ s~\[username\]~$currentmem~ig; $emailsubject =~ s~\[password\]~$memsettings[0]~ig; $emailtext = $FORM{"emailtext"}; $emailtext =~ s~\[name\]~$memsettings[1]~ig; $emailtext =~ s~\[username\]~$currentmem~ig; $emailtext =~ s~\[password\]~$memsettings[0]~ig; if ($emailtext ne "") {&sendmail( $memsettings[2] , $emailsubject, $emailtext);} if ($FORM{'button'} eq "2") { unlink("$memberdir/$currentmem.dat"); unlink("$memberdir/$currentmem.msg"); unlink("$memberdir/$currentmem.log"); unlink("$memberdir/$currentmem.outbox"); unlink("$memberdir/$currentmem.imconfig"); unlink("$memberdir/$currentmem.ll"); if (-e "$memberdir/$currentmem.siz") { unlink("$memberdir/$currentmem.siz"); } unlink("$memberdir/$currentmem.bio"); unlink("$memberdir/$currentmem.yam"); unlink("$memberdir/$currentmem.mh"); # --- Added for Notify Plus 2.2 --- # unlink("$memberdir/$currentmem.da2"); # Delete Member from Mailinglist if ($enable_mailinglist == 1) { # Read Mailinglist File fopen(FILE, "$vardir/mailinglist.txt"); @mailinglist = ; fclose (FILE); # Open file again to update ! fopen(FILE, ">$vardir/mailinglist.txt"); # ----------------------------------------------------------------------------- # Read the mailinglist File # ----------------------------------------------------------------------------- foreach $line (@mailinglist) { chomp($line); local($user, $email, $format, $oldsubscribed) = split(/\|/, $line); # Write Member when not deleted if ($user ne $currentmem) { print FILE "$line\n"; } } # Close file fclose (FILE); } # --- /Added for Notify Plus 2.2 --- # opendir (DIRECTORY,"$datadir"); @dirdata = readdir(DIRECTORY); closedir (DIRECTORY); $umail = $memsettings[2]; foreach $filename (@dirdata) { unless( $filename =~ m~mail\A~ ) { next; } fopen(FILE, "$datadir/$filename"); @entries = ; fclose(FILE); fopen(FILE, ">$datadir/$filename"); foreach $entry (@entries) { $entry =~ s/[\n\r]//g; if ($entry ne $umail) { print FILE "$entry\n"; } } fclose(FILE); } fopen(FILE, "$memberdir/memberlist.txt"); @members = ; fclose(FILE); fopen(FILE, ">$memberdir/memberlist.txt", 1); my $memberfound = 0; my $lastvalidmember = ''; foreach $curmem (@members) { chomp $curmem; if($curmem ne $currentmem) { print FILE "$curmem\n"; $lastvalidmember = $curmem; } else { ++$memberfound; } } fclose(FILE); my $membershiptotal = @members - $memberfound; fopen(FILE, "+>$memberdir/members.ttl"); print FILE qq~$membershiptotal|$lastvalidmember~; fclose(FILE); # For security, remove username from mod position fopen(FILE, "$vardir/cat.txt"); @categories = ; fclose(FILE); foreach $curcat (@categories) { $curcat =~ s/[\n\r]//g; fopen(CAT, "$boardsdir/$curcat.cat"); @catinfo = ; fclose(CAT); foreach $curboard (@catinfo) { $curboard =~ s/[\n\r]//g; chomp $curboard; fopen(BOARD, "$boardsdir/$curboard.dat"); @boardinfo = ; fclose(BOARD); $boardinfo[2] =~ s/[\n\r]//g; $boardinfo[2] =~ /^\|(.*?)\|$/; $mods = $1 or $mods = $boardinfo[2]; $mods =~ s/\|(\S?)/,$1/g; $mods_changed=0; if($currentmem && $mods =~ /(,*)$currentmem(,*)/g) {$mods =~ s~(,*)$currentmem(,*)~~; $mods_changed=1;} if ($mods_changed == 1) { $boardinfo[2] = $mods; fopen(BOARD, ">$boardsdir/$curboard.dat", 1); print BOARD @boardinfo; fclose(BOARD); } } } } } $count++; } if ($INFO{'start'} ne "" ) {$start = ";start=".$INFO{'start'};} if ($INFO{'sort'} ne "" ) {$sortmode = ";sort=".$INFO{'sort'};} if ($INFO{'order'} ne "" ) {$sortorder = ";order=".$INFO{'order'};} $yySetLocation = qq~$cgi;action=viewmembers$start$sortmode$sortorder~; &redirectexit; } sub MailingList { &is_admin; fopen(FILE, "$memberdir/memberlist.txt"); @memberlist = ; fclose(FILE); $yymain .= qq~
  $txt{'6'}

$txt{'735'}



$txt{'338'}




~; $yytitle = "$txt{'6'}"; &template; exit; } sub ml { $FORM{'emails'} = "; " . $FORM{'emails'}; @emails = split(/;\s*/, $FORM{'emails'}); foreach $curmem (@emails) { &sendmail( $curmem, "$mbname: $FORM{'subject'}", "$FORM{'message'}\n\n$txt{'130'}\n\n$scripturl"); } $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub clean_log { &is_admin; $yymain .= qq~
$txt{'202'}
$txt{'203'} $txt{'163'}  $txt{'164'}
~; $yytitle = $txt{'202'}; &template; exit; } sub do_clean_log { &is_admin; # Overwrite with a blank file fopen(FILE, ">$vardir/log.txt"); print FILE ''; fclose(FILE); &Admin; } sub ipban { &is_admin; my( @ipban, @emailban, $curban ); fopen(FILE, "$vardir/ban.txt"); @ipban = ; fclose(FILE); fopen(FILE, "$vardir/ban_email.txt"); @emailban = ; fclose(FILE); fopen(FILE, "$vardir/ban_memname.txt"); @memnameban = ; fclose(FILE); $yymain .= qq~
$txt{'340'}

$txt{'724'}


$txt{'725'}


$txt{'725a'}


~; $yytitle = "$txt{'340'}"; &template; exit; } sub ipban2 { &is_admin; $FORM{'ban'} =~ tr/\r//d; $FORM{'ban'} =~ s~\A[\s\n]+~~; $FORM{'ban'} =~ s~[\s\n]+\Z~~; $FORM{'ban'} =~ s~\n\s*\n~\n~g; $FORM{'ban_email'} =~ tr/\r//d; $FORM{'ban_email'} =~ s~\A[\s\n]+~~; $FORM{'ban_email'} =~ s~[\s\n]+\Z~~; $FORM{'ban_email'} =~ s~\n\s*\n~\n~g; $FORM{'ban_memname'} =~ tr/\r//d; $FORM{'ban_memname'} =~ s~\A[\s\n]+~~; $FORM{'ban_memname'} =~ s~[\s\n]+\Z~~; $FORM{'ban_memname'} =~ s~\n\s*\n~\n~g; my @lines = split( /\n/, $FORM{'ban'} ); fopen(FILE, ">$vardir/ban.txt", 1); foreach my $i (@lines) { ($ban_user, $ban_time, $ban_date) = split(/\|/,$i); if( $ban_time eq "" ) { $ban_time = 0; } if( $ban_date eq "" ) { $ban_date = $date; } print FILE qq~$ban_user|$ban_time|$ban_date\n~; } fclose(FILE); my @lines_email = split( /\n/, $FORM{'ban_email'} ); fopen(FILE, ">$vardir/ban_email.txt", 1); foreach my $i (@lines_email) { ($ban_user, $ban_time, $ban_date) = split(/\|/,$i); if( $ban_time eq "" ) { $ban_time = 0; } if( $ban_date eq "" ) { $ban_date = $date; } print FILE qq~$ban_user|$ban_time|$ban_date\n~; } fclose(FILE); my @lines_memname = split( /\n/, $FORM{'ban_memname'} ); fopen(FILE, ">$vardir/ban_memname.txt", 1); foreach my $i (@lines_memname) { ($ban_user, $ban_time, $ban_date) = split(/\|/,$i); if( $ban_time eq "" ) { $ban_time = 0; } if( $ban_date eq "" ) { $ban_date = $date; } print FILE qq~$ban_user|$ban_time|$ban_date\n~; } fclose(FILE); $yySetLocation = qq~$cgi;action=admin~; &redirectexit; } sub ver_detail { &is_admin; &loadfiles; $yymain .= qq~
 $txt{'429'}

$txt{'495'}

$txt{'494'}

$txt{'493'}

$txt{'496'}$YaBBversion
YaBB.$yyext$YaBBplver
$language$englishlngver
Admin.pl$adminplver
AdminEdit.pl$admineditplver
BoardIndex.pl$boardindexplver
Display.pl$displayplver
ICQPager.pl$icqpagerplver
InstantMessage.pl$instantmessageplver
Load.pl$loadplver
LockThread.pl$lockthreadplver
LogInOut.pl$loginoutplver
Maintenance.pl$maintenanceplver
ManageBoards.pl$manageboardsplver
ManageCats.pl$managecatsplver
Memberlist.pl$memberlistplver
MessageIndex.pl$messageindexplver
ModifyMessage.pl$modifymessageplver
MoveThread.pl$movethreadplver
Notify.pl$notifyplver
Post.pl$postplver
Printpage.pl$printplver
Profile.pl$profileplver
Recent.pl$recentplver
Register.pl$registerplver
RemoveOldThreads.pl$removeoldthreadsplver
RemoveThread.pl$removethreadplver
Search.pl$searchplver
SendTopic.pl$sendtopicplver
Security.pl$securityplver
Subs.pl$subsplver
YaBBC.pl$yabbcplver

~; $yytitle = $txt{'429'}; &template; exit; } 1;