|
@@ -7,7 +7,7 @@ use Dever;
|
|
|
class Feedback
|
|
|
{
|
|
|
|
|
|
- public function submit($uid, $username, $name, $content)
|
|
|
+ public function submit($uid, $username, $name, $type_id, $contact, $content)
|
|
|
{
|
|
|
$where['uid'] = $uid;
|
|
|
$where['username'] = $username;
|
|
@@ -16,8 +16,14 @@ class Feedback
|
|
|
$table = 'act/feedback';
|
|
|
$info = Dever::db($table)->one($where);
|
|
|
if (!$info) {
|
|
|
+ $where['type_id'] = $type_id;
|
|
|
+ $where['contact'] = $contact;
|
|
|
$id = Dever::db($table)->insert($where);
|
|
|
} else {
|
|
|
+ $where['where_id'] = $info['id'];
|
|
|
+ $where['type_id'] = $type_id;
|
|
|
+ $where['contact'] = $contact;
|
|
|
+ Dever::db($table)->update($where);
|
|
|
$id = $info['id'];
|
|
|
}
|
|
|
Dever::score($uid, 'submit_feedback', '发表反馈');
|