Esempio n. 1
0
 protected function getusercash($uid)
 {
     if (!$this->_a_uinfo[$uid]) {
         $this->_a_uinfo[$uid] = kekezu::get_user_info($uid);
     }
     return $this->_a_uinfo[$uid]['balance'] + $this->_a_uedit_arr[$uid]['balance'];
 }
 function __construct($charge_type, $model_id = '', $uid = '', $obj_id = '', $order_id = '', $total_fee = '')
 {
     $this->_userinfo = kekezu::get_user_info($uid);
     $this->_model_id = intval($model_id);
     $this->_uid = intval($uid);
     $this->_username = $this->_userinfo['username'];
     $this->_charge_type = $charge_type;
     $this->_order_id = intval($order_id);
     $this->_total_fee = $total_fee;
     $this->_obj_id = intval($obj_id);
 }
 function login($call_back, $url)
 {
     global $oauth_verifier, $code, $_K;
     if (isset($code) && $this->_wb_type == 'sina') {
         $oauth_verifier = array('code' => $code, 'redirect_uri' => $url);
     }
     if ($call_back) {
         if (isset($code) && $this->_wb_type == 'sina') {
             if ($oauth_verifier) {
                 oauth_api_factory::create_access_token($oauth_verifier, $this->_wb_type, $this->_app_id, $this->_app_secret);
                 $oauth_user_info = $this->get_login_user_info();
                 $bind_info = keke_register_class::is_oauth_bind($this->_wb_type, $oauth_user_info['account']);
                 if ($oauth_user_info && $bind_info) {
                     $user_info = kekezu::get_user_info($bind_info['uid']);
                     $login_obj = new keke_user_login_class();
                     $login_user_info = $login_obj->user_login($user_info['username'], $user_info['password'], null, 1);
                     $login_obj->save_user_info($login_user_info, 1);
                 } else {
                     $_SESSION['wb_type'] = $this->_wb_type;
                     header("Location:{$_K['siteurl']}/index.php?do=index");
                     die;
                 }
             } else {
                 header("Location:{$_K['siteurl']}/index.php?do=login");
                 die;
             }
         } else {
             oauth_api_factory::create_access_token($oauth_verifier, $this->_wb_type, $this->_app_id, $this->_app_secret);
             $oauth_user_info = $this->get_login_user_info();
             $bind_info = keke_register_class::is_oauth_bind($this->_wb_type, $oauth_user_info['account']);
             if ($oauth_user_info && $bind_info) {
                 $user_info = kekezu::get_user_info($bind_info['uid']);
                 $login_obj = new keke_user_login_class();
                 $login_user_info = $login_obj->user_login($user_info['username'], $user_info['password'], null, 1);
                 $login_obj->save_user_info($login_user_info, 1);
             } else {
                 $_SESSION['wb_type'] = $this->_wb_type;
                 header("Location:{$_K['siteurl']}/index.php?do=index");
                 die;
             }
         }
     }
     $this->_url = $url;
     if (oauth_api_factory::get_access_token($this->_wb_type, $this->_app_id, $this->_app_secret)) {
         return true;
     } else {
         $aurl = oauth_api_factory::get_auth_url("{$url}&call_back=1", $this->_wb_type, $this->_app_id, $this->_app_secret);
         header('Location:' . $aurl);
         die;
     }
 }
Esempio n. 4
0
 static function SendFeedMsg($receiver, $title, $content, $type = '1')
 {
     $receiverInfo = kekezu::get_user_info(intval($receiver));
     if (!$receiverInfo) {
         return false;
     }
     $objMsgM = new Keke_witkey_msg_class();
     $objMsgM->setType($type);
     $objMsgM->setTo_uid($receiverInfo['uid']);
     $objMsgM->setTo_username($receiverInfo['username']);
     $objMsgM->setTitle(kekezu::escape($title));
     $objMsgM->setContent(kekezu::escape($content));
     $objMsgM->setOn_time(time());
     return $objMsgM->create_keke_witkey_msg();
 }
Esempio n. 5
0
 public function task_agreement_freeze()
 {
     global $model_list, $_K, $_lang;
     $config = unserialize($model_list[1]['config']);
     $sql = " select a.agree_id,a.agree_status,a.seller_status,a.buyer_status,a.seller_uid,a.buyer_uid,a.task_id,a.on_time,b.task_title from %switkey_agreement a left join %switkey_task b on a.task_id=b.task_id where\n\t\t\t\ta.model_id=1  and b.task_status=6 and a.on_time<'%d'";
     $agree_list = db_factory::query(sprintf($sql, TABLEPRE, TABLEPRE, time() - intval($config['agree_complete_time']) * 24 * 3600));
     if (!empty($agree_list)) {
         $msg_obj = new keke_msg_class();
         foreach ($agree_list as $k => $v) {
             $ginfo = kekezu::get_user_info($v['seller_uid']);
             $winfo = kekezu::get_user_info($v['buyer_uid']);
             db_factory::execute(sprintf(" update %switkey_task set task_status=13 where task_id='%d'", TABLEPRE, $v['task_id']));
             db_factory::execute(sprintf(" update %switkey_agreement set agree_status=5 where agree_id='%d'", TABLEPRE, $v['agree_id']));
             $url = "<a href=\"" . $_K['siteurl'] . '/index.php?do=task&id=' . $v['task_id'] . "\">" . $v['task_title'] . "</a>";
             $v1 = array('动作' => $_lang['agree_g_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $v2 = array('动作' => $_lang['agree_w_ac'], '原因' => '由于超时未完成交付已被系统冻结,请尽快联系客服,由客服介入处理', '任务标题' => $url);
             $msg_obj->send_message($ginfo['uid'], $ginfo['username'], "task_freeze", '协议交付超时冻结通知', $v1, $ginfo['email'], $ginfo['mobile']);
             $msg_obj->send_message($winfo['uid'], $winfo['username'], "task_freeze", '协议交付超时冻结通知', $v2, $winfo['email'], $winfo['mobile']);
         }
     }
 }
Esempio n. 6
0
 static function notify_user($title, $content, $uid, $username = "")
 {
     if (!$username) {
         $userinfo = kekezu::get_user_info($uid);
         $username = $userinfo['username'];
     }
     if (is_array($content)) {
         $objMsgConfig = new Keke_witkey_msg_config_class();
         $wh = "`k` = '{$content['tpl']}' limit 1";
         $objMsgConfig->setWhere($wh);
         $res = $objMsgConfig->query_keke_witkey_msg_config();
         $content = strtr($res[0]['content'], $content['data']);
     }
     $message_obj = new Keke_witkey_msg_class();
     $message_obj->setTitle($title);
     $message_obj->setContent($content);
     $message_obj->setOn_time(time());
     $message_obj->setTo_uid($uid);
     $message_obj->setTo_username($username);
     $message_obj->create_keke_witkey_msg();
 }
Esempio n. 7
0
$arrProjectProgress = $objTask->getProjectProgressDesc();
$arrProcess_can = $objTask->process_can();
$arrWorkStatus = $objTask->get_work_status();
if (strtoupper(CHARSET) == 'GBK') {
    $arrWorkStatus = kekezu::gbktoutf($arrWorkStatus);
}
$jsonWorkStatus = json_encode($arrWorkStatus);
if ($arrTaskInfo['task_pic']) {
    $arrTaskPics = explode(',', $arrTaskInfo['task_pic']);
}
$arrPayitemShow = $objTask->getPayitemShow();
$intGuid = $arrTaskInfo['uid'];
$arrGinfo = $objTask->_g_userinfo;
$arrBidInfo = $objTask->work_exists();
$intWuid = intval($arrBidInfo['uid']);
$intWuid and $arrWinfo = kekezu::get_user_info($intWuid);
$arrCoverCash = kekezu::get_cash_cove('', true);
$objMatchTime = new match_time_class();
$objMatchTime->validtaskstatus();
if ($arrTaskInfo['task_status'] == 11 || $arrTaskInfo['task_status'] == 7) {
    $frontStatus = keke_report_class::getFrontStatus($arrTaskInfo['task_id']);
    if ($arrTaskInfo['task_status'] == 7) {
        $frontStatus = 6;
    }
}
if ($arrBidInfo['work_file']) {
    $arrFileLists = CommonClass::getFileArray('|', $arrBidInfo['work_file']);
}
switch ($view) {
    case "work":
        $s === null and $s = 1 or $s = intval($s);
Esempio n. 8
0
<?php

$excite_uid and $intExciteUid = intval($excite_uid);
$excite_code and $strExciteCode = strval($excite_code);
$arrUserInfo = kekezu::get_user_info($intExciteUid);
if ($arrUserInfo) {
    $strMd5Code = md5($arrUserInfo['uid'] . ',' . $arrUserInfo['username'] . ',' . $arrUserInfo['email']);
    if ($arrUserInfo['status'] == '3') {
        if ($strMd5Code == $strExciteCode) {
            $intRes = db_factory::execute(sprintf("update %switkey_space set status='1' where uid='%d'", TABLEPRE, $intExciteUid));
            if ($intRes) {
                $arrAuthDatas = array('email_a_id' => null, 'uid' => $arrUserInfo['uid'], 'username' => $arrUserInfo['username'], 'email' => $arrUserInfo['email'], 'auth_time' => time(), 'auth_status' => '1');
                db_factory::inserttable(TABLEPRE . "witkey_auth_email", $arrAuthDatas);
                $arrRecordDatas = array('record_id' => null, 'auth_code' => 'email', 'uid' => $arrUserInfo['uid'], 'username' => $arrUserInfo['username'], 'auth_status' => '1');
                db_factory::inserttable(TABLEPRE . "witkey_auth_record", $arrRecordDatas);
                $objMessage = new keke_msg_class();
                if ($objMessage->validate('reg')) {
                    $objMessage->send_message($arrUserInfo['uid'], $arrUserInfo['username'], 'reg', '注册成功', array(), $arrUserInfo['email'], '', 2);
                }
            }
        }
    }
} else {
    kekezu::show_msg($_lang['operate_notice'], 'index.php', 3, '待激活的账号不存在', 'warning');
}
                    $space_obj->setGroup_id(7);
                    $res = $space_obj->edit_keke_witkey_space();
                    if ($res) {
                        kekezu::admin_system_log($_lang['add_new_kf'] . $m_info[username]);
                        $v_arr = array('管理员名' => $admin_info['username'], '用户名' => $spaceinfo['username']);
                        keke_msg_class::notify_user($fds['uid'], $m_info['username'], 'kf_set', '客服设置', $v_arr, 2);
                        kekezu::admin_show_msg($_lang['add_kf_successfully'], $url, 3, '', 'success');
                    }
                }
            }
        }
        require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');
        die;
        break;
    case "del":
        $del_info = kekezu::get_user_info($delid);
        $delid or kekezu::admin_show_msg($_lang['param_error'], $url, 3, '', 'warning');
        $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid = '%d' ", TABLEPRE, $delid));
        kekezu::admin_system_log($_lang['delete_kf'] . $del_info[username]);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['delete_fail'], 'warning');
        break;
}
if ($sbt_action) {
    $keyids = $ckb;
    if (is_array($keyids)) {
        $ids = implode(',', $keyids);
        $res = db_factory::execute(sprintf("update %switkey_space set group_id = 0 where uid in (%s) ", TABLEPRE, $ids));
        kekezu::admin_system_log($_lang['more_delete_kfs'] . $ids);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_success']) or kekezu::admin_show_msg($_lang['operate_notice'], $url, 2, $_lang['mulit_operate_fail'], "error");
    }
}
Esempio n. 10
0
$arrOauthType = UserCenter::getOauthType();
if (!$_SESSION[$type . '_oauthInfo']) {
    if (in_array($type, array_keys($arrOauthType))) {
        UserCenter::oauthRoute($type);
    }
    kekezu::show_msg('缺少参数', 'index.php?do=login', 3, NULL, 'warning');
}
$arrOauthInfo = $_SESSION[$type . '_oauthInfo'];
if (strtoupper(CHARSET) == 'GBK') {
    $arrOauthInfo = kekezu::utftogbk($arrOauthInfo);
}
$objLogin = new keke_user_login_class();
$arrBindInfo = keke_register_class::is_oauth_bind($type, $arrOauthInfo['account']);
if ($_SESSION[$type . '_oauthInfo'] && $arrBindInfo && !$is_binding) {
    $_SESSION[$type . '_oauthInfo'] = null;
    $arrUserInfo = kekezu::get_user_info($arrBindInfo['uid']);
    $loginUserInfo = $objLogin->oauth_user_login($arrUserInfo['username'], $arrUserInfo['password'], null, 1);
    $objLogin->save_user_info($loginUserInfo, 1);
}
$inter = $kekezu->_sys_config['user_intergration'];
$intLoginTimes = intval($_SESSION['login_times']);
if (kekezu::submitcheck(isset($formhash)) || isset($login_type) == 3) {
    if ($code) {
        $strCodeCheck = kekezu::check_secode($code);
        if ($strCodeCheck != 1) {
            $tips['errors']['code'] = $strCodeCheck;
            kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
        }
    }
    $strCode = isset($code) ? $code : "";
    $intLoginType = isset($login_type) ? $login_type : "";
Esempio n. 11
0
 function valid_username()
 {
     global $_lang;
     $user_info = kekezu::get_user_info($this->_account, 1);
     if ($user_info) {
         $user_info['login_type'] = 'username';
         return $user_info;
     } else {
         $this->add_login_time();
         $this->show_msg(' 用户名或密码错误,请检查账号是否输入正确', 3, 'index.php?do=login', 1);
     }
 }
Esempio n. 12
0
         kekezu::admin_show_msg('操作提示', "index.php?do=user&view=add", 3, $result, 'warning');
     }
     $reg_uid = $reg_obj->user_register($fds['username'], $fds['password'], $fds['email'], null, false, $fds['password']);
     unset($fds[repassword]);
     $arrAddUserInfo = array();
     $fds['truename'] and $arrAddUserInfo['truename'] = $fds['truename'];
     $fds['phone'] and $arrAddUserInfo['phone'] = $fds['phone'];
     $fds['indus_id'] and $arrAddUserInfo['indus_id'] = $fds['indus_id'];
     $fds['indus_pid'] and $arrAddUserInfo['indus_pid'] = $fds['indus_pid'];
     $fds['birthday'] and $arrAddUserInfo['birthday'] = $fds['birthday'];
     !empty($arrAddUserInfo) and db_factory::updatetable(TABLEPRE . 'witkey_space', $arrAddUserInfo, array('uid' => $reg_uid));
     is_null($fds['group_id']) or db_factory::execute(sprintf("update %switkey_space set group_id={$fds['group_id']} where uid={$reg_uid}", TABLEPRE));
     kekezu::admin_system_log($_lang['add_member'] . $fds['username']);
     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');
Esempio n. 13
0
 public static function createProjectToKEE($taskid, $tasktitle, $work_id)
 {
     global $basic_config;
     if ($basic_config['kee_switch'] != '1') {
         return false;
     }
     if (true === self::include_kee_client()) {
         $workInfo = db_factory::get_one("SELECT * FROM `" . TABLEPRE . "witkey_task_work` WHERE `work_id`='" . $work_id . "'");
         $userinfo = kekezu::get_user_info($workInfo['uid']);
         $data = array();
         $data['email'] = $userinfo['email'];
         $data['platform'] = $basic_config['website_name'];
         $data['role'] = '2';
         $data['tasktitle'] = $tasktitle;
         $data['taskid'] = $taskid;
         $data['client_url'] = $basic_config['website_url'];
         $keeClient = new keeClient($basic_config['kee_api_id'], $basic_config['kee_app_secret']);
         $keeClient->createproject($data);
     }
 }
Esempio n. 14
0
             } else {
                 $strUrl .= '&op=report';
                 require keke_tpl_class::template("tpl/default/ajax/report");
                 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']);
         }
Esempio n. 15
0
    }
    $arrServiceOrderInfo = db_factory::get_one(sprintf("select * from %switkey_service_order where order_id=%d", TABLEPRE, $orderId));
}
$reportUrl = $strUrl . '&orderId=' . $orderId . '&action=rights&objId=' . $orderId . '&objType=order&type=1&toUid=';
if ($id == $gUid) {
    $reqPage = 'seller';
    $arrBuyerInfo = kekezu::get_user_info($arrOrderInfo['order_uid']);
    $arrOrderInfo['seller_uid'] != $id and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning');
    $arrBuyerInfo['comefrom'] = keke_shop_class::getUserAddress($arrOrderInfo['order_uid'], 2, 1, 1, 0);
    $arrBuyerInfo['userlevel'] = unserialize($arrBuyerInfo['buyer_level']);
    $arrAid = keke_user_mark_class::get_user_aid($arrBuyerInfo['uid'], 1, null, '1');
    $arrServiceOrderInfo['indus_pid'] and $arrAllIndustrys = CommonClass::getIndustryByPid($arrServiceOrderInfo['indus_pid'], 'indus_id,indus_pid,indus_name');
    $reportUrl .= $arrBuyerInfo['uid'];
} else {
    $reqPage = 'buyer';
    $arrSellerInfo = kekezu::get_user_info($id);
    !$arrSellerInfo and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning');
    $arrOrderInfo['order_uid'] && $arrOrderInfo['order_uid'] != $uid and kekezu::show_msg('用户订单不存在', 'index.php?do=seller&id=' . $id, 3, '订单已关闭', 'warning');
    $arrSellerInfo['comefrom'] = keke_shop_class::getUserAddress($id, 2, 1, 1, 0);
    $arrSellerInfo['userlevel'] = unserialize($arrSellerInfo['seller_level']);
    $arrSellerInfo['nearlyIncome'] = CommonClass::getNearlyIncomeForDays($arrSellerInfo['uid']);
    $arrAid = keke_user_mark_class::get_user_aid($arrSellerInfo['uid'], 2, null, '1');
    $reportUrl .= $arrSellerInfo['uid'];
}
switch ($arrOrderInfo['order_status']) {
    case 'seller_confirm':
        $step = 'step2';
        break;
    case 'wait':
        $step = 'step3';
        break;
Esempio n. 16
0
 public function dispose_order($order_id, $action, $is_kf = null, $ht_url = null, $kefu_uid = NULL, $isApp = false)
 {
     global $_lang, $uid, $username, $_K, $kekezu;
     if ($is_kf && $is_kf != 'sys' && $kefu_uid) {
         $u_info = kekezu::get_user_info($kefu_uid);
         if ($u_info['group_id'] == 7) {
             $kefu = TRUE;
         } else {
             $kefu = false;
         }
     } else {
         $kefu = false;
     }
     if ($is_kf == 'sys') {
         $kefu = TRUE;
     }
     $order_info = keke_order_class::get_order_info($order_id);
     $service_info = keke_shop_class::get_service_info($order_info['obj_id']);
     if ($order_info) {
         $s_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=sold&intModelId=" . $service_info['model_id'] . "\">" . $order_info['order_name'] . "</a>";
         $b_order_link = "<a href=\"" . $_K['siteurl'] . "/index.php?do=user&view=transaction&op=orders&intModelId=" . $service_info['model_id'] . "\">" . $order_info['order_name'] . "</a>";
         if ($uid == $order_info['order_uid'] || $uid == $order_info['seller_uid'] || $uid == ADMIN_UID || $kefu) {
             if ($service_info['service_status'] == '2') {
                 if ($action == 'delete') {
                     $res = keke_order_class::del_order($order_id, '', 'json');
                     if ($isApp) {
                         $res and app_class::response(array('ret' => 1006)) or app_class::response(array('ret' => 1007));
                     }
                 } else {
                     switch ($action) {
                         case "ok":
                             $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
                             keke_finance_class::init_mem('buy_service', $data);
                             if ($order_info['order_amount'] > 0) {
                                 $suc = keke_finance_class::cash_out($order_info['order_uid'], $order_info['order_amount'], 'buy_service', '', 'service', $order_info['obj_id']);
                             } else {
                                 $suc = 1;
                             }
                             if ($suc) {
                                 db_factory::execute("update " . TABLEPRE . "witkey_finance set order_id={$order_id} where fina_id={$suc}");
                                 keke_order_class::set_order_status($order_id, $action);
                                 $exec_time = time() + $service_info['confirm_max'] * 24 * 3600;
                                 db_factory::execute(sprintf(" update %switkey_order set ys_end_time='%d' where order_id='%d'", TABLEPRE, $exec_time, $order_id));
                                 $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['haved_confirm_pay'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                 keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_confirm_pay'], $v_arr);
                                 $objProm = keke_prom_class::get_instance();
                                 if ($objProm->is_meet_requirement("service", $order_info['obj_id'])) {
                                     $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']);
                                 }
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1010, 'orderinfo' => $order_info));
                                 } else {
                                     return true;
                                 }
                             } else {
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1011, 'orderinfo' => $order_info));
                                 } else {
                                     return '订单付款失败,您的账户余额不足以支付该订单<br />点击这里<a href="index.php?do=pay&id=' . $order_info['order_id'] . '&type=order">去充值</a>';
                                 }
                             }
                             break;
                         case "close":
                             $res = keke_order_class::order_cancel_return($order_id);
                             if ($res) {
                                 keke_order_class::set_order_status($order_id, $action);
                                 $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['close_order_have'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                 keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr);
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1012, 'orderinfo' => $order_info));
                                 } else {
                                     kekezu::show_msg($_lang['system prompt'], "index.php?do=user&view=employer&op=shop&model_id=" . $service_info['model_id'], '1', $_lang['order_deal_complete_and_close'], 'alert_right');
                                 }
                             } else {
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1013, 'orderinfo' => $order_info));
                                 } else {
                                     kekezu::show_msg($_lang['system prompt'], "index.php?do=user&view=employer&op=shop&model_id=" . $service_info['model_id'], '1', $_lang['order_deal_fail_and_link_kf'], 'alert_error');
                                 }
                             }
                             break;
                         case "confirm":
                             $res = keke_order_class::set_order_status($order_id, $action);
                             if ($res) {
                                 $model_info = $kekezu->_model_list[$order_info['model_id']];
                                 $profit = $service_info['profit_rate'] * $order_info['order_amount'] / 100;
                                 $data = array(':service_id' => $service_info['service_id'], ':title' => $service_info['title']);
                                 keke_finance_class::init_mem('sale_service', $data);
                                 keke_finance_class::cash_in($order_info['seller_uid'], $order_info['order_amount'] - $profit, 'sale_service', '', 'service', $order_info['obj_id'], $profit);
                                 keke_shop_class::plus_sale_num($order_info['obj_id'], $order_info['order_amount']);
                                 keke_user_mark_class::create_mark_log($model_info['model_code'], 2, $order_info['order_uid'], $order_info['seller_uid'], $order_id, $order_info['order_amount'] - $profit, $order_info['obj_id'], $order_info['order_username'], $order_info['seller_username']);
                                 keke_user_mark_class::create_mark_log($model_info['model_code'], 1, $order_info['seller_uid'], $order_info['order_uid'], $order_id, $order_info['order_amount'], $order_info['obj_id'], $order_info['seller_username'], $order_info['order_username']);
                                 keke_shop_class::plus_mark_num($order_info['obj_id']);
                                 $objProm = keke_prom_class::get_instance();
                                 if ($objProm->is_meet_requirement("service", $order_info[obj_id])) {
                                     $objProm->create_prom_event("service", $order_info['order_uid'], $order_info['obj_id'], $order_info['order_amount']);
                                 }
                                 $objProm->dispose_prom_event("service", $order_info['order_uid'], $order_info['obj_id']);
                                 if ($is_kf != null) {
                                     $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => '客服协助作品已交付完成', $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                     keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['work_order_complete'], $v_arr);
                                     $v_arr1 = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => '客服协助作品已交付完成', $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                     keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['work_order_complete'], $v_arr1);
                                     return true;
                                 } else {
                                     $v_arr = array($_lang['user_msg'] => $order_info['order_username'], $_lang['action'] => $_lang['buy_work_coplete'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                     keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['work_order_complete'], $v_arr);
                                     if ($isApp) {
                                         app_class::response(array('ret' => 1022, 'orderinfo' => $order_info));
                                     } else {
                                         return true;
                                     }
                                 }
                             } else {
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1023, 'orderinfo' => $order_info));
                                 } else {
                                     kekezu::show_msg($_lang['system prompt'], "index.php?do=order&sid={$order_info['obj_id']}&orderId={$order_id}&steps=step3", '1', $_lang['order_deal_fail_and_link_kf'], 'alert_error');
                                 }
                             }
                             break;
                         case "arbitral":
                             $res = keke_order_class::set_order_status($order_id, $action);
                             if ($res) {
                                 if ($uid == $order_info['order_uid']) {
                                     $v_arr = array($_lang['user'] => $order_info['order_username'], $_lang['action'] => $_lang['buyer_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                                     keke_shop_class::notify_user($order_id['seller_uid'], $order_info['seller_username'], "order_change", $_lang['sevice_order_arbitrate_submit'], $v_arr);
                                 } else {
                                     $v_arr = array($_lang['user_msg'] => $order_info['seller_username'], $_lang['action'] => $_lang['seller_start_arbitrate'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link);
                                     keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['work_order_submit'], $v_arr);
                                 }
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1022, 'orderinfo' => $order_info));
                                 } else {
                                     return true;
                                 }
                             } else {
                                 if ($isApp) {
                                     app_class::response(array('ret' => 1023, 'orderinfo' => $order_info));
                                 } else {
                                     return $_lang['order_deal_fail_and_link_kf'];
                                 }
                             }
                             break;
                     }
                 }
             } else {
                 $res = keke_order_class::set_order_status($order_id, 'close');
                 keke_order_class::order_cancel_return($order_id);
                 $v_arr = array($_lang['user_msg'] => $_lang['system'], $_lang['action'] => $_lang['stop_your_order_and_your_cash_return'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $b_order_link);
                 keke_shop_class::notify_user($order_info['order_uid'], $order_info['order_username'], "order_change", $_lang['goods_order_close'], $v_arr);
                 $v_arr = array($_lang['user_msg'] => $_lang['system'], $_lang['action'] => $_lang['stop_your_order_and_your_cash_return'], $_lang['order_id'] => $order_id, $_lang['order_link'] => $s_order_link);
                 keke_shop_class::notify_user($order_info['seller_uid'], $order_info['seller_username'], "order_change", $_lang['goods_order_close'], $v_arr);
                 if ($isApp) {
                     $res and app_class::response(array('ret' => 1006)) or app_class::response(array('ret' => 1007));
                 } else {
                     $res and kekezu::keke_show_msg('', $_lang['order_delete_success'], "", 'json') or kekezu::keke_show_msg('', $_lang['order_delete_fail'], "error", 'json');
                 }
             }
         } else {
             if ($isApp) {
                 app_class::response(array('ret' => 1024, 'orderinfo' => $order_info));
             } else {
                 kekezu::keke_show_msg('', $_lang['error_order_num_notice'], 'error', 'json');
             }
         }
     } else {
         if ($isApp) {
             app_class::response(array('ret' => 1025, 'orderinfo' => $order_info));
         } else {
             kekezu::keke_show_msg('', $_lang['no_exist_goods_order'], 'error', 'json');
         }
     }
 }
Esempio n. 17
0
<?php

define("ADMIN_KEKE", TRUE);
define("IN_KEKE", TRUE);
require '../app_comm.php';
$_K['is_rewrite'] = 0;
define('ADMIN_ROOT', S_ROOT . '/' . ADMIN_DIRECTORY . '/');
$_K['admin_tpl_path'] = S_ROOT . '/' . ADMIN_DIRECTORY . '/tpl/';
$dos = array('square', 'app', 'task_map', 'static', 'preview', 'database_manage', 'permission', 'prom', 'main', 'side', 'menu', 'tpl', 'index', 'config', 'article', 'art_cat', 'edit_art_cat', 'finance', 'task', 'model', 'tool', 'user', 'login', 'logout', 'button_a', 'user_integration', 'score_config', 'score_rule', 'mark_config', 'mark_rule', 'mark_addico', 'mark_mangeico', 'auth', 'shop', 'group', 'rule', 'case', 'relation_info', 'nav', 'msg', 'trans', 'keke', 'payitem', 'store', 'custom', 'dq', 'watermark', 'ajax');
!empty($do) && in_array($do, $dos) or $do = 'index';
$admin_info = kekezu::get_user_info($_SESSION['uid']);
if ($do != 'login' && $do != 'logout') {
    if (!$_SESSION['auid'] || !$_SESSION['uid'] || $admin_info['group_id'] == 0) {
        echo "<script>window.parent.location.href='index.php?do=login';</script>";
        die;
    }
}
$grouplist_arr = keke_admin_class::get_user_group();
$arrpriv = $grouplist_arr[$admin_info['group_id']]['group_roles'];
keke_lang_class::package_init("admin");
keke_lang_class::loadlang("admin_{$do}");
$kekezu->init_lang();
$view and keke_lang_class::loadlang("admin_{$do}_{$view}");
$op and keke_lang_class::loadlang("admin_{$do}_{$view}_{$op}");
keke_lang_class::loadlang("admin_screen_lock");
$language = $kekezu->_lang;
$menu_arr = array('config' => $_lang['global_config'], 'article' => $_lang['article_manage'], 'task' => $_lang['task_manage'], 'shop' => $_lang['shop_manage'], 'finance' => $_lang['finance_manage'], 'user' => $_lang['user_manage'], 'tool' => $_lang['system_tool'], 'app' => $_lang['app_center']);
$admin_obj = new keke_admin_class();
require ADMIN_ROOT . 'admin_' . $do . '.php';
Esempio n. 18
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(33);
$space_obj = new Keke_witkey_space_class();
$member_group_arr = db_factory::query(sprintf("select group_id,groupname from %switkey_member_group", TABLEPRE), 1, 3600);
$edituid = intval($edituid);
$edituid and $spaceinfo = kekezu::get_user_info(intval($edituid));
if ($is_submit) {
    if (intval($fds['uid']) === 1) {
        kekezu::admin_show_msg('当前用户ID为管理员,禁止设置,请重新输入', "index.php?do={$do}&view=custom_list", 2, '', 'warning');
        die;
    }
    $space_obj = keke_table_class::get_instance("witkey_space");
    $space_obj->save($fds, array('uid' => $fds['uid']));
    kekezu::admin_system_log($_lang['set_user'] . " {$spaceinfo['username']}" . $_lang['of_group']);
    $v_arr = array($_lang['admin_name'] => $admin_info['username']);
    keke_msg_class::notify_user($spaceinfo['uid'], $spaceinfo['username'], 'group_set', $_lang['user_group_set'], $v_arr, 2);
    kekezu::admin_show_msg($_lang['rights_set_success'], "index.php?do={$do}&view=custom_list", 2, '', 'success');
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_custom_add');
Esempio n. 19
0
                    kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
                }
            }
            kekezu::show_msg('', "index.php?do=retrieve&strStep=step2&account={$account}", NULL, NULL, 'ok');
        }
        break;
    case "step2":
        if (kekezu::submitcheck($formhash)) {
            $strAccount = strval($account);
            $arrUserInfo = kekezu::get_user_info($strAccount, true);
            $arrPassInfo = reset_set_password($arrUserInfo);
            $arrNotifyArr = array('用户名' => $arrUserInfo['username'], '网站名称' => $kekezu->_sys_config['website_name'], '密码' => $arrPassInfo['code'], '安全码' => $arrPassInfo['sec_code']);
            keke_shop_class::notify_user($arrUserInfo['uid'], $arrUserInfo['username'], 'get_password', '找回密码', $arrNotifyArr, 2);
            kekezu::show_msg('您的新密码已发送到邮箱,请注意查收', $strUrl, NULL, NULL, 'ok');
        } else {
            $arrUserInfo = kekezu::get_user_info($account, true);
            $arrEmailAuths = db_factory::query(sprintf("select * from %switkey_auth_email where uid=%d and auth_status=1", TABLEPRE, $arrUserInfo['uid']));
            $arrEmailAuths and $strEmailInfo = $arrEmailAuths['0']['email'];
            $strEmail = explode('@', $strEmailInfo);
            $intLeng = strlen($strEmail[0]);
            $i = intval($intLeng / 2);
            $strRe = '*';
            $strRe = str_pad($strRe, $intLeng - $i, '*', STR_PAD_LEFT);
            $strEmail = substr_replace($strEmailInfo, $strRe, $i, $intLeng - $i);
            $strKfPhone = kekezu::get_rand_kf();
        }
        break;
}
function reset_set_password($user_info)
{
    $code = kekezu::randomkeys(6);
Esempio n. 20
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$report_info = keke_report_class::get_report_info($report_id);
$report_info or kekezu::admin_show_msg($_lang['parameters_error_not_exist'] . $action_arr[$type][1] . $_lang['record'], "index.php?do=trans&view={$type}", 3, '', 'warning');
$user_info = kekezu::get_user_info($report_info['uid']);
$to_userinfo = kekezu::get_user_info($report_info['to_uid']);
$obj_info = keke_report_class::obj_info_init($report_info, $user_info);
$ac == 'download' and keke_file_class::file_down($filename, $filepath);
$url = "index.php?do={$do}&view={$type}";
if ($type == 'complaint') {
    if ($sbt_op) {
        $op_result[action] == 'pass' and $report_status = 4 or $report_status = 3;
        $url .= "&report_status={$report_status}";
        $res = keke_report_class::sub_process_ts($report_info, $user_info, $to_userinfo, $op_result);
        $res and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", $_lang['process_success'], 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", $_lang['operate_over'], 'warning');
    } else {
        $report_info = keke_report_class::get_report_info($report_id);
    }
    require keke_tpl_class::template(ADMIN_DIRECTORY . '/tpl/admin_trans_process');
} else {
    if (empty($obj_info) || empty($obj_info['model_id'])) {
        kekezu::admin_show_msg($_lang['friendly_notice'], $url, 3, $_lang['deal_object_del'], 'warning');
    }
    $report_info = keke_report_class::get_report_info($report_id);
    $model_info = $kekezu->_model_list[$obj_info['model_id']];
    $path = S_ROOT . $model_info['model_type'] . "/" . $model_info['model_dir'] . "/admin/admin_route.php";
    require $path;
}
Esempio n. 21
0
 public function user_role($return_type)
 {
     $userinfo_arr = array();
     $obj_info = $this->_obj_info;
     $report_info = $this->_report_info;
     if ($this->_report_info['user_type'] == '1') {
         if ($obj_info['origin_uid'] != $report_info['to_uid']) {
             $userinfo_arr['wk'] = $this->_user_info;
             $userinfo_arr['gz'] = kekezu::get_user_info($obj_info['origin_uid']);
             $userinfo_arr['third'] = $this->_to_user_info;
         } else {
             $userinfo_arr['wk'] = $this->_user_info;
             $userinfo_arr['gz'] = $this->_to_user_info;
         }
     } else {
         $userinfo_arr['gz'] = $this->_user_info;
         $userinfo_arr['wk'] = $this->_to_user_info;
     }
     if ($return_type == 'gz') {
         return $userinfo_arr['gz'];
     } elseif ($return_type == 'wk') {
         return $userinfo_arr['wk'];
     } else {
         return $userinfo_arr['third'];
     }
 }
Esempio n. 22
0
 public function sendmail()
 {
     global $_K;
     if (!$this->_email || !$this->_username) {
         $userinfo = kekezu::get_user_info($this->_uid);
         $this->_username = $userinfo['username'];
         $this->_email = $userinfo['email'];
     }
     if (!$this->_email) {
         return false;
     }
     $this->_basicconfig and $basicconfig = $this->_basicconfig or $basicconfig = kekezu::get_config('basic');
     if ($basicconfig['mail_server_cat'] == 'mail') {
         if ($basicconfig['post_account'] && $basicconfig['mail_replay'] && $this->_email && $this->_title && $this->_normal_content) {
             $hearer = "From:{$basicconfig['post_account']}\nReply-To:{$basicconfig['mail_replay']}\nX-Mailer: PHP/" . phpversion() . "\nContent-Type:text/html";
             mail($this->_email, $this->_title, htmlspecialchars_decode($this->_normal_content), $hearer);
         }
     } else {
         if ($basicconfig['smtp_url'] && $basicconfig['mail_server_port'] && $basicconfig['post_account'] && $basicconfig['account_pwd'] && $basicconfig['website_name']) {
             kekezu::send_mail($this->_email, $this->_title, htmlspecialchars_decode($this->_normal_content));
         }
     }
 }
Esempio n. 23
0
<?php

if (isset($formhash) && kekezu::submitcheck($formhash)) {
    $objMsgM = new Keke_witkey_msg_class();
    if (strtoupper(CHARSET) == 'GBK') {
        $to_username = kekezu::utftogbk($to_username);
    }
    $arrSpaceInfo = kekezu::get_user_info($to_username, 1);
    if (!$arrSpaceInfo) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if ($arrSpaceInfo['uid'] == $gUid) {
        $tips['errors']['to_username'] = '******';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (strtoupper(CHARSET) == 'GBK') {
        $title = kekezu::utftogbk($title);
        $content = kekezu::utftogbk($content);
    }
    $objMsgM->setUid($gUid);
    $objMsgM->setUsername($username);
    $objMsgM->setTo_uid($arrSpaceInfo['uid']);
    $objMsgM->setTo_username($arrSpaceInfo['username']);
    $objMsgM->setTitle(kekezu::str_filter(kekezu::escape($title)));
    $objMsgM->setContent(kekezu::str_filter(kekezu::escape($content)));
    $objMsgM->setOn_time(time());
    $objMsgM->setType(3);
    $objMsgM->create_keke_witkey_msg();
    unset($objMsgM);
    kekezu::show_msg('已发送', NULL, NULL, NULL, 'ok');
Esempio n. 24
0
$arrProcessCan = $objAgreement->process_can();
$intUserType = $objAgreement->_user_role;
$step = $objAgreement->stage_access_check($intUserType);
$stage_nav = $objAgreement->agreement_stage_nav();
$strUrl = 'index.php?do=' . $do . '&agreeId=' . $agreeId . '&step=' . $step;
$reportUrl = 'index.php?do=taskhandle&op=report&taskId=' . $arrAgreeInfo['task_id'];
if ($gUid == $arrAgreeInfo['buyer_uid']) {
    $reportUrl .= '&objId=' . $arrAgreeInfo['work_id'] . '&objType=work&type=1&toUid=' . $arrAgreeInfo['seller_uid'] . '&toUsername='******'&objId=' . $arrAgreeInfo['task_id'] . '&objType=task&type=1&toUid=' . $arrAgreeInfo['buyer_uid'] . '&toUsername='******'seller_uid']);
$arrWitkeyInfo['comefrom'] = keke_shop_class::getUserAddress($arrAgreeInfo['seller_uid'], 1, 1, 1, 0);
$arrWitkeyLevel = unserialize($arrWitkeyInfo['seller_level']);
$nearlyIncome = CommonClass::getNearlyIncomeForDays($arrWitkeyInfo['uid']);
$arrEmploymerInfo = kekezu::get_user_info($arrAgreeInfo['buyer_uid']);
$arrEmploymerInfo['comefrom'] = keke_shop_class::getUserAddress($arrAgreeInfo['buyer_uid'], 1, 1, 1, 0);
$arrEmploymerLevel = unserialize($arrEmploymerInfo['buyer_level']);
$arrTaskInfo = db_factory::get_one(sprintf("select * from %switkey_task where task_id = '%d'", TABLEPRE, $arrAgreeInfo['task_id']));
$taskStatus = $arrTaskInfo['task_status'];
$config = unserialize($model_list[1]['config']);
$jf_end_time = date('Y-m-d', $config['agree_complete_time'] * 24 * 3600 + $arrAgreeInfo['on_time']);
$check_right_arr = db_factory::get_one(sprintf("select report_id,username,report_type from %switkey_report where report_status in(1,2) and origin_id ='%d'", TABLEPRE, $arrAgreeInfo['task_id']));
if ($taskStatus == 11 || $taskStatus == 13 || $taskStatus == 9) {
    header("location:index.php?do=task&id=" . $arrAgreeInfo['task_id']);
    die;
}
$arrAgreementProgress = array(1 => array('num' => 1, 'step' => 'step1', 'state' => '同意协议'), 2 => array('num' => 2, 'step' => 'step2', 'state' => '上传源文件'), 3 => array('num' => 3, 'step' => 'step3', 'state' => '确认源文件'), 4 => array('num' => 4, 'step' => 'step4', 'state' => '双方互评'));
switch ($step) {
    case "step1":
        if ($op === 'sign') {
Esempio n. 25
0
 function set_prom_event_status($p_uid, $username, $event_id, $status)
 {
     global $_lang;
     $prom_info = db_factory::get_one("select * from " . TABLEPRE . "witkey_prom_event where event_id = " . intval($event_id));
     if ($prom_info) {
         $P_info = kekezu::get_user_info($p_uid);
         $arr[$_lang['txyhm']] = $username;
         $arr[$_lang['tx_sj']] = $prom_info['event_desc'];
         $arr[$_lang['tx_je']] = $prom_info['rake_cash'];
         $res = db_factory::updatetable(TABLEPRE . 'witkey_prom_event', array('event_status' => intval($status)), array('event_id' => intval($event_id)));
         if ($res) {
             if ($status == 2) {
                 $title = $_lang['prom_msg_notice'];
                 $content = $_lang['you_prom_offline'] . $username . $_lang['complete_event_get_money_notice'];
             }
             $title && $content and keke_msg_class::notify_user($p_uid, $P_info['username'], 'prom_succes', $_lang['prom_success'], $arr, 2);
         }
     }
 }
Esempio n. 26
0
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
$title = '任务地图设置';
$task_info = db_factory::get_one(sprintf("select * from %switkey_task where task_id=%d", TABLEPRE, $task_id));
$owner_info = kekezu::get_user_info($task_info['uid']);
$owner_info['residency'] && ($local = explode(',', $owner_info['residency']));
if ($_K['map_api'] == 'baidu') {
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_map_baidu');
} else {
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_map_google');
}
<?php

defined('ADMIN_KEKE') or exit('Access Denied');
kekezu::admin_check_role(82);
$suggest_obj = new keke_table_class('witkey_proposal');
$proposal_obj = new Keke_witkey_proposal_class();
$suggest_type_arr = array('1' => '我的建议', '2' => '我的问题');
$suggest_status_arr = array('1' => '待回复', '2' => '已回复');
$url = "index.php?do={$do}&view={$view}&suggest_id={$suggest_id}";
if ($suggest_id) {
    $suggest_info = db_factory::get_one(sprintf("select * from %switkey_proposal where p_id = '%d'", TABLEPRE, $suggest_id));
    $user_info = kekezu::get_user_info($suggest_info['uid']);
    if ($sbt_op) {
        $proposal_obj->setWhere('p_id = ' . $suggestid);
        $proposal_obj->setOp_content(kekezu::escape($op_result['process_result']));
        $proposal_obj->setOp_time(time());
        $proposal_obj->setPro_status(2);
        $proposal_obj->setOp_uid($_SESSION['uid']);
        $proposal_obj->setOp_username($_SESSION['username']);
        $res_id = $proposal_obj->edit_keke_witkey_proposal();
        $v_arr = array('用户名' => $suggest_username, '用户标题' => $suggest_title, '建议内容' => kekezu::escape($pro_desc), '回复内容' => kekezu::escape($op_result['process_result']), $_lang['website_name'] => $kekezu->_sys_config['website_name']);
        keke_shop_class::notify_user($suggest_uid, $suggest_username, 'suggest_reply', '建议答复', $v_arr, 2);
        $res_id and kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复成功', 'success') or kekezu::admin_show_msg($_lang['operate_notice'], $url, "2", '回复失败', 'warning');
    }
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_user_suggest_reply');
Esempio n. 28
0
 public function notify_user($action, $title, $v_arr = array(), $notify_type = 2, $uid = null, $msg_type = 1)
 {
     switch ($notify_type) {
         case 1:
             !$uid and $user_info = $this->_userinfo or $user_info = kekezu::get_user_info($uid);
             break;
         case 2:
             $user_info = $this->_g_userinfo;
             break;
     }
     $this->_msg_obj->send_message($user_info['uid'], $user_info['username'], $action, $title, $v_arr, $user_info['email'], $user_info['mobile'], $msg_type);
 }
Esempio n. 29
0
$ord['0'] and $wh .= " order by {$ord['0']} {$ord['1']}" or $wh .= " order by comment_id desc";
$url_str = "index.php?do=task&view=custom&w[comment_id]={$w['comment_id']}&w[username]={$w['username']}&ord[0]={$ord['0']}&ord[1]={$ord['1']}";
$page = $page ? intval($page) : 1;
$page_size = $slt_page_size ? intval($slt_page_size) : 10;
$table_info = $table_obj->get_grid($wh, $url_str, $page, $page_size, null, 1, 'ajax_dom');
$comment_arr = $table_info['data'];
$pages = $table_info['pages'];
if ($ac == 'del') {
    $res = $table_obj->del('comment_id', $comment_id, $url_str);
    $res and kekezu::admin_show_msg($_lang['delete_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['delete_faile'], "index.php?do={$do}&view={$view}", 3, '', 'warning');
}
if ($sbt_action) {
    $res = $table_obj->del('comment_id', $ckb, $url_str);
    $res and kekezu::admin_show_msg($_lang['mulit_operate_success'], "index.php?do={$do}&view={$view}", 3, '', 'success') or kekezu::admin_show_msg($_lang['mulit_operate_fail'], "index.php?do={$do}&view={$view}", 3, '', 'warning');
}
if ($by) {
    $t_userinfo = kekezu::get_user_info($to_uid);
    $to_username = $t_userinfo['username'];
    if (CHARSET == 'gbk') {
        $fds = kekezu::utftogbk($fds);
    }
    if ($ac) {
        kekezu::notify_user($fds['msg_title'], $fds['msg_content'], $to_uid, $to_username);
        $str = $_lang['reply_success'];
        echo $str;
        die;
    }
    require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view . '_reply');
    exit;
}
require $template_obj->template(ADMIN_DIRECTORY . '/tpl/admin_task_' . $view);
Esempio n. 30
0
 public static function getAuthItemListByUid($uid)
 {
     $userinfo = kekezu::get_user_info($uid);
     if (!$userinfo) {
         return false;
     }
     if ($userinfo['user_type']) {
         $userinfo['user_type'] == '2' and $remove_item = 'realname' or $remove_item = 'enterprise';
     } else {
         $remove_item = '';
     }
     $items = db_factory::get_table_data("*", "witkey_auth_item", " auth_open = '1' AND auth_code NOT IN('{$remove_item}') ", " CASE WHEN listorder >0 THEN 1 ELSE 0 END DESC ", "", "", "auth_code", 3600);
     if (!$items) {
         return false;
     }
     $records = db_factory::get_table_data("*", "witkey_auth_record", " uid = '{$uid}' AND auth_status = '1' AND auth_code NOT IN('{$remove_item}') ", "", "", "", "auth_code", 3600);
     foreach ($items as $authcode => $iteminfo) {
         $auth_record_status = $records[$authcode]['auth_status'] ? 1 : 0;
         $auth_item_status = 0;
         if ($auth_record_status) {
             $tablename = TABLEPRE . 'witkey_auth_' . $authcode;
             $isExists = db_factory::checkTableIsExists($tablename);
             if ($isExists) {
                 $info = db_factory::get_one("SELECT * FROM `{$tablename}` WHERE uid = '{$uid}' AND auth_status = '1'");
                 if ($info) {
                     $auth_item_status = 1;
                 }
             }
         }
         if ($auth_record_status && $auth_item_status) {
             $items[$authcode]['auth_pass'] = 1;
         } else {
             $items[$authcode]['auth_pass'] = 0;
         }
         $items[$authcode]['auth_url'] = "index.php?do=user&view=account&op=auth&code={$authcode}";
     }
     return $items;
 }