<%
__header("Content-Type","text/html; charset=gb2312");
var serr="{\"op\":\"op err\"}";
if (op=="")
  write(serr);
else
{
var iupd=-1;
db_Open("/NandFlash/dbCfg.db3");
if (op=="qry")
  db_QryAdv("select * from tbSMLocation order by SubSys");
else if (op=="upd")
  iupd=db_UpdAdv("update tbSMLocation set axisx="+axisx+",axisy="+axisy+" where SID="+sid);

if (iupd<0 && iupd!=-1)
  write(serr);
if (iupd>=0)
{
  write("{\"op\":\"ok\",\"opv\":"+iupd+",\"opt\":\""+ op +"\"}");
}
db_Close();
}
%>
