Example #1
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role('m612');
$goods_config = kekezu::get_task_config($model_id);
is_array($goods_config) and extract($goods_config) or $goods_config = array();
$model_obj = keke_table_class::get_instance('witkey_model');
$ops = array('config', 'control', 'rule');
in_array($op, $ops) or $op = 'config';
$url = "index.php?do=model&model_id={$model_id}&view=config&op={$op}";
kekezu::empty_cache();
$indus_arr = $kekezu->_indus_arr;
$indus_index = kekezu::get_indus_by_index();
if (isset($sbt_edit)) {
    $log_op_arr = array("config" => $_lang['goods_basic_config'], "control" => $_lang['goods_flow_config'], "rule" => $_lang['goods_permissions_config']);
    $log_msg = $_lang['has_update'] . $log_op_arr[$op];
    kekezu::admin_system_log($log_msg);
    switch ($op) {
        case 'config':
            !empty($fds['indus_bid']) and $fds['indus_bid'] = implode(",", $fds['indus_bid']) or $fds['indus_bid'] = '';
            $fds['on_time'] = time();
            $fds = kekezu::escape($fds);
            $res = $model_obj->save($fds, $pk);
            kekezu::admin_show_msg($_lang['goods_basic_config_update_success'], $url, 3, '', 'success');
            break;
        case 'control':
            if ($filepath) {
                copy("../" . $filepath, "../tpl/default/img/shop/shop_default_big.png");
            }
            is_array($cont) and $res = keke_task_config::set_task_ext_config($model_id, $cont);
            kekezu::admin_show_msg($_lang['goods_flow_config_update_success'], $url, 3, '', 'success');