File name: addrbook/memowrite.wel (1,037 bytes) Text file viewer v1.2
    1 : #!/bin/wel
    2 : 
    3 : /* file: memowrite.wel
    4 : 
    5 :    메모 기록 프로그램 (author: 서광현)
    6 : 
    7 :    Copyright (c) 2001/02/22 by Wesoft
    8 :    All Rights Reserved.
    9 : */
   10 : 
   11 : htmlquery("POST");
   12 : include("common.inc");
   13 : if(name=="" || memo=="")
   14 :  {
   15 :     location_replace("login.wel");
   16 :     return;
   17 :  }
   18 : 
   19 : if(mysql_connection()==MYSQL_ERR) return;
   20 : 
   21 : if(memo_limit<1) memo_limit= 1;
   22 : limit_dtime= date(1,-memo_limit) ~ " 99:99:99";
   23 : qstr= "delete from " ~ memotable ~ " where wdtime<'" ~ limit_dtime ~ "'";
   24 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   25 : 
   26 : wdtime= date(1) ~ " " ~ time(1);
   27 : name= left(strchange(name, fch~"| ", rch~"|"), 16, 1);
   28 : memo= left(strchange(memo, fch, rch), 250, 1);
   29 : qstr= "insert into " ~ memotable
   30 :     ~ strform(" (wdtime,name,memo) values('{$wdtime}','{$name}','{$memo}')");
   31 : 
   32 : if(mysql_query(mysql, qstr)==MYSQL_ERR) return err_query();
   33 : if(admin!=1) url= "login.wel";
   34 :   else url= strform("admmemo.wel?list={$list}&k={$k}",
   35 :                     "&ps={$ps}&pw={$pw}&pS={$pS}&pN={$pN}&pl={$pl}&pr={$pr}");
   36 : replace_location(url);
   37 : return disconnect();
File name: addrbook/memowrite.wel (1,037 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.