| ############################################################################### |
| ############################################################################### |
| # AdminEdit.pl # |
| # AdminEdit.pm # |
| |
| # $Date: 01.05.16 $ # |
| ############################################################################### |
| ############################################################################### |
| # YaBB: Yet another Bulletin Board # |
| # YaBB: Yet another Bulletin Board # |
| # Open-Source Community Software for Webmasters # |
| # Open-Source Community Software for Webmasters # |
| # Version: YaBB 2.5.2 # |
| # Version: YaBB 2.6.12 # |
| # Packaged: October 21, 2012 # |
| # Packaged: January 5, 2016 # |
| # Distributed by: http://www.yabbforum.com # |
| # Distributed by: http://www.yabbforum.com # |
| # =========================================================================== # |
| # =========================================================================== # |
| # Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Copyright (c) 2000-2016 YaBB (www.yabbforum.com) - All Rights Reserved. # |
| # Software by: The YaBB Development Team # |
| # Software by: The YaBB Development Team # |
| # with assistance from the YaBB community. # |
| # with assistance from the YaBB community. # |
| ############################################################################### |
| ############################################################################### |
| |
| use CGI::Carp qw(fatalsToBrowser); |
| |
| our $VERSION = '2.6.12'; |
| |
| |
| $admineditplver = 'YaBB 2.5.2 $Revision: 1.0 $'; |
| $admineditpmver = 'YaBB 2.6.12 $Revision: 1710 $'; |
| if ($action eq 'detailedversion') { return 1; } |
| if ( $action eq 'detailedversion' ) { return 1; } |
| |
| |
| &LoadLanguage('Register'); |
| LoadLanguage('Register'); |
| |
| |
| sub GmodSettings { |
| sub GmodSettings { |
| &is_admin; |
| is_admin(); |
| |
| |
| &LoadLanguage('GModPrivileges'); |
| LoadLanguage('GModPrivileges'); |
| |
| |
| if (!-e ("$vardir/gmodsettings.txt")) { &GmodSettings2; } |
| if ( !-e ("$vardir/gmodsettings.txt") ) { GmodSettings2(); } |
| |
| require "$vardir/gmodsettings.txt"; |
| |
| |
| require "$vardir/gmodsettings.txt"; |
| if ( $gmod_newfile eq q{} ) { GmodSettings2(); } |
| |
| |
| if ($gmod_newfile eq '') { &GmodSettings2; } |
| fopen( MODACCESS, "$vardir/gmodsettings.txt" ); |
| |
| @scriptlines = <MODACCESS>; |
| fopen(MODACCESS, "$vardir/gmodsettings.txt"); |
| fclose(MODACCESS); |
| @scriptlines = <MODACCESS>; |
| |
| fclose(MODACCESS); |
| $startread = 0; |
| |
| $counter = 0; |
| $startread = 0; |
| foreach my $scriptline (@scriptlines) { |
| $counter = 0; |
| chomp $scriptline; |
| foreach $scriptline (@scriptlines) { |
| if ( substr( $scriptline, 0, 1 ) eq q{'} ) { |
| chomp $scriptline; |
| $scriptline =~ s/newsettings\;page\=//xsm; |
| if (substr($scriptline, 0, 1) eq "'") { |
| if ( $scriptline =~ /\"(.*?)\"/sm ) { |
| $scriptline =~ s/newsettings\;page\=//; |
| $allow = $1; |
| $scriptline =~ /\"(.*?)\"/; |
| |
| $allow = $1; |
| |
| $scriptline =~ /\'(.*?)\'/; |
| |
| $actionfound = $1; |
| |
| push(@actfound, $actionfound); |
| |
| push(@allowed, $allow); |
| |
| $counter++; |
| |
| } |
| } |
| } |
| if ( $scriptline =~ /\'(.*?)\'/sm ) { |
| $column = int($counter / 2); |
| $actionfound = $1; |
| $counter = 0; |
| |
| $a = 0; |
| |
| foreach $actfound (@actfound) { |
| |
| $checked = ''; |
| |
| if ($allowed[$a] eq 'on') { $checked = ' checked="checked"'; } |
| |
| $dismenu .= qq~\n<input type="checkbox" name="$actfound" id="$actfound"$checked /> <label for="$actfound"><img src="$imagesdir/question.gif" align="middle" alt="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" title="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" border="0" /> $actfound</label><br />~; |
| |
| $counter++; |
| |
| $a++; |
| |
| if ($counter > $column + 1) { |
| |
| $dismenu .= qq~</td><td align="left" class="windowbg2" valign="top" width="50%">~; |
| |
| $counter = 0; |
| |
| } |
| } |
| } |
| push @actfound, $actionfound; |
| |
| push @allowed, $allow; |
| if ($allow_gmod_admin) { $gmod_selected_a = ' checked="checked"'; } |
| $counter++; |
| if ($allow_gmod_profile) { |
| } |
| $gmod_selected_p = ' checked="checked"'; |
| } |
| if ($allow_gmod_aprofile) { $gmod_selected_ap = ' checked="checked"'; } |
| $column = int( $counter / 2 ); |
| } else { |
| $counter = 0; |
| $gmod_selected_ap = ' disabled="disabled"'; |
| $aa = 0; |
| } |
| foreach my $actfound (@actfound) { |
| |
| $checked = q{}; |
| |
| if ( $allowed[$aa] eq 'on' ) { $checked = ' checked="checked"'; } |
| |
| $dismenu .= |
| |
| qq~\n<input type="checkbox" name="$actfound" id="$actfound"$checked /> <label for="$actfound"><img src="$admin_img{'question'}" alt="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" title="$reftxt{'1a'} $gmodprivexpl_txt{$actfound}" /> $actfound</label><br />~; |
| |
| $counter++; |
| |
| $aa++; |
| |
| if ( $counter > $column + 1 ) { |
| |
| $dismenu .= q~</td><td class="windowbg2 vtop">~; |
| |
| $counter = 0; |
| |
| } |
| |
| } |
| |
| |
| |
| if ($allow_gmod_admin) { $gmod_selected_a = ' checked="checked"'; } |
| |
| if ($allow_gmod_profile) { |
| |
| $gmod_selected_p = ' checked="checked"'; |
| |
| if ($allow_gmod_aprofile) { $gmod_selected_ap = ' checked="checked"'; } |
| |
| } |
| |
| else { |
| |
| $gmod_selected_ap = ' disabled="disabled"'; |
| |
| } |
| |
| |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <form action="$adminurl?action=gmodsettings2" method="post" enctype="application/x-www-form-urlencoded"> |
| <form action="$adminurl?action=gmodsettings2" method="post" enctype="application/x-www-form-urlencoded"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <div class="bordercolor rightboxdiv"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <table class="border-space pad-cell" style="margin-bottom: .5em;"> |
| <tr valign="middle"> |
| <colgroup> |
| <td align="left" class="titlebg" colspan="2"><img src="$imagesdir/preferences.gif" alt="" border="0" /><b>$gmod_settings{'1'}</b></td> |
| <col span="2" style="width:50%" /> |
| </tr> |
| </colgroup> |
| <tr valign="middle"> |
| <tr> |
| <td align="left" class="windowbg2" colspan="2"><br /> |
| <td class="titlebg" colspan="2">$admin_img{'prefimg'} <b>$gmod_settings{'1'}</b></td> |
| <input type="checkbox" id="allow_gmod_admin" name="allow_gmod_admin"$gmod_selected_a /> <label for="allow_gmod_admin">$gmod_settings{'2'}</label><br /> |
| </tr><tr> |
| <input type="checkbox" id="allow_gmod_profile" name="allow_gmod_profile"$gmod_selected_p onclick="depend(this.checked);" /> <label for="allow_gmod_profile">$gmod_settings{'3'}</label><br /> |
| <td class="windowbg2" colspan="2"> |
| <input type="checkbox" id="allow_gmod_aprofile" name="allow_gmod_aprofile"$gmod_selected_ap /> <label for="allow_gmod_aprofile">$gmod_settings{'3a'}</label><br /> |
| <div class="pad-more"> |
| <br /> |
| <input type="checkbox" id="allow_gmod_admin" name="allow_gmod_admin"$gmod_selected_a /> <label for="allow_gmod_admin">$gmod_settings{'2'}</label><br /> |
| </td> |
| <input type="checkbox" id="allow_gmod_profile" name="allow_gmod_profile"$gmod_selected_p onclick="depend(this.checked);" /> <label for="allow_gmod_profile">$gmod_settings{'3'}</label><br /> |
| </tr> |
| <input type="checkbox" id="allow_gmod_aprofile" name="allow_gmod_aprofile"$gmod_selected_ap /> <label for="allow_gmod_aprofile">$gmod_settings{'3a'}</label> |
| <tr valign="middle"> |
| </div> |
| <td align="left" class="catbg" colspan="2"><span class="small">$gmod_settings{'4'}</span></td> |
| </td> |
| </tr> |
| </tr><tr> |
| <tr valign="middle"> |
| <td class="catbg" colspan="2"><span class="small">$gmod_settings{'4'}</span></td> |
| <td align="left" class="windowbg2" valign="top" width="50%">$dismenu</td> |
| </tr><tr> |
| </tr> |
| <td class="windowbg2 vtop">$dismenu</td> |
| <tr valign="middle"> |
| </tr> |
| <td align="center" class="catbg" colspan="2"><input type="submit" value="$reftxt{'4'}" class="button" /></td> |
| </table> |
| </tr> |
| </div> |
| </table> |
| <div class="bordercolor rightboxdiv"> |
| </div> |
| <table class="border-space pad-cell"> |
| |
| <tr> |
| |
| <th class="titlebg">$admin_img{'prefimg'} $admin_txt{'10'}</th> |
| |
| </tr><tr> |
| |
| <td class="catbg center"> |
| |
| <input type="submit" value="$reftxt{'4'}" class="button" /> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| </form> |
| </form> |
| |
| <script type="text/javascript">//<![CDATA[ |
| <script type="text/javascript"> |
| |
| <!-- |
| |
| function depend(value) { |
| function depend(value) { |
| if (value) { |
| if (value) { |
| document.getElementById('allow_gmod_aprofile').disabled = false; |
| document.getElementById('allow_gmod_aprofile').disabled = false; |
| } else { |
| } else { |
| document.getElementById('allow_gmod_aprofile').checked = false; |
| document.getElementById('allow_gmod_aprofile').checked = false; |
| document.getElementById('allow_gmod_aprofile').disabled = true; |
| document.getElementById('allow_gmod_aprofile').disabled = true; |
| } |
| } |
| } |
| } |
| //--> |
| //]]></script> |
| </script> |
| |
| |
| |
| ~; |
| ~; |
| $yytitle = "$gmod_settings{'1'}"; |
| $yytitle = "$gmod_settings{'1'}"; |
| $action_area = "gmodaccess"; |
| $action_area = 'gmodaccess'; |
| &AdminTemplate; |
| AdminTemplate(); |
| |
| return; |
| } |
| } |
| |
| |
| sub EditBots { |
| sub EditBots { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| my ($line); |
| my ($line); |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <form action="$adminurl?action=editbots2" method="post" enctype="application/x-www-form-urlencoded"> |
| <form action="$adminurl?action=editbots2" method="post" enctype="application/x-www-form-urlencoded" accept-charset="$yymycharset"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <div class="bordercolor rightboxdiv"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <table class="border-space pad-cell" style="margin-bottom: .5em;"> |
| <tr valign="middle"> |
| <tr> |
| <td align="left" class="titlebg"><img src="$imagesdir/xx.gif" alt="" border="0" /><b>$admin_txt{'18'}</b></td> |
| <td class="titlebg">$admin_img{'xx'} <b>$admin_txt{'18'}</b></td> |
| </tr> |
| </tr><tr> |
| <tr valign="middle"> |
| <td class="windowbg2"> |
| <td align="left" class="windowbg2"><br /> |
| <div class="pad-more small">$admin_txt{'19'}</div> |
| <span class="small"> |
| </td> |
| $admin_txt{'19'} |
| </tr><tr> |
| </span><br /><br /> |
| <td class="windowbg2 center"> |
| </td> |
| <div class="pad-more"> |
| </tr> |
| <textarea cols="70" rows="35" name="bots" style="width:98%">~; |
| <tr valign="middle"> |
| fopen( BOTS, "$vardir/bots.hosts" ); |
| <td align="center" class="windowbg2"><br /> |
| while ( $line = <BOTS> ) { chomp $line; $yymain .= qq~$line\n~; } |
| <textarea cols="70" rows="35" name="bots" style="width:98%">~; |
| fclose(BOTS); |
| fopen(BOTS, "$vardir/bots.hosts"); |
| $yymain .= qq~</textarea> |
| while ($line = <BOTS>) { chomp $line; $yymain .= qq~$line\n~; } |
| </div> |
| fclose(BOTS); |
| </td> |
| $yymain .= qq~</textarea> |
| </tr> |
| <br /><br /> |
| </table> |
| </td> |
| </div> |
| </tr> |
| <div class="bordercolor rightboxdiv"> |
| <tr valign="middle"> |
| <table class="border-space pad-cell"> |
| <td align="center" class="catbg"><input type="submit" value="$admin_txt{'10'}" class="button" /></td> |
| <tr> |
| </tr> |
| <th class="titlebg">$admin_img{'prefimg'} $admin_txt{'10'}</th> |
| </table> |
| </tr><tr> |
| </div> |
| <td class="catbg center"> |
| |
| <input class="button" type="submit" value="$admin_txt{'10'}" /> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| </form> |
| </form> |
| ~; |
| ~; |
| $yytitle = "$admin_txt{'18'}"; |
| $yytitle = "$admin_txt{'18'}"; |
| $action_area = "editbots"; |
| $action_area = 'editbots'; |
| &AdminTemplate; |
| AdminTemplate(); |
| |
| return; |
| } |
| } |
| |
| |
| sub EditBots2 { |
| sub EditBots2 { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| |
| |
| fopen(BOTS, ">$vardir/bots.hosts", 1); |
| fopen( BOTS, ">$vardir/bots.hosts", 1 ); |
| print BOTS map { "$_\n"; } sort { (split(/\|/, $a))[1] cmp (split(/\|/, $b))[1] } split(/[\n\r]+/, $FORM{'bots'}); |
| print {BOTS} map { "$_\n"; } |
| fclose(BOTS); |
| sort { ( split /\|/xsm, $a )[1] cmp( split /\|/xsm, $b )[1] } |
| |
| split /[\n\r]+/xsm, $FORM{'bots'} |
| $yySetLocation = qq~$adminurl?action=editbots~; |
| or croak "$croak{'print'} BOTS"; |
| &redirectexit; |
| fclose(BOTS); |
| |
| |
| |
| $yySetLocation = qq~$adminurl?action=editbots~; |
| |
| redirectexit(); |
| |
| return; |
| } |
| } |
| |
| |
| sub SetCensor { |
| sub SetCensor { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| my ($censorlanguage, $line); |
| my ( $censorlanguage, $line ); |
| if ($FORM{'censorlanguage'}) { $censorlanguage = $FORM{'censorlanguage'} } |
| if ( $FORM{'censorlanguage'} ) { $censorlanguage = $FORM{'censorlanguage'} } |
| else { $censorlanguage = $lang; } |
| else { $censorlanguage = $lang; } |
| opendir(LNGDIR, $langdir); |
| opendir LNGDIR, $langdir; |
| my @lfilesanddirs = readdir(LNGDIR); |
| my @lfilesanddirs = readdir LNGDIR; |
| close(LNGDIR); |
| closedir LNGDIR; |
| |
| |
| foreach my $fld (sort {lc($a) cmp lc($b)} @lfilesanddirs) { |
| foreach my $fld ( sort { lc($a) cmp lc $b } @lfilesanddirs ) { |
| if (-d "$langdir/$fld" && $fld =~ m^\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z^ && -e "$langdir/$fld/Main.lng") { |
| if ( -d "$langdir/$fld" |
| if ($censorlanguage eq $fld) { $drawnldirs .= qq~<option value="$fld" selected="selected">$fld</option>~; } |
| && $fld =~ m{\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z}sm |
| else { $drawnldirs .= qq~<option value="$fld">$fld</option>~; } |
| && -e "$langdir/$fld/Main.lng" ) |
| |
| { |
| |
| $displang = $fld; |
| |
| $displang =~ s/(.+?)\_(.+?)$/$1 ($2)/gism; |
| |
| if ( $censorlanguage eq $fld ) { |
| |
| $drawnldirs .= qq~<option value="$fld" selected="selected">$displang</option>~; |
| } |
| } |
| } |
| else { $drawnldirs .= qq~<option value="$fld">$displang</option>~; } |
| |
| } |
| my (@censored, $i); |
| } |
| fopen(CENSOR, "$langdir/$censorlanguage/censor.txt"); |
| |
| @censored = <CENSOR>; |
| my ( @censored, $i ); |
| fclose(CENSOR); |
| fopen( CENSOR, "$langdir/$censorlanguage/censor.txt" ); |
| foreach $i (@censored) { |
| @censored = <CENSOR>; |
| $i =~ tr/\r//d; |
| fclose(CENSOR); |
| $i =~ tr/\n//d; |
| foreach my $i (@censored) { |
| } |
| $i =~ tr/\r//d; |
| $yymain .= qq~ |
| $i =~ tr/\n//d; |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| } |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| $yymain .= qq~ |
| <tr valign="middle"> |
| <div class="bordercolor rightboxdiv"> |
| <td align="left" class="titlebg"> |
| <table class="border-space pad-cell" style="margin-bottom: -1px;"> |
| <img src="$imagesdir/ban.gif" alt="" border="0" /><span class="legend"><b>$admin_txt{'135'}</b></span> |
| <tr> |
| </td> |
| <th class="titlebg"> |
| </tr> |
| $admin_img{'banimg'}<span class="legend"> <b>$admin_txt{'135'}</b></span> |
| <tr align="center" valign="middle"> |
| </th> |
| <td align="left" class="windowbg2"> |
| </tr><tr> |
| <form action="$adminurl?action=setcensor" method="post" enctype="application/x-www-form-urlencoded"> |
| <td class="windowbg2"> |
| $templs{'7'} |
| <form action="$adminurl?action=setcensor" method="post" enctype="application/x-www-form-urlencoded" accept-charset="$yymycharset"> |
| <select name="censorlanguage" id="censorlanguage" size="1"> |
| $templs{'7'} |
| $drawnldirs |
| <select name="censorlanguage" id="censorlanguage" size="1"> |
| </select> |
| $drawnldirs |
| <input type="submit" value="$admin_txt{'462'}" class="button" /> |
| </select> |
| </form> |
| <input type="submit" value="$admin_txt{'462'}" class="button" /> |
| </td> |
| </form> |
| </tr> |
| </td> |
| </table> |
| </tr> |
| </div> |
| </table> |
| <br /> |
| </div> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <form action="$adminurl?action=setcensor2" method="post" enctype="application/x-www-form-urlencoded" accept-charset="$yymycharset"> |
| <!-- Split for XHTML Validation purposes --> |
| <div class="bordercolor rightboxdiv"> |
| <form action="$adminurl?action=setcensor2" method="post" enctype="application/x-www-form-urlencoded"> |
| <table class="border-space" style="margin-bottom: .5em;"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <tr> |
| <tr valign="middle"> |
| <td class="windowbg2"> |
| <td align="left" class="windowbg2"><br /> |
| <div class="pad-more"> |
| <label for="censored">$admin_txt{'136'}</label><br /><br /> |
| <label for="censored">$admin_txt{'136'}</label> |
| </td> |
| </div> |
| </tr> |
| </td> |
| <tr valign="middle"> |
| </tr><tr> |
| <td align="center" class="windowbg2"><br /> |
| <td class="windowbg2 center"> |
| <input type="hidden" name="censorlanguage" value="$censorlanguage" /> |
| <div class="pad-more"> |
| <textarea rows="35" cols="15" name="censored" id="censored" style="width:90%">~; |
| <input type="hidden" name="censorlanguage" value="$censorlanguage" /> |
| foreach $i (@censored) { |
| <textarea rows="35" cols="15" name="censored" id="censored" style="width:90%">~; |
| unless ($i && $i =~ m/.+[\=~].+/) { next; } |
| foreach my $i (@censored) { |
| $yymain .= "$i\n"; |
| if ( !$i || $i !~ m/.+[\=~].+/sm ) { next; } |
| } |
| $yymain .= "$i\n"; |
| $yymain .= qq~</textarea> |
| } |
| <br /><br /> |
| $yymain .= qq~</textarea> |
| </td> |
| </div> |
| </tr> |
| </td> |
| <tr valign="middle"> |
| </tr> |
| <td align="center" class="catbg"> |
| </table> |
| <input type="submit" value="$admin_txt{'10'} $censorlanguage" class="button" /> |
| </div> |
| </td> |
| <div class="bordercolor rightboxdiv"> |
| </tr> |
| <table class="border-space pad-cell"> |
| </table> |
| <tr> |
| </form> |
| <th class="titlebg">$admin_img{'prefimg'} $admin_txt{'10'}</th> |
| </div> |
| </tr><tr> |
| |
| <td class="catbg center"> |
| |
| <input type="submit" value="$admin_txt{'10'} $censorlanguage" class="button" /> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| |
| </form> |
| ~; |
| ~; |
| $yytitle = "$admin_txt{'135'}"; |
| $yytitle = "$admin_txt{'135'}"; |
| $action_area = "setcensor"; |
| $action_area = 'setcensor'; |
| &AdminTemplate; |
| AdminTemplate(); |
| } |
| return; |
| |
| } |
| sub SetCensor2 { # don't use &FromChars() here!!! |
| |
| &is_admin_or_gmod; |
| sub SetCensor2 { # don't use &FromChars() here!!! |
| $FORM{'censored'} =~ tr/\r//d; |
| is_admin_or_gmod(); |
| $FORM{'censored'} =~ s~\A[\s\n]+~~; |
| $FORM{'censored'} =~ tr/\r//d; |
| $FORM{'censored'} =~ s~[\s\n]+\Z~~; |
| $FORM{'censored'} =~ s/\A[\s\n]+//xsm; |
| $FORM{'censored'} =~ s~\n\s*\n~\n~g; |
| $FORM{'censored'} =~ s/[\s\n]+\Z//xsm; |
| if ($FORM{'censorlanguage'}) { $censorlanguage = $FORM{'censorlanguage'}; } |
| $FORM{'censored'} =~ s/\n\s*\n/\n/gxsm; |
| else { $censorlanguage = $lang; } |
| if ( $FORM{'censorlanguage'} ) { |
| my @lines = split(/\n/, $FORM{'censored'}); |
| $censorlanguage = $FORM{'censorlanguage'}; |
| fopen(CENSOR, ">$langdir/$censorlanguage/censor.txt", 1); |
| } |
| |
| else { $censorlanguage = $lang; } |
| foreach my $i (@lines) { |
| my @lines = split /\n/xsm, $FORM{'censored'}; |
| $i =~ tr/\n//d; |
| fopen( CENSOR, ">$langdir/$censorlanguage/censor.txt", 1 ); |
| unless ($i && $i =~ m/.+[\=~].+/) { next; } |
| |
| print CENSOR "$i\n"; |
| foreach my $i (@lines) { |
| } |
| $i =~ tr/\n//d; |
| fclose(CENSOR); |
| if ( !$i || $i !~ m/.+[\=~].+/sm ) { next; } |
| $yySetLocation = qq~$adminurl~; |
| print {CENSOR} "$i\n" or croak "$croak{'print'} CENSOR"; |
| &redirectexit; |
| } |
| |
| fclose(CENSOR); |
| |
| $yySetLocation = qq~$adminurl?action=setcensor~; |
| |
| redirectexit(); |
| |
| return; |
| } |
| } |
| |
| |
| sub SetReserve { |
| sub SetReserve { |
| my (@reserved, @reservecfg, $i); |
| is_admin_or_gmod(); |
| &is_admin_or_gmod; |
| fopen( RESERVE, "$vardir/reserve.txt" ); |
| fopen(RESERVE, "$vardir/reserve.txt"); |
| my @reserved = <RESERVE>; |
| @reserved = <RESERVE>; |
| fclose(RESERVE); |
| fclose(RESERVE); |
| fopen( RESERVECFG, "$vardir/reservecfg.txt" ); |
| fopen(RESERVECFG, "$vardir/reservecfg.txt"); |
| my @reservecfg = <RESERVECFG>; |
| @reservecfg = <RESERVECFG>; |
| fclose(RESERVECFG); |
| fclose(RESERVECFG); |
| for my $i ( 0 .. $#reservecfg ) { |
| for (my $i = 0; $i < @reservecfg; $i++) { |
| chomp $reservecfg[$i]; |
| chomp $reservecfg[$i]; |
| if ( $reservecfg[$i] ) { $reservecheck[$i] = q~ checked="checked"~; } |
| if($reservecfg[$i]) { $reservecheck[$i] = qq~ checked="checked"~; } |
| } |
| } |
| $yymain .= qq~ |
| $yymain .= qq~ |
| <form action="$adminurl?action=setreserve2" method="post" enctype="application/x-www-form-urlencoded" accept-charset="$yymycharset"> |
| <form action="$adminurl?action=setreserve2" method="post" enctype="application/x-www-form-urlencoded"> |
| <div class="bordercolor rightboxdiv"> |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| <table class="border-space" style="margin-bottom: .5em;"> |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| <tr> |
| <tr valign="middle"> |
| <td class="titlebg">$admin_img{'profile'} <b>$admin_txt{'341'}</b></td> |
| <td align="left" class="titlebg"><img src="$imagesdir/profile.gif" alt="" border="0" /><b>$admin_txt{'341'}</b></td> |
| </tr><tr> |
| </tr> |
| <td class="windowbg2"> |
| <tr valign="middle"> |
| <div class="pad-more">$admin_txt{'699'}</div> |
| <td align="left" class="windowbg2"><br /> |
| </td> |
| $admin_txt{'699'}<br /><br /> |
| </tr><tr> |
| </td> |
| <td class="windowbg2"><div class="pad-more"> |
| </tr> |
| $admin_txt{'342'} |
| <tr valign="middle"> |
| <p class="center"><textarea cols="40" rows="35" name="reserved" style="width:95%">~; |
| <td align="left" class="windowbg2"><br /> |
| foreach my $i (@reserved) { |
| $admin_txt{'342'}<br /><br /> |
| chomp $i; |
| <center><textarea cols="40" rows="35" name="reserved" style="width:95%">~; |
| $i =~ s/\t//gxsm; |
| foreach $i (@reserved) { |
| if ( $i !~ m{\A[\S|\s]*[\n\r]*\Z}sm ) { next; } |
| chomp $i; |
| $yymain .= "$i\n"; |
| $i =~ s~\t~~g; |
| } |
| if ($i !~ m~\A[\S|\s]*[\n\r]*\Z~) { next; } |
| $yymain .= qq~</textarea> |
| $yymain .= "$i\n"; |
| </p> |
| } |
| |
| $yymain .= qq~</textarea> |
| |
| </center> |
| |
| <br /><br /> |
| |
| <input type="checkbox" name="matchword" id="matchword" value="checked"$reservecheck[0] /> |
| <input type="checkbox" name="matchword" id="matchword" value="checked"$reservecheck[0] /> |
| <label for="matchword">$admin_txt{'726'}</label><br /> |
| <label for="matchword">$admin_txt{'726'}</label><br /> |
| <input type="checkbox" name="matchcase" id="matchcase" value="checked"$reservecheck[1] /> |
| <input type="checkbox" name="matchcase" id="matchcase" value="checked"$reservecheck[1] /> |
| <label for="matchcase">$admin_txt{'727'}</label><br /> |
| <label for="matchcase">$admin_txt{'727'}</label><br /> |
| <input type="checkbox" name="matchuser" id="matchuser" value="checked"$reservecheck[2] /> |
| <input type="checkbox" name="matchuser" id="matchuser" value="checked"$reservecheck[2] /> |
| <label for="matchuser">$admin_txt{'728'}</label><br /> |
| <label for="matchuser">$admin_txt{'728'}</label><br /> |
| <input type="checkbox" name="matchname" id="matchname" value="checked"$reservecheck[3] /> |
| <input type="checkbox" name="matchname" id="matchname" value="checked"$reservecheck[3] /> |
| <label for="matchname">$admin_txt{'729'}</label><br /> |
| <label for="matchname">$admin_txt{'729'}</label> |
| </td> |
| </div></td> |
| </tr> |
| </tr> |
| <tr valign="middle"> |
| </table> |
| <td align="center" class="catbg"><input type="submit" value="$admin_txt{'10'}" class="button" /></td> |
| </div> |
| </tr> |
| <div class="bordercolor rightboxdiv"> |
| </table> |
| <table class="border-space pad-cell"> |
| </div> |
| <tr> |
| |
| <th class="titlebg">$admin_img{'prefimg'} $admin_txt{'10'}</th> |
| |
| </tr><tr> |
| |
| <td class="catbg center"> |
| |
| <input type="submit" value="$admin_txt{'10'}" class="button" /> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| </form> |
| </form> |
| ~; |
| ~; |
| $yytitle = "$admin_txt{'341'}"; |
| $yytitle = "$admin_txt{'341'}"; |
| $action_area = "setreserve"; |
| $action_area = 'setreserve'; |
| &AdminTemplate; |
| AdminTemplate(); |
| |
| return; |
| } |
| } |
| |
| |
| sub SetReserve2 { |
| sub SetReserve2 { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| $FORM{'reserved'} =~ tr/\r//d; |
| $FORM{'reserved'} =~ tr/\r//d; |
| $FORM{'reserved'} =~ s~\A[\s\n]+~~; |
| $FORM{'reserved'} =~ s/\A[\s\n]+//xsm; |
| $FORM{'reserved'} =~ s~[\s\n]+\Z~~; |
| $FORM{'reserved'} =~ s/[\s\n]+\Z//xsm; |
| $FORM{'reserved'} =~ s~\n\s*\n~\n~g; |
| $FORM{'reserved'} =~ s/\n\s*\n/\n/gxsm; |
| fopen(RESERVE, ">$vardir/reserve.txt", 1); |
| fopen( RESERVE, ">$vardir/reserve.txt", 1 ); |
| my $matchword = $FORM{'matchword'} eq 'checked' ? 'checked' : ''; |
| my $matchword = $FORM{'matchword'} eq 'checked' ? 'checked' : q{}; |
| my $matchcase = $FORM{'matchcase'} eq 'checked' ? 'checked' : ''; |
| my $matchcase = $FORM{'matchcase'} eq 'checked' ? 'checked' : q{}; |
| my $matchuser = $FORM{'matchuser'} eq 'checked' ? 'checked' : ''; |
| my $matchuser = $FORM{'matchuser'} eq 'checked' ? 'checked' : q{}; |
| my $matchname = $FORM{'matchname'} eq 'checked' ? 'checked' : ''; |
| my $matchname = $FORM{'matchname'} eq 'checked' ? 'checked' : q{}; |
| print RESERVE $FORM{'reserved'}; |
| print {RESERVE} $FORM{'reserved'} or croak "$croak{'print'} RESERVE"; |
| fclose(RESERVE); |
| fclose(RESERVE); |
| fopen(RESERVECFG, "+>$vardir/reservecfg.txt"); |
| fopen( RESERVECFG, "+>$vardir/reservecfg.txt" ); |
| print RESERVECFG "$matchword\n"; |
| print {RESERVECFG} "$matchword\n" or croak "$croak{'print'} RESERVECFG"; |
| print RESERVECFG "$matchcase\n"; |
| print {RESERVECFG} "$matchcase\n" or croak "$croak{'print'} RESERVECFG"; |
| print RESERVECFG "$matchuser\n"; |
| print {RESERVECFG} "$matchuser\n" or croak "$croak{'print'} RESERVECFG"; |
| print RESERVECFG "$matchname\n"; |
| print {RESERVECFG} "$matchname\n" or croak "$croak{'print'} RESERVECFG"; |
| fclose(RESERVECFG); |
| fclose(RESERVECFG); |
| $yySetLocation = qq~$adminurl~; |
| $yySetLocation = qq~$adminurl?action=setreserve~; |
| &redirectexit; |
| redirectexit(); |
| |
| return; |
| } |
| } |
| |
| |
| sub ModifyAgreement { |
| sub ModifyAgreement { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| |
| |
| opendir(LNGDIR, $langdir); |
| opendir LNGDIR, $langdir; |
| my @lfilesanddirs = readdir(LNGDIR); |
| my @lfilesanddirs = readdir LNGDIR; |
| close(LNGDIR); |
| closedir LNGDIR; |
| |
| |
| my $agreementlanguage = $FORM{'agreementlanguage'} || $INFO{'agreementlanguage'} || $lang; |
| my $agreementlanguage = |
| foreach my $fld (sort {lc($a) cmp lc($b)} @lfilesanddirs) { |
| $FORM{'agreementlanguage'} |
| if (-d "$langdir/$fld" && $fld =~ m^\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z^ && -e "$langdir/$fld/Main.lng") { |
| || $INFO{'agreementlanguage'} |
| if ($agreementlanguage eq $fld) { $drawnldirs .= qq~<option value="$fld" selected="selected">$fld</option>~; } |
| || $lang; |
| else { $drawnldirs .= qq~<option value="$fld">$fld</option>~; } |
| foreach my $fld (sort {lc($a) cmp lc $b} @lfilesanddirs) { |
| } |
| if (-e "$langdir/$fld/Main.lng") { |
| } |
| $displang = $fld; |
| |
| $displang =~ s/(.+?)\_(.+?)$/$1 ($2)/gism; |
| my ($fullagreement, $line); |
| if ($agreementlanguage eq $fld) { |
| fopen(AGREE, "$langdir/$agreementlanguage/agreement.txt"); |
| $drawnldirs .= qq~<option value="$fld" selected="selected">$displang</option>~; } |
| while ($line = <AGREE>) { |
| else { $drawnldirs .= qq~<option value="$fld">$displang</option>~; } |
| $line =~ tr/[\r\n]//d; |
| } |
| &FromHTML($line); |
| } |
| $fullagreement .= qq~$line\n~; |
| |
| } |
| my ( $fullagreement, $line ); |
| fclose(AGREE); |
| fopen( AGREE, "$langdir/$agreementlanguage/agreement.txt" ); |
| $yymain .= qq~ |
| while ( $line = <AGREE> ) { |
| |
| $line =~ tr/[\r\n]//d; |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| FromHTML($line); |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| $fullagreement .= qq~$line\n~; |
| <tr valign="middle"> |
| } |
| <td align="left" class="titlebg"><img src="$imagesdir/xx.gif" alt="" border="0" /><b>$admin_txt{'764'}</b></td> |
| fclose(AGREE); |
| </tr> |
| $yymain .= qq~ |
| <tr valign="middle"> |
| <div class="bordercolor rightboxdiv"> |
| <td align="left" class="windowbg2"><br /> |
| <table class="border-space pad-cell" style="margin-bottom: -1px;"> |
| <label for="agreement">$admin_txt{'765'}</label><br /><br /> |
| <tr> |
| </td> |
| <td class="titlebg">$admin_img{'xx'} <b>$admin_txt{'764'}</b></td> |
| </tr> |
| </tr><tr> |
| <tr valign="middle"> |
| <td class="windowbg2"> |
| <td align="left" class="windowbg2"><br /> |
| <div class="pad-more"> |
| <form action="$adminurl?action=modagreement" method="post" enctype="application/x-www-form-urlencoded"> |
| <label for="agreement">$admin_txt{'765'}</label> |
| $templs{'8'} |
| </div> |
| <select name="agreementlanguage" id="agreementlanguage" size="1"> |
| </td> |
| $drawnldirs |
| </tr><tr> |
| </select> |
| <td class="windowbg2"> |
| <input type="submit" value="$admin_txt{'462'}" class="button" /> |
| <form action="$adminurl?action=modagreement" method="post" enctype="application/x-www-form-urlencoded"> |
| </form> |
| $templs{'8'} |
| </td> |
| <select name="agreementlanguage" id="agreementlanguage" size="1"> |
| </tr> |
| $drawnldirs |
| <tr valign="middle"> |
| </select> |
| <td align="center" class="windowbg2"><br /> |
| <input type="submit" value="$admin_txt{'462'}" class="button" /> |
| <form action="$adminurl?action=modagreement2" method="post" enctype="application/x-www-form-urlencoded"> |
| </form> |
| <input type="hidden" name="destination" value="$INFO{'destination'}" /> |
| </td> |
| <input type="hidden" name="agreementlanguage" value="$agreementlanguage" /> |
| </tr> |
| <textarea rows="35" cols="95" name="agreement" id="agreement" style="width:95%">$fullagreement</textarea><br /><br /> |
| </table> |
| </td> |
| </div> |
| </tr> |
| <form action="$adminurl?action=modagreement2" method="post" enctype="application/x-www-form-urlencoded" accept-charset="$yymycharset"> |
| <tr valign="middle"> |
| <div class="bordercolor borderstyle rightboxdiv"> |
| <td align="center" class="catbg"><input type="submit" value="$admin_txt{'10'} $agreementlanguage" class="button" /></td> |
| <table class="border-space" style="margin-bottom: .5em;"> |
| </tr> |
| <tr> |
| </form> |
| <td class="windowbg2 center"> |
| </table> |
| <div class="pad-more"> |
| </div> |
| <input type="hidden" name="destination" value="$INFO{'destination'}" /> |
| |
| <input type="hidden" name="agreementlanguage" value="$agreementlanguage" /> |
| |
| <textarea rows="35" cols="95" name="agreement" id="agreement" style="width:95%">$fullagreement</textarea> |
| |
| </div> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| |
| <div class="bordercolor rightboxdiv"> |
| |
| <table class="border-space pad-cell"> |
| |
| <tr> |
| |
| <th class="titlebg">$admin_img{'prefimg'} $admin_txt{'10'}</th> |
| |
| </tr><tr> |
| |
| <td class="catbg center"> |
| |
| <input type="submit" value="$admin_txt{'10'} $agreementlanguage" class="button" /> |
| |
| </td> |
| |
| </tr> |
| |
| </table> |
| |
| </div> |
| |
| </form> |
| ~; |
| ~; |
| $yytitle = "$admin_txt{'764'}"; |
| $yytitle = "$admin_txt{'764'}"; |
| $action_area = "modagreement"; |
| $action_area = 'modagreement'; |
| &AdminTemplate; |
| AdminTemplate(); |
| |
| return; |
| } |
| } |
| |
| |
| sub ModifyAgreement2 { |
| sub ModifyAgreement2 { |
| &is_admin_or_gmod; |
| is_admin_or_gmod(); |
| |
| |
| if ($FORM{'agreementlanguage'}) { $agreementlanguage = $FORM{'agreementlanguage'}; } |
| if ( $FORM{'agreementlanguage'} ) { |
| else { $agreementlanguage = $lang; } |
| $agreementlanguage = $FORM{'agreementlanguage'}; |
| $FORM{'agreement'} =~ tr/\r//d; |
| } |
| $FORM{'agreement'} =~ s~\A\n+~~; |
| else { $agreementlanguage = $lang; } |
| $FORM{'agreement'} =~ s~\n+\Z~~; |
| $FORM{'agreement'} =~ tr/\r//d; |
| fopen(AGREE, ">$langdir/$agreementlanguage/agreement.txt"); |
| $FORM{'agreement'} =~ s/\A\n+//xsm; |
| print AGREE $FORM{'agreement'}; |
| $FORM{'agreement'} =~ s/\n+\Z//xsm; |
| fclose(AGREE); |
| fopen( AGREE, ">$langdir/$agreementlanguage/agreement.txt" ); |
| |
| print {AGREE} $FORM{'agreement'} or croak "$croak{'print'} AGREE"; |
| $FORM{'agreement'} =~ s/\n/<br \/>\n/g; |
| fclose(AGREE); |
| fopen(HELPAGREE, ">$helpfile/$agreementlanguage/User/user00_agreement.help"); |
| |
| print HELPAGREE qq^\$SectionName = "$register_txt{'764a'}"; |
| $FORM{'agreement'} =~ s/\n/<br \/>\n/gsm; |
| |
| if ( -e "$helpfile/$agreementlanguage/User/user00_agreement.help" ) { |
| |
| fopen( HELPAGREE, |
| |
| ">$helpfile/$agreementlanguage/User/user00_agreement.help" ); |
| |
| $my_regtitle = $register_txt{'764a'}; |
| |
| $my_regtitle =~ s/ /_/gsm; |
| |
| print {HELPAGREE} qq^\$SectionName = "$my_regtitle"; |
| |
| |
| ### Section 1 |
| ### Section 1 |
| ############################################# |
| ############################################# |
| \$SectionSub1 = "$register_txt{'764a'}"; |
| \$SectionSub1 = "{yabb_boardname}_$my_regtitle"; |
| \$SectionBody1 = qq~<p>$FORM{'agreement'}</p>~; |
| \$SectionBody1 = qq~<p>$FORM{'agreement'}</p>~; |
| ############################################# |
| ############################################# |
| |
| |
| |
| |
| 1;^; |
| 1;^ or croak "$croak{'print'} HELPAGREE"; |
| fclose(HELPAGREE); |
| fclose(HELPAGREE); |
| |
| } |
| $yySetLocation = $FORM{'destination'} ? qq~$adminurl?action=$FORM{'destination'}~ : qq~$adminurl?action=modagreement;agreementlanguage=$FORM{'agreementlanguage'}~; |
| |
| &redirectexit; |
| $yySetLocation = |
| |
| $FORM{'destination'} |
| |
| ? qq~$adminurl?action=$FORM{'destination'}~ |
| |
| : qq~$adminurl?action=modagreement;agreementlanguage=$FORM{'agreementlanguage'}~; |
| |
| redirectexit(); |
| |
| return; |
| } |
| } |
| |
| |
| sub GmodSettings2 { |
| sub GmodSettings2 { |
| &is_admin; |
| is_admin(); |
| |
| |
| # modstyle is set the same as modcss as modcss is useless without it. |
| |
| $mynewsettings = $FORM{'main'} || $FORM{'advanced'} || $FORM{'news'} || $FORM{'security'}|| $FORM{'antispam'}; |
| |
| |
| |
| $FORM{'viewmembers'} = "on" if $FORM{'deletemultimembers'} eq 'on' || $FORM{'addmember'} eq 'on'; |
| |
| |
| |
| my $filler = q~ ~; |
| # modstyle is set the same as modcss as modcss is useless without it. |
| my $setfile = << "EOF"; |
| $mynewsettings = |
| ### Gmod Related Setttings ### |
| $FORM{'main'} |
| |
| || $FORM{'advanced'} |
| |
| || $FORM{'news'} |
| |
| || $FORM{'security'} |
| |
| || $FORM{'antispam'}; |
| |
| |
| |
| if ( $FORM{'deletemultimembers'} eq 'on' || $FORM{'addmember'} eq 'on' ) { |
| |
| $FORM{'viewmembers'} = 'on'; |
| |
| } |
| |
| |
| |
| my $filler = |
| |
| q~ ~; |
| |
| my $setfile = <<"EOF"; |
| |
| ### Gmod Related Settings ### |
| |
| |
| \$allow_gmod_admin = "$FORM{'allow_gmod_admin'}"; # |
| \$allow_gmod_admin = "$FORM{'allow_gmod_admin'}"; # |
| \$allow_gmod_profile = "$FORM{'allow_gmod_profile'}"; # |
| \$allow_gmod_profile = "$FORM{'allow_gmod_profile'}"; # |
| \$allow_gmod_aprofile = "$FORM{'allow_gmod_aprofile'}"; # |
| \$allow_gmod_aprofile = "$FORM{'allow_gmod_aprofile'}"; # |
| \$gmod_newfile = "on"; # |
| \$gmod_newfile = 'on'; # |
| |
| |
| ### Areas Gmods can Access ### |
| ### Areas Gmods can Access ### |
| |
| |
| %gmod_access = ( |
| %gmod_access = ( |
| 'ext_admin',"$FORM{'ext_admin'}", |
| 'ext_admin',"$FORM{'ext_admin'}", |
| |
| |
| 'newsettings;page=main',"$FORM{'main'}", |
| 'newsettings;page=main',"$FORM{'main'}", |
| 'newsettings;page=advanced', "$FORM{'advanced'}", |
| 'newsettings;page=advanced', "$FORM{'advanced'}", |
| 'editbots',"$FORM{'editbots'}", |
| 'editbots',"$FORM{'editbots'}", |
| |
| |
| 'newsettings;page=news',"$FORM{'news'}", |
| 'newsettings;page=news',"$FORM{'news'}", |
| 'smilies',"$FORM{'smilies'}", |
| 'smilies',"$FORM{'smilies'}", |
| 'setcensor',"$FORM{'setcensor'}", |
| 'setcensor',"$FORM{'setcensor'}", |
| 'modagreement',"$FORM{'modagreement'}", |
| 'modagreement',"$FORM{'modagreement'}", |
| |
| 'eventcal_set',"$FORM{'eventcal_set'}", |
| |
| 'bookmarks',"$FORM{'bookmarks'}", |
| |
| |
| 'referer_control',"$FORM{'referer_control'}", |
| 'referer_control',"$FORM{'referer_control'}", |
| 'newsettings;page=security',"$FORM{'security'}", |
| 'newsettings;page=security',"$FORM{'security'}", |
| 'setup_guardian',"$FORM{'setup_guardian'}", |
| 'setup_guardian',"$FORM{'setup_guardian'}", |
| 'newsettings;page=antispam',"$FORM{'antispam'}", |
| 'newsettings;page=antispam',"$FORM{'antispam'}", |
| |
| 'spam_questions',"$FORM{'spam_questions'}", |
| |
| 'honeypot',"$FORM{'honeypot'}", |
| 'managecats',"$FORM{'managecats'}", |
| 'managecats',"$FORM{'managecats'}", |
| 'manageboards',"$FORM{'manageboards'}", |
| 'manageboards',"$FORM{'manageboards'}", |
| 'helpadmin',"$FORM{'helpadmin'}", |
| 'helpadmin',"$FORM{'helpadmin'}", |
| 'editemailtemplates',"$FORM{'editemailtemplates'}", |
| 'editemailtemplates',"$FORM{'editemailtemplates'}", |
| |
| |
| 'addmember',"$FORM{'addmember'}", |
| 'addmember',"$FORM{'addmember'}", |
| 'viewmembers',"$FORM{'viewmembers'}", |
| 'viewmembers',"$FORM{'viewmembers'}", |
| 'deletemultimembers',"$FORM{'deletemultimembers'}", |
| 'deletemultimembers',"$FORM{'deletemultimembers'}", |
| 'modmemgr',"$FORM{'modmemgr'}", |
| 'modmemgr',"$FORM{'modmemgr'}", |
| 'mailing',"$FORM{'mailing'}", |
| 'mailing',"$FORM{'mailing'}", |
| 'ipban',"$FORM{'ipban'}", |
| 'ipban',"$FORM{'ipban'}", |
| 'setreserve',"$FORM{'setreserve'}", |
| 'setreserve',"$FORM{'setreserve'}", |
| |
| |
| 'modskin',"$FORM{'modskin'}", |
| 'modskin',"$FORM{'modskin'}", |
| 'modcss',"$FORM{'modcss'}", |
| 'modcss',"$FORM{'modcss'}", |
| 'modtemp',"$FORM{'modtemp'}", |
| 'modtemp',"$FORM{'modtemp'}", |
| |
| |
| 'clean_log',"$FORM{'clean_log'}", |
| 'clean_log',"$FORM{'clean_log'}", |
| 'boardrecount',"$FORM{'boardrecount'}", |
| 'boardrecount',"$FORM{'boardrecount'}", |
| 'rebuildmesindex',"$FORM{'rebuildmesindex'}", |
| 'rebuildmesindex',"$FORM{'rebuildmesindex'}", |
| 'membershiprecount',"$FORM{'membershiprecount'}", |
| 'membershiprecount',"$FORM{'membershiprecount'}", |
| 'rebuildmemlist',"$FORM{'rebuildmemlist'}", |
| 'rebuildmemlist',"$FORM{'rebuildmemlist'}", |
| 'rebuildmemhist',"$FORM{'rebuildmemhist'}", |
| 'rebuildmemhist',"$FORM{'rebuildmemhist'}", |
| 'rebuildnotifications',"$FORM{'rebuildnotifications'}", |
| 'rebuildnotifications',"$FORM{'rebuildnotifications'}", |
| 'deleteoldthreads',"$FORM{'deleteoldthreads'}", |
| 'deleteoldthreads',"$FORM{'deleteoldthreads'}", |
| 'manageattachments',"$FORM{'manageattachments'}", |
| 'manageattachments',"$FORM{'manageattachments'}", |
| |
| 'backupsettings',"$FORM{'backupsettings'}", |
| |
| |
| 'detailedversion',"$FORM{'detailedversion'}", |
| 'detailedversion',"$FORM{'detailedversion'}", |
| 'stats',"$FORM{'stats'}", |
| 'stats',"$FORM{'stats'}", |
| 'showclicks',"$FORM{'showclicks'}", |
| 'showclicks',"$FORM{'showclicks'}", |
| 'errorlog',"$FORM{'errorlog'}", |
| 'errorlog',"$FORM{'errorlog'}", |
| |
| |
| 'view_reglog',"$FORM{'view_reglog'}", |
| 'view_reglog',"$FORM{'view_reglog'}", |
| |
| |
| 'modlist',"$FORM{'modlist'}", |
| 'modlist',"$FORM{'modlist'}", |
| ); |
| ); |
| |
| |
| %gmod_access2 = ( |
| %gmod_access2 = ( |
| admin => "$FORM{'allow_gmod_admin'}", |
| admin => "$FORM{'allow_gmod_admin'}", |
| |
| |
| newsettings => "$mynewsettings", |
| newsettings => "$mynewsettings", |
| newsettings2 => "$mynewsettings", |
| newsettings2 => "$mynewsettings", |
| |
| eventcal_set2 => "$FORM{'eventcal_set'}", |
| |
| eventcal_set3 => "$FORM{'eventcal_set'}", |
| |
| bookmarks2 => "$FORM{'bookmarks'}", |
| |
| bookmarks_add => "$FORM{'bookmarks'}", |
| |
| bookmarks_add2 => "$FORM{'bookmarks'}", |
| |
| bookmarks_edit => "$FORM{'bookmarks'}", |
| |
| bookmarks_edit2 => "$FORM{'bookmarks'}", |
| |
| bookmarks_delete => "$FORM{'bookmarks'}", |
| |
| bookmarks_delete2 => "$FORM{'bookmarks'}", |
| |
| spam_questions2 => "$FORM{'spam_questions'}", |
| |
| spam_questions_add => "$FORM{'spam_questions'}", |
| |
| spam_questions_add2 => "$FORM{'spam_questions'}", |
| |
| spam_questions_edit => "$FORM{'spam_questions'}", |
| |
| spam_questions_edit2 => "$FORM{'spam_questions'}", |
| |
| spam_questions_delete => "$FORM{'spam_questions'}", |
| |
| spam_questions_delete2 => "$FORM{'spam_questions'}", |
| |
| honeypot2 => "$FORM{'honeypot'}", |
| |
| honeypot_add => "$FORM{'honeypot'}", |
| |
| honeypot_add2 => "$FORM{'honeypot'}", |
| |
| honeypot_edit => "$FORM{'honeypot'}", |
| |
| honeypot_edit2 => "$FORM{'honeypot'}", |
| |
| honeypot_delete => "$FORM{'honeypot'}", |
| |
| honeypot_delete2 => "$FORM{'honeypot'}", |
| deleteattachment => "$FORM{'manageattachments'}", |
| deleteattachment => "$FORM{'manageattachments'}", |
| manageattachments2 => "$FORM{'manageattachments'}", |
| manageattachments2 => "$FORM{'manageattachments'}", |
| removeoldattachments => "$FORM{'manageattachments'}", |
| removeoldattachments => "$FORM{'manageattachments'}", |
| removebigattachments => "$FORM{'manageattachments'}", |
| removebigattachments => "$FORM{'manageattachments'}", |
| rebuildattach => "$FORM{'manageattachments'}", |
| rebuildattach => "$FORM{'manageattachments'}", |
| remghostattach => "$FORM{'manageattachments'}", |
| remghostattach => "$FORM{'manageattachments'}", |
| |
| |
| profile => "$FORM{'allow_gmod_profile'}", |
| profile => "$FORM{'allow_gmod_profile'}", |
| profile2 => "$FORM{'allow_gmod_profile'}", |
| profile2 => "$FORM{'allow_gmod_profile'}", |
| profileAdmin => "$FORM{'allow_gmod_aprofile'}", |
| profileAdmin => "$FORM{'allow_gmod_aprofile'}", |
| profileAdmin2 => "$FORM{'allow_gmod_aprofile'}", |
| profileAdmin2 => "$FORM{'allow_gmod_aprofile'}", |
| profileContacts => "$FORM{'allow_gmod_profile'}", |
| profileContacts => "$FORM{'allow_gmod_profile'}", |
| profileContacts2 => "$FORM{'allow_gmod_profile'}", |
| profileContacts2 => "$FORM{'allow_gmod_profile'}", |
| profileIM => "$FORM{'allow_gmod_profile'}", |
| profileIM => "$FORM{'allow_gmod_profile'}", |
| profileIM2 => "$FORM{'allow_gmod_profile'}", |
| profileIM2 => "$FORM{'allow_gmod_profile'}", |
| profileOptions => "$FORM{'allow_gmod_profile'}", |
| profileOptions => "$FORM{'allow_gmod_profile'}", |
| profileOptions2 => "$FORM{'allow_gmod_profile'}", |
| profileOptions2 => "$FORM{'allow_gmod_profile'}", |
| |
| |
| ext_edit => "$FORM{'ext_admin'}", |
| ext_edit => "$FORM{'ext_admin'}", |
| ext_edit2 => "$FORM{'ext_admin'}", |
| ext_edit2 => "$FORM{'ext_admin'}", |
| ext_create => "$FORM{'ext_admin'}", |
| ext_create => "$FORM{'ext_admin'}", |
| ext_reorder => "$FORM{'ext_admin'}", |
| ext_reorder => "$FORM{'ext_admin'}", |
| ext_convert => "$FORM{'ext_admin'}", |
| ext_convert => "$FORM{'ext_admin'}", |
| |
| |
| myprofileAdmin => "$FORM{'allow_gmod_aprofile'}", |
| myprofileAdmin => "$FORM{'allow_gmod_aprofile'}", |
| myprofileAdmin2 => "$FORM{'allow_gmod_aprofile'}", |
| myprofileAdmin2 => "$FORM{'allow_gmod_aprofile'}", |
| |
| |
| delgroup => "$FORM{'modmemgr'}", |
| delgroup => "$FORM{'modmemgr'}", |
| editgroup => "$FORM{'modmemgr'}", |
| editgroup => "$FORM{'modmemgr'}", |
| editAddGroup2 => "$FORM{'modmemgr'}", |
| editAddGroup2 => "$FORM{'modmemgr'}", |
| modmemgr2 => "$FORM{'modmemgr'}", |
| modmemgr2 => "$FORM{'modmemgr'}", |
| assigned => "$FORM{'modmemgr'}", |
| assigned => "$FORM{'modmemgr'}", |
| assigned2 => "$FORM{'modmemgr'}", |
| assigned2 => "$FORM{'modmemgr'}", |
| |
| |
| reordercats => "$FORM{'managecats'}", |
| reordercats => "$FORM{'managecats'}", |
| reordercats2 => "$FORM{'managecats'}", |
| reordercats2 => "$FORM{'managecats'}", |
| modifycatorder => "$FORM{'managecats'}", |
| modifycatorder => "$FORM{'managecats'}", |
| modifycat => "$FORM{'managecats'}", |
| modifycat => "$FORM{'managecats'}", |
| createcat => "$FORM{'managecats'}", |
| createcat => "$FORM{'managecats'}", |
| catscreen => "$FORM{'managecats'}", |
| catscreen => "$FORM{'managecats'}", |
| addcat => "$FORM{'managecats'}", |
| addcat => "$FORM{'managecats'}", |
| addcat2 => "$FORM{'managecats'}", |
| addcat2 => "$FORM{'managecats'}", |
| |
| |
| modskin => "$FORM{'modskin'}", |
| modskin => "$FORM{'modskin'}", |
| modskin2 => "$FORM{'modskin'}", |
| modskin2 => "$FORM{'modskin'}", |
| modcss => "$FORM{'modcss'}", |
| modcss => "$FORM{'modcss'}", |
| modcss2 => "$FORM{'modcss'}", |
| modcss2 => "$FORM{'modcss'}", |
| modstyle => "$FORM{'modcss'}", |
| modstyle => "$FORM{'modcss'}", |
| modstyle2 => "$FORM{'modcss'}", |
| modstyle2 => "$FORM{'modcss'}", |
| modtemplate2 => "$FORM{'modtemp'}", |
| modtemplate2 => "$FORM{'modtemp'}", |
| modtemp2 => "$FORM{'modtemp'}", |
| modtemp2 => "$FORM{'modtemp'}", |
| |
| |
| modifyboard => "$FORM{'manageboards'}", |
| modifyboard => "$FORM{'manageboards'}", |
| addboard => "$FORM{'manageboards'}", |
| addboard => "$FORM{'manageboards'}", |
| addboard2 => "$FORM{'manageboards'}", |
| addboard2 => "$FORM{'manageboards'}", |
| reorderboards => "$FORM{'manageboards'}", |
| reorderboards => "$FORM{'manageboards'}", |
| reorderboards2 => "$FORM{'manageboards'}", |
| reorderboards2 => "$FORM{'manageboards'}", |
| boardscreen => "$FORM{'manageboards'}", |
| boardscreen => "$FORM{'manageboards'}", |
| |
| |
| smilieput => "$FORM{'smilies'}", |
| smilieput => "$FORM{'smilies'}", |
| smilieindex => "$FORM{'smilies'}", |
| smilieindex => "$FORM{'smilies'}", |
| smiliemove => "$FORM{'smilies'}", |
| smiliemove => "$FORM{'smilies'}", |
| addsmilies => "$FORM{'smilies'}", |
| addsmilies => "$FORM{'smilies'}", |
| |
| |
| addmember => "$FORM{'addmember'}", |
| addmember => "$FORM{'addmember'}", |
| addmember2 => "$FORM{'addmember'}", |
| addmember2 => "$FORM{'addmember'}", |
| ml => "$FORM{'viewmembers'}", |
| ml => "$FORM{'viewmembers'}", |
| deletemultimembers => "$FORM{'deletemultimembers'}", |
| deletemultimembers => "$FORM{'deletemultimembers'}", |
| |
| |
| mailmultimembers => "$FORM{'mailing'}", |
| mailmultimembers => "$FORM{'mailing'}", |
| mailing2 => "$FORM{'mailing'}", |
| mailing2 => "$FORM{'mailing'}", |
| |
| |
| activate => "$FORM{'view_reglog'}", |
| activate => "$FORM{'view_reglog'}", |
| admin_descision => "$FORM{'view_reglog'}", |
| admin_descision => "$FORM{'view_reglog'}", |
| apr_regentry => "$FORM{'view_reglog'}", |
| apr_regentry => "$FORM{'view_reglog'}", |
| del_regentry => "$FORM{'view_reglog'}", |
| del_regentry => "$FORM{'view_reglog'}", |
| rej_regentry => "$FORM{'view_reglog'}", |
| rej_regentry => "$FORM{'view_reglog'}", |
| view_regentry => "$FORM{'view_reglog'}", |
| view_regentry => "$FORM{'view_reglog'}", |
| clean_reglog => "$FORM{'view_reglog'}", |
| clean_reglog => "$FORM{'view_reglog'}", |
| |
| |
| cleanerrorlog => "$FORM{'errorlog'}", |
| cleanerrorlog => "$FORM{'errorlog'}", |
| deleteerror => "$FORM{'errorlog'}", |
| deleteerror => "$FORM{'errorlog'}", |
| |
| |
| modagreement2 => "$FORM{'modagreement'}", |
| modagreement2 => "$FORM{'modagreement'}", |
| advsettings2 => "$FORM{'advsettings'}", |
| advsettings2 => "$FORM{'advsettings'}", |
| referer_control2 => "$FORM{'referer_control'}", |
| referer_control2 => "$FORM{'referer_control'}", |
| removeoldthreads => "$FORM{'deleteoldthreads'}", |
| removeoldthreads => "$FORM{'deleteoldthreads'}", |
| ipban2 => "$FORM{'ipban'}", |
| ipban2 => "$FORM{'ipban'}", |
| ipban3 => "$FORM{'ipban'}", |
| |
| setcensor2 => "$FORM{'setcensor'}", |
| setcensor2 => "$FORM{'setcensor'}", |
| setreserve2 => "$FORM{'setreserve'}", |
| setreserve2 => "$FORM{'setreserve'}", |
| |
| |
| editbots2 => "$FORM{'editbots'}", |
| editbots2 => "$FORM{'editbots'}", |
| ); |
| ); |
| |
| |
| 1; |
| 1; |
| EOF |
| EOF |
| |
| |
| $setfile =~ s~(.+\;)\s+(\#.+$)~$1 . substr( $filler, 0, (70-(length $1)) ) . $2 ~gem; |
| $setfile =~ |
| $setfile =~ s~(.{64,}\;)\s+(\#.+$)~$1 . "\n " . $2~gem; |
| s/(.+\;)\s+(\#.+$)/$1 . substr( $filler, 0, (70-(length $1)) ) . $2 /gesm; |
| $setfile =~ s~^\s\s\s+(\#.+$)~substr( $filler, 0, 70 ) . $1~gem; |
| $setfile =~ s/(.{64,}\;)\s+(\#.+$)/$1 . "\n " . $2/gesm; |
| |
| $setfile =~ s/^\s\s\s+(\#.+$)/substr( $filler, 0, 70 ) . $1/gesm; |
| fopen(MODACCESS, ">$vardir/gmodsettings.txt"); |
| |
| print MODACCESS $setfile; |
| fopen( MODACCESS, ">$vardir/gmodsettings.txt" ); |
| fclose(MODACCESS); |
| print {MODACCESS} $setfile or croak "$croak{'print'} MODACCESS"; |
| |
| fclose(MODACCESS); |
| $yySetLocation = qq~$adminurl~; |
| |
| &redirectexit; |
| $yySetLocation = qq~$adminurl?action=gmodaccess~; |
| |
| redirectexit(); |
| |
| return; |
| } |
| } |
| |
| |
| sub EditPaths { |
| sub EditPaths { |
| # Simple output of env variables, for troubleshooting |
| |
| if ($ENV{'SCRIPT_FILENAME'} ne "") { |
| |
| $support_env_path = $ENV{'SCRIPT_FILENAME'}; |
| |
| |
| |
| # replace \'s with /'s for Windows Servers |
| |
| $support_env_path =~ s~\\~/~g; |
| |
| |
| |
| # Remove Setupl.pl and cgi - and also nph- for buggy IIS. |
| |
| $support_env_path =~ s~(nph-)?AdminIndex.(pl|cgi)~~ig; |
| |
| } elsif ($ENV{'PATH_TRANSLATED'} ne "") { |
| |
| $support_env_path = $ENV{'PATH_TRANSLATED'}; |
| |
| |
| |
| # replace \'s with /'s for Windows Servers |
| |
| $support_env_path =~ s~\\~/~g; |
| |
| |
| |
| # Remove Setupl.pl and cgi - and also nph- for buggy IIS. |
| # Simple output of env variables, for troubleshooting |
| $support_env_path =~ s~(nph-)?AdminIndex.(pl|cgi)~~ig; |
| if ( $ENV{'SCRIPT_FILENAME'} ne q{} ) { |
| } |
| $support_env_path = $ENV{'SCRIPT_FILENAME'}; |
| |
| |
| $yymain .= qq~ |
| # replace \'s with /'s for Windows Servers |
| <div class="bordercolor" style="padding: 0px; width: 99%; margin-left: 0px; margin-right: auto;"> |
| $support_env_path =~ s/\\/\//gxsm; |
| <table width="100%" cellspacing="1" cellpadding="4"> |
| |
| <tr valign="middle"> |
| # Remove Setupl.pl and cgi - and also nph- for buggy IIS. |
| <td align="left" class="titlebg"><b>$edit_paths_txt{'33'}</b></td> |
| $support_env_path =~ s/(nph-)?AdminIndex.(pl|cgi)//igxsm; |
| </tr> |
| } |
| <tr align="center" valign="middle"> |
| elsif ( $ENV{'PATH_TRANSLATED'} ne q{} ) { |
| <td align="left" class="catbg"><span class="small">$edit_paths_txt{'34'}</span></td> |
| |