<%
__header("Content-Type","text/html; charset=gb2312");
db_Open("/NandFlash/tmp/dbDat0.db3");
write("{\"items\":");
db_QryAdv("select ss.[SubSys], ssd.SID, ssd.Type, ssd.Fld, ss.Name, ss.Note, ss.Count, ssd.[LastUpd], max(ssd.State) as State from tbSubSysDetail ssd left join tbSubSys ss on ssd.[SubSys] = ss.SubSys where ssd.State>=0 group by ssd.SubSys",0);
write(",\"gsm\":");
db_QryAdv("select * from tbAlmGsm",0);
write(",\"dt\":{\"dt\":");
cfg_GetCfg(5);
write("}}");
db_Close();
%>