示例#1
0
        $taskId = intval($taskId);
        if (0 === $taskId) {
            kekezu::show_msg('无权访问', $strUrl, 3, NULL, 'warning');
        }
        $arrTaskInfo = $objRelease->check_access($step, $id, $arrPubInfo, $taskId);
        $arrPayInfo = $objRelease->checkWhetherToPay($taskId);
        $boolValue = $arrPayInfo['balance_pay'];
        $floatPayCash = $arrPayInfo['total_cash'];
        $iStatus = intval($arrTaskInfo['task_status']);
        if (!$floatPayCash && 0 === $iStatus) {
            $objProm = keke_prom_class::get_instance();
            if ($objProm->is_meet_requirement("pub_task", $arrTaskInfo['task_id'])) {
                $objProm->create_prom_event("pub_task", $arrTaskInfo['uid'], $arrTaskInfo['task_id'], $arrTaskInfo['task_cash']);
            }
            $tenderObj = new tender_task_class($arrTaskInfo);
            if ($arrConfig['zb_audit'] == 1) {
                $tenderObj->set_task_status(1);
            } else {
                $tenderObj->set_task_status(2);
                $feed_arr = array("feed_username" => array("content" => $arrTaskInfo['username'], "url" => "index.php?do=seller&id={$arrTaskInfo['uid']}"), "action" => array("content" => $_lang['pub_task'], "url" => ""), "event" => array("content" => "{$arrTaskInfo['task_title']}", "url" => "index.php?do=task&id={$arrTaskInfo['task_id']}", "cash" => $arrTaskInfo['task_cash_coverage'] ? $arrTaskInfo['task_cash_coverage'] : $arrTaskInfo['task_cash'], "model_id" => $arrTaskInfo['model_id']));
                kekezu::save_feed($feed_arr, $arrTaskInfo['uid'], $arrTaskInfo['username'], 'pub_task', $arrTaskInfo['task_id']);
                $status_arr = tender_task_class::get_task_status();
                $url = '<a href="' . $_K['siteurl'] . '/index.php?do=task&id=' . $arrTaskInfo['task_id'] . '"  target="_blank">' . $arrTaskInfo['task_title'] . '</a>';
                $v = array('model_name' => $tenderObj->_model_name, 'task_id' => $arrTaskInfo['task_id'], $_lang['task_title'] => $arrTaskInfo['task_title'], $_lang['task_id'] => $arrTaskInfo['task_id'], $_lang['task_link'] => $url, $_lang['task_status'] => $status_arr[2], '开始时间' => date('Y-m-d H:i:s', $arrTaskInfo['start_time']), '投稿结束时间' => date('Y-m-d H:i:s', $arrTaskInfo['sub_time']), '选稿结束时间' => date('Y-m-d H:i:s', $arrTaskInfo['end_time']));
                $tenderObj->notify_user("task_pub", '任务发布通知', $v, $notify_type = 1, $arrTaskInfo['uid']);
            }
        }
        break;
}
require keke_tpl_class::template('pubtask');
die;
示例#2
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role('m46');
$task_config = unserialize($model_info['config']);
$model_list = $kekezu->_model_list;
$task_status = tender_task_class::get_task_status();
$cash_rule_arr = kekezu::get_table_data("*", "witkey_task_cash_cove", "", "", '', '', "cash_rule_id");
$table_obj = keke_table_class::get_instance('witkey_task');
$page and $page = intval($page) or $page = 1;
$page_size and $page_size = intval($page_size) or $page_size = 10;
$wh = "model_id={$model_info['model_id']}";
if ($w['task_id']) {
    $wh .= " and task_id  like '%{$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";
$url_str = "index.php?do=model&model_id=4&view=list&w[task_id]={$w['task_id']}&w[task_title]={$w['task_title']}&w[task_status]={$w['task_status']}&w[ord][0]={$w['ord']['0']}&w[ord][1]={$w['ord']['1']}&page={$page}&page_size={$page_size}";
$w['ord']['1'] && $w['ord']['0'] and $wh .= " order by {$w['ord']['0']} {$w['ord']['1']}" or $wh .= " order by task_id desc ";
$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']);