[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Full-disclosure] Miyabi CGI Tools index.pl command execution



The Miyabi CGI Tools index.pl CGI script suffers from the pipe bug. The
script is attached. It's all in Japanese (I think), I can't read the
comments.
#!/usr/bin/perl

#********************************************************************

# 0000
T      : for UNIX / FreeWare                                              
                *

# 000000
T  : Module                                                             
                        *

# 0000000
T: index.pl                                                            
                *

# 00000      : Perl Mudule                                                      
                        *

# 00000      : S.Mizutani                                                       
                        *

#-------------------------------------------------------------------*

# 
Ty            : ŖSEOvN000 Version 1.02                                        
*

# URL             : http://tool.miyabi-seo.com/                                 
        *

# E-Mail          : miyabi.seo@gmail.com                                        
                *

#-------------------------------------------------------------------*

# Copyright(c)2007-2008 Miyabi CGI Tools All Right Reserved.            *

#********************************************************************

$SystemVersion          = '1.02';

#===================================================================*

# Include Module                                                                
                                        *

#===================================================================*

$ProgramPath            = './';

$HomePath                       = './';

#-------------------------------*

# Require Module                                *

#-------------------------------*

require $ProgramPath.'project/Setup/ConstantValue.pl';          # [pe-[00000

require $ProgramPath.'project/Inspection/Parameter.pl';         # _peig00000

require $ProgramPath.'project/Output/Display.pl';                       # 
HTMLQR00000

#===================================================================*

# Set Param                                                                     
                                                *

#===================================================================*

#-------------------------------*

# {t(u	Ype                                 *

#-------------------------------*

$MvSubTitle                     = '00#000000Ɩ,0000,00000,00000I{000000%R00000Ɩ'; 
                                # vN0000000

$MvDataFile                     = $ProgramPath.'data/datafile.tsv';             
# 0000000

#-------------------------------*

# R\O-[                                          *

#-------------------------------*

$MvMailSend                     = 1;            # {v2w000               [ 1:ON 
/ 0:OFF ]

$MvLinkCheck            = 1;            # vN0000000     [ 1:ON / 0:OFF ]

$MvThumbnails           = 1;            # 00000;uP               [ 1:ON / 0:OFF ]

#-------------------------------*

# Input Data                                    *

#-------------------------------*

%CvIndata                       = &Inspection_Parameter_Get;

#-------------------------------*

# 0000[                                        *

#-------------------------------*

@MvCategory                     = (

        "hQf0h:y",

        "00}T",

        "0000}T",

        "00000",

        "00000",

        "000\",

        "000",

        "00\",

        "0000\",

        "00000",

        "000",

        "ߘN000000",

        "00",

        "eL",

        "000000",

        "e-000000000",

        "00000000",

        "]0n0N",

);

#===================================================================*

# Deny Param                                                                    
                                        *

#===================================================================*

#-------------------------------*

# 6RP000                                 *

#-------------------------------*

@DenyHost                       = (

        'anonymizer',

        'cache'

);

#-------------------------------*

# 6RP0000                                        *

#-------------------------------*

@DenyText                       = (

        'O',

        '{km0',

        'kY0',

        'Ye',

        'tY',

        '!qOck',

);

#-------------------------------*

# 6RPURL                                         *

#-------------------------------*

@DenyUrl                        = (

        'fuck',

        'adult',

        'fetich',

        'stripper'

);

#===================================================================*

# Main                                                                          
                                                *

#===================================================================*

my($HtmlText)           = '';

my($InCategory)         = $MvCategory[($CvIndata{'Category'} - 10)] if 
($CvIndata{'Category'} > 10);

my($PageTitle)          = $CvSiteTitle;

$PageTitle                      .= '\'.$MvSubTitle if (defined $MvSubTitle);

$PageTitle                      .= ' 0'.$InCategory.'0' if (defined 
$InCategory);

#-------------------------------*

if ($CvIndata{'mode'} eq 'html') {

        $HtmlText               .= 
&Output_File_Html($ProgramPath.'html/'.$CvIndata{'fn'});

} else {

        if ($CvIndata{'mode'} eq 'admin') {

                if ($CvIndata{'process'} eq 'check') {

                        my($ErrorMsg)   = '';

                        $ErrorMsg               = 'eQR000,000URL : URLn0f_L0
Nckg0Y0' 
if ($CvIndata{'URL'} !~ /^http:\/\/(?:[a-zA-Z0-9-_.]+).*$/);

                        unless ($ErrorMsg) {

                                #-------------------------------*

                                # 000                                 *

                                #-------------------------------*

                                if (open(FILE, "grep -E 
'\t".$CvIndata{'URL'}."\t' $MvDataFile|")) {

                                        my(@Array)      = <FILE>;

                                        close(FILE);

                                        #-------------------------------*

                                        if (defined @Array) {

                                                @Array          = split(/\t/, 
$Array[0]);

                                                if ($CvIndata{'request'} eq 
'edit') {

                                                        $HtmlText       .= 
&Output_Html_EditForm($Array[1]);

                                                } elsif ($CvIndata{'request'} 
eq 'delete') {

                                                        $HtmlText       .= 
&Output_Html_DeleteForm($Array[1]);

                                                }

                                        } else {

                                                $ErrorMsg       = 'eQR000,000URL 
: rS_000L0d0K00~0[000';

                                        }

                                } else {

                                        $ErrorMsg       = 
'0000000,00000000Q0~0[000';

                                }

                        }

                        if ($ErrorMsg) {

                                $HtmlText       .= &Output_Html_Text($ErrorMsg);

                                $HtmlText       .= &Output_Html_AdminForm;

                        }

                } else {

                        $HtmlText       .= &Output_Html_AdminForm;

                }

        } elsif (($CvIndata{'mode'} eq 'delete') && $CvIndata{'id'}) {

                my($ErrorMsg)   = '';

                if ($CvIndata{'process'} eq 'check') {

                        $ErrorMsg       = 
&Inspection_Param_Password($CvIndata{'password'},6,$CvPassword);

                        $HtmlText       .= ((!$ErrorMsg) && 
(&Output_File_Delete($CvIndata{'id'})))

                                                ? 
&Output_Html_Text('Qt[N,0000JRdW0~0W0_00')

                                                : 
&Output_Html_Text('eQR000,00000 : '.$ErrorMsg);

                } else {

                        $HtmlText       .= 
&Output_Html_DeleteForm($CvIndata{'id'});

                }

        } elsif (($CvIndata{'mode'} eq 'edit') && $CvIndata{'id'}) {

                if ($CvIndata{'process'} eq 'check') {

                        my($ErrorMsg)   = '';

                        my(@RtnArray)   = &Inspection_ParamCheck(0);

                        push(@RtnArray, 'eQR000,00000 : '.$ErrorMsg) if 
($ErrorMsg       = 
&Inspection_Param_Password($CvIndata{'password'},6,$CvPassword));

                        unless (@RtnArray) {

                                &Output_File_Delete($CvIndata{'id'});

                                $HtmlText       .=  
&Output_Html_Text(&Output_File_InputData);

                        } else {

                                $HtmlText       .= &Output_Html_Text(@RtnArray);

                                $HtmlText       .= 
&Output_Html_EditForm($CvIndata{'id'});

                        }

                } else {

                        $HtmlText       .= 
&Output_Html_EditForm($CvIndata{'id'});

                }

        } elsif ($CvIndata{'mode'} eq 'regist') {

                my(@RtnArray)   = &Inspection_ParamCheck(1);

                unless (@RtnArray) {

                        $HtmlText       .= 
&Output_Html_Text(&Output_File_InputData);

                } else {

                        $HtmlText       .= &Output_Html_Text(@RtnArray);

                        $HtmlText       .= &Output_Html_RegistForm;

                }

        } else {

                $HtmlText               .= &Output_Html_RegistForm;

        }

        $HtmlText                       .= &Output_Html_ReadData;

}

#-------------------------------*

# HTML Header                                   *

#-------------------------------*

&Output_Display_Common_Header($PageTitle);

&Output_Html_Header;

#-------------------------------*

print $HtmlText;

#-------------------------------*

# HTML Footer                                   *

#-------------------------------*

&Output_Html_Footer;

&Output_Display_Common_Footer;

exit;

#===========================================================================*

# 00000
T  : 000O                                                               
                                *

# 00000ID  : Action_MailSend                                                    
                                *

# O(uO        : &Action_MailSend;                                                
                                        *

#===========================================================================*

sub Action_MailSend {

        #-------------------------------*

        # 000OQt                               *

        #-------------------------------*

        return 1 unless (open(OUT,"| $sendmail -t"));

        #-------------------------------#

        # 000000QR                              #

        #-------------------------------#

        &Output_Mail_Header($MvSubTitle.'{v2w - 
'.$CvSiteTitle,$CvMailHandle,$MvSubTitle.' Admin',$CvMailHandle);

        #-------------------------------*

        # ,geb_b                                          *

        #-------------------------------*

        foreach (@_) {

                print OUT &$jcnv(\$_, 'jis');

        }

        close(OUT);

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return;

}

#===========================================================================*

# 00000
T  : Mail0000QR                                                          
                        *

# 00000ID  : Output_Mail_Header                                                 
                        *

# O(uO        : &Output_Mail_Header($_[0],$_[1],$_[2]);                          
        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : Subject                                                           
                                        *

# eQR_pe[1]   : From Mail Address                                                 
                                *

# eQR_pe[2]   : From Name                                                         
                                        *

# eQR_pe[3]   : To Mail Address                                                   
                                *

#---------------------------------------------------------------------------*

# QR_pe[0]   : j0W0                                                                
                                                *

#===========================================================================*

sub Output_Mail_Header {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($mySubject)  = &Encode_Mail_Base64($_[0]);

        my($myMailFrom) = ($_[2]) ? &Encode_Mail_Base64($_[2])."\<".$_[1]."\>" 
: $_[1];

        my($myMailTo)   = ($_[3]) ? $_[3] : $CvMailHandle;

        #-------------------------------#

        # 000000QR                              #

        #-------------------------------#

        print OUT "Return-Path: \<".$myMailTo."\>\n";

        print OUT "From: ".$myMailFrom."\n";

        print OUT "To: ".$myMailTo."\n";

        print OUT "Subject: ".$mySubject."\n";

        #-------------------------------#

        print OUT "MIME-Version: 1.0\n";

        print OUT "Content-Type: text/plain\; charset=iso-2022-jp\n";

        print OUT "Content-Transfer-Encoding: 7bit\n";

        print OUT "X-Priority: 3\n";

        print OUT "X-MSMail-Priority: Normal\n";

        print OUT "\n";

}

#===========================================================================*

# 00000
T  : 0000000f                                                           
                *

# 00000ID  : Output_File_ColumnData                                             
                        *

# O(uO        : &Output_File_ColumnData('***.tsv','DATA');                       
        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 0000000
T                                                          
                        *

# eQR_pe[1]   : fQ[                                                              
                                        *

#===========================================================================*

sub Output_File_ColumnData {

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return if (!open FILE,">>$_[0]");

        flock(FILE, 2);                                 # lock

        seek(FILE, 0, 2);                               # pointer set

        print FILE $_[1]."\n";

        close FILE;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return 1;

}

#===========================================================================*

# 00000
T  : ͑0000                                                              
                                *

# 00000ID  : Inspection_File_Overlap                                            
                        *

# O(uO        : &Inspection_File_Overlap($_[0],$_[1]);                           
        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : i"}00000                                                           
                        *

# eQR_pe[1]   : 0000000
T                                                          
                        *

#===========================================================================*

sub Inspection_File_Overlap {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($SearchKey)          = "\t".$_[0].".*";

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return if (!open(FILE, "grep -E '$SearchKey' $_[1]|"));

        while (<FILE>) {

                chomp;

                return 1 if ($_ =~ /$SearchKey/i);

        }

        close FILE;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return;

}

#===========================================================================*

# 00000
T  : eW[peig                                                               
                                *

# 00000ID  : Inspection_Param_TextLength                                        
                        *

# O(uO        : &Inspection_Param_TextLength($_[0],$_[1],$_[2]);                 
*

#---------------------------------------------------------------------------*

# eQR_pe[0]   : igeW[                                                              
                                        *

# eQR_pe[1]   : [eW[pe                                                             
                                *

# eQR_pe[2]   : StrMode           (0:c[j0W0 1:peW[)                                  
        *

#===========================================================================*

sub Inspection_Param_TextLength {

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return 'eQR_vg0Y0' unless ($_[0]);

        if ($_[2] == 1) {

                return 'JS҉peW[NYn0eW[L0+T~00f0D0~0Y0' if ($_[0] !~ /^[\w]+$/);

                return $_[1].'eW[N
NeQRW0f0NU0D0' if (length($_[0]) < $_[1]);

        } else {

                return 'f_L0
Nckg0Y0' if (length($_[0]) < $_[1]);

        }

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return;

}

#===========================================================================*

# 00000
T  : 00000ig                                                             
                        *

# 00000ID  : Inspection_Param_Password                                          
                        *

# O(uO        : &Inspection_Param_Password($_[0],$_[1],$_[2]);                   
*

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 00000                                                             
                                *

# eQR_pe[1]   : [eW[pe                                                             
                                *

# eQR_pe[2]   : Tig00000                                                         
                *

#===========================================================================*

sub Inspection_Param_Password {

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return 'eQR_vg0Y0' unless ($_[0]);

        return '00000n0f_L0
Nckg0Y0' if ($_[0] !~ /^[a-zA-Z0-9]+$/);

        return $_[1].'eW[N
NeQRW0f0NU0D0' if (length($_[0]) < $_[1]);

        return '00000L0UD0~0Y0' if (($_[2]) && ($_[0] ne $_[2]));

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return;

}

#===========================================================================*

# 00000
T  : URLig                                                               
                                        *

# 00000ID  : Inspection_Param_Url                                               
                                *

# O(uO        : &Inspection_Param_Url($_[0]);                                    
                        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : igURL                                                             
                                        *

#===========================================================================*

sub Inspection_Param_Url {

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return 'URLn0f_L0
Nckg0Y0' if ($_[0] !~ /^http:\/\/(?:[a-zA-Z0-9-_.]+).*$/);

        return 'URLk0c}g0M0~0[00' unless (&Inspection_Existence_Url($_[0]));

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return;

}

#===========================================================================*

# 00000
T  : URLX[(Wx                                                             
                                *

# 00000ID  : Inspection_Existence_Url                                           
                        *

# O(uO        : &Inspection_Existence_Url($_[0]);                                
                        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : URL                                                               
                                                *

#===========================================================================*

sub Inspection_Existence_Url {

        #-------------------------------*

        # 00000O(u[                     *

        #-------------------------------*

        use LWP::Simple;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return get($_[0]);

}

#===========================================================================*

# 00000
T  : }peS_                                                                
                                        *

# 00000ID  : Read_File_Sum                                                      
                                        *

# O(uO        : &Read_File_Sum($_[0],$_[1]);                                     
                        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 0000000
T                                                          
                        *

# eQR_pe[1]   : i"}00000                                                           
                        *

#---------------------------------------------------------------------------*

# QR_pe[0]   : }pe                                                                
                                                *

#===========================================================================*

sub Read_File_Sum {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($Cnt)                                = 0;

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return if (!open(FILE, "grep -E '^$_[1]' $_[0]|"));

        while(<FILE>) {

                $Cnt++;

        }

        close FILE;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $Cnt;

}

#===========================================================================*

# 00000
T  : HTML000S_                                                           
                        *

# 00000ID  : Socket_Get_HtmlSource                                              
                                *

# O(uO        : &Socket_Get_HtmlSource($_[0]);                                   
                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : URL                                                               
                                                *

#===========================================================================*

sub Socket_Get_HtmlSource {

        #-------------------------------*

        # 00000O(u[                     *

        #-------------------------------*

        use LWP::UserAgent;

        use HTTP::Request;

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)   = '';                   # ;b0$P(u	Ype

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return unless (&Inspection_Existence_Url($_[0]));

        my($ua)                 = new LWP::UserAgent;

        my($request)    = new HTTP::Request('GET', $_[0]);

        my($response)   = $ua->request($request);

        $RtnValue               = $response->content if ($response->is_success);

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return &$jcnv(\$RtnValue, $ENV{'CHAR_CODE'});

}

#===========================================================================*

# 00000
T  : eW[000	Yc                                                             
                        *

# 00000ID  : Encode_Mail_Base64                                                 
                        *

# O(uO        : &Encode_Mail_Base64('eW[R');                                      
                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : eW[R                                                               
                                        *

#---------------------------------------------------------------------------*

# QR_pe[0]   : eW[ReW[000 : JIS	                                                  
        *

#===========================================================================*

sub Encode_Mail_Base64 {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RecValue)           = $_[0];

        my($RtnValue, $Cnt, $i);

        my($Base)                       = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

                                                . "abcdefghijklmnopqrstuvwxyz"

                                                . "0123456789+/";

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        return unless ($RecValue);

        $RecValue                       = &$jcnv(\$RecValue, 'jis');

        $RecValue                       =~ s/\x1b\x28\x42/\x1b\x28\x4a/g;

        $RecValue                       = unpack("B*", $RecValue);

        for ($i = 0; $Cnt = substr($RecValue, $i, 6); $i += 6) {

                $RtnValue               .= substr($Base, ord(pack("B*", "00" . 
$Cnt)), 1);

                if (length($Cnt) == 2) {

                        $RtnValue       .= "==";

                } elsif (length($Cnt) == 4) {

                        $RtnValue       .= "=";

                }

        }

        #-------------------------------*

        # ;b0$PQt                                 *

        #-------------------------------*

        return ("=?iso-2022-jp?B?".$RtnValue."?=");

}

#===========================================================================*

# 00000
T  : 000{v2                                                               
                                *

# 00000ID  : Output_File_InputData                                              
                                *

# O(uO        : &Output_File_InputData;                                          
                        *

#===========================================================================*

sub Output_File_InputData {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my(@RtnArray)           = ();

        #-------------------------------*

        # 000{v2                                 *

        #-------------------------------*

        
&Output_File_ColumnData($MvDataFile,$CvIndata{'Category'}."\t".$CvTimeCode."\t".$CvIndata{'Title'}."\t".$CvIndata{'URL'}."\t".$CvIndata{'Exp'}."\t".$CvIndata{'sURL'}."\t");

        if ($MvMailSend) {

                #-------------------------------*

                # 	Ype[                                          *

                #-------------------------------*

                my(@MailText)   = ();

                #-------------------------------*

                
push(@MailText,"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n");

                push(@MailText,$MvSubTitle." {v2w\n");

                
push(@MailText,"*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\n");

                push(@MailText,"\n");

                push(@MailText,"{v2e : ".$CvDataNow."\n");

                push(@MailText,"\n");

                push(@MailText,"000
T : ".$CvIndata{'Title'}."\n");

                push(@MailText,"000URL : ".$CvIndata{'URL'}."\n");

                push(@MailText,"0009}Ne : ".$CvIndata{'Exp'}."\n");

                push(@MailText,"\n");

                push(@MailText,"vN000HQURL : ".$CvIndata{'sURL'}."\n");

                push(@MailText,"\n");

                
push(@MailText,"------------------------------------------------------\n");

                push(@MailText,"S0n0000o0".$MvSubTitle."0000L0OW0f0D0~0Y00\n");

                push(@MailText,"\n");

                push(@MailText,"%%%%%%%%%%%%%%%%%%%%%%%%\n");

                push(@MailText,"IP Address : ".$ENV{'REMOTE_ADDR'}."\n");

                if ($ENV{'REMOTE_HOST'} !~ /[^0-9\.]/) {

                        @_                                      = split(/\./, 
$ENV{'REMOTE_ADDR'});

                        $ENV{'REMOTE_HOST'}     = gethostbyaddr(pack("C4", 
$_[0], $_[1], $_[2], $_[3]), 2);

                        push(@MailText,"Remote Host : 
".$ENV{'REMOTE_HOST'}."\n") if ($ENV{'REMOTE_HOST'});

                }

                push(@MailText,"User Agent : ".$ENV{'HTTP_USER_AGENT'}."\n");

                #-------------------------------*

                push(@RtnArray,'0000000,SENDMAILn0-[k00L0B00~0Y00') if 
(&Action_MailSend(@MailText));

        } else {

                push(@RtnArray,'{v2[N,000n0{v2L0!qN[NW0~0W0_00');

        }

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return @RtnArray;

}

#===========================================================================*

# 00000
T  : eQR`1Xx                                                              
                                *

# 00000ID  : Inspection_ParamCheck                                              
                                *

# O(uO        : &Inspection_ParamCheck($_[0]);                                   
                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 6RPN      [ 0 : !q / 1 : 	g ]                                       
                        *

#===========================================================================*

sub Inspection_ParamCheck {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($ErrorMsg)           = '';

        my(@RtnArray)           = ();

        #-------------------------------*

        # {v26R0000                              *

        #-------------------------------*

        if ($_[0] == 1) {

                my($UserHost)   = $ENV{'REMOTE_HOST'};

                unless ($UserHost) {

                        $UserHost       = 
gethostbyaddr(pack("C4",split(/\./,$ENV{'REMOTE_ADDR'})),2);

                        $UserHost       = $ENV{'REMOTE_ADDR'};

                }

                foreach (@DenyHost) {

                        push(@RtnArray,'{v26R,en0{v2o06RPU00f0D0~0Y00') if ($UserHost =~ 
/$_/i);

                }

                #-------------------------------*

                if ($CvIndata{'URL'} =~ /^http/i) {

                        foreach (@DenyUrl) {

                                push(@RtnArray,'{v26R,_eQD0_0URLo0{v26RPU00f0D0~0Y00') if 
($CvIndata{'URL'} =~ $_);

                        }

                        push(@RtnArray,'{v26R,N͑{v2o0g0M0~0[000') if 
(&Inspection_File_Overlap($CvIndata{'URL'},$MvDataFile));

                        if ($CvIndata{'sURL'} =~ /^http/i) {

                                if ($CvIndata{'sURL'} !~ /^$CvIndata{'URL'}/i) {

                                        
push(@RtnArray,'{v26R,!qRj0URLk0vN000L0-nU00f0D0~0Y00');

                                } else {

                                        my($Html)       = 
&Socket_Get_HtmlSource($CvIndata{'sURL'});

                                        push(@RtnArray,'{v26R,0000c0f0K00T0{v2NU0D00') 
if ($Html !~ /$CvSiteURL/i);

                                }

                        }

                }

        }

        #-------------------------------*

        # eQR0000000                     *

        #-------------------------------*

        push(@RtnArray,'eQR000,000
T : '.$ErrorMsg) if ($ErrorMsg = 
&Inspection_Param_TextLength($CvIndata{'Title'},2,0));

        push(@RtnArray,'eQR000,000URL : '.$ErrorMsg) if ($ErrorMsg = 
&Inspection_Param_Url($CvIndata{'URL'}));

        push(@RtnArray,'eQR000,vN000HQURL : '.$ErrorMsg) if ($ErrorMsg = 
&Inspection_Param_Url($CvIndata{'sURL'}));

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return @RtnArray;

}

#===========================================================================*

# 00000
T  : JRdQt                                                                
                                        *

# 00000ID  : Output_File_Delete                                                 
                        *

# O(uO        : &Output_File_Delete($_[0]);                                      
                        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 000000                                                            
                                *

#===========================================================================*

sub Output_File_Delete {

        #-------------------------------#

        # 	Ype[                                          #

        #-------------------------------#

        my($SearchKey)          = $_[0];

        my(@Array)                      = ();

        #-------------------------------#

        # 000000000k00 #

        #-------------------------------#

        return if (!open(FILE, "grep -v -E '\t".$SearchKey."\t' $MvDataFile|"));

        @Array                          = <FILE>;

        close(FILE);

        #-------------------------------#

        # 000f                                 #

        #-------------------------------#

        return if (!open FILE,"+< $MvDataFile");

        flock(FILE, 2);                                 # lock

        seek(FILE, 0, 0);                               # pointer set

        foreach (@Array) {

                print FILE $_;

        }

        truncate(FILE, tell(FILE));             # File size set

        close FILE;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return 1;

}

#===========================================================================*

# 00000
T  : 0000000                                                           
                *

# 00000ID  : Output_File_Html                                                   
                                *

# O(uO        : &Output_File_Html($_[0]);                                        
                                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 000000                                                            
                                *

#===========================================================================*

sub Output_File_Html {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue);                                  # ;b0$P(u	Ype

        #-------------------------------*

        # 0000                                        *

        #-------------------------------*

        return if (!open(FILE, $_[0]));

        $RtnValue                       = join('', <FILE>);

        close FILE;

        #-------------------------------*

        # 000teb_                                 *

        #-------------------------------*

        $RtnValue                       =~ s/00000000.net0
00}T`1X000Ɩ/$CvSiteTitle/go;

        $RtnValue                       =~ 
s/http://www.thailandlink.net/$CvSiteURL/go;

        $RtnValue                       =~ 
s/00}T`1X000Ɩ000000000000000000000\I{000n0}T`1X/$CvMetaDescription/go;

        $RtnValue                       =~ 
s/00#000000Ɩ,0000,00000,00000I{000000%R00000Ɩ/$MvSubTitle/go;

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : Q[h:y                                                                
                                        *

# 00000ID  : Output_Html_Text                                                   
                                *

# O(uO        : &Output_Html_Text(@Array);                                       
                        *

#---------------------------------------------------------------------------*

# eQRMR      : 000Q[                                                             
                                *

#===========================================================================*

sub Output_Html_Text {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';

        my($Subject)            = '';

        #-------------------------------*

        $RtnValue                       .= "<dl>\n";

        foreach (@_) {

                my(@Array)              = split(/\,/, $_);

                if ($Subject ne $Array[0]) {

                        $Subject        = $Array[0];

                        $RtnValue       .= "  <dt>".$Array[0]."</dt>\n";

                }

                $RtnValue               .= "  <dd>".$Array[1]."</dd>\n";

        }

        $RtnValue                       .= "</dl>\n";

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : 000h:y                                                               
                                *

# 00000ID  : Output_Html_ReadData                                               
                                *

# O(uO        : &Output_Html_ReadData;                                           
                        *

#===========================================================================*

sub Output_Html_ReadData {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';           # ;b0$P(u	Ype

        my($myCategory)         = ($InCategory)

                                                ? $InCategory

                                                : 'vN000';

        my($SearchKey)          = ($CvIndata{'Category'} > 10) ? 
$CvIndata{'Category'} : ".+";

        $SearchKey                      = "^".$SearchKey."\t";

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        $RtnValue                       .= "<h3>".$InCategory."{v2000</h3>\n";

        $RtnValue                       .= "<p>e@w 10Nď0h\:yW0f0D0~0Y00</p>\n" unless 
($InCategory);

        #-------------------------------*

        # 000Qt                               *

        #-------------------------------*

        if (open(FILE, "grep -E '$SearchKey' $MvDataFile|")) {

                my($DataCnt)    = 0;

                $RtnValue               .= "<table summary=\"".$myCategory."\" 
cellspacing=\"1\">\n";

                $RtnValue               .= "  
<caption>".$myCategory."</caption>\n";

                $RtnValue               .= "  <tbody>\n";

                $RtnValue               .= "    <tr>\n";

                $RtnValue               .= "      <th 
style=\"width:70px;\">00000</th>\n" if ($MvThumbnails);

                $RtnValue               .= "      <th>000`1X</th>\n";

                $RtnValue               .= "      <th 
style=\"width:120px;\">0000</th>\n" unless ($CvIndata{'Category'});

                $RtnValue               .= "    </tr>\n";

                foreach (reverse(<FILE>)) {

                        next if /^\D/;

                        @_                      = split(/\t/, $_);

                        $RtnValue       .= "    <tr>\n";

                        $RtnValue       .= "      <td><img alt=\"\" 
width=\"64\" height=\"64\" src=\"http://mozshot.nemui.org/shot?".$_[3]."\" 
/></td>\n" if ($MvThumbnails);

                        $RtnValue       .= "      <td>\n";

                        $RtnValue       .= "      <dl>\n";

                        $RtnValue       .= "        <dt><a href=\"".$_[3]."\" 
target=\"_blank\">".$_[2]."</a>";

                        $RtnValue       .= "0<a href=\"".$_[5]."\" 
target=\"_blank\"><img alt=\"".$_[2]."\" 
src=\"".$HomePath."LinkCheck?url=".$_[5]."\" width=\"12\" height=\"12\" /></a>" 
if ($MvLinkCheck);

                        $RtnValue       .= "</dt>\n";

                        $RtnValue       .= "        <dd>".$_[4]."</dd>\n";

                        $_[3]           = substr($_[3],0,38)."..." if 
(length($_[3]) > 38);

                        $RtnValue       .= "        <dd 
style=\"color:#A8A8A8;\">".$_[3]."</dd>\n";

                        $RtnValue       .= "      </dl>\n";

                        $RtnValue       .= "      </td>\n";

                        $RtnValue       .= "      <td 
style=\"text-align:center;\"><a href=\"".$_[0].".htm\" 
style=\"color:#7F7F7F;text-decoration:none;\">".$MvCategory[($_[0] - 
10)]."</a></td>\n" unless ($CvIndata{'Category'});

                        $RtnValue       .= "    </tr>\n";

                        $DataCnt++;

                        last if (($DataCnt > 10) && (!$CvIndata{'Category'}));

                }

                close(FILE);

                $RtnValue               .= "  </tbody>\n";

                $RtnValue               .= "</table>\n";

        } else {

                $RtnValue               .= "<h4>~0`0{v2U00f0D0~0[000</h4>\n";

                $RtnValue               .= 
"<p>000Ɩk0{v2W0_0D0eo0S_000x0n0000[N_0{v2000000T0{v2NU0D00</p>\n";

        }

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : 000{v20000h:y                                                         
        *

# 00000ID  : Output_Html_RegistForm                                             
                        *

# O(uO        : &Output_Html_RegistForm;                                         
                        *

#===========================================================================*

sub Output_Html_RegistForm {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';           # ;b0$P(u	Ype

        my($myCategory)         = ($InCategory)

                                                ? $InCategory

                                                : 'vN000';

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        $RtnValue                       .= "<form method=\"post\" 
action=\"regist.htm\">\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"mode\" value=\"regist\" />\n";

        $RtnValue                       .= "<table summary=\"".$myCategory."\" 
cellspacing=\"1\">\n";

        $RtnValue                       .= "  
<caption>".$myCategory."{v2</caption>\n";

        $RtnValue                       .= "  <tbody>\n";

        if ($CvIndata{'Category'} > 10) {

                $RtnValue               .= "    <tr>\n";

                $RtnValue               .= "      <th colspan=\"2\" 
style=\"text-align:left;\">0<b>".$MvCategory[($CvIndata{'Category'} - 
10)]."</b>
0 0000k0{v2W0~0Y00<input type=\"hidden\" name=\"Category\" 
value=\"".$CvIndata{'Category'}."\" /></th>\n";

                $RtnValue               .= "    </tr>\n";

        }

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">000
T 
25W[NQ	</td>\n";

        $RtnValue                       .= "      <td><input maxlength=\"25\" 
size=\"40\" name=\"Title\" value=\"".$CvIndata{'Title'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">000URL 
60W[NQ	</td>\n";

        $RtnValue                       .= "      <td><input maxlength=\"60\" 
size=\"50\" name=\"URL\" value=\"".$CvIndata{'URL'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        if ($CvIndata{'Category'} <= 10) {

                $RtnValue               .= "    <tr>\n";

                $RtnValue               .= "      <td 
class=\"item\">0000</td>\n";

                $RtnValue               .= "      <td><select size=\"1\" 
name=\"Category\">\n";

                for (1 .. $#MvCategory) {

                        $RtnValue       .= "        <option value=\"".($_ + 
10)."\">".$MvCategory[$_]."</option>\n";

                }

                $RtnValue               .= "      </select></td>\n";

                $RtnValue               .= "    </tr>\n";

        }

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">0009}Ne 
80W[NQ	</td>\n";

        $RtnValue                       .= "      <td><input maxlength=\"80\" 
size=\"50\" name=\"Exp\" value=\"".$CvIndata{'Exp'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">vN000HQURL</td>\n";

        $RtnValue                       .= "      <td><input maxlength=\"80\" 
size=\"50\" name=\"sURL\" value=\"".$CvIndata{'sURL'}."\" /><br />\n";

        $RtnValue                       .= "      00 : &lt;a 
href=&quot;".$CvSiteURL."&quot; 
target=&quot;_blank&quot;&gt;".$CvSiteTitle."&lt;/a&gt;<br />\n";

        $RtnValue                       .= "      ;  
0vN000HQURL
0k0000L0!qD04XTo0{v2Qeg~0[000</td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "  </tbody>\n";

        $RtnValue                       .= "</table>\n";

        $RtnValue                       .= "<p 
style=\"text-align:center;\"><input type=\"submit\" value=\"0
NQ[g0{v2Y000\" 
/></p>\n";

        $RtnValue                       .= "</form>\n";

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : 000JRd0000h:y                                                         
        *

# 00000ID  : Output_Html_DeleteForm                                             
                        *

# O(uO        : &Output_Html_DeleteForm($_[0]);                                  
                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 000000                                                            
                                *

#===========================================================================*

sub Output_Html_DeleteForm {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';           # ;b0$P(u	Ype

        my($SearchKey)          = $_[0];

        my(@Array)                      = ();

        #-------------------------------*

        # 000                                 *

        #-------------------------------*

        return if (!open(FILE, "grep -E '\t".$SearchKey."\t' $MvDataFile|"));

        @Array                          = <FILE>;

        close(FILE);

        @_                                      = split(/\t/, $Array[0]);

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        $CvIndata{'Category'}   = $_[0];

        #-------------------------------*

        $RtnValue                       .= "<form method=\"post\" 
action=\"delete.htm\">\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"mode\" value=\"delete\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"process\" value=\"check\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" name=\"id\" 
value=\"".$SearchKey."\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"Category\" value=\"".$CvIndata{'Category'}."\" />\n";

        $RtnValue                       .= "<table summary=\"{v2000JRd\" 
cellspacing=\"1\">\n";

        $RtnValue                       .= "  <caption>{v2000JRd</caption>\n";

        $RtnValue                       .= "  <tbody>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">0000</td>\n";

        $RtnValue                       .= "      <td>".$MvCategory[($_[0] - 
10)]."</td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">000
T</td>\n";

        $RtnValue                       .= "      <td>".$_[2]."</td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">000URL</td>\n";

        $RtnValue                       .= "      <td>".$_[3]."</td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">0009}Ne</td>\n";

        $RtnValue                       .= "      <td>".$_[4]."</td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">{t00000</td>\n";

        $RtnValue                       .= "      <td><input type=\"password\" 
maxlength=\"12\" size=\"20\" name=\"password\" value=\"\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "  </tbody>\n";

        $RtnValue                       .= "</table>\n";

        $RtnValue                       .= "<p 
style=\"text-align:center;\"><input type=\"submit\" value=\"0JRdY000\" /></p>\n";

        $RtnValue                       .= "</form>\n";

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : 000}Ɩ0000h:y                                                         
        *

# 00000ID  : Output_Html_EditForm                                               
                                *

# O(uO        : &Output_Html_EditForm($_[0]);                                    
                        *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : 000000                                                            
                                *

#===========================================================================*

sub Output_Html_EditForm {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';           # ;b0$P(u	Ype

        my($SearchKey)          = $_[0];

        my(@Array)                      = ();

        #-------------------------------*

        # 000                                 *

        #-------------------------------*

        return if (!open(FILE, "grep -E '\t".$SearchKey."\t' $MvDataFile|"));

        @Array                          = <FILE>;

        close(FILE);

        @_                                      = split(/\t/, $Array[0]);

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        $CvIndata{'Category'}   = $_[0];

        $CvIndata{'Title'}              = $_[2] unless ($CvIndata{'Title'});

        $CvIndata{'URL'}                = $_[3] unless ($CvIndata{'URL'});

        $CvIndata{'Exp'}                = $_[4] unless ($CvIndata{'Exp'});

        $CvIndata{'sURL'}               = $_[5] unless ($CvIndata{'sURL'});

        #-------------------------------*

        $RtnValue                       .= "<form method=\"post\" 
action=\"edit.htm\">\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"mode\" value=\"edit\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"process\" value=\"check\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" name=\"id\" 
value=\"".$SearchKey."\" />\n";

        $RtnValue                       .= "<table summary=\"{v2000}Ɩ\" 
cellspacing=\"1\">\n";

        $RtnValue                       .= "  <caption>{v2000}Ɩ</caption>\n";

        $RtnValue                       .= "  <tbody>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">000
T 
25W[NQ	</td>\n";

        $RtnValue                       .= "      <td>".$_[2]."<br />\n";

        $RtnValue                       .= "      <input maxlength=\"25\" 
size=\"40\" name=\"Title\" value=\"".$CvIndata{'Title'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">000URL 
60W[NQ	</td>\n";

        $RtnValue                       .= "      <td>".$_[3]."<br />\n";

        $RtnValue                       .= "      <input maxlength=\"60\" 
size=\"50\" name=\"URL\" value=\"".$CvIndata{'URL'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">0000</td>\n";

        $RtnValue                       .= "      <td>".$MvCategory[($_[0] - 
10)]."<br />\n";

        $RtnValue                       .= "      <select size=\"1\" 
name=\"Category\">\n";

        for (1 .. $#MvCategory) {

                my($Selected)   = ' selected' if (($_ + 10) == $_[0]);

                $RtnValue               .= "        <option value=\"".($_ + 
10)."\"".$Selected.">".$MvCategory[$_]."</option>\n";

        }

        $RtnValue                       .= "      </select></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td class=\"item\">0009}Ne 
80W[NQ	</td>\n";

        $RtnValue                       .= "      <td>".$_[4]."<br />\n";

        $RtnValue                       .= "      <input maxlength=\"80\" 
size=\"50\" name=\"Exp\" value=\"".$CvIndata{'Exp'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">vN000HQURL</td>\n";

        $RtnValue                       .= "      <td>".$_[5]."<br />\n";

        $RtnValue                       .= "      <input maxlength=\"80\" 
size=\"50\" name=\"sURL\" value=\"".$CvIndata{'sURL'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">{t00000</td>\n";

        $RtnValue                       .= "      <td><input type=\"password\" 
maxlength=\"12\" size=\"20\" name=\"password\" value=\"\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "  </tbody>\n";

        $RtnValue                       .= "</table>\n";

        $RtnValue                       .= "<p 
style=\"text-align:center;\"><input type=\"submit\" value=\"0}ƖY000\" /></p>\n";

        $RtnValue                       .= "</form>\n";

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : 000{t0000h:y                                                         
        *

# 00000ID  : Output_Html_AdminForm                                              
                                *

# O(uO        : &Output_Html_AdminForm($_[0]);                                   
                *

#---------------------------------------------------------------------------*

# eQR_pe[0]   : j0W0                                                                
                                                *

#===========================================================================*

sub Output_Html_AdminForm {

        #-------------------------------*

        # 	Ype[                                          *

        #-------------------------------*

        my($RtnValue)           = '';           # ;b0$P(u	Ype

        #-------------------------------*

        # Qt                                                    *

        #-------------------------------*

        $RtnValue                       .= "<form method=\"post\" 
action=\"admin.htm\">\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"mode\" value=\"admin\" />\n";

        $RtnValue                       .= "<input type=\"hidden\" 
name=\"process\" value=\"check\" />\n";

        $RtnValue                       .= "<table summary=\"000}Ɩ0JRd\" 
cellspacing=\"1\">\n";

        $RtnValue                       .= "  <caption>000}Ɩ0JRd</caption>\n";

        $RtnValue                       .= "  <tbody>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">\OmiQ[</td>\n";

        $RtnValue                       .= "      <td>\n";

        $RtnValue                       .= "      <select name=\"request\">\n";

        $RtnValue                       .= "        <option 
value=\"edit\">}Ɩ</option>\n";

        $RtnValue                       .= "        <option 
value=\"delete\">JRd</option>\n";

        $RtnValue                       .= "      </select>\n";

        $RtnValue                       .= "      </td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "    <tr>\n";

        $RtnValue                       .= "      <td 
class=\"item\">{v2000URL</td>\n";

        $RtnValue                       .= "      <td><input maxlength=\"60\" 
size=\"50\" name=\"URL\" value=\"".$CvIndata{'URL'}."\" /></td>\n";

        $RtnValue                       .= "    </tr>\n";

        $RtnValue                       .= "  </tbody>\n";

        $RtnValue                       .= "</table>\n";

        $RtnValue                       .= "<p 
style=\"text-align:center;\"><input type=\"submit\" value=\"0OY000\" /></p>\n";

        $RtnValue                       .= "</form>\n";

        #-------------------------------*

        # ;b0$P(u	Ypeub                              *

        #-------------------------------*

        return $RtnValue;

}

#===========================================================================*

# 00000
T  : HTML0000QR                                                          
                        *

# 00000ID  : Output_Html_Header                                                 
                        *

# O(uO        : &Output_Html_Header;                                             
                                *

#===========================================================================*

sub Output_Html_Header {

        #-------------------------------*

        # Html Image                                    *

        #-------------------------------*

        print "<div class=\"base\">\n";

        print "<div class=\"header\">\n";

        print "<h1>".$CvSiteTitle." / ".$MvSubTitle."</h1>\n";

        print "</div>\n";

        print "<p class=\"topic_path\"><a 
href=\"".$CvSiteURL."\">".$CvSiteTitle."</a>  <a 
href=\"./\">".$MvSubTitle."</a>";

        print "  ".$MvCategory[($CvIndata{'Category'} - 10)] if 
($CvIndata{'Category'});

        print "</p>\n";

        print "<div class=\"area_main\">\n";

}

#===========================================================================*

# 00000
T  : HTML0000QR                                                          
                        *

# 00000ID  : Output_Html_Footer                                                 
                        *

# O(uO        : &Output_Html_Footer;                                             
                                *

#===========================================================================*

sub Output_Html_Footer {

        #-------------------------------*

        # Html Image                                    *

        #-------------------------------*

        print "</div>\n";

        print "<div class=\"area_menu\">\n";

        print "<p><a href=\"./admin.htm\">000}Ɩ0JRd</a></p>\n";

        

        print "<ul>\n";

        for (1 .. $#MvCategory) {

                my($CategoryNum)        = $_ + 10;

                if ($CvIndata{'Category'} != $CategoryNum) {

                        print "  <li><a 
href=\"".$CategoryNum.".htm\">".$MvCategory[$_]."</a> 
".&Read_File_Sum($MvDataFile,"^".$CategoryNum."\t")."	</li>\n";

                } else {

                        print "  <li class=\"location\">".$MvCategory[$_]." 
".&Read_File_Sum($MvDataFile,"^".$CategoryNum."\t")."	</li>\n";

                }

        }

        print "</ul>\n";

        print "</div>\n";

        print "<br class=\"clear\" />\n";

        print "<div style=\"text-align:right;\">\n";

        print "<ul class=\"sideways\">\n";

        print "  <li class=\"start\"><a 
href=\"".$CvSiteURL."\">".$CvSiteTitle."</a></li>\n";

        print " <li><a 
href=\"index.pl?mode=html&fn=method.htm\">000el</a></li>\n";

        print " <li><a 
href=\"index.pl?mode=html&fn=agree.htm\">)R(u}</a></li>\n";

        print "</ul>\n";

        print "</div>\n";

        print "<address>Powered By <a href=\"http://tool.miyabi-seo.com/\" 
target=\"_blank\">ŖCGI Tools</a>";

        print " - CGI Script <a 
href=\"http://tool.miyabi-seo.com/docs/freeware/seolink.htm\" 
target=\"_blank\">ŖSEOvN000</a> Ver. ".$SystemVersion;

        print " - Thumbnails by <a href=\"http://mozshot.nemui.org/\" 
target=\"_blank\">Mozshot</a>" if ($MvThumbnails);

        print "</address>\n";

        print "</div>\n";

}

 

1;
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/