在哪里可以找到index.html中定义的配置文件

时间:2018-12-19 02:51:20

标签: html configuration config configuration-files

我目前正在对本地托管的本地网站进行翻版。 我对HTML并不陌生,但是我只是不习惯它,特别是当它与脚本混合使用时。 我从Index.html(位于 E:\ inetpub \ wwwroot \ SONAR **中)找到了一个代码,但我不理解此**“ index.html?config = pims” 部分:< / p>

<td height=161></td>
  <td colspan=2></td>
  <td rowspan=2 align=center valign=top><a href="http://localhost/sonar/app/index.html?config=pims" target="_blank"><div style='position:relative;top:0;left:0;'><img id="sonar_pims_img" width=249 height=152 style='position:relative; left:0; top:0;'
  src="images/sonar_pims.png"
  alt="Text Box: SONAR PIMS" v:shapes="Rectangle_x0020_4"><img id="pims_img" style='position:absolute;top:30px;left:200px' src="images/access_ok.png">

在哪里可以找到特定的“ config = pims”文件或代码? 如果我在浏览器上运行此“ http://localhost/sonar/app/index.html?config=pims”,它将转到“ index.html”,当我查看其源代码时,它与上面的“ index.html”不同。 有一个名为“ config”的文件夹,并且有一个名为“ pims”的子文件夹。但是,此文件夹与上面的代码“ index.html?config = pims” 有何关系?此配置文件夹位于“ E:\ inetpub \ wwwroot \ SONAR \ app \ js \ config”

这是index.html中的javascript:

<script type="text/javascript">
function GetAppGroupName(callback){
    var xobj = new XMLHttpRequest();
    var configsgfile = 'config/_common', filesg = 'sglist';
    xobj.overrideMimeType("application/json");                      
    xobj.open('GET', 'app/js/' + configsgfile + '/' + filesg + '.json', false); 
    xobj.onreadystatechange = function () {
    if (xobj.readyState == 4 && xobj.status == "200"){
        callback(xobj.responseText);
            }
    };
    xobj.send(null);
}

var UsrGroupName, ImgGroupName, appNameAlias;
var objUserInfo = new ActiveXObject("WScript.network");
var uname =  objUserInfo.UserName;

GetAppGroupName(function(response){
    var appidinfo = JSON.parse(response);
    for (i = 0; i < appidinfo.groups.length; i++)
    {
        //get status userid each app
        UsrGroupName = appidinfo.groups[i].group;
        var UsrStatus = false;
        GetUserAppPrivileges(function(response){
        var JsonUsrStatus = JSON.parse(response);
        UsrStatus = JsonUsrStatus.d;
        })
        var appid = appidinfo.groups[i].appid; 
        if (appid == "pims")
        {
            if (!UsrStatus)
            {
                document.getElementById("pims_img").src="images/access_no.png";
                document.getElementById("sonar_pims_img").title="Click how to get access";
                document.getElementById("pims_img").title="Click how to get access";
            }
            else if(UsrStatus)
            {
                document.getElementById("sonar_pims_img").title="Click to access SONAR PIMS";
                document.getElementById("pims_img").title="Click to access SONAR PIMS";
            }
        }               
    }
    return;
})

//Get user group app access status
function GetUserAppPrivileges(callback){
    var xobj1 = new XMLHttpRequest();
    var url1 = "http://localhost/sonarws-ad/WebService.asmx/IsThisUserMemberOfGroup";
    var body1 = '{"UserName":"' + uname + '", "GroupName":"' + UsrGroupName + '"}'; 
    xobj1.open('POST', url1, false);
    xobj1.setRequestHeader("Access-Control-Allow-Origin", "*"); 

    xobj1.setRequestHeader("Content-type", "application/json");                                     
    xobj1.onreadystatechange = function () {
    if (xobj1.readyState == 4 && xobj1.status == "200"){
        callback(xobj1.responseText);
            }
    };
    xobj1.send(body1);
}

function GetUserFullName(callback){
    var xobj3 = new XMLHttpRequest();
    var url3 = "http://localhost/sonarws-ad/WebService.asmx/UserNameAlias";
    var body3 = '{"UserName":"' + uname + '"}'; 
    xobj3.open('POST', url3, false);
    xobj3.setRequestHeader("Access-Control-Allow-Origin", "*"); 
    xobj3.setRequestHeader("Content-type", "application/json");                                     
    xobj3.onreadystatechange = function () {
    if (xobj3.readyState == 4 && xobj3.status == "200"){
        callback(xobj3.responseText);
            }
    };
    xobj3.send(body3);
}

请帮助。非常感谢

0 个答案:

没有答案