½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
php
asp
CSS
html
MYSQL
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 128 | Á¶È¸¼ö 1,531 | µî·ÏÀÏ 2001-06-03 00:02:51
\n";
$return_str.=" \n" if($cfg{"$col1[0]$col2[5]"});
if($cfg{$col1[1].$col2[5]}){
$tmp_comment=($cfg{'g_nodl'}==0?"$realname[$i], ":'');
$tmp_comment.=(-s "./$gcfg{updir}/$upname[$i]")." bytes";
$return_str.=" '.$c{$col1[1].$col2[4]}.
(($realname[$i] ne '')?""&j=dl&c=".($total_data-$nums[$i])."&i=$idxs[$i]\" $message'$tmp_comment'\;return true\;\">$tmp_comment
":" \;")."\n";
}
$return_str.="
\n" if($cfg{"$col1[2]$col2[5]"});
if($cfg{"$col1[3]$col2[5]"}){
$return_str.=" '.$c{$col1[3].$col2[4]};
if($cfg{'g_nord'}==0){
$return_str.=("    " x $thread[$i]);
$return_str.="$return_str.="&kw=$in{'kw'}&s_title=$in{'s_title'}&s_name=$in{'s_name'}&s_content=$in{'s_content'}" if($in{'kw'} ne '');
$return_str.="&j=content&u=$in{'c'}&i=$idxs[$i]&c=".($i+$in{'c'})."\" $message'".&check_nonchar($title[$i])."'\;return true\">";
}
$return_str.="$title[$i]";
$return_str.="
" if($cfg{'g_nord'}==0);
$return_str.="\n";
}
$return_str.="
\n" if($cfg{"$col1[4]$col2[5]"});
$return_str.=" \n" if($cfg{"$col1[5]$col2[5]"});
$return_str.=" '.$c{$col1[6].$col2[4]}.($email[$i]?"$id[$i]":"$id[$i]")."\n" if($cfg{"$col1[6]$col2[5]"});
}
return "$return_str\

´Ð³×ÀÓ

Anonymous

À̸ÞÀÏ

Á¦¸ñ

[Áú¹®]³Ñ...¹«¸ðÇÑ ÁþÀÌ¿´³ª¿©...¿Å±â´Â°Ç~! ±×·¡µÎ.¹º°¡¹æ¹ýÀÌ
³»¿ë
¼³Ä¡Çؼ­ »ç¿ëÇÏ´ø cgi °Ô½ÃÆÇ(¿Í¿ìº¸µå)À», ¸ù¶¥ ´Ù¿î¹Þ¾Æ¼­
´Ù¸¥¼­¹ö·Î ¿Å°å°Åµç¿ä.
¿¹»óÇÑ ¹ÙÁö¸¸.....¾ÈµÇ´Â±º¿ä.
Á¤·É ÀÌ°Ô ¾ÈµÇ´Â°É±î¿ä?

³»°¡ »ý°¢ÇصÎ...³Ñ ¹«¸ðÇß¾ú´ø°Í °°¾Æ¿©...
^^..
¹ÙÀ̳ʸ®·ç ´Ù¿î¹Þ¾Æ¼­...¿Ã·È±¸.
±×..°æ·Î¸¦ º¸¸é...

-wowboard-upload
        -theme
        -log
        -icons
        -data-data
        -config
        -cgi-lib
        -background
        -board.cgi
        -admin-cgi
-cgi-bin
-board.html


´ëÃæ¿ä·¸°Ô µÇÀÖ±¸.............
ÀÌ¿Õ ¿Ã¸°°Å...board.cgi µÎ....¾Æ·¡ À̾ ¿Ã¸±²²¿©..
²ÀÁ¡....¾Ë·ÁÁÖ¼¼¿©~~!!
¿õ..³Ñ °Ç¹æÁö°Ô..¸¹Àº°É ¿ä±¸ÇصÎ..ÀÌÇØÇØÁÖ¼¼¿©........¤Ð.¤Ð
±×·³ Áñ°Å¿î ÁÖ¸»~!



#!/usr/local/bin/perl
require './cgi-lib/cgi-lib.pl';
require './cgi-lib/wowlib.pl';

$message='onMouseOver="window.status=';
&getHash(\%gcfg,'./config/gconfig.cgi');
$cgi_lib'writefiles=($gcfg{updir}?$gcfg{updir}:'./upload');
$gcfg{maxup}=131072 unless $gcfg{maxup};
$cgi_lib'maxdata=$gcfg{maxup};

&ReadParse(\%in,\%cgi_cfn,\%cgi_ct,\%cgi_sfn);

$data_directory="http://www.kimjin-clinic.com/html/wowboard/data/data $in{'bd'}";
$idx_file="$data_directory/indexdb";
$ct_file="$data_directory/contentdb";
$head_file=(-e "$data_directory/head.html" ? "$data_directory/head.html" : 'http://www.kimjin-clinic.com/html/wowboard/config/head.html ');
$cfg_file=(-e "$data_directory/bdconfig.cgi" ? "$data_directory/bdconfig.cgi" : 'http://www.kimjin-clinic.com/html/wowboard/config/bdconfig.cgi ');

umask 000;

&getHash(\%gcfg,'./config/gconfig.cgi');
&getHash(\%cfg,$cfg_file);
$nav{fore}=$nav{back}='';

require ($cfg{'language'} eq 'kr'?'./config/locale.kr':'./config/locale.en');

$page=($cfg{'page'}+0?$cfg{'page'}+0:15);
$table_size=$cfg{'numsize'}*$cfg{'numshow'}+$cfg{'filesize'}*$cfg{'fileshow'}
+$cfg{'dcountsize'}*$cfg{'dcountshow'}+$cfg{'titlesize'}*$cfg{'titleshow'}
+$cfg{'countsize'}*$cfg{'countshow'}+$cfg{'datesize'}*$cfg{'dateshow'}+$cfg{'namesize'}*$cfg{'nameshow'};

if(($in{'j'} eq 'form')||($in{'j'} eq 'reply')||($in{'j'} eq 'fix')){&WriteForm;
}elsif($in{'j'} eq 'dl'){&Download('board');
}elsif($in{'j'} eq 'write'){&DataWrite;
}elsif($in{'j'} eq 'content'){&ShowContent;
}elsif($in{'j'} eq 'delete'){&DeleteForm;
}elsif($in{'j'} eq 'delete_ok'){&DeleteData;
}elsif($in{'j'} eq 'viewIndex'){&viewIndex;
}else{$in{'j'}='';&ShowBoard;}
exit;

sub WriteForm{
&Err_Msg_Back('Permission denied') if($cfg{'g_nowr'}+$cfg{'g_nore'}+$cfg{'g_nomd'}==3);

if(($in{'j'} eq 'reply')||($in{'j'} eq 'fix')){
&getIndex(\@indexes );
$inum=&findKey(\@indexes ,$in{'c'},$in{'i'});
&Err_Msg_Back('Data Not Found') if($inum<0);

dbmopen %ct_data,$ct_file,0444 or Err_Msg_Back("wowboard error:\\n$msg{'eOpen'}");

($id,$passwd,$email,$title,$date,$weekday,$thetime,$count,$dcount,$realname,$upname,$child,$thread)
=@ct_data{$indexes[$inum].'na',$indexes[$inum].'pa',$indexes[$inum].'em',$indexes[$inum].'ti',
$indexes[$inum].'da',$indexes[$inum].'we',$indexes[$inum].'tm',$indexes[$inum].'co',
$indexes[$inum].'do',$indexes[$inum].'re',$indexes[$inum].'up',
$indexes[$inum].'ch',$indexes[$inum].'th'};
}
$td_66ccff="
";
$emailval=" value='$email'";
$nameval=" value='$id'";

$content='';
if($in{'j'} eq 'reply'){
if(open(CFILE,"< $data_directory/".$ct_data{$indexes[$inum].'ct'})){
while(){
$content.='>'.$_;
}
close CFILE;
}
$content="$id wrote :\n$content";
if($title!~/^¢Ñ/){$title="¢Ñ $title";}
$checked_mail=($email?'checked':'');
if($gcfg{use_smail} eq 'yes'){
$print_mail=" "
."$msg{'smail'}:

";
}else{
$print_mail='';
}
$emailval='';
$nameval='';
}elsif($in{'j'} eq 'fix'){
if(open(CFILE,"< $data_directory/".$ct_data{$indexes[$inum].'ct'})){
while(){
$content.=$_;
}
close CFILE;
}
}
if(($gcfg{updir})&&($cfg{'g_noup'}==0)){
$file_up_ok="$td_66ccff $msg{'file'}\n

\n";
$enc_type=" enctype=\"multipart/form-data\"";
}

$col_size=int($table_size/7);
$font="";
print &PrintHead;
print <








$td_66ccff $msg{'name'}



$td_66ccff $msg{'passwd'}

$td_66ccff E-mail

$file_up_ok
$td_66ccff $msg{'title'}

$font
$font$print_mail



END
}

sub DeleteForm{
&Err_Msg_Back('Deleting permission denied') if($cfg{'g_norm'}==1);

$font="";
print &PrintHead;
print <










$msg{'passwd'}

$font



END
}

sub DeleteData{
&LimitAccess;
&Err_Msg_Back('Deleting permission denied') if($cfg{'g_norm'}==1);

dbmopen %ct_data,$ct_file,0666 or Err_Msg_Back("wowboard error:\\n$msg{'eOpen'}");

&getIndex(\@indexes );
$inum=&findKey(\@indexes ,$in{'c'},$in{'i'});
&Err_Msg_Back('Data Not Found') if($inum<0);
&Err_Msg_Back($msg{'undeletable'}) if($ct_data{$indexes[$inum].'ch'}>0);
$passwd=crypt($in{'passwd'},substr($ct_data{$indexes[$inum].'pa'},0,2));
&Err_Msg_Back($msg{'ePasswd'}) if($passwd ne $ct_data{$indexes[$inum].'pa'});

unlink "$gcfg{updir}/".$ct_data{$indexes[$inum].'up'};
unlink "$data_directory/".$ct_data{$indexes[$inum].'ct'};
($del_th,$del_ch)=@ct_data{$indexes[$inum].'th',$indexes[$inum].'ch'};

if($del_th){
for($i=$inum-1;$i>=0;$i--){
if($ct_data{$indexes[$i].'th'}==$del_th-1){
$ct_data{$indexes[$i].'ch'}--;
last;
}
}
}

@indexes=(@indexes[0..($inum-1),($inum+1)..$#indexes]);
&saveIndex(\@indexes );

delete $ct_data{$indexes[$inum].'na',$indexes[$inum].'pa',$indexes[$inum].'em',
$indexes[$inum].'ti',$indexes[$inum].'da',$indexes[$inum].'we',
$indexes[$inum].'tm',$indexes[$inum].'co',$indexes[$inum].'do',$indexes[$inum].'ct',
$indexes[$inum].'re',$indexes[$inum].'up',$indexes[$inum].'ch',$indexes[$inum].'th'};

&Refresh("?kw=$in{'kw'}&bd=".&UrlEncode($in{'bd'})."&c=$in{'u'}");
}

sub DataWrite{
&LimitAccess;
&Err_Msg_Back('Permission denied') if($cfg{'g_nowr'}+$cfg{'g_nore'}+$cfg{'g_nomd'}==3);

$in{'id'}=~s/^[ \t]+//o;
$in{'id'}=~s/[ \t]+/ /g;
$in{'id'}=~s/$in{'title'}=~s/^[ \t]+//o;
$in{'title'}=~s/[ \t]+/ /g;
$in{'title'}=~s/$in{'email'}=~s/[ \t]+//g;
$in{'email'}=~s/$in{'content'}=~s/\t/ /g;

&Err_Msg_Back($msg{'wTitle'}) if ($in{'title'} eq '');
&Err_Msg_Back($msg{'wContent'}) if ($in{'content'} eq '');
&Err_Msg_Back($msg{'wScript'}) if ($in{'content'} =~/<[sS][cC][rR][iI][pP][tT]/);

local($sec,$min,$hour,$day,$mon,$year,$wday,@tmp)=localtime(time);
$mon=$mon+1;

$mon="0".$mon if($mon<10);
$day="0".$day if($day<10);
$hour="0".$hour if($hour<10);
$min="0".$min if($min<10);

$in{'content'}=~s/\r//g;

&SendMail($in{'email'},$in{'saddr'},
"$in{'id'}".($in{'email'}?"($in{'email'})":'').$msg{'sReply'},
"$msg{'title'}: $in{'title'}\n\n$in{'content'}\n") if($in{'smail'} eq 'yes');

&getIndex(\@indexes );

dbmopen %ct_data,$ct_file,0666 or Err_Msg_Back("wowboard error:\\n$msg{'eOpen'}");

if($in{'fix'}){
$inum=&findKey(\@indexes ,$in{'c'},$in{'i'});
&Err_Msg_Back('Data Not Found') if($inum<0);

$passwd=crypt($in{'passwd'},substr($ct_data{$indexes[$inum].'pa'},0,2));
&Err_Msg_Back($msg{'ePasswd'}) if($passwd ne $ct_data{$indexes[$inum].'pa'});

@ct_data{$indexes[$inum].'na',$indexes[$inum].'em',$indexes[$inum].'ti',
$indexes[$inum].'da',$indexes[$inum].'we',$indexes[$inum].'tm'}
=($in{'id'},$in{'email'},$in{'title'},"$year/$mon/$day",$wday,"$hour:$min:$sec");
if(open(CFILE,"> $data_directory/".$ct_data{$indexes[$inum].'ct'})){
print CFILE $in{'content'};
close CFILE;
}
&Refresh("?kw=".&UrlEncode($in{'kw'})."&bd=".&UrlEncode($in{'bd'}));
exit;
}
$in{'passwd'}=($in{'passwd'}?crypt($in{'passwd'},chr(rand(25)+65).chr(rand(25)+65)):'*');

$upname=$cgi_cfn{'upfile'};
if(($upname ne '')&&($gcfg{updir})&&($cfg{'g_noup'}==0)&&(-s $cgi_sfn{'upfile'})){
$upname=~s/.+\\//g;
$upname=~s/.+\///g;
$upname=~s/\s/\_/g;
$realname=$upname;
$i=0;
while(-e "$gcfg{updir}/$upname"){
$i++;
$upname="$i\_$upname";
}
if(open (SFILE, "< $cgi_sfn{'upfile'}")){
if(open (FILE, "> $gcfg{updir}/$upname")){
$buf='';
binmode(SFILE);
binmode(FILE);
while(read(SFILE,$buf,8192)){
print FILE $buf;
}
close(FILE);
close(SFILE);
}else{
close(SFILE);
unlink "$cgi_sfn{'upfile'}";
&Err_Msg_Back($msg{'eSave'});
}
}else{
unlink "$cgi_sfn{'upfile'}";
&Err_Msg_Back($msg{'eRead'});
}
}
unlink "$cgi_sfn{'upfile'}";

$new_filename=rand(99999999);
while(-e "$data_directory/$new_filename.txt"){
$new_filename++;
}
$newindex=(sort {$b <=> $a} @indexes)[0]+1;
if($in{'reply'}){
$inum=&findKey(\@indexes ,$in{'c'},$in{'i'});
&Err_Msg_Back('Data Not Found') if($inum<0);

$ct_data{$indexes[$inum].'ch'}++;
$thread=$ct_data{$indexes[$inum].'th'}+1;
@indexes=(@indexes[0..$inum],$newindex,@indexes[$inum+1..$#indexes]);
}else{
$thread=0;
@indexes=($newindex,@indexes);
}
&saveIndex(\@indexes );
@ct_data{$newindex.'na',$newindex.'pa',$newindex.'em',$newindex.'ti',$newindex.'da',
$newindex.'we',$newindex.'tm',$newindex.'co',$newindex.'do',$newindex.'ct',
$newindex.'re',$newindex.'up',$newindex.'ch',$newindex.'th'}
=($in{'id'},$in{'passwd'},$in{'email'},$in{'title'},"$year/$mon/$day",$wday,
"$hour:$min:$sec",0,0,$new_filename.'.txt',$realname,$upname,0,$thread);

if(open(CFILE,"> $data_directory/$new_filename.txt")){
print CFILE $in{'content'};
close CFILE;
}
&Refresh("?kw=".&UrlEncode($in{'kw'})."&bd=".&UrlEncode($in{'bd'}));
}

sub PrintHead{
return &PrintHeader
."\n\°Ô½ÃÆÇ\n\n"

.&ReadFilePrint($head_file)
."\\n";
}

sub ShowBoard{
$image_dir=&checkIcon($cfg{icon});
local($total_data,$fore,$back,$total_line,$fp,$bp,$undeletable=1);
local(@nums,@indexes,@idxs,@id,@email,@title,@date,@weekday,@realname,@upname,@count,@dcount,@thread);

local @col1=('num','file','dcount','title','count','date','name');
local @col2=('size','tback','bback','tfore','bfore','show');

&fetchIndex('board');
$ttbgimage=($cfg{ttbgimg}?" background='background/$cfg{ttbgimg}'":'');
$tbbgimage=($cfg{tbbgimg}?" background='background/$cfg{tbbgimg}'":'');
local $print_str=&PrintHead;
$print_str.=&print_table;
$print_str.=&Button('board') if($cfg{'show_button'} ne 'none');
print "$print_str\";
}

sub print_table{

$return_str="

\n"
.'
'.&showMultiBoard.''.&showPage.'
';
return "$return_str
\n- $msg{'nodata'} -" if ($total_line<=0);
for($tmp2=1;$tmp2<3;$tmp2++){
for($tmp1=0;$tmp1<=$#col1;$tmp1++){
$c{"$col1[$tmp1]$col2[$tmp2]"}=' bgcolor="'.$cfg{"$col1[$tmp1]$col2[$tmp2]"}.'"' if($cfg{"$col1[$tmp1]$col2[$tmp2]"});
}
}
for($tmp2=3;$tmp2<5;$tmp2++){
for($tmp1=0;$tmp1<=$#col1;$tmp1++){
$c{"$col1[$tmp1]$col2[$tmp2]"}='';
}
}

$return_str.=&table_head;

@c{'dccol','ccol'}=('','');
for($i=0;($i<=$#nums)&&($i<$page);$i++){
$id[$i]=$msg{'guest'} unless($id[$i]);
$return_str.="
'.$c{$col1[0].$col2[4]}."$nums[$i]'.($dcount[$i]>=$cfg{'dcmargin'} ? $c{'dccol'} : $c{$col1[2].$col2[4]})."$dcount[$i]'.($count[$i]>=$cfg{'cmargin'}? $c{'ccol'} : $c{$col1[4].$col2[4]})."$count[$i]'.$c{$col1[5].$col2[4]}.&cal_new($date[$i])."
\n";
}

sub ShowContent{
$image_dir=&checkIcon($cfg{icon});
&Err_Msg_Back('Reading content permission denied') if($cfg{'g_nord'}==1);
local($total_data,$fore,$back,$total_line);
local($inum,@nums,@indexes,@idxs,@id,@passwd,@email,@title,@date,@weekday,@thetime,@realname,@upname,@count,@dcount,@content,@child,@thread);
&getIndex(\@indexes );
$inum=&findKey(\@indexes ,$in{'c'},$in{'i'});
&Err_Msg_Back('Data Not Found') if($inum<0);
local $print_str=&PrintHead;
$ctbgimage=($cfg{ctbgimg}?" background='background/$cfg{ctbgimg}'":'');
$cbbgimage=($cfg{cbbgimg}?" background='background/$cfg{cbbgimg}'":'');
$print_str.=&print_content('board',$inum);
$print_str.=&Button('board') if($cfg{'show_button'} ne 'none');
print "$print_str\


";
}

Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
ÀÌÀü°Ô½Ã±Û [Áú¹®] °Ô½ÃÆÇ°Ë»öÈÄ ¸®½ºÆ®Ãâ·Â ¾Ë°í¸®ÁòÁß¿¡¼­... 2001-06-02 21:14:12
´ÙÀ½°Ô½Ã±Û PHP ÀÌ·±°Å ¾î¶»°Ô »ç¿ëÇÏ´ÂÁö ¸ô°Ú¾î¿ä!! 2001-06-03 10:13:59