This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/ipad/module/main.php
T
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

495 lines
22 KiB
PHP

<?php
//-------------------------------主页面
header("Content-type: text/html; charset=utf-8");
$json_data="{";
if(THIS_IN!="edt_ipad")
exit("错误的访问!");
$msg_client=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
//
$face=$msg_client["face"];
$json_data.="\"face\":\"".$face."\",";
//代理商和店铺角色显示订货须知
$show_dhxz="n";
if($msg_client["flag_dhxz"]!="1" && $msg_client["id"]>0 && ($msg_client["face"]=="4" || $msg_client["face"]=="3")){
$show_dhxz="y";
}
$json_data.="\"show_dhxz\":\"".$show_dhxz."\",";
//license信息
$json_data.="\"lic_title\":\"慕创科技\",";
//订货会抬头
$json_data.="\"dhh_title\":\"".get_set("sys_client_title")."\",";
//账号信息
$json_data.="\"user_title\":\"".$msg_client["title"]."\",\"user_name\":\"".$msg_client["username"]."\",";
//多品牌
$is_brand=is_brand();
$show_jd=get_set("show_jd");
$zb_client_show=get_set("zb_client_show");
$ph_ms=get_set("ph_ms");
$is_spk=get_set("is_spk");
$is_msg=get_set("is_msg");
$show_zzdy=get_set("show_zzdy");
$json_data.="\"zb_client_show\":\"".$zb_client_show."\",";
$json_data.="\"is_brand\":\"".$is_brand."\",";
$json_data.="\"show_jd\":\"".$show_jd."\",";
$json_data.="\"show_ismsg\":\"".$is_msg."\",";
$json_data.="\"appzbconfig\":\"".$Appzbconfig."\",";
$con_spk=($is_spk=="y")?" and is_sp<>'y'":"";
//
$menu_arr_sys=array("1"=>"dk.htm","2"=>"dp.htm","3"=>"cl.htm","4"=>"cc.htm","5"=>"ts.htm","6"=>"ty.htm","7"=>"spdh.htm","8"=>"zbuser.htm","9"=>"zdb.htm","10"=>"scene3d.htm");
switch($face){
case "1":
//-------------------------------------------------------------------------总经理角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
//菜单
$json_data.="\"menu\":[";
//固定菜单
if($ph_ms){
$json_data.="{\"menu_sub\":[{\"title\":\"订货概览\",\"icon\":\"menu_icon_bb\",\"link\":\"daping.htm\"},{\"title\":\"客户分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=client\"},{\"title\":\"款式分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=ks\"},{\"title\":\"全国排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph.htm\"}]},";
}else{
$json_data.="{\"menu_sub\":[{\"title\":\"订货概览\",\"icon\":\"menu_icon_bb\",\"link\":\"daping.htm\"},{\"title\":\"客户分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=client\"},{\"title\":\"款式分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=ks\"},{\"title\":\"全国排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph.htm\"}]},";
}
//订货行为报表类菜单
$json_data.="{\"menu_sub\":[{\"title\":\"客户行为分析\",\"icon\":\"menu_icon_bb\",\"link\":\"xw.htm?cate=client\"},{\"title\":\"款式行为分析\",\"icon\":\"menu_icon_bb\",\"link\":\"xw.htm?cate=kh\"},{\"title\":\"订货模式分析\",\"icon\":\"menu_icon_bb\",\"link\":\"xw.htm?cate=ms\"}]},";
//定制报表类菜单
$ts_bb_arr=array("size"=>"尺码","color"=>"颜色","ks_size"=>"款色深度");
$menu_gd_bb="";
for($i=0;$i<count($sys_bb_cate);$i++){
$bb_arr=explode("&",$sys_bb_cate[$i]);
if(count($bb_arr)==1){
if($bb_arr[0]=="size" || $bb_arr[0]=="color" || $bb_arr[0]=="ks_size"){
$bbtitle=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle=get_cate_title_no("arr_select",$bb_arr[0]);
}
$bb_cate=$bb_arr[0];
}else{
if($bb_arr[0]=="color"){
$bbtitle2=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle2=get_cate_title_no("arr_select",$bb_arr[0]);
}
if($bb_arr[1]=="size" || $bb_arr[1]=="ks_size" || $bb_arr[1]=="color"){
$bbtitle3=$ts_bb_arr[$bb_arr[1]];
}else{
$bbtitle3=get_cate_title_no("arr_select",$bb_arr[1]);
}
$bbtitle=$bbtitle2."-".$bbtitle3;
$bb_cate=$bb_arr[0]."%26".$bb_arr[1];
}
$menu_gd_bb.="{\"title\":\"".$bbtitle."分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=".$bb_cate."\"},";
}
$sql="select * from ".$table_pre."plugin where available='y' and cate='client_bb' and (face='".$face."' or face='')";
$res=$db->query($sql);
while($msg=$db->fetch_array($res)){
$id=$msg["id"];
$icon=get_plugin_set("icon","menu_icon_bb");
$menu_gd_bb.="{\"title\":\"".$msg["title"]."\",\"icon\":\"".$icon."\",\"link\":\"plugin.htm?id=".$msg["id"]."&file_name=".$msg["file_name"]."&cate=".$msg["cate"]."\"},";
}
$json_data.="{\"menu_sub\":[".deel_end($menu_gd_bb)."]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"daping.htm\",";
break;
case "2":
//-------------------------------------------------------------------------区经角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
//菜单
$json_data.="\"menu\":[";
//订货模式
//计算订货模式
$home="";
//区经允许订货
if($msg_client["qyjl_order"]=="y" || $msg_client["qyjl_order"]=="b"){
if($tmpl_is_multi_ms=="y"){
$tmp=get_db_msg("select * from ".$table_pre."set where _k='sys_ms'");
$arr_tmp=explode(",",$tmp["_t1"]);
for($i=0;$i<count($arr_tmp);$i++){
$arr_tmp1=explode("|",$arr_tmp[$i]);
$arr_ms_title[$arr_tmp1[0]]=$arr_tmp1[1];
}
$sys_ms=$tmp["_v"]?$tmp["_v"]:1;
$arr_ms=explode(",",$sys_ms);
}else{
$arr_ms=array("1");
$arr_ms_title["1"]="单款";
}
$js_str_ms="";
for($i=0;$i<count($arr_ms);$i++){
if($i==0){
$home=$menu_arr_sys[$arr_ms[$i]];
}
if($arr_ms[$i]!=6 && $arr_ms[$i]!=4){
$js_str_ms.="{\"title\":\"".get_main_value($arr_ms_title,$arr_ms[$i])."\",\"icon\":\"menu_icon_ms_".$arr_ms[$i]."\",\"link\":\"".$menu_arr_sys[$arr_ms[$i]]."\"},";
}
}
$json_data.="{\"menu_sub\":[".deel_end($js_str_ms)."]},";
}
//固定菜单
$json_data.="{\"menu_sub\":[{\"title\":\"我的客户\",\"icon\":\"menu_icon_my_client\",\"link\":\"my_client.htm\"}]},";
if($ph_ms){
$json_data.="{\"menu_sub\":[{\"title\":\"订单明细\",\"icon\":\"menu_icon_detail\",\"link\":\"detail.htm\"},{\"title\":\"我的排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph_my_dl.htm\"},{\"title\":\"全国排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph.htm\"}]},";
}else{
$json_data.="{\"menu_sub\":[{\"title\":\"订单明细\",\"icon\":\"menu_icon_detail\",\"link\":\"detail.htm\"},{\"title\":\"我的排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph_my_dl.htm\"}]},";
}
//报表类菜单,含定制
$ts_bb_arr=array("size"=>"尺码","color"=>"颜色","ks_size"=>"款色深度");
$menu_gd_bb="";
for($i=0;$i<count($sys_bb_cate);$i++){
$bb_arr=explode("&",$sys_bb_cate[$i]);
if(count($bb_arr)==1){
if($bb_arr[0]=="size" || $bb_arr[0]=="color" || $bb_arr[0]=="ks_size"){
$bbtitle=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle=get_cate_title_no("arr_select",$bb_arr[0]);
}
$bb_cate=$bb_arr[0];
}else{
if($bb_arr[0]=="color"){
$bbtitle2=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle2=get_cate_title_no("arr_select",$bb_arr[0]);
}
if($bb_arr[1]=="size" || $bb_arr[1]=="ks_size" || $bb_arr[1]=="color"){
$bbtitle3=$ts_bb_arr[$bb_arr[1]];
}else{
$bbtitle3=get_cate_title_no("arr_select",$bb_arr[1]);
}
$bbtitle=$bbtitle2."-".$bbtitle3;
$bb_cate=$bb_arr[0]."%26".$bb_arr[1];
}
$menu_gd_bb.="{\"title\":\"".$bbtitle."分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=".$bb_cate."\"},";
}
$sql="select * from ".$table_pre."plugin where available='y' and cate='client_bb' and (face='".$face."' or face='')";
$res=$db->query($sql);
while($msg=$db->fetch_array($res)){
$id=$msg["id"];
$icon=get_plugin_set("icon","menu_icon_bb");
$menu_gd_bb.="{\"title\":\"".$msg["title"]."\",\"icon\":\"".$icon."\",\"link\":\"plugin.htm?id=".$msg["id"]."&file_name=".$msg["file_name"]."&cate=".$msg["cate"]."\"},";
}
$json_data.="{\"menu_sub\":[".deel_end($menu_gd_bb)."]}";
$json_data.="],";
//首次进入页面
$home=$home?$home:"my_client.htm";
$json_data.="\"home\":\"".$home."\",";
break;
case "3":
//-------------------------------------------------------------------------代理商角色
set_order_total($msg_client["id"]);
$msg_client=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
//订货信息
$json_data.="\"order_num\":\"".deel_num($msg_client["order_num"])."\",\"order_je\":\"".deel_num($msg_client["order_money"])."\",\"order_jsje\":\"".deel_num($msg_client["order_money_zk"])."\",";
//指标信息
if($is_brand=="y"){
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$msg_client["id"]."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}else{
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client where id='".$msg_client["id"]."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}
//完成率
$zb_je_wcl=deel_bfb1($msg_client["order_money_zk"],$zb*10000,1);
$zb_js_wcl=deel_bfb1($msg_client["order_num"],$zb_js,1);
$json_data.="\"zb_je\":\"".deel_num(keep_float($zb,2))."\",\"wcl_je\":\"".$zb_je_wcl."\",\"zb_js\":\"".deel_num($zb_js)."\",\"wcl_js\":\"".$zb_js_wcl."\",";
//交单信息
$json_data.="\"is_jd\":\"".$msg_client["is_jd"]."\",";
//订单确认信息
$json_data.="\"is_qr\":\"".$msg_client["is_checked"]."\",";
//菜单
$json_data.="\"menu\":[";
//固定菜单
$menu_gd_ms="";
//if($show_dhxz=="y"){
for($i=0;$i<count($sys_menu_other);$i++){
$dhxz_arr=$sys_menu_other[$i];
$menu_gd_ms.=",{\"title\":\"".$dhxz_arr[0]."\",\"icon\":\"".$dhxz_arr[2]."\",\"link\":\"dhxz.htm?_a=".$dhxz_arr[2]."\"}";
}
//}
$str_dxx="";
if($is_msg=="y"){
$str_dxx=",{\"title\":\"短消息\",\"icon\":\"menu_icon_dhxz\",\"link\":\"msg.htm\"}";
}
$json_data.="{\"menu_sub\":[{\"title\":\"我的客户\",\"icon\":\"menu_icon_my_client\",\"link\":\"my_client.htm\"}".$str_dxx.$menu_gd_ms."]},";
$str_menu_brand="";
if($is_brand=="y"){
$str_menu_brand="{\"title\":\"完成率\",\"icon\":\"menu_icon_wcl\",\"link\":\"ppwcl.htm\"},";
}
if($ph_ms){
$json_data.="{\"menu_sub\":[".$str_menu_brand."{\"title\":\"订单明细\",\"icon\":\"menu_icon_detail\",\"link\":\"detail.htm\"},{\"title\":\"我的排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph_my_dl.htm\"},{\"title\":\"全国排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph.htm\"}]},";
}else{
$json_data.="{\"menu_sub\":[".$str_menu_brand."{\"title\":\"订单明细\",\"icon\":\"menu_icon_detail\",\"link\":\"detail.htm\"},{\"title\":\"我的排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph_my_dl.htm\"}]},";
}
//报表类菜单,含定制
$ts_bb_arr=array("size"=>"尺码","color"=>"颜色","ks_size"=>"款色深度");
$menu_gd_bb="";
for($i=0;$i<count($sys_bb_cate);$i++){
$bb_arr=explode("&",$sys_bb_cate[$i]);
if(count($bb_arr)==1){
if($bb_arr[0]=="size" || $bb_arr[0]=="color" || $bb_arr[0]=="ks_size"){
$bbtitle=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle=get_cate_title_no("arr_select",$bb_arr[0]);
}
$bb_cate=$bb_arr[0];
}else{
if($bb_arr[0]=="color"){
$bbtitle2=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle2=get_cate_title_no("arr_select",$bb_arr[0]);
}
if($bb_arr[1]=="size" || $bb_arr[1]=="ks_size" || $bb_arr[1]=="color"){
$bbtitle3=$ts_bb_arr[$bb_arr[1]];
}else{
$bbtitle3=get_cate_title_no("arr_select",$bb_arr[1]);
}
$bbtitle=$bbtitle2."-".$bbtitle3;
$bb_cate=$bb_arr[0]."%26".$bb_arr[1];
}
$menu_gd_bb.="{\"title\":\"".$bbtitle."分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=".$bb_cate."\"},";
}
$sql="select * from ".$table_pre."plugin where available='y' and cate='client_bb' and (face='".$face."' or face='')";
$res=$db->query($sql);
while($msg=$db->fetch_array($res)){
$id=$msg["id"];
$icon=get_plugin_set("icon","menu_icon_bb");
$menu_gd_bb.="{\"title\":\"".$msg["title"]."\",\"icon\":\"".$icon."\",\"link\":\"plugin.htm?id=".$msg["id"]."&file_name=".$msg["file_name"]."&cate=".$msg["cate"]."\"},";
}
$json_data.="{\"menu_sub\":[".deel_end($menu_gd_bb)."]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"my_client.htm\",";
break;
case "4":
//-------------------------------------------------------------------------店铺角色
//-------------计算订货信息
$tmp_o=get_db_msg("select sum(num) 'js',sum(je) 'je',sum(jsje) 'jsje' from ".$table_pre."order where ka<>'y'".$con_spk." and uid='".$msg_client["id"]."' and _key='".$_key."'");
$q="select sum(num) 'js',sum(je) 'je',sum(jsje) 'jsje' from ".$table_pre."order where ka<>'y'".$con_spk." and uid='".$msg_client["id"]."' and _key='".$_key."'";
$json_data.="\"q\":\"".$q."\",";
if($is_brand=="y"){
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$msg_client["id"]."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}else{
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client where id='".$msg_client["id"]."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}
//金额指标
$zb_je=$zb;
$zb_je_wcl=deel_bfb1($tmp_o["jsje"],$zb_je*10000,1);
//件数指标
//$zb_js=$msg_client["zb_js"];
$zb_js_wcl=deel_bfb1($tmp_o["js"],$zb_js,1);
//-------------/计算订货信息
//订货信息
$json_data.="\"order_num\":\"".deel_num($tmp_o["js"])."\",\"order_je\":\"".deel_num(keep_float($tmp_o["je"],0))."\",\"order_jsje\":\"".deel_num(keep_float($tmp_o["jsje"],0))."\",";
//指标信息
$json_data.="\"zb_je\":\"".deel_num(keep_float($zb_je,2))."\",\"wcl_je\":\"".$zb_je_wcl."\",\"zb_js\":\"".deel_num($zb_js)."\",\"wcl_js\":\"".$zb_js_wcl."\",";
//$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"80%\",\"zb_js\":\"0\",\"wcl_js\":\"90%\",";
//交单信息
$json_data.="\"is_jd\":\"".$msg_client["is_jd"]."\",";
//订单确认信息
$json_data.="\"is_qr\":\"".$msg_client["is_checked"]."\",";
//菜单
//计算订货模式
if($tmpl_is_multi_ms=="y"){
$tmp=get_db_msg("select * from ".$table_pre."set where _k='sys_ms'");
$arr_tmp=explode(",",$tmp["_t1"]);
for($i=0;$i<count($arr_tmp);$i++){
$arr_tmp1=explode("|",$arr_tmp[$i]);
$arr_ms_title[$arr_tmp1[0]]=$arr_tmp1[1];
}
$sys_ms=$tmp["_v"]?$tmp["_v"]:1;
$arr_ms=explode(",",$sys_ms);
}else{
$arr_ms=array("1");
$arr_ms_title["1"]="单款";
}
$js_str_ms="";
$home="";
for($i=0;$i<count($arr_ms);$i++){
if($i==0){
$home=$menu_arr_sys[$arr_ms[$i]];
}
$js_str_ms.="{\"title\":\"".get_main_value($arr_ms_title,$arr_ms[$i])."\",\"icon\":\"menu_icon_ms_".$arr_ms[$i]."\",\"link\":\"".$menu_arr_sys[$arr_ms[$i]]."\"},";
}
$home=$home?$home:"dk.htm";
$json_data.="\"menu\":[";
//订货模式
$json_data.="{\"menu_sub\":[".deel_end($js_str_ms)."]},";
//固定菜单
$menu_gd_ms="";
//if($show_dhxz=="y"){
for($i=0;$i<count($sys_menu_other);$i++){
$dhxz_arr=$sys_menu_other[$i];
$menu_gd_ms.=",{\"title\":\"".$dhxz_arr[0]."\",\"icon\":\"".$dhxz_arr[2]."\",\"link\":\"dhxz.htm?_a=".$dhxz_arr[2]."\"}";
}
//}
$str_menu_brand="";
if($is_brand=="y"){
$str_menu_brand.="{\"title\":\"品牌完成率\",\"icon\":\"menu_icon_wcl\",\"link\":\"ppwcl.htm\"},";
}
if($show_zzdy=="y"){
$str_menu_brand.="{\"title\":\"客户二维码\",\"icon\":\"menu_icon_ewm\",\"link\":\"ewm.htm\"},";
}
$tmpgz=get_db_msg("select count(*) num from ".$table_pre."keyword where (cate='dhgz') and no<>'zgdl' and no<>'dhbs' and no<>'qdl' and no<>'glk' and no<>'zxs' and flag_ka='y'");
//
$json_data.="{\"menu_sub\":[".$str_menu_brand."{\"title\":\"订单明细\",\"icon\":\"menu_icon_detail\",\"link\":\"detail.htm\"}";
//$json_data.=",{\"title\":\"智订宝\",\"icon\":\"menu_icon_zdb\",\"link\":\"zdb.htm\"}";
if($ph_ms){
$json_data.=",{\"title\":\"全国排行\",\"icon\":\"menu_icon_ph\",\"link\":\"ph.htm\"}";
}
if($is_msg=="y"){
$json_data.=",{\"title\":\"短消息\",\"icon\":\"menu_icon_dhxz\",\"link\":\"msg.htm\"}";
}
if($tmpgz["num"]){
$json_data.=",{\"title\":\"订货规则\",\"icon\":\"menu_icon_dhgz\",\"link\":\"dhgz.htm\"}";
}
$json_data.="".$menu_gd_ms."]},";
//报表类菜单,含定制
$ts_bb_arr=array("size"=>"尺码","color"=>"颜色","ks_size"=>"款色深度");
$menu_gd_bb="";
for($i=0;$i<count($sys_bb_cate);$i++){
$bb_arr=explode("&",$sys_bb_cate[$i]);
if(count($bb_arr)==1){
if($bb_arr[0]=="size" || $bb_arr[0]=="color" || $bb_arr[0]=="ks_size"){
$bbtitle=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle=get_cate_title_no("arr_select",$bb_arr[0]);
}
$bb_cate=$bb_arr[0];
}else{
if($bb_arr[0]=="color"){
$bbtitle2=$ts_bb_arr[$bb_arr[0]];
}else{
$bbtitle2=get_cate_title_no("arr_select",$bb_arr[0]);
}
if($bb_arr[1]=="size" || $bb_arr[1]=="ks_size" || $bb_arr[1]=="color"){
$bbtitle3=$ts_bb_arr[$bb_arr[1]];
}else{
$bbtitle3=get_cate_title_no("arr_select",$bb_arr[1]);
}
$bbtitle=$bbtitle2."-".$bbtitle3;
$bb_cate=$bb_arr[0]."%26".$bb_arr[1];
}
$menu_gd_bb.="{\"title\":\"".$bbtitle."分析\",\"icon\":\"menu_icon_bb\",\"link\":\"bb.htm?cate=".$bb_cate."\"},";
}
$sql="select * from ".$table_pre."plugin where available='y' and cate='client_bb' and (face='".$face."' or face='')";
$res=$db->query($sql);
while($msg=$db->fetch_array($res)){
$id=$msg["id"];
$icon=get_plugin_set("icon","menu_icon_bb");
$menu_gd_bb.="{\"title\":\"".$msg["title"]."\",\"icon\":\"".$icon."\",\"link\":\"plugin.htm?id=".$msg["id"]."&file_name=".$msg["file_name"]."&cate=".$msg["cate"]."\"},";
}
$json_data.="{\"menu_sub\":[".deel_end($menu_gd_bb)."]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"".$home."\",";
break;
case "5":
//-------------------------------------------------------------------------陈列师角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_3\",\"link\":\"cls.htm\"}]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"cls.htm\",";
break;
case "6":
//-------------------------------------------------------------------------设计师角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_5\",\"link\":\"sjs.htm\"}]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"sjs.htm\",";
break;
case "7":
//-------------------------------------------------------------------------推送主讲角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_5\",\"link\":\"ts_zj.htm\"}]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"ts_zj.htm\",";
break;
case "8":
//-------------------------------------------------------------------------app拍照上传角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_5\",\"link\":\"admin.htm\"}]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"admin.htm\",";
break;
case "10":
//-------------------------------------------------------------------------推演师角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_5\",\"link\":\"tys.htm\"}]},";
$sql="select * from ".$table_pre."plugin where available='y' and cate='client_bb' and (face='".$face."' or face='')";
$res=$db->query($sql);
while($msg=$db->fetch_array($res)){
$id=$msg["id"];
$icon=get_plugin_set("icon","menu_icon_bb");
$menu_gd_bb.="{\"title\":\"".$msg["title"]."\",\"icon\":\"".$icon."\",\"link\":\"plugin.htm?id=".$msg["id"]."&file_name=".$msg["file_name"]."&cate=".$msg["cate"]."\"},";
}
$json_data.="{\"menu_sub\":[".deel_end($menu_gd_bb)."]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"tys.htm\",";
break;
case "11":
//-------------------------------------------------------------------------直播主讲角色
//订货信息
$json_data.="\"order_num\":\"0\",\"order_je\":\"0\",\"order_jsje\":\"0\",";
//指标信息
$json_data.="\"zb_je\":\"0\",\"wcl_je\":\"0%\",\"zb_js\":\"0\",\"wcl_js\":\"0%\",";
$json_data.="\"menu\":[";
$json_data.="{\"menu_sub\":[{\"title\":\"首页\",\"icon\":\"menu_icon_ms_5\",\"link\":\"zb_zj.htm\"},{\"title\":\"在线概览\",\"icon\":\"menu_icon_detail\",\"link\":\"zb_zj_zxmx.htm\"},{\"title\":\"在线明细\",\"icon\":\"menu_icon_my_client\",\"link\":\"zb_zj_client.htm\"}]}";
//$json_data.="{\"menu_sub\":[{\"title\":\"客户列表\",\"icon\":\"menu_icon_my_client\",\"link\":\"zb_zj_client.htm\"}]}";
$json_data.="],";
//首次进入页面
$json_data.="\"home\":\"zb_zj.htm\",";
break;
}
$json_data=substr($json_data,0,-1)."}";
echo $json_data;
?>