hook = true; $update = array(); $audit = Dever::param('audit', $data); $info = Dever::db('option/account')->one($id); if ($audit > 2 && $info) { $update['audit_date'] = time(); $update['where_id'] = $info['id']; Dever::db('option/account')->update($update); } } public function setJiaofu($id, $name, $data) { Dever::config('base')->hook = true; $update = array(); $audit = Dever::param('audit', $data); $info = Dever::db('option/bill_jiaofu')->one($id); if ($audit > 1 && $info) { $admin = Dever::load('manage/auth.info'); $update['audit_date'] = time(); $update['audit_admin'] = $admin['id']; $update['where_id'] = $info['id']; Dever::db('option/bill_jiaofu')->update($update); } } public function setFafang($id, $name, $data) { Dever::config('base')->hook = true; $update = array(); $audit = Dever::param('audit', $data); $info = Dever::db('option/bill_fafang')->one($id); if ($audit > 1 && $info) { $admin = Dever::load('manage/auth.info'); $update['audit_date'] = time(); $update['audit_admin'] = $admin['id']; $update['where_id'] = $info['id']; Dever::db('option/bill_fafang')->update($update); } } public function setDuifu($id, $name, $data) { Dever::config('base')->hook = true; $update = array(); $audit = Dever::param('audit', $data); $info = Dever::db('option/bill_duifu')->one($id); if ($audit && $audit > 1 && $info) { $admin = Dever::load('manage/auth.info'); $update['audit_date'] = time(); $update['audit_admin'] = $admin['id']; $update['where_id'] = $info['id']; Dever::db('option/bill_duifu')->update($update); } } public function cashUpdate($id, $name, $data) { Dever::config('base')->hook = true; $aid = Dever::param('aid', $data); $type = Dever::param('type', $data); $cash = Dever::param('cash', $data); $desc = Dever::param('desc', $data); if ($aid && $type && $cash && $desc) { $account = Dever::db('option/account')->find($aid); if ($account && $account['status'] <= 2) { Dever::load('option/lib/cash')->up($aid, $type, $cash, $desc); $where['where_id'] = $aid; $where['cash'] = $cash; Dever::db('agent/member')->upCash($where); } else { Dever::db('option/push_cash')->update(array('where_id' => $id, 'status' => 2)); Dever::alert('期权账户已停用或者未审核,操作失败'); } } } public function updateAccountAudit($id, $name, $data) { $data['add_audit'] = 1; return $data; } }