<%@ page language="C#" autoeventwireup="true" enableviewstate="false" inherits="Dcx.Publish.Accept_CheckMenu_Ent_IsExist2, P_DcxRun" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=gb2312" />
    <title>检查运行端的应用状态 </title>

    <script type="text/javascript" src="/js/jquery.js"></script>

    <script type="text/javascript" src="/js/common/Common.js"></script>

    <script type="text/javascript" src="/Js/dialog/artDialog/jquery.artDialog.js?skin=default"></script>

    <script type="text/javascript" language="JavaScript"> 
       var IsLogined = <%= IsLogined %>; 
$(window).load(function(){
    if(!IsLogined)
    {
        var obj={"IsOK":true,"NewId":-5,"ErrorMsg":""};
        vrr(obj) ;
        return;
    }

    var menuId = tzm("menuId");
    if (!ymr( menuId ) && !isNaN( menuId ))
         menuId  = parseInt( menuId , 10);
    else
         menuId  = -1; 
    var webUrl = "/WebServices/Menu/Menu_Run.asmx/gjfstate";
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: webUrl,
//        async: false,
        data: "{'menuId':"+menuId+"}",
        dataType: 'json',
        beforeSend: function (XMLHttpRequest) {
            //zyk.html("正在加载.....");
        },
        complete: function (XMLHttpRequest, textStatus) {
            //隐藏正在查询图片
        },
        error: function (json) {
                var obj={"IsOK":false,"NewId":-1,"ErrorMsg":"读取数据失败，请检查运行端是否正常运行，数据库连接是否正确。其他原因："+ JSON2.stringify(json)};
                 vrr(obj) ;
//            alert("获取数据失败。详情：" + JSON2.stringify(json));
        },
        success: function (modelObj) {
               modelObj =hmy(modelObj);
               vrr(modelObj) ;
        }
    });
function vrr(modelObj) {

       var dcxMyUrl = tzm("dcxUrl");
    if (ymr(dcxMyUrl) )
        dcxMyUrl = "www.dcxCreator.com";
    var clientState=modelObj.NewId;
    modelObj=JSON2.stringify(modelObj);
        window.location.href="http://"+dcxMyUrl+"/designer/clientState.html?clientState="+clientState+"&errstr="+escape(modelObj);
}
});

    </script>

</head>
<body>
    <div class="main" style="width: 850px;">
    </div>
</body>
</html>

