Exemple #1
0
             unset($arrLogDatas['custom'], $arrLogDatas['old_custom']);
         }
         $arrLogInfo['log_content'] = $arrLogDatas;
         CommonClass::applyEdit($arrLogInfo, $service_id);
         CommonClass::cancleEdit($service_id, 6);
         $arrServiceInfo = db_factory::get_one('select * from ' . TABLEPRE . 'witkey_service where service_id = ' . intval($service_id));
         if ($arrServiceInfo['service_status'] == '1') {
             $time = time() - $service_arr['on_time'];
             keke_payitem_class::update_service_payitem_time($service_arr['payitem_time'], $time, $service_id);
             goods_shop_class::set_service_status($service_id, 2);
         }
         keke_msg_class::send_private_message('服务审核通知', '您编辑的商品信息<a href="index.php?do=goods&id=' . $service_id . '">' . $arrServiceInfo['title'] . '</a>已通过管理员审核,目前已生效!', $arrServiceInfo['uid'], $arrServiceInfo['username']);
     }
     if ($acc == 'snopass') {
         CommonClass::cancleEdit($service_id, 6);
         keke_shop_release_class::updateEditStatusBySid($service_id, 4);
         keke_msg_class::send_private_message('服务审核通知', '您编辑的商品信息<a href="index.php?do=goods&id=' . $service_id . '">' . $arrServiceInfo['title'] . '</a>未通过管理员的审核,如有疑问请联系网站管理员!', $arrServiceInfo['uid'], $arrServiceInfo['username']);
     }
     kekezu::echojson('操作成功', 1);
 } else {
     $editInfo = CommonClass::getEditLogInfoByLogTypeAndObjId($service_id, 6);
     $arrTopIndustrys = $kekezu->_indus_goods_arr;
     $arrIndustrys = CommonClass::getIndustryByPid($editInfo['log_content_data']['indus_pid']);
     $arrOldImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_pic']);
     $arrImageLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['pic']);
     $arrOldFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['old_file_path']);
     $arrFileLists = CommonClass::getFileArrayByPath(',', $editInfo['log_content_data']['file_path']);
     require keke_tpl_class::template('shop/goods/admin/tpl/goods_updateinfo');
     die;
 }
 break;
    }
    if (!intval($pk['service_id'])) {
        $arrData['profit_rate'] = $arrGoodsConfig['service_profit'];
        $arrData['on_time'] = time();
        $arrData['service_status'] = 2;
        $objServiceT = new keke_table_class('witkey_service');
        $objServiceT->save($arrData);
        unset($objServiceT);
    } else {
        if ($arrServiceInfo['service_status'] == '1') {
            $objServiceT = new keke_table_class('witkey_service');
            $objServiceT->save($arrData, $pk);
        } else {
            if (!empty($arrUpdateParts)) {
                CommonClass::createEditLog($pk['service_id'], $arrServiceInfo['model_id'], serialize($arrUpdateParts));
                keke_shop_release_class::updateEditStatusBySid($pk['service_id'], 1);
            } else {
                kekezu::show_msg($strServiceName . '信息没有更改', $strJumpUrl, NULL, NULL, 'ok');
            }
        }
    }
    if ($objId && $intTaskId) {
        $strBidSql = ' UPDATE `' . TABLEPRE . 'witkey_task_bid`  SET `hasdel`=1 WHERE (`bid_id` =' . $objId . ')  and task_id = ' . $intTaskId;
        $strWorkSql = ' UPDATE `' . TABLEPRE . 'witkey_task_work` SET `hasdel`=1 WHERE (`work_id`=' . $objId . ')  and task_id = ' . $intTaskId;
        db_factory::execute($strBidSql);
        db_factory::execute($strWorkSql);
    }
    kekezu::show_msg('操作成功', $strJumpUrl, NULL, NULL, 'ok');
}
function updateFilepath($serviceId, $filepath, $type)
{
                kekezu::show_msg('删除失败', NULL, NULL, NULL, 'error');
            }
            break;
        case 'delSingle':
            if ($serInfo) {
                CommonClass::cancleEdit($objId, $serInfo['model_id']);
                $objServiceT->del('service_id', intval($objId));
                kekezu::show_msg('删除成功', $strUrl, NULL, NULL, 'ok');
            } else {
                kekezu::show_msg('删除失败', NULL, NULL, NULL, 'error');
            }
            break;
        case 'cancel_editSingle':
            if ($serInfo) {
                CommonClass::cancleEdit($objId, $serInfo['model_id']);
                keke_shop_release_class::updateEditStatusBySid($objId, 2);
                kekezu::show_msg('撤销成功', $strUrl, NULL, NULL, 'ok');
            } else {
                kekezu::show_msg('撤销失败', NULL, NULL, NULL, 'error');
            }
            break;
    }
} else {
    $strWhere = " 1=1 ";
    $strWhere .= " and uid= " . $gUid;
    $intModelId and $strWhere .= " and model_id = " . $intModelId;
    $page and $intPage = intval($page);
    $intPage = intval($intPage) ? $intPage : 1;
    $intPagesize = 10;
    $intId and $strWhere .= " and service_id=" . intval($intId);
    $strTitle and $strWhere .= " and title like '%" . trim($strTitle) . "%' ";