File name: welboard2/write.wel (2,222 bytes) Text file viewer v1.2
    1 : #!/bin/wel¢Ò
    2 : ¢Ò
    3 : /* file: write.wel¢Ò
    4 : ¢Ò
    5 :    °Ô½ÃÆÇ ±Û ¾²±â ÇÁ·Î±×·¥ (author: ¼­±¤Çö)¢Ò
    6 : ¢Ò
    7 :    Copyright (c) 2001/03/25 by Wesoft¢Ò
    8 :    All Rights Reserved.¢Ò
    9 : */¢Ò
   10 : ¢Ò
   11 : send_cookie= "NO";¢Ò
   12 : if(include("include/fileupload.sub")!=OK) return;¢Ò
   13 : if(read_only==1)¢Ò
   14 :  {¢Ò
   15 :     if(attfile!="") delete_uploadfile();¢Ò
   16 :     MSG1= "°ü¸®ÀÚ Àü¿ë " ~ prg_title;¢Ò
   17 :     if(board_name=="") board_name= "ÀÌ " ~ prg_title;¢Ò
   18 :     MSG2= "<font color=#0000c0>" ~ board_name ~ "</font>¿¡¼­´Â "¢Ò
   19 :         ~ "°ü¸®ÀÚ¸¸ ¾²±â/¼öÁ¤/»èÁ¦¸¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù!" ~ BACK_BUTTON;¢Ò
   20 :     formdump(message_form);¢Ò
   21 :     return disconnect();¢Ò
   22 :  }¢Ò
   23 : if(writeflag<1)¢Ò
   24 :  {¢Ò
   25 :     if(attfile!="") delete_uploadfile();¢Ò
   26 :     action= "write.wel", answer_flag= "";¢Ò
   27 :     wname= ckname, wemail= ckemail;¢Ò
   28 :     if(wname=="") focus= "wname";¢Ò
   29 :      else if(wemail=="") focus= "wemail";¢Ò
   30 :       else focus= "subject";¢Ò
   31 :     fm= formdump(skin~"write.fom");¢Ò
   32 :     if(fm==FORM_OPENERR) return err_form("write.fom");¢Ò
   33 :     return disconnect();¢Ò
   34 :  }¢Ò
   35 : ¢Ò
   36 : subject= strchange(left(lrtrim(subject),60,1), fch, rch);¢Ò
   37 : content= strchange(content, fch, rch);¢Ò
   38 : fileseq= val(new_attfile);¢Ò
   39 : linecnt= strcount(content, "\n");¢Ò
   40 : if(right(content,1)!="\n") ++linecnt;¢Ò
   41 : postpass= encode(left(postpass, 12), encodekey(), "", decode_variable);¢Ò
   42 : ¢Ò
   43 : wdtime= date(1) ~ " " ~ left(time(1),5);¢Ò
   44 : wip= getenv("REMOTE_ADDR");¢Ò
   45 : whost= getenv("REMOTE_HOST");¢Ò
   46 : wname= strchange(left(lrtrim(wname),20,1), fch, rch);¢Ò
   47 : wemail= strchange(left(lrtrim(wemail),40,1), fch, rch);¢Ò
   48 : grpno= selno= get_maximum(mytable, "selno", "") + 1;¢Ò
   49 : ¢Ò
   50 : qstr= "insert into " ~ mytable¢Ò
   51 :     ~ " (selno,grpno,answer,subject,content,attfile,fileseq,readcnt,downcnt,"¢Ò
   52 :     ~ "linecnt,postpass,wdtime,wip,whost,wname,wemail) values ("¢Ò
   53 :     ~ strform("{$selno},{$grpno},'','{$subject}','{$content}','{$attfile}',",¢Ò
   54 :               "{$fileseq},0,0,{$linecnt},'{$postpass}','{$wdtime}','{$wip}',",¢Ò
   55 :               "'{$whost}','{$wname}','{$wemail}')");¢Ò
   56 : ¢Ò
   57 : if(mysql_query(mysql, qstr)==MYSQL_ERR)¢Ò
   58 :  {¢Ò
   59 :     if(attfile!="") delete_uploadfile();¢Ò
   60 :     return err_query();¢Ò
   61 :  }¢Ò
   62 : send_cookie(ckid, ckpass, wemail, wname);¢Ò
   63 : if(mail_to_admin!=0) include("include/mailadmin.sub");¢Ò
   64 : vn= get_recount(mytable, "");¢Ò
   65 : url= strform("view.wel?db={$db}&pg=1&sk={$sk}&no={$selno}&vn={$vn}&k=&cn={$cn}&cs={$cs}&cc={$cc}&nc=1");¢Ò
   66 : replace_location(url);¢Ò
   67 : return disconnect();¢Ò
File name: welboard2/write.wel (2,222 bytes) Wesoft Corp. ¨Ï 2001 All rights reserved.