/[LeafOK_CVS]/fenglin/bbs/common_lib.inc.php
ViewVC logotype

Annotation of /fenglin/bbs/common_lib.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Thu Oct 7 15:28:30 2004 UTC (21 years, 5 months ago) by sysadm
Branch: MAIN
CVS Tags: fenglin_1-0-0-0_MIL
Changes since 1.1: +1 -1 lines
Fix bug: check ueer status before update

1 sysadm 1.1 <?
2    
3     //Function article_op_log()
4     //Log article operation into table bbs_article_log
5     function article_op_log($aid,$uid,$op_type,$ip_addr,$db_conn=null)
6     {
7     /*
8     Type Description
9     A Add article
10     D Delete article
11     S Restore article
12     L Lock article
13     U Unlock article
14     M Modify article
15     T Move article
16     E Set article as excerption
17     O Unset article as excerption
18     F Set article on top
19     V Unset article on top
20     R Recommend article
21     N Unrecommend article
22     Z Set article as trnasship
23     */
24     $ret = mysql_query("insert delayed into bbs_article_op(AID,UID,type,op_dt,op_ip)".
25     " values($aid,$uid,'$op_type',now(),'$ip_addr')",$db_conn);
26    
27     return $ret;
28     }
29    
30    
31     //Function user_exp_change()
32     //Add/Subtract user exp
33     function user_exp_change($uid,$exp_change,$db_conn=null)
34     {
35     $ret = mysql_query("update user_pubinfo set exp=exp+$exp_change".
36     " where UID=".$uid);
37    
38     return $ret;
39     }
40    
41    
42     //Function error_msg()
43     //Display error message in a pop-up window
44     function error_msg($msg,$back=false,$close=false)
45     {
46     $ret = "<script language=\"JavaScript\">\n".
47 sysadm 1.2 " alert(\"".str_replace("\n","\\\n",$msg)."\");\n".
48 sysadm 1.1 ($back?" history.go(-1);\n":"").
49     ($close?" self.close();\n":"").
50     "</script>";
51    
52     echo $ret;
53     }
54    
55     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1