获取本机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="data:images/wspb/chgpwd.gif" width="62" height="23" onMouseOver="this.style.cursor='hand'" onClick="location.href='webJudgeAction.do?action=changepassword';">
<img src="data: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="width:80;height:20" class="underLineText">
</td>
<td width="36%">
<span style="color:#0A4565;font-size:14px;">密码:</span>
<input type="password" name="pwd" style="width:80;height:20" class="underLineText">
</td>
<td width="28%">
<input type="image" src="data: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="data:images/wspb/qualBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(1);"/></td>
<td><img src="data:images/wspb/techBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="102" onClick="javascript:poptip(3);"/></td>
<td><img src="data:images/wspb/busiBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="103" onClick="javascript:poptip(2);"/></td>
<td><img src="data:images/wspb/setBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" onClick="javascript:poptip(4);"/></td>
<td>
<!--
<img src="data: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="data:images/wspb/spBid.jpg" onMouseOver="this.style.cursor='hand'" width="109" height="101" border="0"/>
</a>
</td>
<td><img src="data: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>
获取本机MAC地址的更多相关文章
- c#中如何获取本机MAC地址、IP地址、硬盘ID、CPU序列号等系统信息
我们在利用C#开发桌面程序(Winform)程序的时候,经常需要获取一些跟系统相关的信息,例如用户名.MAC地址.IP地址.硬盘ID.CPU序列号.系统名称.物理内存等. 首先需要引入命名空间: us ...
- js获取本机mac地址,IP地址,计算机名
<!DOCTYPE HTML> <html> <head> <title>js获取本机mac地址,IP地址,计算机名</title> < ...
- windows获取本机MAC地址并写入文件的bat
windows获取本机MAC地址并写入文件的bat MAC(Media Access Control)地址,或称为 MAC地址.硬件地址,用来定义网络设备的位置. bat代码例如以下: @echo o ...
- Java获取本机MAC地址[转]
原文地址:https://www.cnblogs.com/hxsyl/p/3422191.html Java获取本机MAC地址 为什么写这个呢?因为前几天看见网上有采用windows命令获取局域网 ...
- 获取客户机MAC地址 根据IP地址 获取机器的MAC地址 / 获取真实Ip地址
[DllImport("Iphlpapi.dll")] private static extern int SendARP(Int32 dest, Int32 host, ref ...
- 脚本_获取本机 MAC 地址
#!bin/bash#作者:liusingbon#功能:获取本机 MAC 地址ip a s |awk 'BEGIN{print "本机 MAC 地址信息如下:"}/^[0-9]/{ ...
- Java获取本机MAC地址
为什么写这个呢?因为前几天看见网上有采用windows命令获取局域网和广域网MAC,查了查可以直接用JDK的方法. MAC可用于局域网验证,提高安全性. import java.net.InetAdd ...
- Node.js 获取本机Mac地址
首先我们要先加载一个包用于获取mac地址 npm install getmac 加载完毕会在node_modules文件夹下发现一个getmac文件夹,我们把对应的路径加载到程序中 源码如下: var ...
- 052_获取本机 MAC 地址
#!/bin/baship a s | awk 'BEGIN{print "本机 MAC 地址信息如下:"}/^[0-9]/{print $2;getline;if($0~/lin ...
- php获取客户机mac地址
@exec("arp -a",$array); //执行arp -a命令,结果放到数组$array中 foreach($array as $value){ //匹配结果放到数组$m ...
随机推荐
- python抓取数据 常见反爬虫 情况
1.报文头信息: User-Agent Accept-Language 防盗链 上referer 随机生成不同的User-Agent构造报头 2.加抓取等待时间 每抓取一页都让它随机休息几秒,加入此 ...
- [转]浏览器渲染机制——一定要放在body底部的js引用
转自:http://blog.csdn.net/u012251421/article/details/50536265 说明: 本文提到的浏览器均是指Chrome. “script标签“指的都是普通的 ...
- 《Linux内核设计与实现》课本第一章&第二章学习笔记
<Linux内核设计与实现>课本学习笔记 By20135203齐岳 一.Linux内核简介 Unix内核的特点 Unix很简洁,所提供的系统调用都有很明确的设计目的. Unix中一切皆文件 ...
- 页面路由跳转地址-get方式
从开始敲代码,一直到现在,总是记不太清页面上的路由应该怎样书写,因此最终还是觉得自己应该提笔写下来以免自己再犯同样的错误! 1.get方式访问页面 http://localhost:3001/arti ...
- [转]为什么不能用memcached存储Session
以下内容转自:http://www.infoq.com/cn/news/2015/01/memcached-store-session -------------------------分割线---- ...
- Supercell only provide the best games for players
Supercell only provide the best games for players Supercell start to change all, Supercell's first t ...
- iOS开发拓展篇—音频处理(音乐播放器6)
iOS开发拓展篇—音频处理(音乐播放器6) 一.图片处理 说明: Aspect表示按照原来的宽高比进行缩放. Aspectfit表示按照原来的宽高比缩放,要求看到全部图片,后果是不能完全覆盖窗口,会留 ...
- Vmware workstation 10 NAT功能总是不正常的原因
原来运行一切正常的VMWARE WORKSTATION 10,突然出现NAT功能不能正常工作的情况. 表现是:如果将虚拟机的网卡设置为NAT模式,可以PING通网关及LAN内的主机,但是PING不通外 ...
- 开发实时壁纸(Live Wallpapers)
所谓实时壁纸,就是指手机桌面不再是简单的图片,而是运行中的动画,这个动画是由程序实时绘制的,因此被称为实时壁纸. 为了开发实时壁纸,Android提供了WallpaperService基类,实时壁纸的 ...
- 2014年3月份第3周51Aspx源码发布详情
WPF翻书效果源码 2014-3-17 [VS2010]源码描述:WPF翻书效果源码:多点触控的一个Demo,利用鼠标可以实现图书翻页效果:适合新手学习研究. TL简单家具网新手源码 2014-3 ...