7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
48 lines
1.8 KiB
PHP
48 lines
1.8 KiB
PHP
<?php
|
|
//-------------------------------场景订货-界面
|
|
header("Content-type: text/html; charset=utf-8");
|
|
$json_data="{";
|
|
if(THIS_IN!="edt_ipad")
|
|
exit("错误的访问!");
|
|
|
|
$uid=check_cookie_jxs();
|
|
$msg_login=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
|
|
|
|
$json_data.="\"uid\":\"".$uid."\",";
|
|
$json_data.="\"face\":\"".$msg_login["face"]."\",";
|
|
switch($_a){
|
|
case "get_scene":
|
|
//获取默认
|
|
$tmp=get_db_msg("select * from web_scene where sceneDefault='y' limit 0,1");
|
|
$json_data.="\"firstScene\":\"".$tmp["sceneName"]."\",";
|
|
|
|
$str="";
|
|
$sql="select * from web_scene order by sceneName";
|
|
$res=$db->query($sql);
|
|
while($msg=$db->fetch_array($res)){
|
|
|
|
$pic="../attachments/scene/".$msg["scenePic"].".jpg";
|
|
|
|
//
|
|
$hotstr="";
|
|
$sql2="select * from web_scene_hotspots where sid='".$msg["id"]."'";
|
|
$res2=$db->query($sql2);
|
|
while($msg2=$db->fetch_array($res2)){
|
|
if($msg2["hot_type"]=="info"){
|
|
$tmp_kh=get_db_msg("select id from web_kh where no='".$msg2["khno"]."'");
|
|
$khid=$tmp_kh["id"]?$tmp_kh["id"]:"0";
|
|
$hotstr.="{\"id\":\"".$khid."\",\"pitch\":\"".$msg2["hot_pitch"]."\",\"yaw\":\"".$msg2["hot_yaw"]."\",\"type\":\"".$msg2["hot_type"]."\",\"text\":\"".$msg2["khno"]."\",\"sceneId\":\"".$msg2["hot_sceneId"]."\"},";
|
|
}else{
|
|
$hotstr.="{\"pitch\":\"".$msg2["hot_pitch"]."\",\"yaw\":\"".$msg2["hot_yaw"]."\",\"type\":\"".$msg2["hot_type"]."\",\"text\":\"".$msg2["hot_title"]."\",\"sceneId\":\"".$msg2["hot_sceneId"]."\"},";
|
|
}
|
|
}
|
|
|
|
$str.="\"".$msg["sceneName"]."\":{\"type\":\"equirectangular\",\"title1\":\"".$msg["sceneTitle"]."\",\"panorama\":\"".$pic."\",\"hotSpots\":[".substr($hotstr,0,-1)."]},";
|
|
}
|
|
$json_data.="\"code\":0,\"data\":{".substr($str,0,-1)."},";
|
|
break;
|
|
}
|
|
$json_data=substr($json_data,0,-1)."}";
|
|
echo $json_data;
|
|
?>
|