File name: addrbook/insert.wel (1,742 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: insert.wel
    4 : 
    5 :    주소록 자료 입력 프로그램 (author: 서광현)
    6 : 
    7 :    Copyright (c) 2001/02/22 by Wesoft
    8 :    All Rights Reserved.
    9 : */
   10 : 
   11 : htmlquery("GET");
   12 : htmlquery("POST");
   13 : include("common.inc");
   14 : if(mysql_connection()==MYSQL_ERR) return;
   15 : login= admin= 0; // 로긴 상태가 아니며 관리자 메뉴 사용불능
   16 : if(include("chkuser.sub")!=OK) return disconnect();
   17 : 
   18 : if(openpassmatch==0)
   19 :  {
   20 :     MSG1= "개방형 주소록 읽기 전용 상태";
   21 :     MSG2= "주소록을 개방형으로 했을 경우 ID와 암호가 일치해야만"
   22 :         ~ " 신규등록/수정/삭제가 가능하며<br>암호가 일치하지 않으면"
   23 :         ~ " 주소록을 조회만 할 수 있습니다!" ~ BACK_BUTTON;
   24 :     formdump(message_form);
   25 :     return disconnect();
   26 :  }
   27 : if(writeflag<1)
   28 :  {
   29 :     fm= formdump("form/insert.fom");
   30 :     if(fm==FORM_OPENERR) return err_form("insert.fom");
   31 :     return disconnect();
   32 : }
   33 : 
   34 : include("editdata.sub");
   35 : if(writeflag!=2)
   36 :  {
   37 :     if(include("chkdupdata.sub")!=OK) return;
   38 :  }
   39 : wdtime= date(1) ~ " " ~ time(1);
   40 : wip= getenv("REMOTE_ADDR");
   41 : qstr= "insert into " ~ mytable
   42 :     ~ " (wdtime,wip,name,birth,hdphone,hphone,hfax,homepage,"
   43 :     ~ "email,hzipcode,haddr1,haddr2,office,buseo,position,ophone,ofax,"
   44 :     ~ "ozipcode,oaddr1,oaddr2,memo) values ("
   45 :     ~ strform("'{$wdtime}','{$wip}','{$name}','{$birth}','{$hdphone}',",
   46 :               "'{$hphone}','{$hfax}','{$homepage}','{$email}','{$hzipcode}',",
   47 :               "'{$haddr1}','{$haddr2}','{$office}','{$buseo}','{$position}',",
   48 :               "'{$ophone}','{$ofax}','{$ozipcode}','{$oaddr1}','{$oaddr2}',",
   49 :               "'{$memo}')");
   50 : 
   51 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   52 : url= strform("addrbook.wel?list=w&k={$k}&n={$n}&o={$o}",
   53 :              "&pi={$pi}&pw=1&pm={$pm}&ps={$ps}&pd={$pd}");
   54 : replace_location(url);
   55 : return disconnect();
File name: addrbook/insert.wel (1,742 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.