File name: addrbook/admzap.wel (1,362 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: admzap.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 id from " ~ myustable ~ " where selno=" ~ no;
   27 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   28 : myresult= mysql_store_result(mysql);
   29 : if(myresult==MYSQL_ERR) return err_store_result();
   30 : 
   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 ~ "의 자료가 없습니다!";
   37 :     formdump(message_form);
   38 :     return disconnect();
   39 :  }
   40 : mysql_free_result(myresult);
   41 : qstr= "drop table " ~ preTBname ~ row[0];
   42 : mysql_query(mysql, qstr);
   43 : qstr= "delete from " ~ myustable ~ " where selno=" ~ no;
   44 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   45 : url= strform("admin.wel?list={$list}&k={$k}",
   46 :              "&ps={$ps}&pw={$pw}&pS={$pS}&pN={$pN}&pl={$pl}&pr={$pr}");
   47 : replace_location(url);
   48 : return disconnect();
File name: addrbook/admzap.wel (1,362 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.