$end_time = date("Y-m-d H:i:s", $task_audit_arr['end_time']); $url = "<a href =\"{$_K['siteurl']}/index.php?do=task&id={$task_audit_arr['task_id']}\" target=\"_blank\" >" . $task_audit_arr['task_title'] . "</a>"; } switch ($ac) { case "del": $res = keke_task_config::task_del($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success'); break; case "settask": require $kekezu->_tpl_obj->template('task/' . $model_info['model_dir'] . '/admin/tpl/task_reason'); die; break; case "stoptask": $model_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_model where model_id=4"); $config = unserialize($model_info[config]); $task_info = get_task_info($task_id); $work_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_bid where task_id='" . intval($task_id) . "' and bid_status=4"); if ($work_info) { $objMsgM = new Keke_witkey_msg_class(); $objMsgM->setTo_uid($work_info['uid']); $objMsgM->setTo_username($work_info['username']); $objMsgM->setTitle(kekezu::str_filter(kekezu::escape("任务结束"))); $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content))); $objMsgM->setOn_time(time()); $objMsgM->create_keke_witkey_msg(); db_factory::execute("update " . TABLEPRE . "witkey_task_bid set bid_status=0 where task_id='" . intval($task_id) . "' and bid_status=4"); } db_factory::execute("update " . TABLEPRE . "witkey_task set task_status=9 where task_id=" . intval($task_id)); $v_arr = array("模型名称" => $model_info['model_name'], "任务标题" => '<a href="' . $kekezu->_sys_config['website_url'] . '/index.php?do=task&id=' . $task_audit_arr['task_id'] . '">' . $task_audit_arr['task_title'] . '</a>', "理由" => kekezu::str_filter(kekezu::escape($content))); keke_msg_class::notify_user($task_audit_arr['uid'], $task_audit_arr['username'], 'task_end_manually', '任务结束通知', $v_arr); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['operate_success'], 'success');
function GetFinishedTask($var, $gm) { $role_name = ArgRoleName(); get_task_info($role_name, 3, "q_tFinishTime", $var); return true; }
$wh .= " and task_id = " . intval($w['task_id']); } if ($w['task_title']) { $wh .= ' and task_title like ' . '"%' . $w['task_title'] . '%" '; } if ($w['task_status']) { $wh .= " and task_status = " . $w['task_status']; } $w['task_status'] === '0' and $wh .= " and task_status = 0"; $ord[0] && $ord[1] and $wh .= " order by {$ord['0']} {$ord['1']}" or $wh .= " order by task_id desc "; $url_str = "index.php?do=model&model_id=12&view=list&w[task_id]={$w['task_id']}&w[task_title]={$w['task_title']}&w[task_status]={$w['task_status']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}&page={$page}&page_size={$page_size}"; $table_arr = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom'); $task_arr = $table_arr['data']; $pages = $table_arr['pages']; if ($task_id) { $task_audit_arr = get_task_info($task_id); $start_time = date("Y-m-d H:i:s", $task_audit_arr['start_time']); $end_time = date("Y-m-d H:i:s", $task_audit_arr['end_time']); $url = "<a href =\"{$_K['siteurl']}/index.php?do=task&id={$task_audit_arr['task_id']}\" target=\"_blank\" >" . $task_audit_arr['task_title'] . "</a>"; } switch ($ac) { case "del": $res = keke_task_config::task_del($task_id); kekezu::admin_show_msg($_lang['operate_notice'], $url_str, 2, $_lang['delete_success'], 'success'); break; case "pass": $res = keke_task_config::task_audit_pass($task_id); $arr = array(); $arr['用户名'] = $task_audit_arr['username']; $arr['网站名称'] = $kekezu->_sys_config['website_name']; $arr['任务编号'] = "#" . $task_id;