File name: addrbook/modify.wel (1,634 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: modify.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) { include("modify.sub"); return; }
   28 : 
   29 : include("editdata.sub");
   30 : mdtime= date(1) ~ " " ~ time(1);
   31 : mip= getenv("REMOTE_ADDR");
   32 : qstr= "update " ~ mytable
   33 :     ~ strform(" set mdtime='{$mdtime}',mip='{$mip}',birth='{$birth}',",
   34 :               "name='{$name}',hdphone='{$hdphone}',hphone='{$hphone}',",
   35 :               "hfax='{$hfax}',homepage='{$homepage}',email='{$email}',",
   36 :               "hzipcode='{$hzipcode}',haddr1='{$haddr1}',haddr2='{$haddr2}',",
   37 :               "office='{$office}',buseo='{$buseo}',position='{$position}',",
   38 :               "ophone='{$ophone}',ofax='{$ofax}',ozipcode='{$ozipcode}',",
   39 :               "oaddr1='{$oaddr1}',oaddr2='{$oaddr2}',memo='{$memo}'",
   40 :               " where selno={$no}");
   41 : 
   42 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   43 : url= strform("view.wel?no={$no}&list={$list}&k={$k}&n={$n}&o={$o}",
   44 :              "&pi={$pi}&pw={$pw}&pm={$pm}&ps={$ps}&pd={$pd}");
   45 : replace_location(url);
   46 : return disconnect();
File name: addrbook/modify.wel (1,634 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.