Ejemplo n.º 1
0
 function getOperatorFromVadmin($OperatorName, $Detail = "")
 {
     Base_Common::getLocalIP();
     $array = array('CurrentIp' => $IP, 'OpLoginId' => $OperatorName);
     $Data = json_encode($array);
     $key = "987654321!@#\$%";
     $txt = "6" . $Data . $key;
     $sign = md5(strtoupper($txt));
     $Data = urlencode(base64_encode($Data));
     $url = "http://tradeservice.5173esb.com/CommService/CommonRequest.ashx?OperationType=6&Data={$Data}&Sign={$sign}";
     $return = file_get_contents($url);
     $return_arr = json_decode(base64_decode($return), true);
     if (is_array($return_arr)) {
         $OperatorInfo = json_decode($return_arr['JsonData'], true);
         if ($OperatorInfo['OpLoginId'] != "") {
             $Operator = array('photo' => $OperatorInfo['OpAvatar'], 'QQ' => $OperatorInfo['OPQQ'], 'mobile' => $OperatorInfo['OPMObile'], 'tel' => $OperatorInfo['OPTel'], 'weixin' => $OperatorInfo['OPWeiXin'], 'name' => $OperatorInfo['OPName'], 'cno' => $OperatorInfo['OpRealName'], 'login_name' => $OperatorInfo['OpLoginId'], 'weixinPicUrl' => $OperatorInfo['OPWeiXinPicUrl'], 'weixinPicUrl_officer' => $OperatorInfo['OPWeiXinPicUrl2'], 'xnGroupId' => $OperatorInfo['OPSmallCanUID'], 'xnGroupId_officer' => $OperatorInfo['OPSmallCanUID2'], 'photo_officer' => $OperatorInfo['OpAvatar2'], 'qq_url' => $OperatorInfo['OPQQIdKey'] == "" ? "" : 'http://sighttp.qq.com/authd?IDKEY=' . $OperatorInfo['OPQQIdKey'], 'qq_url_officer' => $OperatorInfo['OPQQIdKey2'] == "" ? "" : 'http://sighttp.qq.com/authd?IDKEY=' . $OperatorInfo['OPQQIdKey2'], 'QQ_officer' => $OperatorInfo['OPQQ2'], 'mobile_officer' => $OperatorInfo['OPMObile2'], 'tel_officer' => $OperatorInfo['OPTel2'], 'weixin_officer' => $OperatorInfo['OPWeiXin2'], 'name_officer' => $OperatorInfo['OPName2'], 'cno_officer' => $OperatorInfo['OpRealName2'], 'login_name_officer' => $OperatorInfo['OpLoginId2'], 'qq_link_type' => $OperatorInfo['IsNewPopQQ'] == 0 ? 'js' : 'http');
             //去除所需列表之外的数据
             $t = explode(",", $Detail);
             if (count($t) > 1) {
                 foreach ($Operator as $key => $value) {
                     if (!in_array($key, $t)) {
                         unset($Operator[$key]);
                     }
                 }
             }
             return $Operator;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }