File name: addrbook/admview.wel (2,382 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: admview.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= 0, admin= 1; // 로긴 상태가 아니며 관리자 메뉴 사용가능
   15 : if(include("chkuser.sub")!=OK) return disconnect();
   16 : 
   17 : no= val(no);
   18 : if(no<1)
   19 :  {
   20 :     MSG1= "자료번호 오류";
   21 :     MSG2= "자료 번호가 없거나 잘못되었습니다!" ~ BACK_BUTTON;
   22 :     formdump(message_form);
   23 :     return disconnect();
   24 :  }
   25 : 
   26 : qstr= "select * from " ~ myustable ~ " where selno=" ~ no;
   27 : 
   28 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   29 : 
   30 : myresult= mysql_store_result(mysql);
   31 : if(myresult==MYSQL_ERR) return err_store_result();
   32 : 
   33 : recnt= mysql_num_rows(myresult);
   34 : if(recnt>0) row= mysql_fetch_row(myresult);
   35 : if(recnt<1 || row==MYSQL_ERR)
   36 :  {
   37 :     MSG1= "[" ~ recnt ~ "] 자료가 없습니다!";
   38 :     MSG2= "번호" ~ no ~ "의 자료가 없습니다!" ~ BACK_BUTTON;
   39 :     formdump(message_form);
   40 :     return disconnect();
   41 :  }
   42 : mysql_free_result(myresult);
   43 : 
   44 : selno  = row[0];
   45 : wdtime = insert_week(row[1]);
   46 : sdtime = insert_week(row[2]);
   47 : ldtime = insert_week(row[3]);
   48 : lldtime= insert_week(row[4]);
   49 : id     = row[5];
   50 : pass   = decode(row[6], "", decode_variable);
   51 : title  = row[7];
   52 : usecnt = row[8];
   53 : class  = row[9];
   54 : kind   = row[10];
   55 : useflag= row[11];
   56 : name   = row[12];
   57 : phone  = row[13];
   58 : hdphone= row[14];
   59 : email  = row[15];
   60 : pagerec= row[16];
   61 : 
   62 : if(kind=="C") cku= "폐쇄";
   63 :   else if(kind=="O") cku= "<font color=#f00000>공개</font>";
   64 :   else cku= "모름";
   65 : 
   66 : if(useflag=="S") cku~= "/<font color=#009000>신청</font>";
   67 :   else if(useflag=="Y") cku~= "/<font color=#000090>가동</font>";
   68 :   else if(useflag=="N") cku~= "/<font color=#f00000>정지</font>";
   69 :   else cku~= "/모름";
   70 : 
   71 : if(class=="U") cku= "사용자/" ~ cku;
   72 :   else if(class!="A") cku= "모름/" ~ cku ~ " [ "
   73 :                          ~ class ~ " / " ~ kind ~ " / " ~ useflag ~ " ]";
   74 :   else cku= "<font color=#f00000>관리자</font>";
   75 : 
   76 : if(class=="A") user= "관리자"; else user= "소유자";
   77 : 
   78 : addr_recnt= get_recount(mysql, preTBname~id, "");
   79 : if(addr_recnt==-1)
   80 :   {
   81 :     addr_recnt= "<font color=#f00000>NoTB</font> (<font color=#f00000>"
   82 :               ~ preTBname ~ id ~ "</font> 테이블이 없음)";
   83 :   }
   84 :  else
   85 :   {
   86 :     if(addr_recnt==-2) addr_recnt= "(MySQL 내부 오류)";
   87 :   }
   88 : fm= formdump("form/admview.fom");
   89 : if(fm==FORM_OPENERR) return err_form("admview.fom");
   90 : return disconnect();
File name: addrbook/admview.wel (2,382 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.