public static function check_condit_priv($uinfo, $priv, $model_name, $notice)
 {
     global $_lang;
     $uid = $uinfo['uid'];
     $item_list = keke_auth_base_class::get_auth_item('', 'auth_code,auth_open,auth_title');
     $condition = array_filter(explode(",", $priv['condit']));
     $priv_return = array("pass" => true, "notice" => $notice);
     if ($uid) {
         if (empty($condition)) {
             return $priv_return;
         } else {
             $priv_return['notice'] .= "。" . $model_name . $_lang['need_pass'];
             $i = 0;
             foreach ($condition as $k => $v) {
                 if ($item_list[$v] && $item_list[$v]['auth_open'] == '1') {
                     $pass = keke_auth_fac_class::auth_check($v, $uid);
                     if (!$pass) {
                         if ($v == 'realname' || $v == 'enterprise') {
                             $i++;
                             if ($i == 2) {
                                 $priv_return['pass'] = false;
                                 $priv_return['notice'] .= "实名或企业认证,";
                             }
                         } else {
                             $priv_return['pass'] = false;
                             $priv_return['notice'] .= $item_list[$v]['auth_title'] . ",";
                         }
                     }
                 }
             }
         }
     } else {
         $priv_return['pass'] = false;
         $priv_return['notice'] = $_lang['user_not_login'];
     }
     return $priv_return;
 }
Example #2
0
    $intAuthStatus = keke_auth_fac_class::auth_check('enterprise', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
} else {
    $strCodeWh = " auth_code!='enterprise' ";
    $intAuthStatus = keke_auth_fac_class::auth_check('realname', $gUid);
    if ($intUserRole && !$intAuthStatus) {
        $intAuthStatus = 1;
    }
}
$arrAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, $strCodeWh);
$arrAllAuthItems = keke_auth_base_class::get_auth_item(null, null, 1, null);
$keys = array_keys($arrAuthItems);
$arrAllowAuth = array('realname', 'enterprise', 'bank', 'mobile', 'email', 'alipayjs');
if ($code && in_array($code, $arrAllowAuth)) {
    $code or $code = $keys['0'];
    $code or kekezu::show_msg($_lang['param_error'], "index.php?do=auth", 3, '', 'warning');
    $auth_class = "keke_auth_" . $code . "_class";
    $objAuth = new $auth_class($code);
    $auth_item = $arrAllAuthItems[$code];
    $auth_dir = $auth_item['auth_dir'];
    $arrAuthInfo = $objAuth->get_user_auth_info($gUid, 0, $intBankAid);
    require S_ROOT . "/auth/{$code}/control/index.php";
    require keke_tpl_class::template('auth/' . $code . '/tpl/' . $_K['template'] . '/' . $step);
    die;
} else {
    $real_pass = keke_auth_fac_class::auth_check('enterprise', $gUid) or $real_pass = keke_auth_fac_class::auth_check("realname", $gUid);
    $arrHasAuthItem = keke_auth_fac_class::get_auth($gUserInfo);
    $arrUserAuthInfo = $arrHasAuthItem['info'];
}
Example #3
0
} elseif ($view == 'case') {
    $strPageTitle = "案例-" . $shopTitle . "-" . $_K['html_title'];
    $strPageKeyword = "({$arrSellerInfo['username']}的店铺,{$arrSellerInfo['username']}的案例)";
    $strPageDescription = $arrSellerInfo['seo_desc'];
} elseif ($view == 'mark' && $type == '2') {
    $strPageTitle = "能力等级-" . $shopTitle . "-" . $_K['html_title'];
    $strPageKeyword = "({$arrSellerInfo['username']}的店铺,{$arrSellerInfo['username']}的能力等级)";
    $strPageDescription = $arrSellerInfo['seo_desc'];
} else {
    $strPageTitle = "信誉等级-" . $shopTitle . "-" . $_K['html_title'];
    $strPageKeyword = "({$arrSellerInfo['username']}的店铺,{$arrSellerInfo['username']}的信誉等级)";
    $strPageDescription = $arrSellerInfo['seo_desc'];
}
$incomeCash = db_factory::query(sprintf('SELECT sum(fina_cash) as cash FROM `' . TABLEPRE . 'witkey_finance` where to_days( NOW( ) ) - to_days( FROM_UNIXTIME( fina_time ) ) <=90  and fina_type="in" and (fina_action="sale_service" or fina_action="task_bid" or fina_action="sale_gy") and uid = %s', $arrSellerInfo['uid']));
$incomeCash = number_format($incomeCash[0][cash], 2);
$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');
Example #4
0
                 die;
             }
             break;
     }
 }
 $arrBreadcrumbs = array(1 => array('url' => 'index.php?do=goodslist', 'name' => '威客商城'), 2 => array('url' => 'index.php?do=goodslist&pd=' . $arrServiceInfo['indus_pid'], 'name' => $indus_p_arr[$arrServiceInfo['indus_pid']]['indus_name']), 3 => array('url' => 'index.php?do=goodslist&pd=' . $arrServiceInfo['indus_pid'] . '&i=' . $arrServiceInfo['indus_id'], 'name' => $indus_arr[$arrServiceInfo['indus_id']]['indus_name']));
 $arrCoverList = keke_shop_class::output_pics($arrServiceInfo['pic'], '');
 $intNum = sizeof($arrCoverList);
 $mc = keke_shop_class::get_mark_count_ext($model_list[$arrServiceInfo['model_id']]['model_code'], $intId);
 $mc['all'] = intval($mc[1]['c'] + $mc[2]['c']);
 $mc['seller'] = intval($mc[1]['c']);
 $mc['buyer'] = intval($mc[2]['c']);
 $arrOwnerInfo = kekezu::get_user_info($arrServiceInfo['uid']);
 $strAddress = keke_shop_class::getUserAddress($arrServiceInfo['uid'], 2, 1, 1, 0);
 $strUserLevel = unserialize($arrOwnerInfo['seller_level']);
 $arrAuthItems = keke_auth_fac_class::getAuthItemListByUid($arrOwnerInfo['uid']);
 $arrShopAid = keke_user_mark_class::get_user_aid($arrOwnerInfo['uid'], 2, null, 1);
 $arrOtherGoods = db_factory::query("select * from " . TABLEPRE . "witkey_service where uid=" . intval($arrOwnerInfo['uid']) . " and service_id!='" . $arrServiceInfo['service_id'] . "' and service_status=2 order by on_time desc limit 3");
 $arrPayitemLists = PayitemClass::getPayitemListDetail('goods', $arrServiceInfo['service_id']);
 $arrPayitemShow = keke_shop_class::getPayitemShow($arrServiceInfo);
 $arrRecommShops = db_factory::query(sprintf("select a.username,a.uid,b.indus_id,b.indus_pid,a.shop_name,if(b.seller_total_num>0,b.seller_good_num/b.seller_total_num,0) as good_rate from %switkey_shop a " . " left join %switkey_space b on a.uid=b.uid  where b.recommend=1 and b.status=1 and IFNULL(a.is_close,0)=0 and shop_status=1 order by if(b.indus_pid=%d ,1,0) desc, good_rate desc limit 0,5", TABLEPRE, TABLEPRE, $arrServiceInfo['indus_pid']), 1, $intIndexCacheTime);
 if ($arrModelInfo['open_custom'] == '1') {
     $c_open = 1;
     $arrShowCustoms = CustomClass::getExtData($arrServiceInfo['service_id'], $arrModelInfo['model_id']);
     foreach ($arrShowCustoms as $k => $v) {
         if ($v['extdata']) {
             $arrShowCustoms[$k]['data'] = unserialize($v['extdata']);
         }
     }
 }
 require S_ROOT . "/shop/" . $arrModelInfo['model_dir'] . "/control/index.php";
Example #5
0
                    db_factory::execute(sprintf(" update %switkey_member_ext set v1='%s' where k='%s' and uid='%d'", TABLEPRE, $v, $k, $gUid));
                } else {
                    $ext_obj = new Keke_witkey_member_ext_class();
                    $ext_obj->setK($k);
                    $ext_obj->setV1(kekezu::escape($v));
                    $ext_obj->setUid($gUid);
                    $ext_obj->setType('sect');
                    $ext_obj->create_keke_witkey_member_ext();
                }
            }
        }
        unset($objSpaceT);
        kekezu::show_msg('已保存', NULL, NULL, NULL, 'ok');
    }
} else {
    $intAuthStatus = keke_auth_fac_class::auth_check("realname", $gUid);
    if (isset($formhash) && kekezu::submitcheck($formhash)) {
        if ($gUserInfo['uid'] != $pk['uid']) {
            kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
            return false;
        }
        if (strtotime($birthday) >= strtotime(date('Y-m-d', time()))) {
            $tips['errors']['birthday'] = '出生日期不得大于或等于当前日期';
            kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
        }
        if (strtoupper(CHARSET) == 'GBK') {
            $truename = kekezu::utftogbk($truename);
        }
        $arrData = array('indus_pid' => $indus_pid, 'indus_id' => $indus_id, 'truename' => $truename, 'sex' => $sex, 'is_perfect' => $is_perfect, 'birthday' => $birthday);
        $objSpaceT->save($arrData, array('uid' => $pk['uid']));
        $arrData = array();
Example #6
0
<?php

defined('IN_KEKE') or exit('Access Denied');
$strUrl = 'index.php?do=user&view=account&op=contact';
$objSpaceT = keke_table_class::get_instance('witkey_space');
$arrMemberExts = kekezu::get_table_data("*", "witkey_member_ext", " type='sect' and uid= " . $gUid, "", "", "", "k");
$boolEmailAuth = keke_auth_fac_class::auth_check('email', $gUid);
$boolMobileAuth = keke_auth_fac_class::auth_check('mobile', $gUid);
$arrProvinces = CommonClass::getDistrictByPid('0', 'id,upid,name');
if ($gUserInfo['city']) {
    $arrCity = CommonClass::getDistrictByPid($gUserInfo['province'], 'id,upid,name');
}
if ($gUserInfo['area']) {
    $arrArea = CommonClass::getDistrictByPid($gUserInfo['city'], 'id,upid,name');
}
if (isset($formhash) && kekezu::submitcheck($formhash)) {
    if ($gUserInfo['uid'] != $pk['uid']) {
        kekezu::show_msg('无权操作', NULL, NULL, NULL, 'error');
        return false;
    }
    $arrData = array('email' => $email, 'mobile' => $mobile, 'qq' => $qq, 'msn' => $msn, 'phone' => $phone, 'province' => $province, 'city' => $city, 'area' => $area);
    $intRes = $objSpaceT->save($arrData, $pk);
    if ($sect) {
        foreach ($sect as $k => $v) {
            if ($arrMemberExts[$k]) {
                db_factory::execute(sprintf(" update %switkey_member_ext set v1='%s' where k='%s' and uid='%d'", TABLEPRE, $v, $k, $gUid));
            } else {
                $ext_obj = new Keke_witkey_member_ext_class();
                $ext_obj->setK($k);
                $ext_obj->setV1(kekezu::escape($v));
                $ext_obj->setUid($gUid);
Example #7
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$code or kekezu::admin_show_msg($_lang['error_param'], "index.php?do=auth", 3, '', 'warning');
if ($sbt_edit) {
    if ($code == 'mobile') {
        $smsInterface = db_factory::get_one('select v from ' . TABLEPRE . 'witkey_basic_config where k="sms_interface"');
        if ($smsInterface['v'] != 'open') {
            kekezu::admin_show_msg('请先开启短信接口', 'index.php?do=config&view=basic&op=smsinterface');
        }
    }
    $big_icon = $filepath1;
    $small_before_icon = $filepath2;
    $small_after_icon = $filepath3;
    keke_auth_fac_class::edit_item($code, $fds, $pk, $big_icon, $small_after_icon, $small_before_icon);
}
kekezu::admin_system_log($_lang['edit_auth'] . $code);
if ($code != 'weibo') {
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
} else {
    require S_ROOT . './auth/' . $auth_item['auth_dir'] . '/admin/auth_config.php';
}
function get_fid($path)
{
    if (!path) {
        return false;
    }
    $querystring = substr(strstr($path, '?'), 1);
    parse_str($querystring, $query);
    return $query['fid'];
}
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(38);
$auth_item_obj = new Keke_witkey_auth_item_class();
if ($ac === 'del') {
    keke_auth_fac_class::del_auth($code, 'auth_item_cache_list');
    kekezu::admin_system_log($_lang['delete_auth'] . $code);
} elseif (isset($sbt_add)) {
    keke_auth_fac_class::install_auth($auth_dir);
    kekezu::admin_system_log($_lang['add_auth'] . $auth_dir);
} elseif (isset($sbt_action) && $sbt_action === $_lang['mulit_delete']) {
    keke_auth_fac_class::del_auth($ckb, 'auth_item_cache_list');
    kekezu::admin_system_log($_lang['mulit_delete_auth'] . $ckb);
} else {
    $where = ' 1 = 1  ';
    intval($page_size) or $page_size = 10 and $page_size = intval($page_size);
    $auth_item_obj->setWhere($where);
    $count = $auth_item_obj->count_keke_witkey_auth_item();
    $page or $page = 1 and $page = intval($page);
    $kekezu->_page_obj->setAjax(1);
    $kekezu->_page_obj->setAjaxDom("ajax_dom");
    $pages = $kekezu->_page_obj->getPages($count, $page_size, $page, $url);
    $where .= " order by listorder asc ";
    $auth_item_obj->setWhere($where . $pages['where']);
    $auth_item_arr = $auth_item_obj->query_keke_witkey_auth_item();
}
require $kekezu->_tpl_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);
Example #9
0
             if ($intWithdrawCash < $arrPays['withdraw_min']['v'] || $intWithdrawCash > $arrPays['withdraw_max']['v']) {
                 $tips['errors']['intWithdrawCash'] = '单日提现金额范围为' . "{$arrPays['withdraw_min']['v']}-{$arrPays['withdraw_max']['v']}," . '您的提现金额输入有误';
                 kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
             }
             $_SESSION['withdraw_cash'] = $intWithdrawCash;
             kekezu::show_msg('', $strUrl . "&strStep=2&intWithdrawCash={$intWithdrawCash}&ver=1#userCenter", NULL, NULL, 'ok');
         } else {
             kekezu::show_msg('输入金额不正确', NULL, NULL, NULL, 'error');
         }
     }
     break;
 case "2":
     if ($intWithdrawCash != $_SESSION['withdraw_cash']) {
         kekezu::show_msg($_lang['alert_return_rewrite'], $strUrl . "&step=step1&intReset=1#userCenter", "3", "", "warning");
     }
     $arrBankauthInfo = keke_auth_fac_class::auth_check("bank", $gUid);
     $arrBindLists = kekezu::get_table_data("*", "witkey_auth_bank", "uid='{$gUid}' and auth_status=1", "", "", "", "bank_id", null);
     $arrBank = keke_glob_class::get_bank();
     $arrOfflineLists = kekezu::get_payment_config('', 'offline', 1);
 case "3":
     switch ($paymode) {
         case "online":
             $arrPayInfo = $arrPaymentLists[$pay_type];
             break;
         case "offline":
             $arrBankInfo = db_factory::get_one(" select * from " . TABLEPRE . "witkey_auth_bank  where uid ='{$uid}' and auth_status=1 and bank_name='{$pay_type}'");
             $arrUserBankInfo = kekezu::get_table_data("*", "witkey_member_bank", 'uid=' . $uid, '', "", '', '');
             break;
     }
     break;
 case "4":
Example #10
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$uid = intval($_R['uid']);
$username = $_R['username'];
$intCountTask = db_factory::get_count('select count(task_id) from ' . TABLEPRE . 'witkey_task where uid = ' . $uid);
$strSql = "SELECT count(*) count FROM `" . TABLEPRE . "witkey_task` WHERE ( task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_bid WHERE uid = " . $uid . " ) OR task_id IN ( SELECT task_id FROM " . TABLEPRE . "witkey_task_work WHERE uid = " . $uid . " ) )";
$intParrtTask = intval(db_factory::get_count($strSql));
$intCountSj = db_factory::get_count('select count(service_id) from ' . TABLEPRE . 'witkey_service where uid = ' . $uid . ' and service_status = 2');
$strWhere = ' 1=1 ';
$strWhere .= ' and a.order_uid = ' . $uid;
$strWhere .= ' and b.obj_type = ' . "'service'";
$strSql1 = ' SELECT count(*) count FROM `' . TABLEPRE . 'witkey_order` AS a ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_order_detail AS b ON a.order_id = b.order_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service AS c ON b.obj_id = c.service_id ' . ' LEFT JOIN ' . TABLEPRE . 'witkey_service_order AS d ON b.order_id = d.order_id ' . ' WHERE ' . $strWhere;
$intCountGm = intval(db_factory::get_count($strSql1));
$strSql2 = "SELECT count(*) count FROM `" . TABLEPRE . "witkey_service_order` as a\n\t\t\tLEFT JOIN " . TABLEPRE . "witkey_order_detail as b on a.order_id = b.order_id\n\t\t\tLEFT JOIN " . TABLEPRE . "witkey_order as c on a.order_id = c.order_id where b.obj_type ='gy' and c.order_uid= " . $uid;
$intCountGzgy = intval(db_factory::get_count($strSql2));
$strSql3 = "SELECT count(*) count FROM `" . TABLEPRE . "witkey_service_order` as a \n\t\t    LEFT JOIN " . TABLEPRE . "witkey_order_detail as b ON a.order_id = b.order_id\t\t\n\t\t    LEFT JOIN " . TABLEPRE . "witkey_order as c ON a.order_id = c.order_id where c.seller_uid = " . $uid . " and b.obj_type ='gy' and c.order_status!= 'close' ";
$intCountWkgy = intval(db_factory::get_count($strSql3));
$identy_auth_list = keke_auth_fac_class::getAuthItemListByUid($uid);
$intWithdraw = db_factory::get_count('select count(withdraw_id) from ' . TABLEPRE . 'witkey_withdraw where uid = ' . $uid);
$intCharge = db_factory::get_count('select count(order_id) from ' . TABLEPRE . 'witkey_order_charge where uid = ' . $uid);
$intFinance = db_factory::get_count('select count(fina_id) from ' . TABLEPRE . 'witkey_finance where uid = ' . $uid);
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_' . $do . '_' . $view);