• 获取本机MAC地址


    <%@ page contentType="text/html; charset=GBK" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <link href="inc/css.css" rel="stylesheet" type="text/css">
    <title>网上评标平台</title>
    </head>
    <%
    Integer userType = (Integer)session.getAttribute("wspbUserType");
    Integer projid = (Integer)session.getAttribute("wspbProjid");
    Integer bidProjid = (Integer)session.getAttribute("wspbBidProjid");
    String username = (String)session.getAttribute("wspbUserName");
    String videoUrl = (String)session.getAttribute("videoUrl");
    %>
    <script FOR="foo" EVENT="OnCompleted(hResult,pErrorObject, pAsyncContext)" LANGUAGE="JScript">

    document.forms[0].macAddr.value=unescape(MACAddr);

    </script>

    <script FOR="foo" EVENT="OnObjectReady(objObject,objAsyncContext)" LANGUAGE="JScript">

    if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
    {

    if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
    MACAddr = objObject.MACAddress;

    if(objObject.IPEnabled && objObject.IPAddress(0) != null && objObject.IPAddress(0) != "undefined")
    IPAddr = objObject.IPAddress(0);

    if(objObject.DNSHostName != null && objObject.DNSHostName != "undefined")
    sDNSName = objObject.DNSHostName;

    }
    </script>

    <script language="javascript">
    <!--
    function poptip(type){
    var userType = <%=userType%>;
    var projid = <%=projid%>;
    var bidprojid = <%=bidProjid%>;
    var url = '<%=videoUrl%>';

    if (userType != "" && userType != null){
    if (type == 5){
    var height = window.screen.availHeight-20;
    var width = window.screen.availWidth-20;
    //window.open("http://www.qzzb.gov.cn:7777/entrance/flash/?conferenceId=0&url=user1","newwindow","height="+height+", width="+width+", top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes");
    if (url != null && url != ""){
    //window.open(url,"newwindow","height="+height+", width="+width+", top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes");
    window.open(url,"ameeting","height="+height+", width="+width+", top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=yes");
    document.form1.action=url;
    document.form1.target="ameeting";
    document.form1.submit();
    }else{
    alert("不能进入,请联系管理员!");
    }
    }

    if (userType == "2"){
    if (type == 1){
    location.href = "wspbBidProjectAction.do?action=LIST&bidProjID="+bidprojid+"&projid="+projid+"&isRound=yes";
    }else if(type == 2){
    location.href = "webBusinessBidJudgeAction.do?action=list&bidprojid="+bidprojid+"&projid="+projid+"&isRound=yes";
    }else if(type == 3){
    location.href = "webTechnicalSEAction.do?method=forwardToLogon&projId="+projid+"&bidProjId="+bidprojid+"&isRound=yes";
    }else if(type == 4){
    location.href = "webEvaluateAction.do?action=LIST&strlicenes=true&single=yes&projid="+projid+"&bidprojid="+bidprojid+"&type=record&isRound=yes";

    }else if(type == 6){
    location.href = "wspbFileShareAction.do?action=LIST&bidprojid="+bidprojid+"&isRound=yes";
    }

    }else{
    alert("您没有访问该模块的权限!");
    }
    }else{
    alert("您还未登录,请先登录!");
    document.userlogin.username.focus();
    }


    }

    function check(obj){
    var m01 = obj.username.value;
    var m02 = obj.pwd.value;

    if (m01 == "" || m01 == null){
    alert("请输入用户名!");
    obj.username.focus();
    return false;
    }

    if (m02 == "" || m02 == null){
    alert("请输入密码!");
    obj.pwd.focus();
    return false;
    }

    //alert("");
    //window.location.reload();
    //return false;
    }

    function checkresult(result){
    if (result==-1){
    alert("您输入的用户名不存在或是密码错误,请确认后再输入!");
    }
    if (result==-2){
    //alert("密码修改成功,请重新登录!");
    }
    if (result==-3){
    alert("该账号已过期失效,无法登录!");
    }
    if (result==-4){
    alert("该项目未设定评审时间,无法登录!");
    }
    if (result==-5){
    alert("您没有权限登录!");
    }
    }
    //-->
    </script>
    <%Integer result = (Integer)(request.getAttribute("result")); %>
    <body onLoad="checkresult(<%=result%>)">
    <object classid="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6" id="locator" VIEWASTEXT>
    </object>
    <object classid="CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223" id="foo">
    </object>

    <script LANGUAGE="JScript">
    var service = locator.ConnectServer();
    var MACAddr ;
    var IPAddr ;
    var DomainAddr;
    var sDNSName;
    service.Security_.ImpersonationLevel=3;
    service.InstancesOfAsync(foo, 'Win32_NetworkAdapterConfiguration');
    </script>

    <table width="1002" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td background="images/wspb/wspbxt_top.jpg" height="288">
    <table width="100%" align="center" height="101%">
    <tr>
    <td width="45%" height="205"></td>
    <td width="55%"></td>
    </tr>
    <tr>
    <td width="45%"></td>
    <td width="55%">
    <%
    if (userType!=null&&userType==2){
    %>
    <form>
    <input type="hidden" name="macAddr">
    <table width="100%" align="center">
    <tr>
    <td width="36%">
    <span style="color:#0A4565;font-size:14px;">
    当前用户:<%=username%>
    </span>
    </td>
    <td width="28%">
    <img src="images/wspb/chgpwd.gif" width="62" height="23" onMouseOver="this.style.cursor='hand'" onClick="location.href='webJudgeAction.do?action=changepassword';">
    <img src="images/wspb/exit.gif" width="62" height="23" onMouseOver="this.style.cursor='hand'" onClick="location.href='module/webJudge/logout.jsp'">
    </td>
    </tr>
    </table>
    </form>
    <%
    }
    else{
    %>
    <form name="userlogin" method="post" action="webJudgeAction.do?action=login" onSubmit="return check(this)">
    <input type="hidden" name="macAddr">
    <table width="100%" align="center">
    <tr>
    <td width="36%">
    <span style="color:#0A4565;font-size:14px;">用户名:</span>
    <input type="text" name="username" style="80;height:20" class="underLineText">
    </td>
    <td width="36%">
    <span style="color:#0A4565;font-size:14px;">密码:</span>
    <input type="password" name="pwd" style="80;height:20" class="underLineText">
    </td>
    <td width="28%">
    <input type="image" src="images/wspb/wspb_login.jpg" width="73" height="28">
    </td>
    </tr>
    </table>
    </form>
    <%
    }
    %>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td background="images/wspb/wspbxt_tail.jpg" height="312" valign="top">
    <table width="80%" align="left" border="0">
    <tr>
    <td colspan="6" height="80"></td>
    </tr>
    <tr>
    <td width="80" height="109"></td>
    <td><img src="images/wspb/qualBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(1);"/></td>
    <td><img src="images/wspb/techBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="102" onClick="javascript:poptip(3);"/></td>
    <td><img src="images/wspb/busiBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="103" onClick="javascript:poptip(2);"/></td>
    <td><img src="images/wspb/setBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(4);"/></td>
    <td>
    <!--
    <img src="images/wspb/spBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(5);"/>
    -->
    <form id="form1" name="form1" method="post" action="">
    </form>
    <a href="#" onClick="javascript:poptip(5);">
    <img src="images/wspb/spBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" border="0"/>
    </a>

    </td>
    <td><img src="images/wspb/fileShare.gif" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(6);"/></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>

    </body>
    </html>

  • 相关阅读:
    散列
    AVL树的单旋与双旋
    Ubuntu系统目录
    os x文件系统结构简介
    c语言静态局部变量
    创建J2EE 5.0工程后,JSTL不能使用解决方法
    mysql
    指针
    servlet 访问项目
    c数组
  • 原文地址:https://www.cnblogs.com/wjlstation/p/3824158.html
Copyright © 2020-2023  润新知