############################################################################### # AdminEdit.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 2.1 # # Released: November 8, 2005 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2005 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # # Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com # # Your source for web hosting, web design, and domains. # ############################################################################### $admineditplver = 'YaBB 2.1 $Revision: 1.13 $'; if ($action eq 'detailedversion') { return 1; } use File::Find; LoadLanguage("flood"); LoadLanguage("Register"); LoadLanguage("Chatirc"); sub GmodSettings { &is_admin; if (!-e ("$vardir/gmodsettings.txt")) { &GmodSettings2; } fopen(MODACCESS, "$vardir/gmodsettings.txt"); @scriptlines = ; fclose(MODACCESS); $startread = 0; $counter = 0; foreach $scriptline (@scriptlines) { chomp $scriptline; if (substr($scriptline, 0, 1) eq "'") { $scriptline =~ /\"(.*?)\"/; $allow = $1; $scriptline =~ /\'(.*?)\'/; $actionfound = $1; push(@actfound, $actionfound); push(@allowed, $allow); $counter++; } } $column = int($counter / 2); $counter = 0; $a = 0; foreach $actfound (@actfound) { $selected = ""; if ($allowed[$a] eq "on") { $selected = "checked"; } $dismenu .= qq~$reftxt{'1a'} $refexpl_txt{$actfound} $actfound
\n~; $counter++; $a++; if ($counter > $column + 1) { $dismenu .= qq~~; $counter = 0; } } $dismenu .= qq~~; require "$vardir/gmodsettings.txt"; if ($allow_gmod_admin) { $gmod_selected_a = "checked"; } if ($allow_gmod_profile) { $gmod_selected_p = "checked"; } $yymain .= qq~
$gmod_settings{'1'}

$gmod_settings{'2'}
$gmod_settings{'3'}

$gmod_settings{'4'}
$dismenu
~; $yytitle = "$reftxt{'1'}"; $action_area = "gmodaccess"; &AdminTemplate; exit; } sub EditNews { &is_admin_or_gmod; my ($line); $yymain .= qq~
$admin_txt{'7'}

$admin_txt{'670'}




~; $yytitle = "$admin_txt{'7'}"; $action_area = "editnews"; &AdminTemplate; exit; } sub EditNews2 { &is_admin_or_gmod; $FORM{'news'} =~ tr/\r//d; fopen(NEWS, ">$vardir/news.txt", 1); chomp $FORM{'news'}; print NEWS "$FORM{'news'}"; fclose(NEWS); $yySetLocation = qq~$adminurl~; &redirectexit; } sub SetCensor { &is_admin_or_gmod; my ($censorlanguage, $line); if ($FORM{'censorlanguage'}) { $censorlanguage = $FORM{'censorlanguage'} } else { $censorlanguage = $lang; } opendir(LNGDIR, $langdir); my @lfilesanddirs = readdir(LNGDIR); close(LNGDIR); foreach $fld (@lfilesanddirs) { if (-d "$langdir/$fld" && $fld =~ m^\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z^ && -e "$langdir/$fld/Main.lng") { if ($censorlanguage eq $fld) { $drawnldirs .= qq~~; } else { $drawnldirs .= qq~~; } } } my (@censored, $i); fopen(CENSOR, "$langdir/$censorlanguage/censor.txt"); @censored = ; fclose(CENSOR); foreach $i (@censored) { $i =~ tr/\r//d; $i =~ tr/\n//d; } $yymain .= qq~
$admin_txt{'135'}

$admin_txt{'136'}


$templs{'7'}



~; $yytitle = "$admin_txt{'135'}"; $action_area = "setcensor"; &AdminTemplate; exit; } sub SetCensor2 { &is_admin_or_gmod; $FORM{'censored'} =~ tr/\r//d; $FORM{'censored'} =~ s~\A[\s\n]+~~; $FORM{'censored'} =~ s~[\s\n]+\Z~~; $FORM{'censored'} =~ s~\n\s*\n~\n~g; if ($FORM{'censorlanguage'}) { $censorlanguage = $FORM{'censorlanguage'}; } else { $censorlanguage = $lang; } my @lines = split(/\n/, $FORM{'censored'}); fopen(CENSOR, ">$langdir/$censorlanguage/censor.txt", 1); foreach my $i (@lines) { $i =~ tr/\n//d; unless ($i && $i =~ m/.+[\=~].+/) { next; } print CENSOR "$i\n"; } fclose(CENSOR); $yySetLocation = qq~$adminurl~; &redirectexit; } sub SetReserve { my (@reserved, @reservecfg, $i); &is_admin_or_gmod; fopen(RESERVE, "$vardir/reserve.txt"); @reserved = ; fclose(RESERVE); fopen(RESERVECFG, "$vardir/reservecfg.txt"); @reservecfg = ; fclose(RESERVECFG); for (my $i = 0; $i < @reservecfg; $i++) { chomp $reservecfg[$i]; } $yymain .= qq~
$admin_txt{'341'}

$admin_txt{'699'}


$admin_txt{'342'}



$admin_txt{'726'}
$admin_txt{'727'}
$admin_txt{'728'}
$admin_txt{'729'}
~; $yytitle = "$admin_txt{'341'}"; $action_area = "setreserve"; &AdminTemplate; exit; } sub SetReserve2 { &is_admin_or_gmod; $FORM{'reserved'} =~ tr/\r//d; $FORM{'reserved'} =~ s~\A[\s\n]+~~; $FORM{'reserved'} =~ s~[\s\n]+\Z~~; $FORM{'reserved'} =~ s~\n\s*\n~\n~g; fopen(RESERVE, ">$vardir/reserve.txt", 1); my $matchword = $FORM{'matchword'} eq 'checked' ? 'checked="checked" ' : ''; my $matchcase = $FORM{'matchcase'} eq 'checked' ? 'checked="checked" ' : ''; my $matchuser = $FORM{'matchuser'} eq 'checked' ? 'checked="checked" ' : ''; my $matchname = $FORM{'matchname'} eq 'checked' ? 'checked="checked" ' : ''; print RESERVE $FORM{'reserved'}; fclose(RESERVE); fopen(RESERVECFG, "+>$vardir/reservecfg.txt"); print RESERVECFG "$matchword\n"; print RESERVECFG "$matchcase\n"; print RESERVECFG "$matchuser\n"; print RESERVECFG "$matchname\n"; fclose(RESERVECFG); $yySetLocation = qq~$adminurl~; &redirectexit; } sub ModifyAgreement { &is_admin_or_gmod; my ($agreementlanguage, $line); if ($FORM{'agreementlanguage'}) { $agreementlanguage = $FORM{'agreementlanguage'}; } else { $agreementlanguage = $lang; } opendir(LNGDIR, $langdir); my @lfilesanddirs = readdir(LNGDIR); close(LNGDIR); foreach $fld (@lfilesanddirs) { if (-d "$langdir/$fld" && $fld =~ m^\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z^ && -e "$langdir/$fld/Main.lng") { if ($agreementlanguage eq $fld) { $drawnldirs .= qq~~; } else { $drawnldirs .= qq~~; } } } my ($fullagreement, $line); fopen(AGREE, "$langdir/$agreementlanguage/agreement.txt"); while ($line = ) { $line =~ tr/[\r\n]//d; &FromHTML($line); $fullagreement .= qq~$line\n~; } fclose(AGREE); $yymain .= qq~
$admin_txt{'764'}

$admin_txt{'765'}


$templs{'8'}



~; $yytitle = "$admin_txt{'764'}"; $action_area = "modagreement"; &AdminTemplate; exit; } sub ModifyAgreement2 { &is_admin_or_gmod; if ($FORM{'agreementlanguage'}) { $agreementlanguage = $FORM{'agreementlanguage'}; } else { $agreementlanguage = $lang; } $FORM{'agreement'} =~ tr/\r//d; $FORM{'agreement'} =~ s~\A\n~~; $FORM{'agreement'} =~ s~\n\Z~~; fopen(AGREE, ">$langdir/$agreementlanguage/agreement.txt"); print AGREE $FORM{'agreement'}; fclose(AGREE); $yySetLocation = qq~$adminurl~; &redirectexit; } sub ModifySettings { &is_admin_or_gmod; require "$vardir/Settings.pl"; my ($mainchecked, $pflashchecked, $guestaccchecked, $forcechecked, $blankchecked, $agreechecked, $regdischecked, $mailpasschecked, $newpasschecked, $welchecked); my ($menuchecked, $ubbcchecked, $eclickchecked, $aluchecked, $dstchecked, $pbchecked, $insertchecked, $newschecked, $gpchecked, $notifchecked); my ($pmchecked); my ($ahmchecked, $slmchecked, $srbarchecked, $smbarchecked, $smodchecked, $supicchecked, $sutextchecked, $stviewchecked, $strepchecked, $sgichecked); my ($snfchecked, $fls1, $fls2, $fls3, $truncchecked, $mts1, $mts2, $mts3, $tsl6, $tsl5, $tsl4, $tsl3, $tsl2, $tsl1); my ($gzc1, $gzc2, $gzc3, $gzchecked, $preregchecked, $bmd1, $bmd2, $defml1, $defml2, $defml3, $defml4); # figure out what to print if (!$color{'fadertext'}) { $color{'fadertext'} = '#000000'; } if (!$color{'faderbg'}) { $color{'faderbg'} = '#ffffff'; } if ($debug) { $debugchecked = ' checked="checked" '; } if ($nestedquotes) { $nestedquoteschecked = ' checked="checked" '; } if ($maintenance) { $mainchecked = ' checked="checked" '; } if ($cachebehaviour) { $cachechecked = ' checked="checked" '; } if ($preregister) { $preregchecked = ' checked="checked" '; } if ($guestaccess == 0) { $guestaccchecked = ' checked="checked" '; } if ($RegAgree) { $agreechecked = ' checked="checked" '; } if ($regdisable) { $regdischecked = ' checked="checked" '; } if ($smtp_auth_required) { $smtp_auth_checked = ' checked="checked" '; } if ($emailpassword) { $mailpasschecked = ' checked="checked" '; } if ($emailnewpass) { $newpasschecked = ' checked="checked" '; } if ($emailwelcome) { $welchecked = ' checked="checked" '; } if ($MenuType == 0) { $menutype0 = ' selected="selected" '; } elsif ($MenuType == 1) { $menutype1 = ' selected="selected" '; } elsif ($MenuType == 2) { $menutype2 = ' selected="selected" '; } if ($enable_ubbc) { $ubbcchecked = ' checked="checked" '; } if ($parseflash) { $pflashchecked = ' checked="checked" '; } if ($enableclicklog) { $eclickchecked = ' checked="checked" '; } if ($autolinkurls) { $aluchecked = ' checked="checked" '; } if ($dstoffset) { $dstchecked = ' checked="checked" '; } if ($profilebutton) { $pbchecked = ' checked="checked" '; } if ($enable_news) { $newschecked = ' checked="checked" '; } if ($enable_ircgchat) { $senablegchat = ' checked="checked" ' ;} if ($popupmode) { $pmchecked = ' checked="checked" ' ;} if ($enable_guestposting) { $gpchecked = ' checked="checked" '; } if ($enable_notification) { $notifchecked = ' checked="checked" '; } if ($allow_hide_email) { $ahmchecked = ' checked="checked" '; } if ($showlatestmember) { $slmchecked = ' checked="checked" '; } if ($Show_RecentBar) { $srbarchecked = ' checked="checked" '; } if ($showmodify) { $smodchecked = ' checked="checked" '; } if ($ShowBDescrip) { $bdescripchecked = ' checked="checked" '; } if ($showuserpic) { $supicchecked = ' checked="checked" '; } if ($showusertext) { $sutextchecked = ' checked="checked" '; } if ($showtopicviewers) { $stviewchecked = ' checked="checked" '; } if ($showtopicrepliers) { $strepchecked = ' checked="checked" '; } if ($showgenderimage) { $sgichecked = ' checked="checked" '; } if ($shownewsfader) { $snfchecked = ' checked="checked" '; } if ($fadelinks) { $fadlinkschecked = ' checked="checked" '; } if (!$maxsteps) { $maxsteps = '30'; } if (!$stepdelay) { $stepdelay = '40'; } if ($showyabbcbutt) { $syabbcchecked = ' checked="checked" '; } if ($allowpics) { $allowpicschecked = ' checked="checked" '; } if ($use_flock == 0) { $fls1 = " selected=\"selected\" "; } elsif ($use_flock == 1) { $fls2 = " selected=\"selected\" "; } elsif ($use_flock == 2) { $fls3 = " selected=\"selected\" "; } if ($chat_type == 0) { $cts1 = " selected=\"selected\" " ; } elsif ($chat_type == 1) { $cts2 = " selected=\"selected\" " ; } fopen (FILE, "$vardir/chatlangs.txt"); @chatlang = ; fclose (FILE); $i = 0; foreach $clang (@chatlang){ chomp $clang; $langtouse = lc $clang; $langtouse = $langtouse . ".prm"; if ($langtouse eq "english.prm"){$langtouse = "embedded.prm";} if ($chat_lang eq $langtouse){$cls{"$i"} = " selected=\"selected\" " ;} $i++; } $truncchecked = $faketruncation ? ' checked="checked" ' : ''; if ($mailtype == 0) { $mts1 = ' selected="selected" '; } elsif ($mailtype == 1) { $mts2 = ' selected="selected" '; } elsif ($mailtype == 2) { $mts3 = ' selected="selected" '; } if ($timeselected == 6) { $tsl6 = " selected=\"selected\" " } elsif ($timeselected == 5) { $tsl5 = " selected=\"selected\" " } elsif ($timeselected == 4) { $tsl4 = " selected=\"selected\" " } elsif ($timeselected == 3) { $tsl3 = " selected=\"selected\" " } elsif ($timeselected == 2) { $tsl2 = " selected=\"selected\" " } else { $tsl1 = " selected=\"selected\" " } if ($gzcomp == 0) { $gzc1 = ' selected'; } elsif ($gzcomp == 1) { $gzc2 = ' selected'; } elsif ($gzcomp == 2) { $gzc3 = ' selected'; } $gzchecked = $gzforce ? ' checked' : ''; $ddd = (($timeoffset * 10) + 120); $del{$ddd} = ' selected="selected"'; if ($barmaxdepend == 0) { $bmd1 = ' checked="checked"'; } else { $bmd2 = ' checked="checked"'; } if ($defaultml eq 'regdate') { $defml1 = ' selected="selected"'; } elsif ($defaultml eq 'posts') { $defml2 = ' selected="selected"'; } elsif ($defaultml eq 'username') { $defml3 = ' selected="selected"'; } elsif ($defaultml eq 'position') { $defml4 = ' selected="selected"'; } if ($Cookie_Length == 1) { $clsel1 = " selected=\"selected\" "; } elsif ($Cookie_Length == 60) { $clsel60 = " selected=\"selected\" "; } elsif ($Cookie_Length == 180) { $clsel180 = " selected=\"selected\" "; } elsif ($Cookie_Length == 360) { $clsel360 = " selected=\"selected\" "; } elsif ($Cookie_Length == 720) { $clsel720 = " selected=\"selected\" "; } elsif ($Cookie_Length == 1440) { $clsel1440 = " selected=\"selected\" "; } if ($smtp_auth_required == 0) { $smtpsel0 = ' selected="selected"'; } elsif ($smtp_auth_required == 1) { $smtpsel1 = ' selected="selected"'; } elsif ($smtp_auth_required == 2) { $smtpsel2 = ' selected="selected"'; } elsif ($smtp_auth_required == 3) { $smtpsel3 = ' selected="selected"'; } elsif ($smtp_auth_required == 4) { $smtpsel4 = ' selected="selected"'; } $forumstart =~ m~(\d{2})\/(\d{2})\/(\d{2,4}).*?(\d{2})\:(\d{2})\:(\d{2})~is; $forumstart_month = $1; $forumstart_day = $2; $forumstart_year = $3; $forumstart_hour = $4; $forumstart_minute = $5; $forumstart_secund = $6; if($forumstart_month > 12) { $forumstart_month = 12; } if($forumstart_month < 1) { $forumstart_month = 1; } if($forumstart_day > 31) { $forumstart_day = 31; } if($forumstart_day < 1) { $forumstart_day = 1; } if(length($forumstart_year) > 2) { $forumstart_year = substr($forumstart_year , length($forumstart_year) - 2, 2); } if($forumstart_year < 90 && $forumstart_year > 20) { $forumstart_year = 90; } if($forumstart_year > 20 && $forumstart_year < 90) { $forumstart_year = 20; } if($forumstart_hour > 23) { $forumstart_hour = 23; } if($forumstart_minute > 59) { $forumstart_minute = 59; } if($forumstart_secund > 59) { $forumstart_secund = 59; } $sel_day = qq~ \n~; $sel_month = qq~ \n~; $sel_year = qq~ \n~; $time_sel = ${$uid.$username}{'timeselect'}; if($time_sel == 1 || $time_sel == 4 || $time_sel == 5) { $all_date = qq~$sel_month $sel_day $sel_year~; } else { $all_date = qq~$sel_day $sel_month $sel_year~; } $sel_hour = qq~ \n~; $sel_minute = qq~ \n~; $sel_secund = qq~~; $all_time = qq~$sel_hour $sel_minute $sel_secund~; $yymain .= qq~
 $admin_txt{'222'}

$admin_txt{'347'}


 $admin_txt{'67'}
$admin_txt{'67'}

$admin_txt{'348'}

$admin_txt{'348Text'}

 $settop_txt{'4'}

$admin_txt{'350'}

$admin_txt{'350a'}
$all_date $maintxt{'107'} $all_time
$admin_txt{'521'}

$admin_txt{'523'}

$admin_txt{'382'}

$admin_txt{'379'}

$admin_txt{'387'}

$admintxt{'40'}

$admintxt{'41'}

$admintxt{'42'}

$admin_txt{'389'}

$admin_txt{'389a'}

$admin_txt{'509'}

$admin_txt{'732'}

$admin_txt{'383'}

$admin_txt{'384'}

$admin_txt{'385'}

$admin_txt{'394'}
$admin_txt{'396'}

$admin_txt{'395'}
$admin_txt{'396'}

$admin_txt{'385a'}

$admin_txt{'386'}

$admin_txt{'740'}

$admin_txt{'804'}


$admin_txt{'378'}

$admin_txt{'378a'}

$admin_txt{'524'}

$admin_txt{'498'}

$ircgoose{'5'}

$ircgoose{'1'}

$ircgoose{'9'}

$ircgoose{'2'}

$ircgoose{'10'}

$ircgoose{'3'}

$ircgoose{'8'}

$admin_txt{'101'}

$admin_txt{'499'}

$admin_txt{'500'}

$admin_txt{'587'}

$admin_txt{'371'}

$admin_txt{'371a'}

$admin_txt{'371b'}

$admin_txt{'373'}

$admin_txt{'912'}

$admin_txt{'902'} $admin_txt{'107'}
$admin_txt{'904'} $admin_txt{'905'} $admin_txt{'903'}

$admin_txt{'842'}

$admin_txt{'843'}



 $settop_txt{'2'}

$admin_txt{'404'}

$admin_txt{'354'}

$admin_txt{'407'}

$smtp_txt{'1'}
$smtp_txt{'2'}

$smtp_txt{'3'}

$smtp_txt{'4'}

$admin_txt{'355'}

$admin_txt{'702'}

$admin_txt{'639'}

$admin_txt{'619'}


 $settop_txt{'3'}

$admin_txt{'632'}

$admin_txt{'380'}

$admin_txt{'432'}

$admin_txt{'352'}

$admin_txt{'353'}

$admin_txt{'353a'}

$admin_txt{'585'}

$admin_txt{'584'}

$prereg_txt{'7'}

$prereg_txt{'11'}

$admin_txt{'746'}

$admin_txt{'381'}

$admin_txt{'723'}

$admin_txt{'476'}

$admin_txt{'477'}

$admin_txt{'689'}

$admin_txt{'408'}

~; opendir(LNGDIR, $langdir); my @lfilesanddirs = readdir(LNGDIR); close(LNGDIR); foreach $fld (@lfilesanddirs) { if (-d "$langdir/$fld" && $fld =~ m^\A[0-9a-zA-Z_\#\%\-\:\+\?\$\&\~\,\@/]+\Z^ && -e "$langdir/$fld/Main.lng") { if ($lang eq $fld) { $drawnldirs .= qq~~; } else { $drawnldirs .= qq~~; } } } $yymain .= qq~
$admin_txt{'816'}

~; &CheckNewTemplates; unless ($templatesloaded == 1) { require "$vardir/template.cfg"; } while (($curtemplate, $value) = each(%templateset)) { $selected = ""; if ($curtemplate eq $default_template) { $selected = qq~ selected="selected"~; $akttemplate = $curtemplate; } $drawndirs .= qq~\n~; } $yymain .= qq~
$admin_txt{'813'}


 $settop_txt{'5'}

$gztxt{'1'}

$gztxt{'2'}

$admin_txt{'802'}


$admin_txt{'803'}


$admin_txt{'690'}

$admin_txt{'376'}

$floodtxt{'5'}

$floodtxt{'6'}

$admin_txt{'374'}

$admin_txt{'375'}


 $settop_txt{'6'}

$admin_txt{'391'}

$admin_txt{'999'}
$admin_txt{'999a'}

$admin_txt{'630'}


~; $yytitle = $admin_txt{'222'}; $action_area = "modsettings"; &AdminTemplate; exit; } # Gets our current absolute path. Needed for error messages. sub GetDirPath { eval 'use Cwd; $cwd = cwd();'; unless ($cwd) { $cwd = `pwd`; chomp $cwd; } unless ($cwd) { $cwd = $0 || $ENV{'PWD'} || $ENV{'CWD'} || ($ENV{'DOCUMENT_ROOT'} . '/' . $ENV{'SCRIPT_NAME'} || $ENV{'PATH_INFO'}); } $cwd =~ tr~\\~/~; $cwd =~ s~\A(.+)/\Z~$1~; $cwd =~ s~\A(.+)/YaBB\.\w+\Z~$1~i; return $cwd; } sub is_exe { my ($cmd, $name); foreach $cmd (@_) { $name = ($cmd =~ /^(\S+)/)[0]; # remove any options return ($cmd) if (-x $name and !-d $name and $name =~ m:/:); # check for absolute or relative path if (defined $ENV{PATH}) { my $dir; foreach $dir (split(/:/, $ENV{PATH})) { return "$dir/$cmd" if (-x "$dir/$name" && !-d "$dir/$name"); } } } 0; } sub GmodSettings2 { &is_admin_or_gmod; my $filler = q~ ~; my $setfile = << "EOF"; ### Gmod Releated Setttings ### \$allow_gmod_admin = "$FORM{'allow_gmod_admin'}"; # \$allow_gmod_profile = "$FORM{'allow_gmod_profile'}"; # ### Areas Gmods can Access ### %gmod_access = ( 'modsettings',"$FORM{'modsettings'}", 'flood_control',"$FORM{'flood_control'}", 'advsettings',"$FORM{'advsettings'}", 'smilies',"$FORM{'smilies'}", 'helpadmin',"$FORM{'helpadmin'}", 'setcensor',"$FORM{'setcensor'}", 'detailedversion',"$FORM{'detailedversion'}", 'managecats',"$FORM{'managecats'}", 'manageboards',"$FORM{'manageboards'}", 'editnews',"$FORM{'editnews'}", 'modagreement',"$FORM{'modagreement'}", 'modtemp',"$FORM{'modtemp'}", 'modcss',"$FORM{'modcss'}", 'referer_control',"$FORM{'referer_control'}", 'viewmembers',"$FORM{'viewmembers'}", 'modmemgr',"$FORM{'modmemgr'}", 'mailing',"$FORM{'mailing'}", 'ipban',"$FORM{'ipban'}", 'setreserve',"$FORM{'setreserve'}", 'clean_log',"$FORM{'clean_log'}", 'boardrecount',"$FORM{'boardrecount'}", 'membershiprecount',"$FORM{'membershiprecount'}", 'rebuildmemlist',"$FORM{'rebuildmemlist'}", 'deleteoldthreads',"$FORM{'deleteoldthreads'}", 'manageattachments',"$FORM{'manageattachments'}", 'stats',"$FORM{'stats'}", 'showclicks',"$FORM{'showclicks'}", 'errorlog',"$FORM{'errorlog'}", 'view_reglog',"$FORM{'view_reglog'}", ); %gmod_access2 = ( admin => "on", deleteattachment => "$FORM{'manageattachments'}", manageattachments2 => "$FORM{'manageattachments'}", removeoldattachments => "$FORM{'manageattachments'}", removebigattachments => "$FORM{'manageattachments'}", profile => "$FORM{'allow_gmod_profile'}", profile => "$FORM{'allow_gmod_profile'}", profile2 => "$FORM{'allow_gmod_profile'}", profileAdmin => "$FORM{'allow_gmod_profile'}", profileAdmin2 => "$FORM{'allow_gmod_profile'}", profileContacts => "$FORM{'allow_gmod_profile'}", profileContacts2 => "$FORM{'allow_gmod_profile'}", profileIM => "$FORM{'allow_gmod_profile'}", profileIM2 => "$FORM{'allow_gmod_profile'}", profileOptions => "$FORM{'allow_gmod_profile'}", profileOptions2 => "$FORM{'allow_gmod_profile'}", delgroup => "$FORM{'modmemgr'}", editgroup => "$FORM{'modmemgr'}", editAddGroup2 => "$FORM{'modmemgr'}", modmemgr2 => "$FORM{'modmemgr'}", assigned => "$FORM{'modmemgr'}", assigned2 => "$FORM{'modmemgr'}", reordercats => "$FORM{'managecats'}", modifycatorder => "$FORM{'managecats'}", modifycat => "$FORM{'managecats'}", createcat => "$FORM{'managecats'}", catscreen => "$FORM{'managecats'}", reordercats2 => "$FORM{'managecats'}", addcat => "$FORM{'managecats'}", addcat2 => "$FORM{'managecats'}", modifyboard => "$FORM{'manageboards'}", addboard => "$FORM{'manageboards'}", addboard2 => "$FORM{'manageboards'}", reorderboards2 => "$FORM{'manageboards'}", boardscreen => "$FORM{'manageboards'}", smilieput => "$FORM{'smilies'}", smilieindex => "$FORM{'smilies'}", smiliemove => "$FORM{'smilies'}", addsmilies => "$FORM{'smilies'}", addmember => "$FORM{'viewmembers'}", addmember2 => "$FORM{'viewmembers'}", deletemultimembers => "$FORM{'viewmembers'}", mailmultimembers => "$FORM{'mailing'}", mailing2 => "$FORM{'mailing'}", del_regentry => "$FORM{'view_reglog'}", clean_reglog => "$FORM{'view_reglog'}", cleanerrorlog => "$FORM{'errorlog'}", deleteerror => "$FORM{'errorlog'}", do_clean_log => "$FORM{'clean_log'}", modagreement2 => "$FORM{'modagreement'}", modsettings2 => "$FORM{'modsettings'}", advsettings2 => "$FORM{'advsettings'}", ml => "$FORM{'mailing'}", referer_control2 => "$FORM{'referer_control'}", removeoldthreads => "$FORM{'deleteoldthreads'}", ipban2 => "$FORM{'ipban'}", setcensor2 => "$FORM{'setcensor'}", setreserve2 => "$FORM{'setreserve'}", editnews2 => "$FORM{'editnews'}", flood_control2,"$FORM{'flood_control'}", ); 1; EOF $setfile =~ s~(.+\;)\s+(\#.+$)~$1 . substr( $filler, 0, (70-(length $1)) ) . $2 ~gem; $setfile =~ s~(.{64,}\;)\s+(\#.+$)~$1 . "\n " . $2~gem; $setfile =~ s~^\s\s\s+(\#.+$)~substr( $filler, 0, 70 ) . $1~gem; fopen(MODACCESS, ">$vardir/gmodsettings.txt"); print MODACCESS $setfile; fclose(MODACCESS); $yySetLocation = qq~$adminurl~; &redirectexit; } sub ModifySettings2 { &is_admin_or_gmod; my @onoff = qw/ cachebehaviour debug nestedquotes preregister parseflash enableclicklog allowpics showyabbcbutt showbdescrip maintenance guestaccess insert_original enable_ubbc enable_news enable_guestposting enable_notification showlatestmember showrecentbar showmodify showuserpic showusertext showtopicviewers showtopicrepliers showgenderimage shownewsfader MenuType profilebutton autolinkurls dstoffset emailpassword RegAgree regdisable emailwelcome allow_hide_email faketruncation emailnewpass barmaxdepend fadelinks/; push(@onoff, "enable_ircgchat", "popupmode"); # Set as 0 or 1 if box was checked or not my $fi; map { $fi = lc $_; ${$_} = $FORM{$fi} eq 'on' ? 1 : 0; } @onoff; $guestaccess = $guestaccess ? 0 : 1; # If empty fields are submitted, set them to default-values to save yabb from crashing $maintenancetext = $FORM{'maintenancetext'} || ""; &ToHTML($maintenancetext); $FORM{'timeout'} =~ s~\D*~~g; $smtp_auth_required = $FORM{'smtp_auth_required'} || 0; $timeout = $FORM{'timeout'} || 5; $color{'fadertext'} =~ s~\s*~~g; $color{'fadertext'} = $FORM{'fadertext'} || '#000000'; $color{'faderbg'} =~ s~\s*~~g; $color{'faderbg'} = $FORM{'faderbg'} || '#ffffff'; $defaultusertxt = $FORM{'defaultusertxt'} || ""; $timeselected = $FORM{'timeselect'} || 0; $FORM{'preregspan'} =~ s~\D*~~g; $preregspan = $FORM{'preregspan'} || 24; $timeoffset = $FORM{'timeoffset'} || 0; $timeoffset =~ tr/[0-9\+\-\.]//cd; $timecorrection = $FORM{'timecorrection'} || 0; $timecorrection =~ tr/[0-9\+\-\.]//cd; $timecorrection = int($timecorrection); $FORM{'TopAmmount'} =~ s~\D*~~g; $TopAmmount = $FORM{'TopAmmount'} || 25; $FORM{'maxdisplay'} =~ s~\D*~~g; $maxdisplay = $FORM{'maxdisplay'} || 20; $FORM{'maxfavs'} =~ s~\D*~~g; $maxfavs = $FORM{'maxfavs'} || 10; $FORM{'fontsizemin'} =~ s~\D*~~g; $fontsizemin = $FORM{'fontsizemin'} || 6; $FORM{'fontsizemax'} =~ s~\D*~~g; $fontsizemax = $FORM{'fontsizemax'} || 72; $FORM{'maxrecentdisplay'} =~ tr/[0-9\+\-\.]//cd; $maxrecentdisplay = $FORM{'maxrecentdisplay'} || 50; $FORM{'maxsearchdisplay'} =~ tr/[0-9\+\-\.]//cd; $maxsearchdisplay = $FORM{'maxsearchdisplay'} || 25; $FORM{'maxmessagedisplay'} =~ s~\D*~~g; $maxmessagedisplay = $FORM{'maxmessagedisplay'} || 20; $FORM{'max_log_days_old'} =~ s~\D*~~g; $max_log_days_old = $FORM{'max_log_days_old'} || 21; if ($max_log_days_old > 9999) { $max_log_days_old = 9999; } $FORM{'clicklogtime'} =~ s~\D*~~g; $clicklogtime = $FORM{'clicklogtime'} || 1440; if ($clicklogtime >= 1440) { $clicklogtime = 1439; } $use_flock = $FORM{'use_flock'} || 0; $ircname = $FORM{'ircname'} || ""; $ircabbrev = $FORM{'ircabbrev'} || ""; $chat_type = $FORM{'chat_type'} || 0; $chat_lang = $FORM{'chat_lang'} || "embedded.prm"; if ($chat_lang eq "english.prm"){$chat_lang = "embedded.prm";} $Cookie_Length = $FORM{'cookielength'} || 60; $cookieusername = $FORM{'cookieusername'} || 'YaBBusername'; $cookiepassword = $FORM{'cookiepassword'} || 'YaBBpassword'; $cookiesession_name = $FORM{'cookiesession_name'} || 'YaBBSession'; if ($cookieusername eq $cookiepassword || $cookieusername eq $cookiesession_name || $cookiepassword eq $cookiesession_name) { $cookieusername = 'YaBBusername'; $cookiepassword = 'YaBBpassword'; $cookiesession_name = 'YaBBSession'; } $FORM{'maxmesslen'} =~ s~\D*~~g; $maxmesslen = $FORM{'maxmesslen'} || 5000; $FORM{'maxsiglen'} =~ s~\D*~~g; $maxsiglen = $FORM{'maxsiglen'} || 200; $mbname = $FORM{'mbname'} || 'My Perl YaBB Forum'; $mbname =~ s/\"/\'/g; $boardurl = $FORM{'boardurl'} || $boardurl; $lang = $FORM{'lang'} || "English"; $default_template = $FORM{'default_template'} || "Forum default"; $helpfile = $FORM{'helpfile'} || "$html_root/YaBBHelp/index.html"; $mailprog = $FORM{'mailprog'} || &is_exe('/usr/lib/sendmail', '/usr/sbin/sendmail', '/usr/ucblib/sendmail', 'sendmail', 'mailx', 'Mail', 'mail'); $smtp_server = $FORM{'smtp_server'} || '127.0.0.1'; $webmaster_email = $FORM{'webmaster_email'} || 'webmaster@mysite.com'; $mailtype = $FORM{'mailtype'} || 0; $faderpath = $FORM{'faderpath'} || "$boardurl/fader.js"; $authuser = $FORM{'authuser'} || ""; $authpass = $FORM{'authpass'} || ""; if ($FORM{'userpic_width'} =~ /\d+/) { $userpic_width = $FORM{'userpic_width'}; } else { $userpic_width = 65; } if ($FORM{'userpic_height'} =~ /\d+/) { $userpic_height = $FORM{'userpic_height'}; } else { $userpic_height = 65; } $gzcomp = $FORM{'gzcomp'} || 0; $gzforce = $FORM{'gzforce'} || 0; $MenuType = $FORM{'menutype'} || 0; $FORM{'HotTopic'} =~ s~\D*~~g; $HotTopic = $FORM{'HotTopic'} || 15; $FORM{'VeryHotTopic'} =~ s~\D*~~g; $VeryHotTopic = $FORM{'VeryHotTopic'} || 25; $barmaxdepend = $FORM{'barmaxdepend'} || 0; if ($FORM{'barmaxnumb'} =~ /\d+/) { $barmaxnumb = $FORM{'barmaxnumb'}; } else { $barmaxnumb = 500; } $defaultml = $FORM{'defaultml'} || "regdate"; $FORM{'maxsteps'} =~ s~\D*~~g; $maxsteps = $FORM{'maxsteps'} || 30; $FORM{'stepdelay'} =~ s~\D*~~g; $stepdelay = $FORM{'stepdelay'} || 40; $forumstart_month = $FORM{'forumstart_month'}; $forumstart_day = $FORM{'forumstart_day'}; $forumstart_year = $FORM{'forumstart_year'}; $forumstart_hour = $FORM{'forumstart_hour'}; $forumstart_minute = $FORM{'forumstart_minute'}; $forumstart_secund = $FORM{'forumstart_secund'}; if($forumstart_month == 4 || $forumstart_month == 6 || $forumstart_month == 9 || $forumstart_month == 11) { $max_days = 30; } elsif($forumstart_month == 2 && $forumstart_year % 4 == 0 && $forumstart_year != 0) { $max_days = 29; } elsif($forumstart_month == 2 && ($forumstart_year % 4 != 0 || $forumstart_year == 0)) { $max_days = 28; } else { $max_days = 31; } if($forumstart_day > $max_days) { $forumstart_day = $max_days; } $forumstart = qq~$forumstart_month/$forumstart_day/$forumstart_year $maintxt{'107'} $forumstart_hour:$forumstart_minute:$forumstart_secund~; my $filler = q~ ~; my $setfile = << "EOF"; ############################################################################### # Settings.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 2.1 # # Released: November 8, 2005 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2005 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # # Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com # # Your source for web hosting, web design, and domains. # ############################################################################### ########## Board Info ########## # Note: these settings must be properly changed for YaBB to work \$maintenance = $maintenance; # Set to 1 to enable Maintenance mode \$guestaccess = $guestaccess; # Set to 0 to disallow guests from doing anything but login or register \$mbname = q^$mbname^; # The name of your YaBB forum \$forumstart = "$forumstart"; # The start date of your YaBB Forum \$Cookie_Length = $Cookie_Length; # Default minutes to set login cookies to stay for \$cookieusername = "$cookieusername"; # Name of the username cookie \$cookiepassword = "$cookiepassword"; # Name of the password cookie \$cookiesession_name = "$cookiesession_name"; # Name of the Session cookie \$regdisable = $regdisable; # Set to 1 to disable user registration (only admin can register) \$RegAgree = $RegAgree; # Set to 1 to display the registration agreement when registering \$preregister = $preregister; # Set to 1 to use pre-registration and account activation \$preregspan = $preregspan; # Time span in hours for users to account activation before cleanup. \$emailpassword = $emailpassword; # 0 - instant registration. 1 - password emailed to new members \$emailnewpass = $emailnewpass; # Set to 1 to email a new password to members if they change their email address \$emailwelcome = $emailwelcome; # Set to 1 to email a welcome message to users even when you have mail password turned off \$lang = "$lang"; # Default Forum Language \$default_template = "$default_template"; # Default Forum Template \$mailprog = "$mailprog"; # Location of your sendmail program \$smtp_server = "$smtp_server"; # Address of your SMTP-Server \$smtp_auth_required = $smtp_auth_required; # Set to 1 if the SMTP server requires Authorisation \$authuser = q^$authuser^; # Username for SMTP authorisation \$authpass = q^$authpass^; # Password for SMTP authorisation \$webmaster_email = q^$webmaster_email^; # Your email address. (eg: \$webmaster_email = q^admin\@host.com^;) \$mailtype = $mailtype; # Mail program to use: 0 = sendmail, 1 = SMTP, 2 = Net::SMTP ########## Layout ########## \$maintenancetext = "$maintenancetext"; # User-defined text for Maintenance mode (leave blank for default text) \$MenuType = $MenuType; # 1 for text menu or anything else for images menu \$profilebutton = $profilebutton; # 1 to show view profile button under post, or 0 for blank \$allow_hide_email = $allow_hide_email; # Allow users to hide their email from public. Set 0 to disable \$showlatestmember = $showlatestmember; # Set to 1 to display "Welcome Newest Member" on the Board Index \$shownewsfader = $shownewsfader; # 1 to allow or 0 to disallow NewsFader javascript on the Board Index # If 0, you'll have no news at all unless you put tag # back into template.html!!! \$Show_RecentBar = $showrecentbar; # Set to 1 to display the Recent Post on Board Index \$showmodify = $showmodify; # Set to 1 to display "Last modified: Realname - Date" under each message \$ShowBDescrip = $showbdescrip; # Set to 1 to display board descriptions on the topic (message) index for each board \$showuserpic = $showuserpic; # Set to 1 to display each member's picture in the message view (by the ICQ.. etc.) \$showusertext = $showusertext; # Set to 1 to display each member's personal text in the message view (by the ICQ.. etc.) \$showtopicviewers = $showtopicviewers; # Set to 1 to display members viewing a topic \$showtopicrepliers = $showtopicrepliers; # Set to 1 to display members replying to a topic \$showgenderimage = $showgenderimage; # Set to 1 to display each member's gender in the message view (by the ICQ.. etc.) \$showyabbcbutt = $showyabbcbutt; # Set to 1 to display the yabbc buttons on Posting and IM Send Pages \$nestedquotes = $nestedquotes ; # Set to 1 to allow quotes within quotes (0 will filter out quotes within a quoted message) \$parseflash = $parseflash; # Set to 1 to parse the flash tag \$enableclicklog = $enableclicklog; # Set to 1 to track stats in Clicklog (this may slow your board down) ########## Feature Settings ########## \$enable_ubbc = $enable_ubbc; # Set to 1 if you want to enable UBBC (Uniform Bulletin Board Code) \$enable_news = $enable_news; # Set to 1 to turn news on, or 0 to set news off \$allowpics = $allowpics; # set to 1 to allow members to choose avatars in their profile \$enable_guestposting = $enable_guestposting; # Set to 0 if do not allow 1 is allow. \$enable_notification = $enable_notification; # Allow e-mail notification \$autolinkurls = $autolinkurls; # Set to 1 to turn URLs into links, or 0 for no auto-linking. \$timeselected = $timeselected; # Select your preferred output Format of Time and Date \$timecorrection = $timecorrection; # Set time correction for server time in seconds \$timeoffset = $timeoffset; # Time Offset to GMT/UTC (0 for GMT/UTC) \$dstoffset = $dstoffset; # Time Offset (for daylight savings time, 0 to disable DST) \$TopAmmount = $TopAmmount; # No. of top posters to display on the top members list \$maxdisplay = $maxdisplay; # Maximum of topics to display \$maxfavs = $maxfavs; # Maximum of favorite topics to save in a profile \$maxrecentdisplay = $maxrecentdisplay; # Maximum of topics to display on recent posts by a user (-1 to disable) \$maxsearchdisplay = $maxsearchdisplay; # Maximum of messages to display in a search query (-1 to disable search) \$maxmessagedisplay = $maxmessagedisplay; # Maximum of messages to display \$MaxMessLen = $maxmesslen; # Maximum Allowed Characters in a Posts \$fontsizemin = $fontsizemin; # Minimum Allowed Font height in pixels \$fontsizemax = $fontsizemax; # Maximum Allowed Font height in pixels \$MaxSigLen = $maxsiglen; # Maximum Allowed Characters in Signatures \$ClickLogTime = $clicklogtime; # Time in minutes to log every click to your forum (longer time means larger log file size) \$max_log_days_old = $max_log_days_old; # If an entry in the user's log is older than ... days remove it # Set to 0 if you want it disabled \$maxsteps = $maxsteps; # Number of steps to take to change from start color to endcolor \$stepdelay = $stepdelay; # Time in miliseconds of a single step \$fadelinks = $fadelinks; # Fade links as well as text? \$color{'fadertext'} = "$color{'fadertext'}"; # Color of text in the NewsFader (news color) \$color{'faderbg'} = "$color{'faderbg'}"; # Color of background in the NewsFader (news color) \$defaultusertxt = qq~$defaultusertxt~; # The dafault usertext visible in users posts \$timeout = $timeout; # Minimum time between 2 postings from the same IP \$HotTopic = $HotTopic; # Number of posts needed in a topic for it to be classed as "Hot" \$VeryHotTopic = $VeryHotTopic; # Number of posts needed in a topic for it to be classed as "Very Hot" \$barmaxdepend = $barmaxdepend; # Set to 1 to let bar-max-length depend on top poster or 0 to depend on a number of your choise \$barmaxnumb = $barmaxnumb; # Select number of post for max. bar-length in memberlist \$defaultml = $defaultml; ###### IRC Chat Mod Settings ##### \$chat_type = $chat_type; # 0 is the chatspace client; 1 is the eIRC client. \$enable_ircgchat = $enable_ircgchat; # 1 to enable guests in IRC chat \$popupmode = $popupmode; # Use popup mode? (1 = yes) \$ircname = "$ircname"; # Name of your IRC channel \$ircabbrev = "$ircabbrev"; # Abbreviation appended to nicknames in your channel \$chat_lang = "$chat_lang"; # Language used for the chat ########## MemberPic Settings ########## \$userpic_width = $userpic_width; # Set pixel size to which the selfselected userpics are resized, 0 disables this limit \$userpic_height = $userpic_height; # Set pixel size to which the selfselected userpics are resized, 0 disables this limit ########## File Locking ########## \$gzcomp = $gzcomp; # GZip compression: 0 = No Compression, 1 = External gzip, 2 = Zlib::Compress \$gzforce = $gzforce; # Don't try to check whether browser supports GZip \$cachebehaviour = $cachebehaviour; # Browser Cache Control: 0 = No Cache must revalidate, 1 = Allow Caching \$use_flock = $use_flock; # Set to 0 if your server doesn't support file locking, # 1 for Unix/Linux and WinNT, and 2 for Windows 95/98/ME \$faketruncation = $faketruncation; # Enable this option only if YaBB fails with the error: # "truncate() function not supported on this platform." # 0 to disable, 1 to enable. \$debug = $debug; # If set to 1 debug info is added to the template # tags are and 1; EOF $setfile =~ s~(.+\;)\s+(\#.+$)~$1 . substr( $filler, 0, (70-(length $1)) ) . $2 ~gem; $setfile =~ s~(.{64,}\;)\s+(\#.+$)~$1 . "\n " . $2~gem; $setfile =~ s~^\s\s\s+(\#.+$)~substr( $filler, 0, 70 ) . $1~gem; fopen(SETTING, ">$vardir/Settings.pl"); print SETTING $setfile; fclose(SETTING); &WriteLog; $yySetLocation = qq~$adminurl~; &redirectexit; } 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. $support_env_path =~ s~(nph-)?AdminIndex.(pl|cgi)~~ig; } $yymain .= qq~
$edit_paths_txt{'33'}
$edit_paths_txt{'34'}

$support_env_path



 $edit_paths_txt{'1'}
$edit_paths_txt{'2'}

$edit_paths_txt{'3'}

$edit_paths_txt{'4'}

$edit_paths_txt{'5'}

$edit_paths_txt{'6'}

$edit_paths_txt{'7'}

$edit_paths_txt{'8'}

$edit_paths_txt{'9'}

$edit_paths_txt{'10'}

$edit_paths_txt{'11'}

$edit_paths_txt{'12'}

$edit_paths_txt{'13'}

$edit_paths_txt{'14'}

$edit_paths_txt{'15'}

$edit_paths_txt{'16'}

$edit_paths_txt{'17'}

$edit_paths_txt{'18'}

$edit_paths_txt{'19'}

$edit_paths_txt{'20'}

$edit_paths_txt{'21'}

$edit_paths_txt{'22'}

$edit_paths_txt{'23'}

$edit_paths_txt{'24'}

$edit_paths_txt{'25'}

$edit_paths_txt{'26'}

$edit_paths_txt{'27'}

$edit_paths_txt{'28'}

$edit_paths_txt{'29'}

$edit_paths_txt{'30'}

$edit_paths_txt{'31'}

$edit_paths_txt{'32'}

~; $action_area = "editpaths"; &AdminTemplate; } sub EditPaths2 { &LoadCookie; # Load the user's cookie (or set to guest) &LoadUserSettings; if (!$iamadmin) { &admin_fatal_error("$maintxt{'1'}"); } $lastsaved = $FORM{'lastsaved'}; $lastdate = $FORM{'lastdate'}; $boardurl = $FORM{'boardurl'}; $boarddir = $FORM{'boarddir'}; $htmldir = $FORM{'htmldir'}; $uploaddir = $FORM{'uploaddir'}; $uploadurl = $FORM{'uploadurl'}; $html_root = $FORM{'html_root'}; $datadir = $FORM{'datadir'}; $boardsdir = $FORM{'boardsdir'}; $memberdir = $FORM{'memberdir'}; $sourcedir = $FORM{'sourcedir'}; $admindir = $FORM{'admindir'}; $vardir = $FORM{'vardir'}; $langdir = $FORM{'langdir'}; $helpfile = $FORM{'helpfile'}; $templatesdir = $FORM{'templatesdir'}; $forumstylesdir = $FORM{'forumstylesdir'}; $forumstylesurl = $FORM{'forumstylesurl'}; $adminstylesdir = $FORM{'adminstylesdir'}; $adminstylesurl = $FORM{'adminstylesurl'}; $facesdir = $FORM{'facesdir'}; $facesurl = $FORM{'facesurl'}; $smiliesdir = $FORM{'smiliesdir'}; $smiliesurl = $FORM{'smiliesurl'}; $modimgdir = $FORM{'modimgdir'}; $modimgurl = $FORM{'modimgurl'}; $ubbcjspath = $FORM{'ubbcjspath'}; $faderpath = $FORM{'faderpath'}; $yabbcjspath = $FORM{'yabbcjspath'}; $postjspath = $FORM{'postjspath'}; my $filler = q~ ~; my $setfile = << "EOF"; ############################################################################### # Paths.pl # ############################################################################### # YaBB: Yet another Bulletin Board # # Open-Source Community Software for Webmasters # # Version: YaBB 2.1 # # Released: November 8, 2005 # # Distributed by: http://www.yabbforum.com # # =========================================================================== # # Copyright (c) 2000-2005 YaBB (www.yabbforum.com) - All Rights Reserved. # # Software by: The YaBB Development Team # # with assistance from the YaBB community. # # Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com # ############################################################################### \$lastsaved = "$lastsaved"; \$lastdate = "$lastdate"; ########## Directories ########## \$boardurl = "$boardurl"; # URL of your board's folder (without trailing '/') \$boarddir = "$boarddir"; # The server path to the board's folder (usually can be left as '.') \$boardsdir = "$boardsdir"; # Directory with board data files \$datadir = "$datadir"; # Directory with messages \$memberdir = "$memberdir"; # Directory with member files \$sourcedir = "$sourcedir"; # Directory with YaBB source files \$admindir = "$admindir"; # Directory with YaBB admin source files \$vardir = "$vardir"; # Directory with variable files \$langdir = "$langdir"; # Directory with Language files and folders \$helpfile = "$helpfile"; # Directory with Help files and folders \$templatesdir = "$templatesdir"; # Directory with template files and folders \$forumstylesdir = "$forumstylesdir"; # Directory with forum style files and folders \$adminstylesdir = "$adminstylesdir"; # Directory with admin style files and folders \$htmldir = "$htmldir"; # Base Path for all html/css files and folders \$facesdir = "$facesdir"; # Base Path for all avatar files \$smiliesdir = "$smiliesdir"; # Base Path for all smilie files \$modimgdir = "$modimgdir"; # Base Path for all mod images \$uploaddir = "$uploaddir"; # Base Path for all attachment files ########## URL's ########## \$forumstylesurl = "$forumstylesurl"; # Default Forum Style Directory \$adminstylesurl = "$adminstylesurl"; # Default Admin Style Directory \$ubbcjspath = "$ubbcjspath"; # Default Location for the ubbc.js file \$faderpath = "$faderpath"; # Default Location for the fader.js file \$yabbcjspath = "$yabbcjspath"; # Default Location for the yabbc.js file \$postjspath = "$postjspath"; # Default Location for the post.js file \$html_root = "$html_root"; # Base URL for all html/css files and folders \$facesurl = "$facesurl"; # Base URL for all avatar files \$smiliesurl = "$smiliesurl"; # Base URL for all smilie files \$modimgurl = "$modimgurl"; # Base URL for all mod images \$uploadurl = "$uploadurl"; # Base URL for all attachment files 1; EOF $setfile =~ s~(.+\;)\s+(\#.+$)~$1 . substr( $filler, 0, (70-(length $1)) ) . $2 ~gem; $setfile =~ s~(.{64,}\;)\s+(\#.+$)~$1 . "\n " . $2~gem; $setfile =~ s~^\s\s\s+(\#.+$)~substr( $filler, 0, 70 ) . $1~gem; fopen(FILE, ">Paths.pl"); print FILE $setfile; fclose(FILE); $yySetLocation = qq~$adminurl~; &redirectexit; } 1;