Example #1
0
<?php

$strUrl = 'index.php?do=user&view=shop&op=caseadd';
$shopInfo = db_factory::get_one(sprintf(" select * from %switkey_shop where uid='%d' ", TABLEPRE, $gUid));
keke_shop_release_class::checkShopStatus($uid, 'index.php?do=user&view=shop&op=setting');
$objCaseT = keke_table_class::get_instance('witkey_shop_case');
if ($objId) {
    $caseInfo = db_factory::get_one(sprintf(" select * from %switkey_shop_case where case_id='%d' ", TABLEPRE, intval($objId)));
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    if (strtoupper(CHARSET) == 'GBK') {
        $case_name = kekezu::utftogbk($case_name);
        $case_desc = kekezu::utftogbk($case_desc);
    }
    $arrData = array('shop_id' => $shopInfo['shop_id'], 'case_name' => $case_name, 'case_url' => $case_url, 'case_pic' => $case_pic, 'case_desc' => $case_desc, 'on_time' => time());
    if ($objId) {
        $intRes = $objCaseT->save($arrData, array('case_id' => intval($objId)));
    } else {
        $intRes = $objCaseT->save($arrData);
    }
    unset($objCaseT);
    kekezu::show_msg('已保存', 'index.php?do=user&view=shop&op=caselist', NULL, NULL, 'ok');
}
    }
    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)
{
Example #3
0
$arrAuthItems = keke_auth_fac_class::getAuthItemListByUid($id);
$arrSellerLevel = unserialize($arrSellerInfo['seller_level']);
$arrSellerMark = keke_user_mark_class::get_user_aid($arrSellerInfo['uid'], '2', null, '1');
foreach ($arrSellerMark as $k => $v) {
    $arrSellerMark[$k]['star'] = intval($v['avg']);
}
$arrFollow = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and fuid = %d', TABLEPRE . 'witkey_free_follow', intval($gUid), intval($arrSellerInfo['uid'])));
if ($arrFollow) {
    $arrSellerInfo['follow'] = 1;
} else {
    $arrSellerInfo['follow'] = 0;
}
unset($arrFollow);
if ($closeshop) {
    keke_shop_release_class::closeShop($arrSellerInfo['uid'], 3);
    kekezu::show_msg("店铺已关闭", null, null, NULL, 'success');
    die;
}
if ($openshop) {
    keke_shop_release_class::updateShopStatus($arrSellerInfo['uid'], 1);
    kekezu::show_msg("店铺已开张,可以添加商品哦!", null, null, NULL, 'success');
    die;
}
$intGoodsCount = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and service_status = 2 ', TABLEPRE . 'witkey_service ', $arrSellerInfo['uid']));
$intTaskCount = db_factory::get_count(sprintf('select count(*) from %s where uid = %d and task_status >1', TABLEPRE . 'witkey_task', $arrSellerInfo['uid']));
$intCaseCount = db_factory::get_count(sprintf('select count(*) from %s where shop_id = %d ', TABLEPRE . 'witkey_shop_case', $arrSellerInfo['shop_id']));
$intMarkCount = db_factory::get_count(sprintf('select count(*) from %s where mark_status > 0  and uid = %d', TABLEPRE . 'witkey_mark', $arrSellerInfo['uid']));
$_SESSION['spread'] = 'index.php?do=seller&id=' . intval($id);
require $do . '/' . $view . '.php';
require $kekezu->_tpl_obj->template($do . '/' . $view);
die;
 function __construct($model_id)
 {
     parent::__construct($model_id);
     $this->get_service_config();
 }
Example #5
0
<?php

$strUrl = 'index.php?do=user&view=shop&op=setting';
$shopInfo = db_factory::get_one(sprintf(" select * from %switkey_shop where uid='%d' ", TABLEPRE, $gUid));
if ($ajaxop == 'setstatus') {
    $status = 3;
    if ($setstatus == 'open') {
        $status = '1';
        keke_shop_release_class::updateShopStatus($uid, $status);
    } else {
        keke_shop_release_class::closeShop($uid, $status);
    }
    die;
}
$arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name');
if ($shopInfo['city']) {
    $arrCity = CommonClass::getDistrictById($shopInfo['city'], 'id,upid,name');
}
if ($shopInfo['area']) {
    $arrArea = CommonClass::getDistrictById($shopInfo['area'], 'id,upid,name');
}
$arrBackgroudStyle = unserialize($shopInfo['shop_backstyle']);
$objShopT = keke_table_class::get_instance('witkey_shop');
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    if (strtoupper(CHARSET) == 'GBK') {
        $shop_name = kekezu::utftogbk($shop_name);
        $shop_slogans = kekezu::utftogbk($shop_slogans);
        $seo_title = kekezu::utftogbk($seo_title);
        $seo_keyword = kekezu::utftogbk($seo_keyword);
        $seo_desc = kekezu::utftogbk($seo_desc);
        $address = kekezu::utftogbk($address);
Example #6
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;
Example #7
0
<?php

kekezu::check_login();
$strPageTitle = '发布测试服务-' . $_K['html_title'];
$strPageKeyword = '发布测试服务,' . $_K['html_title'];
$strPageDescription = $kekezu->_sys_config['index_seo_desc'];
$id = intval($id);
$step = strval(trim($step));
keke_shop_release_class::checkShopStatus($uid);
if ($gUserInfo['autoshop'] != 1) {
    kekezu::show_msg('店铺已关闭,不能发布!', 'index.php', 3, null, 'warning');
}
$strRandKf = kekezu::get_rand_kf();
$arrModelLists = kekezu::get_table_data('*', 'witkey_model', " model_type = 'shop' and model_status='1'", 'listorder', '', '', 'model_id', 3600);
if (0 === $id) {
    $arrIds = array_keys($arrModelLists);
    $id = $arrIds['0'];
}
$arrModelInfo = $arrModelLists[$id];
if (empty($arrModelInfo)) {
    kekezu::show_msg('不存在该任务模型,请重新选择', 'index.php?do=pubtask', 3, null, 'warning');
}
$arrTopIndustrys = $kekezu->_indus_goods_arr;
$arrPubProcess = array(1 => array('step' => 'step1', 'desc' => '填写服务描述'), 2 => array('step' => 'step2', 'desc' => '核对服务清单'), 3 => array('step' => 'step3', 'desc' => '成功发布服务'));
$arrPayitemLists = PayitemClass::getPayitemListForPub('goods');
$arrPayitemPriceLists = PayitemClass::getPayitemPriceList('goods');
$arrStep = array('step1', 'step2', 'step3', 'step4');
if (!in_array($step, $arrStep)) {
    $step = 'step1';
}
$strUrl = "index.php?do=pubgoods&id=" . $id;
Example #8
0
        break;
    case "nopass":
        $shop_info = db_factory::get_one(sprintf("select * from %switkey_shop where shop_id=%d", TABLEPRE, $shop_id));
        $shop_obj->setWhere("shop_id=" . $shop_id);
        $shop_obj->setShop_status(2);
        $shop_obj->edit_keke_witkey_shop();
        kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['operate_success'], 'success');
        break;
    case "open":
        $shop_info = db_factory::get_one(sprintf("select * from %switkey_shop where shop_id=%d", TABLEPRE, $shop_id));
        keke_shop_release_class::updateShopStatus($shop_info['uid'], 1);
        kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['operate_success'], 'success');
        break;
    case "close":
        $shop_info = db_factory::get_one(sprintf("select * from %switkey_shop where shop_id=%d", TABLEPRE, $shop_id));
        keke_shop_release_class::closeShop($shop_info['uid'], 3);
        kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['operate_success'], 'success');
        break;
    case 'recommend':
        $sql = sprintf("update  %switkey_space set recommend=1 where uid =%d", TABLEPRE, $edituid);
        db_factory::execute($sql);
        kekezu::admin_system_log($_lang['recommend'] . $memberinfo_arr['username']);
        kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success');
        break;
    case 'move_recommend':
        $sql = sprintf("update  %switkey_space set recommend=0 where uid =%d", TABLEPRE, $edituid);
        db_factory::execute($sql);
        kekezu::admin_system_log($_lang['move_recommend'] . $memberinfo_arr['username']);
        kekezu::admin_show_msg($_lang['operate_success'], $url, 3, '', 'success');
        break;
}
                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) . "%' ";