D:\my docs\My Received Files\Yabb\Yabb\YaBB_2.5_AEB\cgi-bin\yabb2_old\Setup.pl D:\WEBSITES\testbed\cgi-bin\yabb252\Setup.pl
#!/usr/bin/perl -- #!/usr/bin/perl --
   
############################################################################### ###############################################################################
# Setup.pl                                                                    # # Setup.pl                                                                    #
############################################################################### ###############################################################################
# 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 Anniversary Edition                                # # Version:        YaBB 2.5.2                                                  #
# Packaged:       July 04, 2010                                               # # Packaged:       September 30, 2012                                          #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2010 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-2012 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.                      #
# Sponsored by: Xnull Internet Media, Inc. - http://www.ximinc.com            #    
#               Your source for web hosting, web design, and domains.         #    
############################################################################### ###############################################################################
   
$setupplver = 'YaBB 2.5 AE $Revision: 1.36 $'; $setupplver = 'YaBB 2.5.2 $Revision: 1.0 $';
   
# use CGI::Carp qw(fatalsToBrowser); # used only for tests # use CGI::Carp qw(fatalsToBrowser); # used only for tests
   
# conversion will stop after $max_process_time # conversion will stop after $max_process_time
# in seconds, than the browser will call the script # in seconds, than the browser will call the script
# again until all is done. Don't put it too high # again until all is done. Don't put it too high
# or you will run into server or browser timeout # or you will run into server or browser timeout
$max_process_time = 20; $max_process_time = 20;
$time_to_jump = time() + $max_process_time; $time_to_jump = time() + $max_process_time;
   
if ($ENV{'SERVER_SOFTWARE'} =~ /IIS/) { if ($ENV{'SERVER_SOFTWARE'} =~ /IIS/) {
   $yyIIS = 1;    $yyIIS = 1;
   $0 =~ m~(.*)(\\|/)~;    $0 =~ m~(.*)(\\|/)~;
   $yypath = $1;    $yypath = $1;
   $yypath =~ s~\\~/~g;    $yypath =~ s~\\~/~g;
   chdir($yypath);    chdir($yypath);
   push(@INC, $yypath);    push(@INC, $yypath);
} }
   
### Requirements and Errors ### ### Requirements and Errors ###
$script_root = $ENV{'SCRIPT_FILENAME'}; $script_root = $ENV{'SCRIPT_FILENAME'};
$script_root =~ s/\/Setup\.(pl|cgi)//ig; $script_root =~ s/\/Setup\.(pl|cgi)//ig;
   
if (-e "./Paths.pl") { require "./Paths.pl"; } if (-e "./Paths.pl") { require "./Paths.pl"; }
elsif (-e "$script_root/Paths.pl") { require "$script_root/Paths.pl"; } elsif (-e "$script_root/Paths.pl") { require "$script_root/Paths.pl"; }
elsif (-e "$script_root/Variables/Paths.pl") { require "$script_root/Variables/Paths.pl"; } elsif (-e "$script_root/Variables/Paths.pl") { require "$script_root/Variables/Paths.pl"; }
   
# Check if it's blank Paths.pl or filled in one # Check if it's blank Paths.pl or filled in one
unless ($lastsaved) { unless ($lastsaved) {
   $boardsdir = "./Boards";    $boardsdir = "./Boards";
   $sourcedir = "./Sources";    $sourcedir = "./Sources";
   $memberdir = "./Members";    $memberdir = "./Members";
   $vardir    = "./Variables";    $vardir    = "./Variables";
} }
   
if (-e "YaBB.cgi") { $yyext = "cgi"; } if (-e "YaBB.cgi") { $yyext = "cgi"; }
else { $yyext = "pl"; } else { $yyext = "pl"; }
if ($boardurl) { $set_cgi = "$boardurl/Setup.$yyext"; } if ($boardurl) { $set_cgi = "$boardurl/Setup.$yyext"; }
else { $set_cgi = "Setup.$yyext"; } else { $set_cgi = "Setup.$yyext"; }
   
# Make sure the module path is present # Make sure the module path is present
push(@INC, "./Modules"); push(@INC, "./Modules");
   
require "$sourcedir/Subs.pl"; require "$sourcedir/Subs.pl";
require "$sourcedir/System.pl"; require "$sourcedir/System.pl";
require "$sourcedir/Load.pl"; require "$sourcedir/Load.pl";
require "$sourcedir/DateTime.pl"; require "$sourcedir/DateTime.pl";
   
$windowbg = '#FEFEFE'; $windowbg = '#FEFEFE';
$windowbg2 = '#DDE3EB'; $windowbg2 = '#DDE3EB';
$header = '#6699CC'; $header = '#6699CC';
$catbg = '#ADC7E1'; $catbg = '#ADC7E1';
$maintext_23 = 'Unable to open'; $maintext_23 = 'Unable to open';
   
$yymenu = ''; $yymenu = '';
$yytabmenu = qq~ ~; $yytabmenu = qq~ ~;
   
############################################# #############################################
# Conversion starts here                    # # Conversion starts here                    #
############################################# #############################################
   
# Conversion was rewritten and fixed for xx-large # Conversion was rewritten and fixed for xx-large
# forums by Detlef Pilzecker (deti) in June 2008 # forums by Detlef Pilzecker (deti) in June 2008
   
# The 'our' function is avaliable sincee Perl v5.6.0 # The 'our' function is avaliable sincee Perl v5.6.0
# If your Perl version is lower, then comment the 'our'-lines out and use this: # If your Perl version is lower, then comment the 'our'-lines out and use this:
# use vars qw(@categoryorder,@catboards,@catdata,@boarddata,@allboards,%catinfo,%cat,%board,%boarddata,$catfile,$boardfile,$key,$value,$cnt); # use vars qw(@categoryorder,@catboards,@catdata,@boarddata,@allboards,%catinfo,%cat,%board,%boarddata,$catfile,$boardfile,$key,$value,$cnt);
our (@categoryorder, @catboards, @catdata, @boarddata, @allboards); our (@categoryorder, @catboards, @catdata, @boarddata, @allboards);
our (%catinfo, %cat, %board, %boarddata); our (%catinfo, %cat, %board, %boarddata);
our ($catfile, $boardfile, $key, $value, $cnt); our ($catfile, $boardfile, $key, $value, $cnt);
our (%fixed_users); our (%fixed_users);
   
if (-e "$vardir/Setup.lock") { if (-e "$vardir/Setup.lock") {
   &FoundConvLock if -e "$vardir/Converter.lock";    &FoundConvLock if -e "$vardir/Converter.lock";
   
   if (-e "$vardir/fixusers.txt") {    if (-e "$vardir/fixusers.txt") {
       fopen(FIXUSER, "$vardir/fixusers.txt") || &setup_fatal_error("$maintext_23 $vardir/fixusers.txt: ", 1);        fopen(FIXUSER, "$vardir/fixusers.txt") || &setup_fatal_error("$maintext_23 $vardir/fixusers.txt: ", 1);
       my @fixed = <FIXUSER>;        my @fixed = <FIXUSER>;
       fclose(FIXUSER);        fclose(FIXUSER);
       foreach (@fixed) {        foreach (@fixed) {
           my ($user, $fixedname, undef, $displayedname, undef) = split(/\|/, $_);            my ($user, $fixedname, undef, $displayedname, undef) = split(/\|/, $_);
           @{$fixed_users{$user}} = ($fixedname,$displayedname);            @{$fixed_users{$user}} = ($fixedname,$displayedname);
       }        }
   }    }
   
   &tempstarter;    &tempstarter;
   &tabmenushow;    &tabmenushow;
   
   if ($action && !$INFO{'convert'}) {    if ($action && !$INFO{'convert'}) {
       # needed for: sub conv_stringtotime        # needed for: sub conv_stringtotime
       require Time::Local;        require Time::Local;
       import Time::Local 'timelocal';        import Time::Local 'timelocal';
   
   } elsif (!$action || $INFO{'convert'}) {    } elsif (!$action || $INFO{'convert'}) {
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
   <form action="$set_cgi?action=prepare" method="post">    <form action="$set_cgi?action=prepare" method="post">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td class="windowbg2" align="left" style="font-size: 11px;">            <td class="windowbg2" align="left" style="font-size: 11px;">
           Make sure your YaBB 2 installation is running and that it has all the correct folder paths and URLs.<br />            Make sure your YaBB 2 installation is running and that it has all the correct folder paths and URLs.<br />
           Proceed through the following steps to convert your YaBB 1 Gold - SP 1.x forum to YaBB 2!<br /><br />            Proceed through the following steps to convert your YaBB 1 Gold - SP 1.x forum to YaBB 2!<br /><br />
           <b>If</b> your YaBB 1 Gold - SP 1.x forum is located on the same server as your YaBB 2 installation:            <b>If</b> your YaBB 1 Gold - SP 1.x forum is located on the same server as your YaBB 2 installation:
           <ol>            <ol>
           <li>Insert the path to your YaBB 1 Gold - SP 1.x forum in the input field below</li>            <li>Insert the path to your YaBB 1 Gold - SP 1.x forum in the input field below</li>
           <li>Click on the 'Continue' button</li>            <li>Click on the 'Continue' button</li>
           </ol>            </ol>
           <b>Else</b> if your YaBB 1 Gold - SP 1.x forum is located on a different server than your YaBB 2 installation or if you dont know the path to your SP 1.x forum:            <b>Else</b> if your YaBB 1 Gold - SP 1.x forum is located on a different server than your YaBB 2 installation or if you dont know the path to your SP 1.x forum:
           <ol>            <ol>
           <li>Copy all files in the /Boards, /Members, and /Messages folders from your YaBB 1 Gold - SP 1.x installation, to the corresponding Convert/Boards,            <li>Copy all files in the /Boards, /Members, and /Messages folders from your YaBB 1 Gold - SP 1.x installation, to the corresponding Convert/Boards,
           Convert/Members, and Convert/Messages folders of your YaBB 2 installation, and chmod them 777.</li>            Convert/Members, and Convert/Messages folders of your YaBB 2 installation, and chmod them 777.</li>
           <li>Copy cat.txt from the /Variables folder of your YaBB 1 Gold - SP 1.x installation to the Convert/Variables folder of your YaBB 2 installation, and chmod it 666.</li>            <li>Copy cat.txt from the /Variables folder of your YaBB 1 Gold - SP 1.x installation to the Convert/Variables folder of your YaBB 2 installation, and chmod it 666.</li>
           <li>If you have 'Add More Membergroups' installed on your YaBB 1 Gold - SP 1.x, copy MemberStats.txt from the /Variables folder of your YaBB 1 Gold - SP 1.x installation to the Convert/Variables folder of your YaBB 2 installation, and chmod it 666.</li>            <li>If you have 'Add More Membergroups' installed on your YaBB 1 Gold - SP 1.x, copy MemberStats.txt from the /Variables folder of your YaBB 1 Gold - SP 1.x installation to the Convert/Variables folder of your YaBB 2 installation, and chmod it 666.</li>
   
           <li>Click on the 'Continue' button</li>            <li>Click on the 'Continue' button</li>
           </ol>            </ol>
           <div style="width: 100%; text-align: center;">            <div style="width: 100%; text-align: center;">
           <b>Path to your YaBB 1 Gold - SP 1.x files: </b> <input type="text" name="convertdir" value="$convertdir" size="50" />            <b>Path to your YaBB 1 Gold - SP 1.x files: </b> <input type="text" name="convertdir" value="$convertdir" size="50" />
           </div>            </div>
           <br />            <br />
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="catbg" align="center">            <td width="100%" colspan="2" class="catbg" align="center">
           <input type="submit" value="Continue" />            <input type="submit" value="Continue" />
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </form>    </form>
   </div>    </div>
       ~;        ~;
   }    }
   
   if ($action eq "prepare") {    if ($action eq "prepare") {
       &UpdateCookie("delete");        &UpdateCookie("delete");
   
       $username = 'Guest';        $username = 'Guest';
       $iamguest = '1';        $iamguest = '1';
       $iamadmin = '';        $iamadmin = '';
       $iamgmod = '';        $iamgmod = '';
       $password = '';        $password = '';
       $yyim = '';        $yyim = '';
       $ENV{'HTTP_COOKIE'} = '';        $ENV{'HTTP_COOKIE'} = '';
       $yyuname = '';        $yyuname = '';
   
       $convertdir = $FORM{'convertdir'};        $convertdir = $FORM{'convertdir'};
   
       if (!-d "$convertdir/Boards") { &setup_fatal_error("Directory: $convertdir/Boards", 1); }        if (!-d "$convertdir/Boards") { &setup_fatal_error("Directory: $convertdir/Boards", 1); }
       else { $convboardsdir = "$convertdir/Boards"; }        else { $convboardsdir = "$convertdir/Boards"; }
       if (!-e "$convertdir/Members/memberlist.txt") { &setup_fatal_error("Directory: $convertdir/Members", 1); }        if (!-e "$convertdir/Members/memberlist.txt") { &setup_fatal_error("Directory: $convertdir/Members", 1); }
       else { $convmemberdir = "$convertdir/Members"; }        else { $convmemberdir = "$convertdir/Members"; }
       if (!-d "$convertdir/Messages") { &setup_fatal_error("Directory: $convertdir/Messages", 1); }        if (!-d "$convertdir/Messages") { &setup_fatal_error("Directory: $convertdir/Messages", 1); }
       else { $convdatadir = "$convertdir/Messages"; }        else { $convdatadir = "$convertdir/Messages"; }
       if (!-e "$convertdir/Variables/cat.txt") { &setup_fatal_error("Directory: $convertdir/Variables", 1); }        if (!-e "$convertdir/Variables/cat.txt") { &setup_fatal_error("Directory: $convertdir/Variables", 1); }
       else { $convvardir = "$convertdir/Variables"; }        else { $convvardir = "$convertdir/Variables"; }
   
   
       my $setfile = << "EOF";        my $setfile = << "EOF";
\$convertdir = qq~$convertdir~; \$convertdir = qq~$convertdir~;
\$convboardsdir = qq~$convertdir/Boards~; \$convboardsdir = qq~$convertdir/Boards~;
\$convmemberdir = qq~$convertdir/Members~; \$convmemberdir = qq~$convertdir/Members~;
\$convdatadir = qq~$convertdir/Messages~; \$convdatadir = qq~$convertdir/Messages~;
\$convvardir = qq~$convertdir/Variables~; \$convvardir = qq~$convertdir/Variables~;
   
1; 1;
EOF EOF
   
       fopen(SETTING, ">$vardir/ConvSettings.txt") || &setup_fatal_error("$maintext_23 $vardir/ConvSettings.txt: ", 1);        fopen(SETTING, ">$vardir/ConvSettings.txt") || &setup_fatal_error("$maintext_23 $vardir/ConvSettings.txt: ", 1);
       print SETTING &nicely_aligned_file($setfile);        print SETTING &nicely_aligned_file($setfile);
       fclose(SETTING);        fclose(SETTING);
   
       $yytabmenu = $NavLink1a . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1a . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           <ul>            <ul>
           <li>Members info found in: <b>$convmemberdir</b></li>            <li>Members info found in: <b>$convmemberdir</b></li>
           <li>Board and Category info found in: <b>$convboardsdir</b></li>            <li>Board and Category info found in: <b>$convboardsdir</b></li>
           <li>Messages info found in: <b>$convdatadir</b></li>            <li>Messages info found in: <b>$convdatadir</b></li>
           <li>cat.txt found in: <b>$convvardir</b></li>            <li>cat.txt found in: <b>$convvardir</b></li>
           </ul>            </ul>
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           - Conversion can take a long time depending on the size of your forum (30 seconds to a couple hours).<br />            - Conversion can take a long time depending on the size of your forum (30 seconds to a couple hours).<br />
           - Your browser will be refreshed automaticly every $max_process_time seconds and you will see the ongoing process in the status bar.<br />            - Your browser will be refreshed automaticly every $max_process_time seconds and you will see the ongoing process in the status bar.<br />
           - Some internet connections refresh their IP-Adress automaticly every 24 hours.<br />            - Some internet connections refresh their IP-Adress automaticly every 24 hours.<br />
           &nbsp; Make sure that your IP-Adress will not change during conversion, or you must restart the conversion after that! <br />            &nbsp; Make sure that your IP-Adress will not change during conversion, or you must restart the conversion after that! <br />
           - Your forum will be set to maintenance while converting.            - Your forum will be set to maintenance while converting.
           <p id="memcontinued">Click on 'Members' in the menu to start.<br />&nbsp;</p>            <p id="memcontinued">Click on 'Members' in the menu to start.<br />&nbsp;</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Members\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Members\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "members") {    } elsif ($action eq "members") {
       unless (exists $INFO{'mstart1'}) { &PrepareConv; }        unless (exists $INFO{'mstart1'}) { &PrepareConv; }
   
       $INFO{'mstart2'} ? &ConvertMembers2 : &ConvertMembers1;        $INFO{'mstart2'} ? &ConvertMembers2 : &ConvertMembers1;
   
       $yytabmenu = $NavLink1 . $NavLink2a . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2a . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Board and Category Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           New User data files have been created.<br />            New User data files have been created.<br />
           Password encryption is done for each user the first time he/she logs in.<br />            Password encryption is done for each user the first time he/she logs in.<br />
           <br />            <br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <p id="memcontinued">Click on 'Boards & Categories' in the menu to continue.<br />            <p id="memcontinued">Click on 'Boards & Categories' in the menu to continue.<br />
           If you don't do that the script will continue itself in 5 Minutes.</p>            If you don't do that the script will continue itself in 5 Minutes.</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Boards & Categories\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Boards & Categories\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function membtick() {        function membtick() {
            PleaseWait();             PleaseWait();
            location.href="$set_cgi?action=cats;st=$INFO{'st'}";             location.href="$set_cgi?action=cats;st=$INFO{'st'}";
       }        }
   
       setTimeout("membtick()",300000);        setTimeout("membtick()",300000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
       if (-e "$vardir/fixusers.txt") {        if (-e "$vardir/fixusers.txt") {
   
           fopen(FIXUSER, "$vardir/fixusers.txt") || &setup_fatal_error("$maintext_23 $vardir/fixusers.txt: ", 1);            fopen(FIXUSER, "$vardir/fixusers.txt") || &setup_fatal_error("$maintext_23 $vardir/fixusers.txt: ", 1);
           my @fixed = <FIXUSER>;            my @fixed = <FIXUSER>;
           fclose(FIXUSER);            fclose(FIXUSER);
           chomp(@fixed);            chomp(@fixed);
   
           $yymain .= qq~            $yymain .= qq~
   <br />    <br />
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
   <table width="100%" cellspacing="1" cellpadding="4">    <table width="100%" cellspacing="1" cellpadding="4">
       <tr>        <tr>
       <td align="left" class="windowbg" colspan="5">        <td align="left" class="windowbg" colspan="5">
        Member(s) with illegal username(s) were found and converted to legal name(s).<br />         Member(s) with illegal username(s) were found and converted to legal name(s).<br />
        You can find this informations in the <i>$vardir/fixusers.txt</i> file. If you don't need it, you can delete it later.         You can find this informations in the <i>$vardir/fixusers.txt</i> file. If you don't need it, you can delete it later.
       </td>        </td>
       <tr>        <tr>
       <td align="center" class="catbg">Invalid name</td>        <td align="center" class="catbg">Invalid name</td>
       <td align="center" class="catbg">Fixed name</td>        <td align="center" class="catbg">Fixed name</td>
       <td align="center" class="catbg">Reg. date</td>        <td align="center" class="catbg">Reg. date</td>
       <td align="center" class="catbg">Displayed name</td>        <td align="center" class="catbg">Displayed name</td>
       <td align="center" class="catbg">E-mail</td>        <td align="center" class="catbg">E-mail</td>
       </tr>        </tr>
           ~;            ~;
           foreach $userfixed (@fixed) {            foreach $userfixed (@fixed) {
               ($inname, $fxname, $rgdate, $dspname, $tmail) = split(/\|/, $userfixed);                ($inname, $fxname, $rgdate, $dspname, $tmail) = split(/\|/, $userfixed);
               $yymain .= qq~                $yymain .= qq~
       <tr>        <tr>
       <td align="left" class="windowbg2">$inname</td>        <td align="left" class="windowbg2">$inname</td>
       <td align="left" class="windowbg2">$fxname</td>        <td align="left" class="windowbg2">$fxname</td>
       <td align="left" class="windowbg2">$rgdate</td>        <td align="left" class="windowbg2">$rgdate</td>
       <td align="left" class="windowbg2">$dspname</td>        <td align="left" class="windowbg2">$dspname</td>
       <td align="left" class="windowbg2">$tmail</td>        <td align="left" class="windowbg2">$tmail</td>
       </tr>        </tr>
               ~;                ~;
           }            }
           $yymain .= qq~            $yymain .= qq~
   </table>    </table>
   </div>    </div>
           ~;            ~;
       }        }
   
   
   } elsif ($action eq "members2") {    } elsif ($action eq "members2") {
       &setup_fatal_error("Member conversion (members2) 'mstart1' ($INFO{'mstart1'}), 'mstart2' ($INFO{'mstart2'}) error!") if $INFO{'mstart1'} <= 0 || $INFO{'mstart2'} < 0;        &setup_fatal_error("Member conversion (members2) 'mstart1' ($INFO{'mstart1'}), 'mstart2' ($INFO{'mstart2'}) error!") if $INFO{'mstart1'} <= 0 || $INFO{'mstart2'} < 0;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       my $mwidth = int((($INFO{'mstart2'} + $INFO{'mstart1'}) / 2) / $INFO{'mtotal'} * 100);        my $mwidth = int((($INFO{'mstart2'} + $INFO{'mstart1'}) / 2) / $INFO{'mtotal'} * 100);
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $mwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $mwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$mwidth %</div><br />            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$mwidth %</div><br />
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Board and Category Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           To prevent server time-out due to the amount of members to be converted, the conversion is split into more steps.<br />            To prevent server time-out due to the amount of members to be converted, the conversion is split into more steps.<br />
           <br />            <br />
           The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />            The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />
           The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />            The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           There are <b>~ . int($INFO{'mtotal'} - (($INFO{'mstart2'} + $INFO{'mstart1'}) / 2)) . qq~/$INFO{'mtotal'}</b> Members left to be converted.<br />            There are <b>~ . int($INFO{'mtotal'} - (($INFO{'mstart2'} + $INFO{'mstart1'}) / 2)) . qq~/$INFO{'mtotal'}</b> Members left to be converted.<br />
   
           <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=members;st=$INFO{'st'};mstart1=$INFO{'mstart1'};mstart2=$INFO{'mstart2'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Members' conversion click here</a>. Then copy the actual browser adress and type it in when you are going to continue the conversion.</p>            <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=members;st=$INFO{'st'};mstart1=$INFO{'mstart1'};mstart2=$INFO{'mstart2'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Members' conversion click here</a>. Then copy the actual browser adress and type it in when you are going to continue the conversion.</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Members\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Members\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function stoptick() { stop = 1; }        function stoptick() { stop = 1; }
   
       stop = 0;        stop = 0;
       function membtick() {        function membtick() {
           if (stop != 1) {            if (stop != 1) {
               PleaseWait();                PleaseWait();
               location.href="$set_cgi?action=members;st=$INFO{'st'};mstart1=$INFO{'mstart1'};mstart2=$INFO{'mstart2'}";                location.href="$set_cgi?action=members;st=$INFO{'st'};mstart1=$INFO{'mstart1'};mstart2=$INFO{'mstart2'}";
           }            }
       }        }
   
       setTimeout("membtick()",2000);        setTimeout("membtick()",2000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "cats") {    } elsif ($action eq "cats") {
       unless (exists $INFO{'bstart'} && exists $INFO{'bfstart'}) {        unless (exists $INFO{'bstart'} && exists $INFO{'bfstart'}) {
           &GetCats;            &GetCats;
           &CreateControl;            &CreateControl;
       }        }
       &ConvertBoards;        &ConvertBoards;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3a . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3a . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           New forum.master file has been created.<br />            New forum.master file has been created.<br />
           New forum.control file has been created.<br />            New forum.control file has been created.<br />
           All dates in files have been converted to timestamps.<br />            All dates in files have been converted to timestamps.<br />
           All threads have been converted.<br />            All threads have been converted.<br />
           <br />            <br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <p id="memcontinued">Click on 'Messages' in the menu to continue.<br />            <p id="memcontinued">Click on 'Messages' in the menu to continue.<br />
           If you don't do that the script will continue itself in 5 Minutes.</p>             If you do not do that the script will continue by itself in 5 minutes.</p> 
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Messages\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Messages\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function membtick() {        function membtick() {
            PleaseWait();             PleaseWait();
            location.href="$set_cgi?action=messages;st=$INFO{'st'}";             location.href="$set_cgi?action=messages;st=$INFO{'st'}";
       }        }
   
       setTimeout("membtick()",300000);        setTimeout("membtick()",300000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "cats2") {    } elsif ($action eq "cats2") {
       &setup_fatal_error("Boards conversion (cats2) 'bstart' ($INFO{'bstart'}) or 'bfstart' ($INFO{'bfstart'}) error!") if (!$INFO{'bstart'} && !$INFO{'bfstart'}) || $INFO{'bstart'} < 0 || $INFO{'bfstart'} < 0;        &setup_fatal_error("Boards conversion (cats2) 'bstart' ($INFO{'bstart'}) or 'bfstart' ($INFO{'bfstart'}) error!") if (!$INFO{'bstart'} && !$INFO{'bfstart'}) || $INFO{'bstart'} < 0 || $INFO{'bfstart'} < 0;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       my $bwidth = int($INFO{'bstart'} / $INFO{'btotal'} * 100);        my $bwidth = int($INFO{'bstart'} / $INFO{'btotal'} * 100);
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $bwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $bwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$bwidth %</div><br />            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$bwidth %</div><br />
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Message Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           <div>            <div>
           To prevent server time-out due to the amount of boards to be converted, the conversion is split into more steps.<br />            To prevent server time-out due to the amount of boards to be converted, the conversion is split into more steps.<br />
           <br />            <br />
           The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />            The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />
           The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />            The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           There are <b>~ . ($INFO{'btotal'} - $INFO{'bstart'}) . qq~/$INFO{'btotal'}</b> Boards left to be converted.<br />            There are <b>~ . ($INFO{'btotal'} - $INFO{'bstart'}) . qq~/$INFO{'btotal'}</b> Boards left to be converted.<br />
           </div>            </div>
           <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=cats;st=$INFO{'st'};bstart=$INFO{'bstart'};bfstart=$INFO{'bfstart'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Boards & Categories' conversion click here</a>. Then copy the actual browser adress and type it in when you are going to continue the conversion.</p>            <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=cats;st=$INFO{'st'};bstart=$INFO{'bstart'};bfstart=$INFO{'bfstart'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Boards & Categories' conversion click here</a>. Then copy the actual browser address and type it in when you are going to continue the conversion.</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Boards & Categories\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Boards & Categories\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function stoptick() { stop = 1; }        function stoptick() { stop = 1; }
   
       stop = 0;        stop = 0;
       function membtick() {        function membtick() {
           if (stop != 1) {            if (stop != 1) {
               PleaseWait();                PleaseWait();
               location.href="$set_cgi?action=cats;st=$INFO{'st'};bstart=$INFO{'bstart'};bfstart=$INFO{'bfstart'}";                location.href="$set_cgi?action=cats;st=$INFO{'st'};bstart=$INFO{'bstart'};bfstart=$INFO{'bfstart'}";
           }            }
       }        }
   
       setTimeout("membtick()",2000);        setTimeout("membtick()",2000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "messages") {    } elsif ($action eq "messages") {
       &ConvertMessages;        &ConvertMessages;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4a . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4a . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           New style message files have been created.<br />            New style message files have been created.<br />
           <br />            <br />
           <i>$INFO{'total_threads'}</i> Threads have been converted.<br />            <i>$INFO{'total_threads'}</i> Threads have been converted.<br />
           <i>$INFO{'total_mess'}</i> Messages have been converted.<br />            <i>$INFO{'total_mess'}</i> Messages have been converted.<br />
           <br />            <br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <p id="memcontinued">Click on 'Date & Time' in the menu to continue.<br />            <p id="memcontinued">Click on 'Date & Time' in the menu to continue.<br />
           If you don't do that the script will continue itself in 5 Minutes.</p>             If you do not do that the script will continue by itself in 5 minutes.</p> 
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Date & Time\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Date & Time\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function membtick() {        function membtick() {
            PleaseWait();             PleaseWait();
            location.href="$set_cgi?action=dates;st=$INFO{'st'}";             location.href="$set_cgi?action=dates;st=$INFO{'st'}";
       }        }
   
       setTimeout("membtick()",300000);        setTimeout("membtick()",300000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "messages2") {    } elsif ($action eq "messages2") {
       &setup_fatal_error("Message conversion (messages2) 'count' ($INFO{'count'}) or 'tcount' ($INFO{'tcount'}) error!", 1) if (!$INFO{'count'} && !$INFO{'tcount'}) || $INFO{'count'} < 0 || $INFO{'tcount'} < 0;        &setup_fatal_error("Message conversion (messages2) 'count' ($INFO{'count'}) or 'tcount' ($INFO{'tcount'}) error!", 1) if (!$INFO{'count'} && !$INFO{'tcount'}) || $INFO{'count'} < 0 || $INFO{'tcount'} < 0;
   
       my $bwidth = int($INFO{'count'} / $INFO{'totboard'} * 100);        my $bwidth = int($INFO{'count'} / $INFO{'totboard'} * 100);
       my $mwidth = $INFO{'totmess'} ? int($INFO{'tcount'} / $INFO{'totmess'} * 100) : 0;        my $mwidth = $INFO{'totmess'} ? int($INFO{'tcount'} / $INFO{'totmess'} * 100) : 0;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>
           <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $bwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $bwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$bwidth %</div><br />            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$bwidth %</div><br />
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Date & Time Conversion.</div>
           $ConvNotDone            $ConvNotDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           To prevent server time-out due to the amount of messages to be converted, the conversion is split into more steps.<br />            To prevent server time-out due to the amount of messages to be converted, the conversion is split into more steps.<br />
           <br />            <br />
           The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />            The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />
           The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />            The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <i>$INFO{'total_threads'}</i> Threads where converted until now.<br />            <i>$INFO{'total_threads'}</i> Threads where converted until now.<br />
           <i>$INFO{'total_mess'}</i> Messages where converted until now.<br />            <i>$INFO{'total_mess'}</i> Messages where converted until now.<br />
           <br />            <br />
           There are <b>~ . ($INFO{'totboard'} - $INFO{'count'}) . qq~/$INFO{'totboard'}</b> Boards left, to convert the Messages in.<br />            There are <b>~ . ($INFO{'totboard'} - $INFO{'count'}) . qq~/$INFO{'totboard'}</b> Boards left, to convert the Messages in.<br />
           <div style="float: left;">There are <b>~ . ($INFO{'totmess'} - $INFO{'tcount'}) . qq~/$INFO{'totmess'}</b> Threads left in the actual Board to be converted. &nbsp; </div>            <div style="float: left;">There are <b>~ . ($INFO{'totmess'} - $INFO{'tcount'}) . qq~/$INFO{'totmess'}</b> Threads left in the actual Board to be converted. &nbsp; </div>
           <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $mwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $mwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$mwidth %</div><br />            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$mwidth %</div><br />
   
           <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=messages;st=$INFO{'st'};count=$INFO{'count'};tcount=$INFO{'tcount'};total_mess=$INFO{'total_mess'};total_threads=$INFO{'total_threads'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Messages' conversion click here</a>. Then copy the actual browser adress and type it in when you are going to continue the conversion.</p>            <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=messages;st=$INFO{'st'};count=$INFO{'count'};tcount=$INFO{'tcount'};total_mess=$INFO{'total_mess'};total_threads=$INFO{'total_threads'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Messages' conversion click here</a>. Then copy the actual browser address and type it in when you are going to continue the conversion.</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Messages\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Messages\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function stoptick() { stop = 1; }        function stoptick() { stop = 1; }
   
       stop = 0;        stop = 0;
       function membtick() {        function membtick() {
           if (stop != 1) {            if (stop != 1) {
               PleaseWait();                PleaseWait();
               location.href="$set_cgi?action=messages;st=$INFO{'st'};count=$INFO{'count'};tcount=$INFO{'tcount'};total_mess=$INFO{'total_mess'};total_threads=$INFO{'total_threads'}";                location.href="$set_cgi?action=messages;st=$INFO{'st'};count=$INFO{'count'};tcount=$INFO{'tcount'};total_mess=$INFO{'total_mess'};total_threads=$INFO{'total_threads'}";
           }            }
       }        }
   
       setTimeout("membtick()",2000);        setTimeout("membtick()",2000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "dates") {    } elsif ($action eq "dates") {
       &ConvertTimeToString;        &ConvertTimeToString;
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5a . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5a . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           New style timestamps have been created throughout the board. All old style dates have been converted.<br />            New style timestamps have been created throughout the board. All old style dates have been converted.<br />
           <br />            <br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <p id="memcontinued">Click on 'Clean Up' in the menu to continue.<br />            <p id="memcontinued">Click on 'Clean Up' in the menu to continue.<br />
           If you don't do that the script will continue itself in 5 Minutes.</p>             If you do not do that the script will continue by itself in 5 minutes.</p> 
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Clean Up\\', click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Clean Up\\', click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function membtick() {        function membtick() {
            PleaseWait();             PleaseWait();
            location.href="$set_cgi?action=cleanup;st=$INFO{'st'}";             location.href="$set_cgi?action=cleanup;st=$INFO{'st'}";
       }        }
   
       setTimeout("membtick()",300000);        setTimeout("membtick()",300000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "dates2") {    } elsif ($action eq "dates2") {
       &setup_fatal_error("Date & Time conversion (dates2) error! pollfile($INFO{'pollfile'}), polledfile($INFO{'polledfile'})", 1) if $INFO{'pollfile'} <= 0 && $INFO{'polledfile'} <= 0;        &setup_fatal_error("Date & Time conversion (dates2) error! pollfile($INFO{'pollfile'}), polledfile($INFO{'polledfile'})", 1) if $INFO{'pollfile'} <= 0 && $INFO{'polledfile'} <= 0;
   
       my $pollwidth = ($INFO{'totalpolls'} && $INFO{'pollfile'}) ? int($INFO{'pollfile'} / $INFO{'totalpolls'} * 100) : 100;        my $pollwidth = ($INFO{'totalpolls'} && $INFO{'pollfile'}) ? int($INFO{'pollfile'} / $INFO{'totalpolls'} * 100) : 100;
       $INFO{'pollfile'} = $INFO{'pollfile'} ? $INFO{'pollfile'} : $INFO{'totalpolls'};        $INFO{'pollfile'} = $INFO{'pollfile'} ? $INFO{'pollfile'} : $INFO{'totalpolls'};
       my $polledwidth = ($INFO{'totalpolled'} && $INFO{'polledfile'}) ? int($INFO{'polledfile'} / $INFO{'totalpolled'} * 100) : 0;        my $polledwidth = ($INFO{'totalpolled'} && $INFO{'polledfile'}) ? int($INFO{'polledfile'} / $INFO{'totalpolled'} * 100) : 0;
       $INFO{'polledfile'} = $INFO{'polledfile'} ? $INFO{'polledfile'} : $INFO{'totalpolled'};        $INFO{'polledfile'} = $INFO{'polledfile'} ? $INFO{'polledfile'} : $INFO{'totalpolled'};
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6;
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>
           <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 10px;text-align :center;">            <div style="float: left; width: 102px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 10px;text-align :center;">
           See info below!            See info below!
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">--- %</div><br />            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">--- %</div><br />
           <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #bbbbbb;">Final Cleanup.</div>
           $ConvNotDone            $ConvNotDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           To prevent server time-out due to the amount of Date & Time conversion, the conversion is split into more steps.<br />            To prevent server time-out due to the amount of Date & Time conversion, the conversion is split into more steps.<br />
           <br />            <br />
           The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />            The time-step (\$max_process_time) is set to <i>$max_process_time seconds</i>.<br />
           The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />            The last step took <i>~ . ($time_to_jump - $INFO{'starttime'}) . qq~ seconds</i>.<br />
           You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            You are converting <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
   
           <div style="float: left; width: 350px; height: 14px;">There are <b>~ . ($INFO{'totalpolls'} - $INFO{'pollfile'}) . qq~/$INFO{'totalpolls'}</b> Polls left to be converted. &nbsp; </div>            <div style="float: left; width: 350px; height: 14px;">There are <b>~ . ($INFO{'totalpolls'} - $INFO{'pollfile'}) . qq~/$INFO{'totalpolls'}</b> Polls left to be converted. &nbsp; </div>
           <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $pollwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $pollwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$pollwidth %</div>            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$pollwidth %</div>
           </div><br /><br />            </div><br /><br />
   
           <div style="float: left; width: 350px; height: 14px;">There are <b>~ . ($INFO{'totalpolled'} - $INFO{'polledfile'}) . qq~/$INFO{'totalpolled'}</b> Polled-Files left to be converted. &nbsp; </div>            <div style="float: left; width: 350px; height: 14px;">There are <b>~ . ($INFO{'totalpolled'} - $INFO{'polledfile'}) . qq~/$INFO{'totalpolled'}</b> Polled-Files left to be converted. &nbsp; </div>
           <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">            <div style="float: left; width: 100px; height: 10px; margin: 1px; background-color: #dddddd; border: 1px black solid; font-size: 5px;">
           <div style="position: relative; top: 0px; left: 0px; width: $polledwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>            <div style="position: relative; top: 0px; left: 0px; width: $polledwidth\px; height: 10px; margin: 0px; background-color: #6699cc; border: 0px; font-size: 5px;">&nbsp;</div>
           </div>            </div>
           <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$polledwidth %</div>            <div style="float: left; width: 50px; height: 14px; text-align: right; color: #FF3333;">$polledwidth %</div>
           </div><br /><br />            </div><br /><br />
   
           <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=dates;st=$INFO{'st'};timeconv=$INFO{'timeconv'};pollfile=$INFO{'pollfile'};totalpolls=$INFO{'totalpolls'};polledfile=$INFO{'polledfile'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Date & Time' conversion click here</a>. Then copy the actual browser adress and type it in when you are going to continue the conversion.</p>            <p id="memcontinued">If nothing happens in 5 seconds <a href="$set_cgi?action=dates;st=$INFO{'st'};timeconv=$INFO{'timeconv'};pollfile=$INFO{'pollfile'};totalpolls=$INFO{'totalpolls'};polledfile=$INFO{'polledfile'}" onclick="PleaseWait();">click here to continue</a>...<br />If you want to <a href="javascript:stoptick();">STOP 'Date & Time' conversion click here</a>. Then copy the actual browser address and type it in when you are going to continue the conversion.</p>
           </td>            </td>
       </tr>        </tr>
       </table>        </table>
   </div>    </div>
   
   <script type="text/javascript">    <script type="text/javascript">
   <!--    <!--
       function PleaseWait() {        function PleaseWait() {
           document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Date & Time\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';            document.getElementById("memcontinued").innerHTML = '<font color="red"><b>Converting - please wait!<br />If you want to stop \\'Date & Time\\' conversion, click here on STOP before this red message apears again on next page.</b></font>';
       }        }
   
       function stoptick() { stop = 1; }        function stoptick() { stop = 1; }
   
       stop = 0;        stop = 0;
       function membtick() {        function membtick() {
           if (stop != 1) {            if (stop != 1) {
               PleaseWait();                PleaseWait();
               location.href="$set_cgi?action=dates;st=$INFO{'st'};timeconv=$INFO{'timeconv'};pollfile=$INFO{'pollfile'};totalpolls=$INFO{'totalpolls'};polledfile=$INFO{'polledfile'}";                location.href="$set_cgi?action=dates;st=$INFO{'st'};timeconv=$INFO{'timeconv'};pollfile=$INFO{'pollfile'};totalpolls=$INFO{'totalpolls'};polledfile=$INFO{'polledfile'}";
           }            }
       }        }
   
       setTimeout("membtick()",2000);        setTimeout("membtick()",2000);
   // -->    // -->
   </script>    </script>
       ~;        ~;
   
   
   } elsif ($action eq "cleanup") {    } elsif ($action eq "cleanup") {
       require "$boardsdir/forum.master";        require "$boardsdir/forum.master";
   
       if (!$INFO{'clean'}) {        if (!$INFO{'clean'}) {
           fopen(FORUMTOTALS, ">>$boardsdir/forum.totals") || &setup_fatal_error("Can not open $boardsdir/forum.totals", 1);            fopen(FORUMTOTALS, ">>$boardsdir/forum.totals") || &setup_fatal_error("Can not open $boardsdir/forum.totals", 1);
           foreach my $testboard (@allboards) {            foreach my $testboard (@allboards) {
               chomp $testboard;                chomp $testboard;
               if (-e "$boardsdir/$testboard.ttl") {                if (-e "$boardsdir/$testboard.ttl") {
                   fopen(BOARDTTL, "$boardsdir/$testboard.ttl") || &setup_fatal_error("Can not open $boardsdir/$testboard.ttl", 1);                    fopen(BOARDTTL, "$boardsdir/$testboard.ttl") || &setup_fatal_error("Can not open $boardsdir/$testboard.ttl", 1);
                   my $line = <BOARDTTL>;                    my $line = <BOARDTTL>;
                   fclose(BOARDTTL);                    fclose(BOARDTTL);
                   chomp $line;                    chomp $line;
                   print FORUMTOTALS "$testboard|$line|\n";                    print FORUMTOTALS "$testboard|$line|\n";
                   #unlink "$boardsdir/$testboard.ttl";                    #unlink "$boardsdir/$testboard.ttl";
               }                }
           }            }
           fclose(FORUMTOTALS);            fclose(FORUMTOTALS);
   
           $yySetLocation = qq~$set_cgi?action=cleanup2;st=~ . int($INFO{'st'} + time() - $time_to_jump + $max_process_time) . qq~;starttime=$time_to_jump;clean=1;pass_error=1;total_boards=~ . @allboards;            $yySetLocation = qq~$set_cgi?action=cleanup2;st=~ . int($INFO{'st'} + time() - $time_to_jump + $max_process_time) . qq~;starttime=$time_to_jump;clean=1;pass_error=1;total_boards=~ . @allboards;
           &redirectexit;            &redirectexit;
       }        }
       &MyReCountTotals if $INFO{'clean'} == 1;        &MyReCountTotals if $INFO{'clean'} == 1;
   
       &MyMemberIndex if $INFO{'clean'} == 2;        &MyMemberIndex if $INFO{'clean'} == 2;
       &MyMailNotify if $INFO{'clean'} == 3;        &MyMailNotify if $INFO{'clean'} == 3;
       &FixNopost if $INFO{'clean'} == 4;        &FixNopost if $INFO{'clean'} == 4;
   
       if ($INFO{'tmp_firstforum'} > $INFO{'firstforum'}) {        if ($INFO{'tmp_firstforum'} > $INFO{'firstforum'}) {
           $setforumstart  = &timeformat($INFO{'tmp_firstforum'});            $setforumstart  = &timeformat($INFO{'tmp_firstforum'});
           $firstmember    = &timeformat($INFO{'firstforum'});            $firstmember    = &timeformat($INFO{'firstforum'});
           $forumstarttext = qq~The Forum Start date was set to $setforumstart but the first member was registered $firstmember. So we changed the Forum Start Date to $firstmember.~;            $forumstarttext = qq~The Forum Start date was set to $setforumstart but the first member was registered $firstmember. So we changed the Forum Start Date to $firstmember.~;
       }        }
   
       $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6a;        $yytabmenu = $NavLink1 . $NavLink2 . $NavLink3 . $NavLink4 . $NavLink5 . $NavLink6a;
   
       $formsession = &cloak("$mbname$username");        $formsession = &cloak("$mbname$username");
   
       if (-e "Convert/Members/admin.dat") {        if (-e "Convert/Members/admin.dat") {
           $convtext .= qq~<br /><br />After you have tested your forum and made sure everything was converted correctly you can go to your Admin Center and delete /Convert/Boards, /Convert/Members, /Convert/Messages and /Convert/Variables folders and their contents.~;            $convtext .= qq~<br /><br />After you have tested your forum and made sure everything was converted correctly you can go to your Admin Center and delete /Convert/Boards, /Convert/Members, /Convert/Messages and /Convert/Variables folders and their contents.~;
       }        }
   
       if (-e "$vardir/fixusers.txt") {        if (-e "$vardir/fixusers.txt") {
           $convtext .= qq~<br /><br />There were some illegal usernames. Their names were changed. Please inform them. You can find the list in the $vardir/fixusers.txt~;            $convtext .= qq~<br /><br />There were some illegal usernames. Their names were changed. Please inform them. You can find the list in the $vardir/fixusers.txt~;
       }        }
   
       $yymain = qq~        $yymain = qq~
   <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">    <div class="bordercolor" style="padding: 0px; width: 100%; margin-left: 0px; margin-right: 0px;">
       <table width="100%" cellspacing="1" cellpadding="4">        <table width="100%" cellspacing="1" cellpadding="4">
       <tr valign="middle">        <tr valign="middle">
           <td width="100%" colspan="2" class="titlebg" align="left">            <td width="100%" colspan="2" class="titlebg" align="left">
           YaBB 2 Converter            YaBB 2 Converter
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/thread.gif" alt="" />            <img src="$imagesdir/thread.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left">            <td width="95%" class="windowbg2" align="left">
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Member Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Board and Category Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Message Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Date & Time Conversion.</div>
           $ConvDone            $ConvDone
           <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Final Cleanup.</div>            <div style="float: left; width: 250px; height: 14px; color: #FF3333;">Final Cleanup.</div>
           $ConvDone            $ConvDone
           </td>            </td>
       </tr>        </tr>
       <tr valign="middle">        <tr valign="middle">
           <td width="5%" class="windowbg" align="center">            <td width="5%" class="windowbg" align="center">
           <img src="$imagesdir/info.gif" alt="" />            <img src="$imagesdir/info.gif" alt="" />
           </td>            </td>
           <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">            <td width="95%" class="windowbg2" align="left" style="font-size: 11px;">
           $forumstarttext            $forumstarttext
           $convtext<br />            $convtext<br />
           <br />            <br />
           The conversion took <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />            The conversion took <i>~ . int(($INFO{'st'} + 60)/60) . qq~ minutes</i>.<br />
           <br />            <br />
           <br />            <br />
           <font color"red">We recommend you delete the file "$ENV{'SCRIPT_NAME'}". This is to prevent someone else running the converter and damaging your files.<br />            <font color"red">We recommend you delete the file "$ENV{'SCRIPT_NAME'}". This is to prevent someone else running the converter and damaging your files.<br />
           <br />            <br />
           Further more, we strongly recomend to run the following "Maintenance Controls" in the "Admin Center" before you start doing other things:<br />            Further more, we strongly recomend to run the following "Maintenance Controls" in the "Admin Center" before you start doing other things:<br />
           - Rebuild Message Index<br />            - Rebuild Message Index<br />
           - Recount Board Totals<br />            - Recount Board Totals<br />
           - Rebuild Members List<br />            - Rebuild Members List<br />
           - Recount Membership<br />            - Recount Membership<br />
           - Rebuild Members History<br />            - Rebuild Members History<br />
           - Rebuild Notifications Files<br />            - Rebuild Notifications Files<br />
           - Clean Users Online Log<br />            - Clean Users Online Log<br />
           - Attachment Functions => Rebuild Attachments<br /></font>            - Attachment Functions => Rebuild Attachments<br /></font>
           <br />            <br />
           <br />            <br />
           You may now login to your forum. Enjoy using YaBB 2!            You may now login to your forum. Enjoy using YaBB 2!
           </td>            </td>
       </tr>        </tr>
       <tr>        <tr>
           <td width="100%" class="catbg" colspan="2" align="center">            <td width="100%" class="catbg" colspan="2" align="center">
           <form action="YaBB.$yyext" method="post" style="display: inline;">            <form action="YaBB.$yyext" method="post" style="display: inline;">
               <input type="submit" value="Start" />                <input type="submit" value="Start" />
               <input type="hidden" name="formsession" value="$formsession" />                <input type="hidden" name="formsession" value="$formsession" />