username . "用户在" . format_date ( $this->time ) . "时间" . $this->ip . "IP回答被采纳,获得财富为" . $this->amount . ";问题ID为" . $this->qid; } /** * 设置发布悬赏问题的action说明 */ public function set_ACTION_OFFER_QUESTION() { return $this->username . "用户在" . format_date ( $this->time ) . "时间" . $this->ip . "IP发起了悬赏为" . $this->amount . "的问题" . $this->qid . "ID"; } /** * 设置退款问题的action说明 */ public function set_ACTION_REFUNDS_QUESTION() { return $this->username . "用户在" . format_date ( $this->time ) . "时间" . $this->ip . "IP名师答疑回答不满意,退款" . $this->amount . ";问题ID为" . $this->qid; } /** * 发布名师答疑问题的action说明 */ public function set_ACTION_ADD_VIP_QUESTION() { return $this->username . "用户在" . format_date ( $this->time ) . "时间" . $this->ip . "IP发起了名师答疑,悬赏为" . $this->amount . ";问题ID为" . $this->qid; } /** * 添加一条财富流向记录 * @param unknown_type $uid * @param unknown_type $username * @param unknown_type $action * @param unknown_type $amount * @param unknown_type $ip */ public function add_credit3_log($uid = 0, $username = "", $qid = 0, $action = "", $amount = 0, $ip = "",$is_vip=0) { $sql = "INSERT INTO " . t_credit3log . "(uid,username,qid,action,amount,time,ip,is_vip) VALUES (" . $uid . ",'" . $username . "'," . $qid . ",'" . $action . "','" . $amount . "'," . get_date () . ",'" . $ip . "','".$is_vip."')"; $query = Doo::db ()->query ( $sql ); } /** * 获取用户财富流向明细 * @param unknown_type $uid */ function get_list_by_uid($uid = 0) { $sql = "select * from " . t_credit3log . " where uid = " . $uid; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } function get_all_list(){ $sql = "select * from " . t_credit3log; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } } ?>