D:\WEBSITES\testbed\zipped\yabb252_09_15\cgi-bin\yabb2\Setup.pl D:\WEBSITES\testbed\zipped\yabb252_09_17\cgi-bin\yabb2\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.2                                                  # # Version:        YaBB 2.5.2                                                  #
# Packaged:       September 30, 2012                                          # # Packaged:       September 30, 2012                                          #
# Distributed by: http://www.yabbforum.com                                    # # Distributed by: http://www.yabbforum.com                                    #
# =========================================================================== # # =========================================================================== #
# Copyright (c) 2000-2012 YaBB (www.yabbforum.com) - All Rights Reserved.     # # Copyright (c) 2000-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.                      #
############################################################################### ###############################################################################
   
$setupplver = 'YaBB 2.5.2 $Revision: 1.3 $'; $setupplver = 'YaBB 2.5.2 $Revision: 1.4 $';
   
# 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.5.2 Converter                  YaBB 2.5.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.5.2 installation is running and that it has all the correct folder paths and URLs.<br />                  Make sure your YaBB 2.5.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.5.2!<br /><br />                  Proceed through the following steps to convert your YaBB 1 Gold - SP 1.x forum to YaBB 2.5.2!<br /><br />
                 <b>If</b> your YaBB 1 Gold - SP 1.x forum is located on the same server as your YaBB 2.5.2 installation:                  <b>If</b> your YaBB 1 Gold - SP 1.x forum is located on the same server as your YaBB 2.5.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.5.2 installation or if you do not 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.5.2 installation or if you do not 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.5.2 installation, and chmod them 777.</li>                  Convert/Members, and Convert/Messages folders of your YaBB 2.5.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.5.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.5.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.5.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.5.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.5.2 Converter                  YaBB 2.5.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.5.2 Converter                  YaBB 2.5.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 do not do that the script will continue itself in 5 Minutes.</p>                  If you do not 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 information in the <i>$vardir/fixusers.txt</i> file. If you do not need it, you can delete it later.             You can find this information in the <i>$vardir/fixusers.txt</i> file. If you do not 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.5.2 Converter                  YaBB 2.5.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.5.2 Converter                  YaBB 2.5.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 do not do that the script will continue by 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.5.2 Converter                  YaBB 2.5.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 address 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.5.2 Converter                  YaBB 2.5.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 do not do that the script will continue by 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.5.2 Converter                  YaBB 2.5.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;">                 <