File name: addrbook/view.wel (1,857 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: view.wel
    4 : 
    5 :    주소록 자료 보기 프로그램 (author: 서광현)
    6 : 
    7 :    Copyright (c) 2001/02/22 by Wesoft
    8 :    All Rights Reserved.
    9 : */
   10 : 
   11 : htmlquery("GET");
   12 : include("common.inc");
   13 : if(mysql_connection()==MYSQL_ERR) return;
   14 : login= admin= 0; // 로긴 상태가 아니며 관리자 메뉴 사용불능
   15 : if(include("chkuser.sub")!=OK) return disconnect();
   16 : 
   17 : no= val(no);
   18 : if(no<1)
   19 :  {
   20 :     MSG1= "자료번호 오류";
   21 :     MSG2= "자료 번호가 없거나 잘못되었습니다." ~ HELP_ADMIN;
   22 :     formdump(message_form);
   23 :     return disconnect();
   24 :  }
   25 : 
   26 : qstr= "select * from " ~ mytable ~ " where selno=" ~ no;
   27 : 
   28 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   29 : myresult= mysql_store_result(mysql);
   30 : if(myresult==MYSQL_ERR) return err_store_result();
   31 : recnt= mysql_num_rows(myresult);
   32 : if(recnt>0) row= mysql_fetch_row(myresult);
   33 : if(recnt<1 || row==MYSQL_ERR)
   34 :  {
   35 :     MSG1= "[" ~ recnt ~ "] 자료가 없습니다!";
   36 :     MSG2= "번호" ~ no ~ "의 자료가 없습니다!" ~ BACK_BUTTON;
   37 :     formdump(message_form);
   38 :     return disconnect();
   39 :  }
   40 : mysql_free_result(myresult);
   41 : 
   42 : idtime= date(1) ~ " " ~ time(1);
   43 : iip= getenv("REMOTE_ADDR");
   44 : qstr= "update " ~ mytable
   45 :     ~ " set idtime='" ~ idtime ~ "', iip='" ~ iip ~ "' where selno=" ~ no;
   46 : mysql_query(mysql, qstr); // 조회 일시 및 IP 갱신
   47 : 
   48 : selno   = row[0];
   49 : wdtime  = insert_week(row[1]);
   50 : wip     = row[2];
   51 : mdtime  = insert_week(row[3]);
   52 : mip     = row[4];
   53 : idtime  = insert_week(row[5]);
   54 : iip     = row[6];
   55 : name    = row[7];
   56 : birth   = row[8];
   57 : hdphone = row[9];
   58 : hphone  = row[10];
   59 : hfax    = row[11];
   60 : homepage= row[12];
   61 : email   = row[13];
   62 : hzipcode= row[14];
   63 : haddr1  = row[15];
   64 : haddr2  = row[16];
   65 : office  = row[17];
   66 : buseo   = row[18];
   67 : position= row[19];
   68 : ophone  = row[20];
   69 : ofax    = row[21];
   70 : ozipcode= row[22];
   71 : oaddr1  = row[23];
   72 : oaddr2  = row[24];
   73 : memo    = row[25];
   74 : fm= formdump("form/view.fom");
   75 : if(fm==FORM_OPENERR) return err_form("view.fom");
   76 : return disconnect();
File name: addrbook/view.wel (1,857 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.