| 1 |
<? |
<? |
|
|
|
|
//Function article_op_log() |
|
| 2 |
//Log article operation into table bbs_article_log |
//Log article operation into table bbs_article_log |
| 3 |
function article_op_log($aid,$uid,$op_type,$ip_addr,$db_conn=null) |
function article_op_log($aid,$uid,$op_type,$ip_addr,$db_conn=null) |
| 4 |
{ |
{ |
| 19 |
N Unrecommend article |
N Unrecommend article |
| 20 |
Z Set article as trnasship |
Z Set article as trnasship |
| 21 |
*/ |
*/ |
| 22 |
$ret = mysql_query("insert delayed into bbs_article_op(AID,UID,type,op_dt,op_ip)". |
$ret = mysql_query("insert into bbs_article_op(AID,UID,type,op_dt,op_ip)". |
| 23 |
" values($aid,$uid,'$op_type',now(),'$ip_addr')",$db_conn); |
" values($aid,$uid,'$op_type',now(),'$ip_addr')",$db_conn); |
| 24 |
|
|
| 25 |
return $ret; |
return $ret; |
| 26 |
} |
} |
| 27 |
|
|
|
|
|
|
//Function user_exp_change() |
|
| 28 |
//Add/Subtract user exp |
//Add/Subtract user exp |
| 29 |
function user_exp_change($uid,$exp_change,$db_conn=null) |
function user_exp_change($uid,$exp_change,$db_conn=null) |
| 30 |
{ |
{ |
| 34 |
return $ret; |
return $ret; |
| 35 |
} |
} |
| 36 |
|
|
|
|
|
|
//Function error_msg() |
|
| 37 |
//Display error message in a pop-up window |
//Display error message in a pop-up window |
| 38 |
function error_msg($msg,$back=false,$close=false) |
function error_msg($msg,$back=false,$close=false) |
| 39 |
{ |
{ |
| 40 |
$ret = "<script language=\"JavaScript\">\n". |
$ret = "<script language=\"JavaScript\">\n". |
| 41 |
" alert(\"".$msg."\");\n". |
" alert(\"".str_replace("\n","\\\n",$msg)."\");\n". |
| 42 |
($back?" history.go(-1);\n":""). |
($back?" history.go(-1);\n":""). |
| 43 |
($close?" self.close();\n":""). |
($close?" self.close();\n":""). |
| 44 |
"</script>"; |
"</script>"; |