获取本机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 ...
随机推荐
- Oracle系统表整理+常用SQL语句收集
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...
- Linux系统资源监控命令
转自http://www.51testing.com/html/16/271416-149128.html 衡量CPU性能的指标: 1,用户使用CPU的情况:CPU运行常规用户进程CPU运行niced ...
- Java过滤器,SpringMVC拦截器之间的一顺序点关系
由于最近做的项目中有一部分是接口远程调用,用到了接入权限和业务权限的鉴定,需要采用SpringMVC的拦截器,以前用Struts2的时候用过拦截器,而SpringMVC的拦截器功能之前没研究过,所以这 ...
- call(),apply(),bind()与回调
1.call(),apply(),bind()方法 JavaScript 中通过call或者apply用来代替另一个对象调用一个方法,将一个函数的对象上下文从初始的上下文改变为由 thisObj 指定 ...
- guava学习--Ordering
转载:http://www.cnblogs.com/peida/p/Guava_Ordering.html Ordering是Guava类库提供的一个犀利强大的比较器工具,Guava的Ordering ...
- MongoDB搭建Replica Set Shard Cluster步骤
本文记录从头搭建一个MongoDB 副本集分片集群的过程. 我们要创建一个这样子的分布式集群:有两个shard,每个shard都是一个replica set,各有两个副本(实际产品应用中还应加上一个仅 ...
- 获取数据库里面最新的ID
你如果新插入的一段资料,你想获取它的ID,就用 “mysql_insert_id()”; 并且要重新定义一个名称
- hdu 4642 Fliping game
http://acm.hdu.edu.cn/showproblem.php?pid=4642 对于给定的矩阵 操作步数的奇偶性是确定的 奇数步Alice赢 否则Bob赢 从左上角向右下角遍历遇到1就进 ...
- 一个 11 行 Python 代码实现的神经网络
一个 11 行 Python 代码实现的神经网络 2015/12/02 · 实践项目 · 15 评论· 神经网络 分享到:18 本文由 伯乐在线 - 耶鲁怕冷 翻译,Namco 校稿.未经许可,禁止转 ...
- 【matlab】MATLAB程序调试方法和过程
3.8 MATLAB程序的调试和优化 在MATLAB的程序调试过程中,不仅要求程序能够满足设计者的设计需求,而且还要求程序调试能够优化程序的性能,这样使得程序调试有时比程序设计更为复杂.MATLAB ...