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();¢Ò
|