You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

77 lines
2.5 KiB

<?php
require_once 'com.php';
//跳转
if(strlen($_GET['referrer'])>0) {
$compare_str = "http://demo.finereport.com/decision/url/login?fine_username=demo&fine_password=123456&validity=-1";
if($compare_str == $_GET['referrer']) {
session_start();
echo $_SESSION['uid'] . "=>" . $_SESSION['username'];
echo "<script>window.location.href='".urldecode($_GET['referrer'])."'</script>";
} else {
define("FINEREPORT", '100');
require_once 'index/synLogin.php';
sleep(0.01);
echo "<script>window.location.href='".urldecode($_GET['referrer'])."'</script>";
}
}
if(!$_G['uid']){
header("location:/login/login.php");
}
$title = '账号中心';
$tpl->assign('cur',1);
$tpl->template_dir = 'account/tpl/';
//获取等级资料
$get_level = CallInterface(API_URL.'/v1/user/index/?uid='.$_G['uid'],'GET');
$arr_level = json_decode($get_level,true);
$position = [1=>'其它',2=>'业务人员',3=>'技术人员',4=>'CIO或CTO等高层人员',6=>'学生',7=>'老师'];
//实名认证状态
$realnameauth = CallInterface(API_URL.'/v1/account/realnameauth/getauth/?uid='.$_G['uid'],'GET');
$realnameauth = json_decode($realnameauth,true);
$tpl->assign('realnameauth',$realnameauth);
//学生认证状态
$studentauth = CallInterface(API_URL.'/v1/account/studentauth/getauth/?uid='.$_G['uid'],'GET');
$studentauth = json_decode($studentauth,true);
$tpl->assign('studentauth',$studentauth);
//组织认证状态
$orgauth = CallInterface(API_URL.'/v1/account/organizationauth/getauth/?uid='.$_G['uid'],'GET');
$orgauth = json_decode($orgauth,true);
$tpl->assign('orgauth',$orgauth);
//成员认证状态
$mem_header = ['authentication:'.base64_encode($ckuserinfo['appid'].'.'.$ckuser['access_token'].'.'.$ckuserinfo['uid'])];
$memberauth = CallInterface(API_URL.'/v1/account/membermanage/ismember/','GET', '',$mem_header);
$memberauth = json_decode($memberauth,true);
$tpl->assign('memberauth',$memberauth);
//下拉选中
$myposition = $_G['position'] ? $_G['position']:0;
//同步登录
if($_COOKIE["fr_id_onelogin"]){
setcookie('fr_id_onelogin','',0,'/');
echo id_synlogin();
}
//是否通过组织认证
$zuzhi_api = CallInterface(API_URL.'/v1/account/organizationauth/getauth/?uid='.$_G['uid'],'GET');
$zuzhi_arr = json_decode($zuzhi_api,true);
if($zuzhi_arr['message']=='success'){
$is_zuzhi=1;
}else{
$is_zuzhi=0;
}
$tpl->assign('is_zuzhi',$is_zuzhi);
$tpl->assign('title',$title);
$tpl->assign('user',$arr_level['data']);
$tpl->assign('position',$position);
$tpl->assign('myposition',$myposition);
$tpl->display('user_info.htm');