save($param); } public function agree($param){ $data = $this->find($param["id"]); $unit = get_login_admin("unit_name"); $another = get_admin($data["sponsor_id"])["unit_name"]; if($data!=null ){ $param["approval_id"] = get_login_admin("id"); $param["approval_name"] = get_login_admin("nickname"); $param["audit_status"] = 1; $param["update_time"] = time(); return $this->update($param); } return false; } public function disagree($param){ $data = $this->find($param["id"]); $unit = get_login_admin("unit_name"); $another = get_admin($data["sponsor_id"])["unit_name"]; if($data!=null && $unit!=$another){ $param["approval_id"] = get_login_admin("id"); $param["approval_name"] = get_login_admin("nickname"); $param["audit_status"] = 2; $param["update_time"] = time(); return $this->update($param); } return false; } }