#!/usr/bin/perl -U require './config.cgi'; $This_CGI_Name = 'iboard2.cgi'; $MemberDataBoard = 'CLUB'; &parse; &get_cookie; sub HTML_PRINT{ print < DCS $BODY_BEGIN


 

$table1



$BODY_END END_LINE exit; } $table1 = &open_table (" headline_text=no; table_width=100%; index_many=5; new_icon_time=0; board_path=./board/notice; text_num_addition=2; text_link_url=./read.cgi; cell_column=2; append_img=35x20; Print_indextable=1; line_color=white; head_bgcolor=#FFFFFF; head_icon_url=$img_dir_url/face/icon_66.gif; index_bgcolor=#FFFFFF; mouse_over_color=#F3F3F3; text_color=#000000; subject_length=65; body_length=0; body_position=1; body_htm_allow=yes; other_length=30; open_new_window=no; main_board_link=no; subject_icon_url=$img_dir_url/face/bitimg26.gif; "); $table2 = &open_table (" headline_text=no; table_width=420; index_many=10; new_icon_time=0; board_path=./board/NEWS; text_num_addition=2; text_link_url=./read.cgi; cell_column=2; append_img=25x20; Print_indextable=1; line_color=white; head_bgcolor=white; head_icon_url=$img_dir_url/face/icon_66.gif; index_bgcolor=white; mouse_over_color=#F3F3F3; text_color=black; subject_length=50; body_length=0; body_position=1; body_htm_allow=yes; other_length=30; open_new_window=no; main_board_link=no; subject_icon_url=$img_dir_url/face/bitimg26.gif; "); $table3 = &open_table (" headline_text=no; table_width=160; index_many=4; new_icon_time=0; board_path=./board/NOTICE; text_num_addition=2; text_link_url=./read.cgi; cell_column=2; append_img=25x20; Print_indextable=1; line_color=white; head_bgcolor=white; head_icon_url=$img_dir_url/face/icon_65.gif; index_bgcolor=white; mouse_over_color=#F3F3F3; text_color=black; subject_length=22; body_length=0; body_position=1; body_htm_allow=yes; other_length=20; open_new_window=yes; main_board_link=no; subject_icon_url=$img_dir_url/face/bitimg26.gif; "); $table4 = &open_table (" headline_text=no; table_width=420; index_many=10; new_icon_time=0; board_path=./board/FORUM; text_num_addition=2; text_link_url=./read.cgi; cell_column=2/4; append_img=25x20; Print_indextable=1; line_color=white; head_bgcolor=white; head_icon_url=$img_dir_url/face/icon_66.gif; index_bgcolor=#F3F3F3; mouse_over_color=#B9E1FF; text_color=black; subject_length=50; body_length=0; body_position=1; body_htm_allow=yes; other_length=15; open_new_window=no; main_board_link=no; subject_icon_url=$img_dir_url/face/icon_66.gif; "); print "Content-type: text/html\n\n"; &HTML_PRINT; sub open_table{ local($const)=@_; local($boardname,$tabletag,$Iindexsize,$indexsizetm,$nextpg,$prevpg,$Nextibutton,$Opentarget_1,$Opentarget_2,$Boldface1,$Boldface2,$textline_2body,$textline_3body,$imgsrc,$imgsrc2,$img_width,$img_height,@DIVpart,@Iindex,@today,@visitor,@CellConst,@textline_body); @DIVpart = split(/;/,$const); foreach $key (@DIVpart) { $key =~ s/^\s+//; $key =~ s/\s+$//; $key =~ /(.*)=(.*)/; $TABLE{$1} = $2; } @CellConst = split(/\//,$TABLE{'cell_column'}); foreach $key (@CellConst) { if($key == 11){ if($TABLE{'append_img'} =~ /^(\d+)x(\d+)/){ $img_width = $1; $img_height = $2; } elsif($TABLE{'append_img'} !~ /\//){ $TABLE{'append_img'} = "$img_dir_url/subjecticon/5/filegr.gif"; } else{'';} next; } $key += 28 if($key > 8); $key += 14 if($key > 4 && $key < 9); } if($TABLE{'open_new_window'} ne 'no'){ $Opentarget_1 = "target='aaa' onClick='NewWindows()'"; $Opentarget_2 = "target='bbb' onClick='NewWindows2()'"; } else{ $TABLE{'Print_indextable'}=2; } if($TABLE{'index_bgcolor'} =~ /\//){ $TABLE{'index_bgcolor'} = "style=\"background-image:url('$TABLE{'index_bgcolor'}'); BACKGROUND-REPEAT: no-repeat;\""; } else{ $TABLE{'index_bgcolor'} = "bgcolor=$TABLE{'index_bgcolor'}"; } open(INDEX,"$TABLE{'board_path'}/$indexfile"); $indexsizetm = $indexsize = @index = ; close(INDEX); chop(@index); open(TODAY,"$TABLE{'board_path'}/today.txt"); @today = ; close(TODAY); chop(@today); open(COUNT,"$TABLE{'board_path'}/$countfile"); @visitor = ; close(COUNT); chop(@visitor); $todaytxt = ($today[0] eq $DateTime)? $today[1] : '0'; $TABLE{'board_path'} =~ /[^\/]+$/; $boardname = $&; ($link2 = $TABLE{'text_link_url'}) =~ s/$readcg/$maincgorfile/; ($link3 = $TABLE{'text_link_url'}) =~ s/$readcg/$imgcg/; $tabletag .= "= 0); $tabletag .= "Prev"; $tabletag .= "" if($prevpg >= 0); if(($indexsize/$TABLE{'index_many'}) >= $nextpg){ $tabletag .= "" ; $Nextibutton = 1; } $tabletag .= "Next"; $tabletag .= "" if($Nextibutton); $tabletag .= " Open_Board"; } $tabletag .= "\n"; } $tabletag .= "\n
\n"; $tabletag .= "\n"; if($FORM{'page'}){ $indexsize -= ($TABLE{'index_many'} * $FORM{'page'}); } if($FORM{$boardname}){ $indexsize -= ($TABLE{'index_many'} * $FORM{$boardname}); } for($i=($indexsize-1); $i >= ($indexsize-$TABLE{'index_many'}); $i--){ next if(!$index[$i]); last if($i < 0); $tabletag .= ""; @indexbody = split(/\|/,$index[$i]); foreach $Cell (@CellConst){ if($Cell == 1){ $tabletag .= ""; } elsif($Cell == 4){ $indexbody[23] =~ s/\s.*$//; $tabletag .= ""; } elsif($Cell == 2){ $tabletag .= ""; undef $textline_2body; undef $textline_3body; } elsif($Cell == 11){ $tabletag .= ""; } else{ $tabletag .= ""; } } ## foreach $tabletag .= "\n"; } ## for $tabletag .= "
"; if($TABLE{'text_num_addition'} == 1){ $tabletag .= " ".($indexsizetm - $i).""; } else{ $tabletag .= " ".($i+1).""; } $tabletag .= ""; $tabletag .= " $indexbody[23]"; $tabletag .= ""; if($indexbody[4] > 0){ $tabletag .= ('  ' x $indexbody[4]).""; } if($TABLE{'body_length'} > 10){ if($indexbody[32] ne 'x'){ $T_dir_x2 = $indexbody[39] ? $indexbody[39] : $textdir ; open(BODY,"$TABLE{'board_path'}/$T_dir_x2/$indexbody[1].$filename_exp"); @textline_body = ; close(BODY); shift(@textline_body); $textline_2body=join(' ',@textline_body ); } else{ $textline_2body= ''; } if($TABLE{'body_position'} > 0){ $textline_2body =~ s/<([^>]|\n)*>/ /g; $textline_3body = $textline_2body; $textline_3body =~ s/\"//g; $textline_3body =~ s/\'//g; $indexbody[2]=~ s/\"//g; $indexbody[2]=~ s/\'//g; $textline_3body =~ s/\r//g; if($indexbody[31]==1 || !$indexbody[31]){ $textline_3body =~ s/\n/
/g;} else{ $textline_3body =~ s/\n/ /g;} $textline_3body=&SubstrReturn($textline_3body,0,$TABLE{'body_length'},".."); $textline_3body = "onMouseover=\"textbodyprint(' $indexbody[2]
$textline_3body')\" onMouseout=textbodyprint(0,1)"; $textline_2body=''; } else{ $textline_2body =~ s/<([^>]|\n)*>/ /g if($TABLE{'body_htm_allow'} ne 'yes'); $textline_2body =~ s/onclick=[^>]+//gi; $Boldface1 = ''; $Boldface2 = ''; if($indexbody[31]==1 || !$indexbody[31]){ $textline_2body =~ s/\n/
/g;} $textline_2body=&SubstrReturn($textline_2body,0,$TABLE{'body_length'},".."); $textline_2body = "
$textline_2body
 "; } } if((length($indexbody[2]) > $TABLE{'subject_length'}) || !$indexbody[2]){ $indexbody[2] = &SubstrReturn($indexbody[2],0,$TABLE{'subject_length'},'..'); } $tabletag .= "" if($TABLE{'subject_icon_url'}); $tabletag .= " $Boldface1$indexbody[2]$Boldface2"; $tabletag .= "¨ß" if($indexbody[32] eq 'x'); $tabletag .= " " if((time - ($TABLE{'new_icon_time'} * 3600)) < $indexbody[1]); $tabletag .= "$textline_2body"; $tabletag .= "
"; if(($imgsrc,$imgsrc2) = &img_search){ $tabletag .= "$imgsrc"; #$tabletag .= "$imgsrc"; } else{ $tabletag .= " "; } $tabletag .= ""; if(length($indexbody[$Cell]) > $TABLE{'other_length'}){ $indexbody[$Cell] = &SubstrReturn($indexbody[$Cell],0,$TABLE{'other_length'},'..'); } $tabletag .= " $indexbody[$Cell]"; $tabletag .= "
\n
\n"; return $tabletag; } sub parse{ $buffer = $ENV{'QUERY_STRING'}; @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } @timeday=localtime(time+$NewLocaltime); $DateTime=($timeday[4]+1).$timeday[3]; $nextbutton = $FORM{'page'} + 1; $prevbutton = $FORM{'page'} - 1; $buttonprint .= "\n\n !; $buttonprint .= qq!
\n"; if($prevbutton > -1){ $buttonprint .= qq! Prev Top !; } else{ $buttonprint .= "Next..."; } $buttonprint .= qq! Next
!; } sub SubstrReturn{ local($strings,$startlen,$endlen,$addin) = @_; local($reststr); $reststr = $strings = substr($strings,$startlen,$endlen); chop($strings) if((($reststr =~ tr/[\xA1-\xFE]//) % 2) != 0 ); return ($strings."$addin"); } sub img_search{ local ($returnimgtag,$returnimgtag2); if($indexbody[17] =~ /\.(gif|jpg|bmp)$/i){ if($cgi_dir_appoint==1){ $returnimgtag ="$board_dir_url/$boardname/$uploaddir/$indexbody[17]";} else{$returnimgtag ="$link3?board=$boardname&img=$indexbody[17]&xfile=1";}} elsif($indexbody[28] =~ /\.(gif|jpg|bmp)$/i){$returnimgtag = "$indexbody[28]";} elsif($indexbody[10]){if($cgi_dir_appoint==1){$returnimgtag ="$board_dir_url/$boardname/$upimgdir/$indexbody[10]";} else{$returnimgtag = "$link3?board=$boardname&img=$indexbody[10]";}} elsif($indexbody[11]){$returnimgtag ="$indexbody[11]";}else{return;} $returnimgtag2 = ($img_width)? "" : ""; return($returnimgtag2,"click_now!"); } sub get_cookie{local($m_name, $m_value,$Main_Logpass,$cookie_key,$cook_dirkey,$xcookieanme,@M_config,@cookies); return unless($MemberDataBoard);@cookies = split(/; /, $ENV{'HTTP_COOKIE'}); foreach (@cookies) {($m_name, $m_value) = split(/=/, $_);$COOKIE{$m_name} = $m_value;} open(MEMBER,"$board_dir_path/$MemberDataBoard/$configfile");@M_config = ; close(MEMBER);chop(@M_config); if($M_config[112] == 2){$cookie_key=$scripimport.$MemberDataBoard; $cook_dirkey=$MemberDataBoard.$M_config[0];} else{$cookie_key=$scripimport.'nSXq';$cook_dirkey=$scripimport.'olkZq';} ($cook_name,$cook_mail,$cook_home,$cook_visit,$cook_id,$cook_post,$cook_address,$cook_tel,$cook_file)=split(/\|/,$COOKIE{$cookie_key}); $xcookieanme = $M_config[292].'home'.$frankscrip; return unless($COOKIE{$xcookieanme});@visitor_line=split(/\|/,$COOKIE{$xcookieanme}); if($M_config[112] == 2){if(($visitor_line[5] eq $M_config[0]) && ($MemberDataBoard eq $visitor_line[6])){ $LoginMember=1;print "Set-Cookie: $xcookieanme=$COOKIE{$xcookieanme}; \n";}} else{open(MEMBER,"$board_dir_path/$loginfile");$Main_Logpass = ;close(MEMBER); $Main_Logpass =~ s/\s//g; if(($visitor_line[5] eq $Main_Logpass) && ($scripimport.'olkZq' eq $visitor_line[6])){ $LoginMember=1;print "Set-Cookie: $xcookieanme=$COOKIE{$xcookieanme}; \n";}} undef @visitor_line unless($LoginMember);} 1;