Exemplo n.º 1
0
 }
 if ($arrServiceInfo['unite_price'] != $unite_price && $unite_price) {
     $arrUpdateParts['unite_price'] = $unite_price;
     $arrUpdateParts['old_unite_price'] = $arrServiceInfo['unite_price'];
 }
 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);
 }
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(2);
$url = "index.php?do={$do}&view={$view}";
$default_currency = $kekezu->_sys_config['currency'];
if (!empty($cid)) {
    $sql = sprintf("select * from %switkey_currencies where currencies_id ='%d' limit 0,1", TABLEPRE, $cid);
    $currency_config = db_factory::get_one($sql);
}
if ($conf and $sbt_edit) {
    if (preg_match('/([a-z])+/i', $conf['code'])) {
        $currencies_obj = new keke_table_class('witkey_currencies');
        $conf['last_updated'] = time();
        if ($default_cur) {
            $default_currency_conf = db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='currency'", TABLEPRE, $default_cur));
            $_SESSION['currency'] = $default_cur;
        }
        $res = $currencies_obj->save($conf, $pk);
        kekezu::admin_show_msg($_lang['operate_success'], $url, 2, $_lang['edit_success'], "success");
    } else {
        kekezu::admin_show_msg($_lang['operate_fail'], $url, 2, $_lang['currency_code_fill_error'], "error");
    }
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_' . $op);
Exemplo n.º 3
0
        kekezu::admin_show_msg($_lang['operate_notice'], "index.php?do=user&view=add", 3, $_lang['user_creat_success'], 'success');
    } else {
        $uinfo = kekezu::get_user_info($edituid);
        if ($fds['password']) {
            $slt = db_factory::get_count(sprintf("select rand_code from %switkey_member where uid = '%d'", TABLEPRE, $edituid));
            $sec_code = keke_user_class::get_password($fds['password'], $slt);
            $fds['sec_code'] = $sec_code;
            $newpwd = $fds['password'];
            $pwd = md5($fds['password']);
            $fds[password] = $pwd;
            db_factory::execute(sprintf("update %switkey_member set password ='******' where uid=%d", TABLEPRE, $pwd, $edituid));
        } else {
            unset($fds['password']);
        }
        keke_user_class::user_edit($uinfo['username'], '', $newpwd, '', 1);
        $space_class->save($fds, array("uid" => "{$edituid}"));
        kekezu::admin_system_log($_lang['edit_member'] . $member_arr[username]);
        kekezu::admin_show_msg($_lang['edit_success'], "index.php?do=user&view=add&edituid=" . $edituid, 3, '', 'success');
    }
}
if ($check_email) {
    $regClass = new keke_register_class();
    $result = $regClass->check_email($check_email);
    if ($result !== true) {
        echo $result;
    } else {
        echo 1;
    }
    die;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_add');
Exemplo n.º 4
0
 if (isset($formhash) && kekezu::submitcheck($formhash)) {
     if ($gUserInfo['uid'] != $pk['uid']) {
         kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
         return false;
     }
     if (strtoupper(CHARSET) == 'GBK') {
         $company = kekezu::utftogbk($company);
         $legal = kekezu::utftogbk($legal);
         $address = kekezu::utftogbk($address);
         $summary = kekezu::utftogbk($summary);
     }
     $arrData = array('company' => $company, 'licen_num' => $licen_num, 'legal' => $legal, 'staff_num' => $staff_num, 'run_years' => $run_years, 'url' => $url);
     $arrData['uid'] = $gUserInfo['uid'];
     $arrData['username'] = $gUserInfo['username'];
     $objAuthEnterpriseT = new keke_table_class('witkey_auth_enterprise');
     $objAuthEnterpriseT->save($arrData, array('enterprise_auth_id' => $arrEnterPriseInfo['enterprise_auth_id']));
     unset($objAuthEnterpriseT);
     $arrData = array();
     $arrData = array('indus_pid' => $indus_pid, 'indus_id' => $indus_id, 'address' => $address, 'summary' => $summary);
     $objSpaceT->save($arrData, array('uid' => intval($pk['uid'])));
     $arrData = array();
     $arrData = array('email' => $email, 'mobile' => $mobile, 'qq' => $qq, 'msn' => $msn, 'phone' => $phone, 'province' => intval($province), 'city' => intval($city), 'area' => intval($area), 'is_perfect' => $is_perfect);
     $intRes = $objSpaceT->save($arrData, array('uid' => intval($pk['uid'])));
     if ($sect) {
         foreach ($sect as $k => $v) {
             $type = array("phone", "msn", "qq", "mobile", "email");
             if (!in_array($k, $type)) {
                 return false;
             }
             if ($arrMemberExts[$k]) {
                 db_factory::execute(sprintf(" update %switkey_member_ext set v1='%s' where k='%s' and uid='%d'", TABLEPRE, $v, $k, $gUid));
Exemplo n.º 5
0
$nav_list_json = kekezu::json_encode_k(kekezu::gbktoutf($nav_list));
$nav_obj = new keke_table_class("witkey_nav");
$url = "index.php?do={$do}&view={$view}";
if ($ac == 'edit') {
    if (!empty($nav_id)) {
        $sql = sprintf("select * from %switkey_nav where nav_id ='%d' limit 0,1", TABLEPRE, $nav_id);
        $nav_config = db_factory::get_one($sql);
        $readonly = nav_analysis($nav_config['nav_url']);
    }
    if ($fds and $sbt_edit) {
        if ($set_index) {
            $set_rs = db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='set_index'", TABLEPRE, $fds['nav_style']));
        } else {
            $set_rs = db_factory::execute(sprintf("update %switkey_basic_config set v='index' where k='set_index'", TABLEPRE));
        }
        $res = $nav_obj->save($fds, $pk);
        $res || $set_rs and kekezu::admin_show_msg($_lang['operate_success'], $url, 2, $_lang['edit_success'], "success") or kekezu::admin_show_msg($_lang['operate_fail'], $url, 2, $_lang['edit_fail'], "error");
    }
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_config_' . $view . '_edit');
    die;
}
if ($ac == 'del') {
    $nav_obj->del('nav_id', $nav_id, $url);
    kekezu::admin_show_msg($_lang['delete_nav_success'], "index.php?do=config&view=nav", 3, '', 'success');
}
if ($ac == 'set_index') {
    $res = db_factory::execute(sprintf("update %switkey_basic_config set v='%s' where k='set_index'", TABLEPRE, $nav_style));
    kekezu::admin_show_msg($_lang['set_index_success'], "index.php?do=config&view=nav", 3, '', 'success');
}
if ($sbt_edit) {
    $sql = '';
Exemplo n.º 6
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$art_obj = new Keke_witkey_article_class();
$table_obj = new keke_table_class("witkey_article");
$types = array('help', 'art', 'bulletin', 'about');
$type = !empty($type) && in_array($type, $types) ? $type : 'art';
$url = "index.php?do={$do}&view={$view}&w[username]={$w['username']}&w[art_title]={$w['art_title']}&w[art_cat_id]={$w['art_cat_id']}&page_size={$page_size}&page={$page}&type={$type}&ord[0]={$ord['0']}&ord[1]={$ord['1']}";
if ($opajax == 'setorder') {
    $table_obj->save(array('listorder' => intval($ov)), array('art_id' => intval($dataid)));
    kekezu::echojson('设置成功', 1);
    die;
}
if ($ac == 'del') {
    $res = $table_obj->del('art_id', $art_id, $url);
    $res and kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['operate_fail'], $url, 3, '', 'warning');
} elseif (isset($sbt_action)) {
    sizeof($ckb) or kekezu::admin_show_msg($_lang['choose_operate_item'], $url, 3, '', 'warning');
    is_array($ckb) and $ids = implode(',', array_filter($ckb));
    $art_obj->setWhere("art_id in ({$ids})");
    if ($sbt_action) {
        $res = $art_obj->del_keke_witkey_article();
        kekezu::admin_system_log($_lang['mulit_recovery_articles']);
    }
    $res and kekezu::admin_show_msg($_lang['mulit_operate_success'], $url, 3, '', 'success') or kekezu::admin_show_msg($_lang['mulit_operate_fail'], $url, 3, '', 'warning');
} elseif ($op == 'listorder') {
    $art_obj = new Keke_witkey_article_class();
    $art_obj->setWhere("art_id='{$art_id}'");
    $art_obj->setListorder(intval($value));
    $art_obj->edit_keke_witkey_article();
    kekezu::admin_system_log($_lang['edit_art_order'] . $art_id);