$strOrder and $strUrl .= "&strOrder=" . strval($strOrder);
if (isset($action)) {
    $intWorkId = intval($objId);
    if ($intWorkId) {
        switch ($action) {
            case "delWork":
                if ($worktype == 'bid') {
                    $strTabName = "witkey_task_bid";
                    $strId = "bid_id";
                } else {
                    $strTabName = "witkey_task_work";
                    $strId = "work_id";
                }
                $res = db_factory::execute(sprintf(" delete from %s" . $strTabName . " where {$strId}='%d'", TABLEPRE, $intWorkId));
                db_factory::execute(sprintf(' delete from %switkey_comment where obj_id=%d and obj_type="work"', TABLEPRE, $intWorkId));
                keke_file_class::del_obj_file($intWorkId, 'work', true);
                if ($res) {
                    kekezu::show_msg('删除成功', $strUrl, NULL, NULL, 'ok');
                } else {
                    kekezu::show_msg('删除失败', NULL, NULL, NULL, 'error');
                }
                break;
        }
    } else {
        kekezu::show_msg('删除失败', NULL, NULL, NULL, 'error');
    }
}
$arrTaskNavs = TaskClass::getEnabledTaskModelList();
$arrListOrder = array('a.task_id desc' => '编号降序', 'a.task_id asc' => '编号升序', 'b.task_cash desc' => '金额降序', 'b.task_cash asc' => '金额升序');
$arrCashCoves = TaskClass::getTaskCashCove();
if ($intModelId) {
Exemple #2
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$page = max($page, 1);
$limit = max($limit, 5);
$url = 'index.php?do=' . $do . '&model_id=' . $model_id . '&view=edit&task_id=' . $task_id . '&op=' . $op;
switch ($op) {
    case 'work':
        if ($ac && $work_id) {
            switch ($ac) {
                case 'del':
                    db_factory::execute("update " . TABLEPRE . "witkey_task set work_num=work_num-1 where task_id =(select task_id from " . TABLEPRE . "witkey_task_work where work_id=" . intval($work_id) . ")");
                    $res = db_factory::execute(sprintf('delete  from %switkey_task_work where work_id=%d', TABLEPRE, intval($work_id)));
                    if ($res) {
                        keke_file_class::del_obj_file(intval($work_id), 'work', true);
                        db_factory::execute(sprintf(' delete from %switkey_comment where obj_id=%d', TABLEPRE, intval($work_id)));
                    }
                    $res and kekezu::echojson('', 1) or kekezu::echojson('', 0);
                    die;
                    break;
                case 'file':
                    $taskfilelist = db_factory::get_one("select * from " . TABLEPRE . "witkey_task_work where work_id = " . intval($work_id));
                    $filelist = $taskfilelist[work_file];
                    $f_list = db_factory::query("select * from " . TABLEPRE . "witkey_file where file_id in ({$filelist})");
                    break;
                case 'comm':
                    $c_list = db_factory::query(sprintf(' select a.content,a.on_time from %switkey_comment a 
						left join %switkey_task_work b on a.obj_id=b.work_id where b.work_id=%d', TABLEPRE, TABLEPRE, $work_id));
                    break;
            }
            require keke_tpl_class::template('task/' . $model_info['model_dir'] . '/admin/tpl/task_edit_ext');