query("insert into ".$table_pre."bb_log(username,bb,add_date) values ('".$msg_client["username"]."','".$file_name."',now())"); $msg=get_db_msg("select * from ".$table_pre."plugin where file_name='".$file_name."' and cate='".$cate."'"); //定制目录 $path_plugin=dir_cutb(THIS_FILE_ROOT,1)."/plugin"; //包含插件 include $path_plugin."/".$cate."/".$file_name.".php"; $code=($code==0)?$code:99; $json_data.="\"code\":".$code.","; $json_data.="\"error_msg\":\"".$error_msg."\","; $json_data.="\"file_name\":\"".$file_name."\","; $json_data.="\"file_title\":\"".$msg["title"]."\","; $json_data.="\"face\":\"".$msg_client["face"]."\","; $json_data.="\"cate\":\"".$cate."\","; $json_data.="\"uid\":\"".$uid."\","; $json_data.="\"use_layui\":\"".$use_layui_datatable."\","; if($select_client_type){ //取得可筛选店铺 $face=$msg_client["face"]; $op=""; if($face=="4"){ //店铺,不用筛选 $s_username=$msg_client["username"]; }else if($face=="3"){ //代理 $this_upath=$msg_client["path"]."-".$msg_client["path"]; $q="select username,title from ".$table_pre."client where (face='4' or face='3' or face='9') and (path='".$this_upath."' or path like '".$this_upath."-%') order by username"; $r=$db->query($q); while($m=$db->fetch_array($r)){ $op.="{\"no\":\"".$m["username"]."\",\"title\":\"".$m["title"]."\"},"; } }else if($face=="2"){ //区经 $arr_upath=explode(",",$msg_client["charge_path"]); for($i=0;$i0){ if($m1["face"]=="4" || ($m1["face"]=="3" && check_qj_priv_all($m1["id"])=="y") || ($m1["face"]=="9" && check_qj_priv_all($m1["id"])=="y")){ $op.="{\"id\":\"".$m1["id"]."\",\"no\":\"".$m1["username"]."\",\"title\":\"".$m1["title"]."\"},"; } } } }else if($face=="1"){ //总经理 $q="select username,title,concat(path,'-',id) 'abspath' from ".$table_pre."client where (face='4' or face='3' or face='9') order by abspath"; $r=$db->query($q); while($m=$db->fetch_array($r)){ $op.="{\"no\":\"".$m["username"]."\",\"title\":\"".$m["title"]."\"},"; } } if($op) $select.="{\"name\":\"s_username\",\"title\":\"店铺\",\"value\":\"".$s_username."\",\"op\":[".deel_end($op)."]},"; } $json_data.="\"select\":[".deel_end($select)."],"; $json_data.="\"s_username\":\"".$s_username."\","; $json_data=substr($json_data,0,-1)."}"; echo $json_data; ?>