#!/usr/bin/perl -U
#############################################################################
# wookie's Web Board version 1.3 beta 2 #
# Homepage : http://interpia.net/~wookie #
# Coded 11/09/96 , Last Modified 05/01/97 #
#
# Revision by jyllee@ewha.ac.kr
# 2008/02/01 : pcode - time dependent passcode;
# write_form(), followup_form(), write_err(), modify_form_display()
# 2009/09/29 : get_variables() new_file
#############################################################################
$base_dir = '.'; # °Ô½ÃÆÇÀÇ Àý´ë°æ·Î
$base_url = '.'; # °Ô½ÃÆÇÀÇ URL
$cgi_url = 'index.cgi'; # ½ºÅ©¸³Æ®ÀÇ URL
# pcode : Time dependent passcode to avoid automatic input (2008/1/28)
# p*43189669*832429 = p (mod n) where n=60*60*24*365=2^7*3^3*5^3*73
$pcode = time() % (60*60*24*365); # 1 (Year) = 31536000 (Second)
#############################################################################
&parse_form;
umask(022);
$FORM{'bb'} = '1stboard' unless $FORM{'bb'};
$FORM{'h'} = 'r1' unless $FORM{'h'};
$FORM{'w'} = '1' unless $FORM{'w'};
if (-e "$base_dir/$FORM{'bb'}/board.cfg") {
require "$base_dir/$FORM{'bb'}/board.cfg";
} else {
require "$base_dir/board.cfg";
}
if ($FORM{'h'} eq 'r1') { &get_index_line; }
elsif ($FORM{'h'} eq 'r2') { &get_index_line_sorted; }
else { $FORM{'h'} = 'r1'; &get_index_line; }
$make_small_font_size = 1; #added by jylee
$bttn_v1 = "";
$bttn_v2 = "";
$bttn_wr = "";
$bttn_fo = "";
$bttn_mo = "";
$bttn_rm = "";
$bttn_ad = "";
#$bttn_ad = ""; #deleted by jylee
$bttn_np = "";
$bttn_pp = "";
$bttn_np = ""; $bttn_pp = "";
$board_width = $board_width - 100 if ($make_small_font_size == 1);
$board_width = 548 - 70 if ($board_width < 548); # -70 added by jylee
$base_length = $board_width / 7.1 - 1.4;
$base_length =~ s/(\d*)\.\d*/\1/;
$subject_length = $base_length - 41;
$textarea_width = $base_length ;#- 15;
($al,$dl,$hl) = (78,80,38);
($al,$dl,$hl) = (62,66,31) if ($make_small_font_size == 1);
$index_table_width = $board_width - 4;
$sl = ($index_table_width - ($al + $dl + $hl)) / 2;
$sl =~ s/(\d*)\.\d*/\1/;
if ($FORM{'c'}) {
$c = $FORM{'c'};
if ($c eq 'view_index' ) { &view_index; }
elsif ($c eq 'read' ) { &read_mesg; }
elsif ($c eq 'write_form' ) { &write_form; }
elsif ($c eq 'followup_form' ) { &followup_form; }
elsif ($c eq 'write' ) { &write; }
elsif ($c eq 'modify_form' ) { &modify_form; }
elsif ($c eq 'modify' ) { &modify; }
elsif ($c eq 'confirm_remove' ) { &confirm_remove; }
elsif ($c eq 'remove' ) { &remove; }
elsif ($c eq 'find' ) { &find; }
elsif ($c eq 'find_help' ) { &find_help; }
elsif ($c eq 'login_form' ) { &login_form; }
elsif ($c eq 'admin_login' ) { &admin_login; }
elsif ($c eq 'ch_admin_info' ) { &ch_admin_info; }
else { $c = 'view_index'; &view_index; }
} else {
$c = 'view_index';
&view_index;
}
sub print_html {
local($IDXH) = shift(@_);
print "Content-type: text/html";
print "; charset=euc-kr" if ($charset_kr == 1);
print "\n\n";
$top = "
";
open(HEADER,"$base_dir/$FORM{'bb'}/$head_file") || &open_err("$FORM{'bb'}/$head_file");
while () {
s?<([^b]*)body([^>]*)>?<\1body\2>$top?oi;
print;
}
close(HEADER);
local(@TH) = ('', 'Á¦ ¸ñ','±Û¾´ÀÌ','±Û¾´½Ã°¢','Á¶È¸');
@TH = &make_small_size(@TH) if ($make_small_font_size == 1);
local($ths1,$ths2,$tha,$thd,$thc) = @TH;
$bmark1 = 1;
print "$separator" . &button; #by jylee
# print "";
$bmark1 = 0;
print "$IDXH";
print "$separator$ths11 | $ths2 | "
. "$tha | $thd | "
. "$thc |
---|
| \n";
foreach (@_) {
local(@TD) = split(/\|/,$_);
@TD = &make_small_size(@TD) if ($make_small_font_size == 1);
local($subject,$author,$date,$hit) = @TD;
print "$subject | "
. "$author | $date | "
. "$hit | \n";
}
print " | $separator\n";
$bmark2 = 1;
print &button . &findform . "$separator\n";
$bmark2 = 0;
$bottom =
# "" .
" |