1 : #!/bin/wel¶
2 : ¶
3 : /* file: admmodify.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= 0, admin= 1; // 로긴 상태가 아니며 관리자 메뉴 사용가능¶
16 : if(writeflag==1) send_cookie= "NO";¶
17 : if(include("chkuser.sub")!=OK) return disconnect();¶
18 : ¶
19 : if(writeflag!=1) { include("admmodify.sub"); return; }¶
20 : ¶
21 : if(pass=="") pswd= "";¶
22 : else¶
23 : {¶
24 : pswd= encode(tolower(left(pass,12)), encodekey(), "", decode_variable);¶
25 : pswd= "pass='" ~ pswd ~ "',";¶
26 : }¶
27 : title= strchange(lrtrim(title), fch, rch);¶
28 : name= strchange(lrtrim(name), fch, rch);¶
29 : phone= strchange(lrtrim(phone), fch, rch);¶
30 : hdphone= strchange(lrtrim(hdphone), fch, rch);¶
31 : email= strchange(lrtrim(email), fch, rch);¶
32 : ¶
33 : qstr= "update " ~ myustable¶
34 : ~ strform(" set {$pswd}title='{$title}',kind='{$kind}',",¶
35 : "useflag='{$useflag}',name='{$name}',phone='{$phone}',",¶
36 : "hdphone='{$hdphone}',email='{$email}',pagerec='{$rpp}'",¶
37 : " where selno={$no}");¶
38 : ¶
39 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();¶
40 : if(pass=="" || ckid!=id) pass= ckpass;¶
41 : send_cookie(ckid, pass);¶
42 : url= strform("admview.wel?no={$no}&list={$list}&k={$k}",¶
43 : "&ps={$ps}&pw={$pw}&pS={$pS}&pN={$pN}&pl={$pl}&pr={$pr}");¶
44 : replace_location(url);¶
45 : return disconnect();¶
|