|
|
Ŭ¶ó¿ìµåű×
Javascript PHP asp CSS HTML mysql jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
147 |
| |
1,665 |
| |
2001-07-20 00:14:18 |
|
|
|
´Ð³×ÀÓ
|
dct |
À̸ÞÀÏ
|
mstudio@cjdream.net |
Á¦¸ñ
|
CGI¸¦ IIS5¿¡¼ ±¸µ¿ÇÏ·Á°í Çϴµ¥... |
³»¿ë
|
|
¾È³çÇϼ¼¿ä. Ç»¸® °Ô½ÃÆÇÀ» Çѹø ½ÇÇàÇغ¸°íÀÚ Çϴµ¥ ½ÇÇàÀÌ ¿µ µÇÁö ¾Ê´Â±º¿ä. ¿©±â CGI¼Ò½º°¡ Àִµ¥... ¾îµð¸¦ °íÃÄ¾ß ÇÏ´ÂÁö ¾Ë·ÁÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù. ½Ã½ºÅÛ Á¤º¸ À©µµ¿ì 2000 ¼¹ö IIS 5.0 ActivePerl-5.6.0.618-MSWin32-x86-multi-thread(c:\perl) ±âº» Å×½ºÆ® : Åë°ú(ÀÌ»ó¾øÀ½) ÷ºÎ¹®¼ : ¿øº» ¾ÐÃàÆÄÀÏ ====================================================================== #!/usr/bin/perl $ver = 'PURYBBS EX ver 1.1'; $title = "PURY BBS"; # purybbs.log¿¡ ÃÖ°í·Î µé¾î°¥ ¼ö ÀÖ´Â ±ÛÀÇ ¼öÀÔ´Ï´Ù. 500-600»çÀ̸¦ ÃßõÇÕ´Ï´Ù # ÀÌ ¼öÄ¡¸¦ ÃÊ°úÇϸé óÀ½ÀÇ ±ÛºÎÅÍ Â÷·Ê´ë·Î Çϳª¾¿ backup.log¿¡ ¹Ð¸®°Ô µË´Ï´Ù $max = 1000; # Æнº¿öµå ÀÔ·Â $pass = 'PURY'; # 0: ¼Õ´Ôµµ ´ä±Û´Ù´Â °ÍÀÌ °¡´É # 1: admin¸¸ ´ä±ÛÀ» ´Þ ¼ö ÀÖÀ½ $adminonly=0; # iconÆú´õ À̸§ $icon_dir = "icon"; # Where ºÎºÐ¿¡ µé¾î°¡´Â °ª @COLORS = ('clear','panic'); # 0: ¾ÆÀÌÄÜ ¾²Áö ¾ÊÀ½ # 1: ¾ÆÀÌÄÜ »ç¿ë $icon_mode = 1; # Lock ±â´É »ç¿ë °ü·Ã # 0: ¾²Áö ¾ÊÀ½ [ºñÃßõ] # 1: Symlink ÇÔ¼ö [¼¹ö°¡ Linux,Unix ȯ°æÀ϶§] # 2: Open ÇÔ¼ö [¼¹ö°¡ WinNT ȯ°æÀ϶§] $lockkey = 2; $lockfile = "purybbs.lock"; $lock_dir = "lock"; $reverse = 0; $res_sort = 0; # Reply PlugÀÇ »çÀÌ¿¡ µé¾î°¡´Â ij¸¯ÅÍ, ±× »ö»ó ¼³Á¤ $arrowchar = ' - '; $arrowcolor = 'white'; # ȸ鿡 ³ª¿À´Â Reply PlugÀÇ °³¼ö # ´ä±ÛÀÌ 1-2À϶§´Â warning1, 3-4À϶§´Â warning2, 5-6À϶§´Â warning3, # 7-9À϶§´Â warning4,10Àº warning5ÀÇ »ö»óÀ¸·Î ¼ýÀÚ°¡ ÂïÈü´Ï´Ù. $rppluglimit = 20; $warning1 = '#68A4E0'; $warning2 = '#68A4E0'; $warning3 = '#68A4E0'; $warning4 = '#68A4E0'; $warning5 = '#68A4E0'; $get_remotehost = 0; # ű׻ç¿ë ¿©ºÎ # 1·Î Çϸé Àü¿ø »ç¿ë °¡´É, 0À¸·Î ÇßÀ» ¶§´Â admin¸¸ »ç¿ë °¡´É # ...ÀÌÁö¸¸ ¾Æ·¡ÀÇ tagname¿¡ ÀÔ·ÂµÈ À̸§À¸·Î ±ÛÀ» ¾²¸é ÅÂ±× »ç¿ë °¡´É # [adminÀÌ º¹¼ö°³ÀÇ Àü¿ë ¾ÆÀÌÄÜÀ» ¾µ ¶§¸¦ À§ÇÑ Name µðÅØÆ®ÀÔ´Ï´Ù ] # name µðÅØÆ®¸¦ ¿øÇϽÃÁö ¾ÊÀ¸¸é ¾Æ¹« °ªµµ ÀÔ·ÂÇÏÁö ¾ÊÀ¸½Ã¸é µË´Ï´Ù. $tagkey = 1; $tagname=''; $script = "purybbs.cgi"; $logfile = "purybbs.log"; $backupfile = "backup.log"; $method = 'POST'; # ÇÑ ÆäÀÌÁö¿¡ ³ª¿À´Â ±ÛÀÇ ¼ö $pagelog = 10; # ÇöÀç purybbs.cgi°¡ µé¾îÀÖ´Â Æú´õÀÇ Àý´ë °æ·Î # http://localhost/purybbs/purybbs.cgi°°Àº ½ÄÀ¸·Î ±âÀÔ $base_url = "."; # 0: ÀÚµ¿¸µÅ© »ç¿ë ¾ÈÇÔ # 1: ±Û Áß¿¡ http ÁÖ¼Ò°¡ ³ª¿À¸é ±×°ÍÀ» ÀÚµ¿À¸·Î ¸µÅ©½ÃÄÑ ÁÜ $autolink = 1; $lockfile = "$lock_dir\/$lockfile"; $accentcolor="#68A4E0"; # ÀԷ»çÇ× Çʼö¿©ºÎ # 0Àº ºñÇʼö 1Àº Çʼö $usesubject = 0; $usepass = 1; # Ç÷¯±× Á¾·ù¼±Åà # 1Àº ±âÁ¸, 0Àº ŸÀÔ2 $plugtype = 0; # ´ä±Û ±âº» Á¦¸ñ # <-sub->´Â ¿ø·¡ ±ÛÀÇ Á¦¸ñÀ» ÀǹÌÇÔ $resub = '[RE] <-sub->'; # ¾ÆÀÌÄÜ º¸±â ¸ðµå ¿É¼Ç # 0Àº ±×³É º¸±â, 1Àº º¸¸é¼ ¼±Åà °¡´É $viewtype = 1; # ÀÛ¼ºÀÏ ±â·Ï ±âÁØ # 0Àº ÃÖÃÊ ÀÛ¼ºÀÏ, 1Àº ÃÖÈÄ ¼öÁ¤ÀÏ $lastdate = 1; # ±ÛÀÚ º¯È¯ ¸ñ·Ï @replace = ('\[<> [','\]<>]'); # Where ºÎºÐ »ö±ò »ç¿ë ¹üÀ§ # 0Àº »ç¿ë ¾ÊÀ½, 1Àº ¾²±âÆû¿¡¼¸¸ »ç¿ë, 2´Â ±Ûº¸±âÆû¿¡¼ »ç¿ë, 3Àº ¸ðµÎ »ç¿ë $wheremode = 0; ########## ¿©±â¼ ºÎÅÍ´Â ÀÚ½ÅÀÖ´Â »ç¶÷¸¸ ¼Õ´î °Í ############ &decode; if ($mode eq "find") { &find; } if ($mode eq "msg_del") { &msg_del; } if ($mode eq "msg_edit") { &msg_edit; } if ($mode eq "edit_msg") { &edit_msg; } if ($mode eq "reg_edit") { ®_edit; } if ($mode eq "msg") { ®ist; } if ($mode eq "res_msg") { &res_msg; } if ($mode eq "admin") { &admin; } if ($mode eq "real_del") { &real_del; } if ($mode eq "admin_del") { &admin_del; } if ($mode eq "iconview") { &iconview; } &html_log; sub html_log { &get_cookie; $word = $c_name; if ($FORM{'page'} eq '') { $page = 0; } else { $page = $FORM{'page'}; } open(IN,"$logfile") || &error("Can't open $logfile",'NOLOCK'); @lines = ; close(IN);
open(VSTYLE, "style_v.htm") || &error("Can't open style_v.htm",NOLOCK); @vstyle1 = ; close(VSTYLE);
open(VSTYLE, "style_vr.htm") || &error("Can't open style_vr.htm",NOLOCK); @vstyle2 = ; close(VSTYLE);
open(RSTYLE, "style_r.htm") || &error("Can't open style_r.htm",NOLOCK); @rstyle1 = ; close(RSTYLE);
open(RSTYLE, "style_rr.htm") || &error("Can't open style_rr.htm",NOLOCK); @rstyle2 = ; close(RSTYLE);
open(MSTYLE, "style_m.htm") || &error("Can't open style_m.htm",NOLOCK); @mstyle = ; close(MSTYLE);
open(WSTYLE, "style_w.htm") || &error("Can't open style_w.htm",NOLOCK); @wstyle = ; close(WSTYLE);
open(IN,"replyplg.log") || &error("Can't open replyplg.log"); @rp = ; close(IN);
open(IN,"icon.dat") || &error("Can't open icon.dat"); @iconfile = ; close(IN);
shift(@lines); @new = (); @reply = ();
$backcount=0;
$temppage=$page; $temppage2=$pagelog;
$numforreply=0; $numcount=0;
foreach $line (@lines) { local($num,$k) = split(/<>/, $line);
if ($k eq "") { $numcount++;
if ($temppage!=0) { $temppage--; } else { if ($temppage2!=0) { $temppage2--; $numforreply=$num; local($num,$k,$dt,$na,$em,$sub,$com,$url,$host,$pw,$color,$icon) = split(/<>/, $line); push(@new,$line); } } } else { if ($numforreply==$k) { local($num,$k,$dt,$na,$em,$sub,$com,$url,$host,$pw,$color,$icon) = split(/<>/, $line); push(@reply,$line); } } }
@reply = reverse(@reply);
&header; @mtemp = @mstyle;
$logcount=$numcount; $logcount="$logcount/$max";
open(IN,"$backupfile") || &error("Can't open $backupfile"); @backup = ; close(IN);
foreach $line (@backup) { ($knum,$kk) = split(/<>/,$line); if ($kk eq '') { $backcount++; } }
$end_data = $numcount - 1; $page_end = $page + ($pagelog - 1); $next_line = $page_end + 1; $back_line = $page - $pagelog;
if ($page_end >= $end_data) { $page_end = $end_data; }
foreach $inline (@mtemp) { $inline =~ s//$c_name/i; $inline =~ s//$logcount/i; $inline =~ s//$backcount/i;
if ($inline =~ //i) { $count=0;
foreach $rpline (@rp) { ($rpnum,$rpnum2) = split(/<>/, $rpline); $count++; if ($rpnum2 >= 0 && $rpnum2 <=2) { print " $arrowchar $rpnum\n"; } if ($rpnum2 >= 3 && $rpnum2 <=4) { print " $arrowchar $rpnum\n"; } if ($rpnum2 >= 5 && $rpnum2 <=6) { print " $arrowchar $rpnum\n"; } if ($rpnum2 >= 7 && $rpnum2 <=9) { print " $arrowchar $rpnum\n"; } if ($rpnum2 >= 10) { print " $arrowchar $rpnum\n"; } if ($count eq "$rppluglimit") { last; } } } if ($inline =~ //i) { print" | | |