public function work_over($work_desc, $file_id, $modify = 0) { global $_K, $_lang; $work_info = $this->work_exists('', " uid = '{$this->_uid}'"); if (in_array($this->_task_status, array(5, 6)) && $work_info) { $work_obj = new Keke_witkey_task_work_class(); if (CHARSET == 'gbk') { $work_desc = kekezu::utftogbk($work_desc); } $work_obj->setWhere(" work_id = '{$work_info['work_id']}'"); $work_obj->setWork_desc($work_desc); $work_obj->setWork_file($file_id); $res = $work_obj->edit_keke_witkey_task_work(); if ($res) { if ($modify) { $noti = $_lang['work_modify_success']; } else { $this->set_task_status(6); db_factory::execute(sprintf("update %switkey_task set end_time = %d where task_id=%d", TABLEPRE, time() + $this->_task_config['confirm_hour'] * 3600, $this->_task_id)); $noti = $_lang['work_over_success']; } $g_notice = array($_lang['description'] => $_lang['wiki'] . $noti . $_lang['please_accept_quickly'], $_lang['task_title'] => $this->_notice_url); $this->notify_user('match_task', $this->_model_name . $noti, $g_notice); return true; } else { return $_lang['system_is_busy'] . $noti . $_lang['failed']; } } else { return $_lang['system_is_busy'] . $noti . $_lang['failed']; } }