SCMain
<head runat="server">
<title></title>
<script src="../../Common/jquery-easyui-1.3.1/jquery-1.8.0.min.js" type="text/javascript"></script>
<link href="../../CommonNew/css/main.css" rel="stylesheet" type="text/css" />
<script src="../../CommonNew/js/Charts.js" type="text/javascript"></script>
</head>
<body>
<div class="content_box" style="overflow-x: hidden; overflow-y: hidden">
<div class="sy_state">
<div class="item">
<div class="left ic1">
</div>
<div class="right">
<h1 class="fclan">
在库传感器</h1>
<p>
总计:<span class="fclan"><asp:Label runat="server" ID="labSensorIn_TotalNum"></asp:Label></span>
个</p>
<p>
在线:<span class="fclan"><asp:Label runat="server" ID="labSensorIn_OnlinelNum"></asp:Label></span>
个</p>
<p>
离线:<span class="fclan"><a href="#" onclick="PostTheWebUrl('Node')" style="color: #36aeea;
margin-left: -5px;">
<asp:Label runat="server" ID="labSensorIn_OfflinelNum" Font-Underline="true"></asp:Label>
</a></span>个</p>
<p>
停用:<span class="fclan"><asp:Label runat="server" ID="labSensorIn_StopNum"></asp:Label></span>
个</p>
</div>
<script type="text/javascript">
function PostTheWebUrl(obj) {
if (obj == "Node") {
var myurl = "../../page/THSupervisionCenter/ScInStoreOfOutline.aspx";
window.location.assign(myurl);
}
else if (obj == "Car") {
var myurl = "../../page/THSupervisionCenter/ScOnPassageOfOutline.aspx";
window.location.assign(myurl);
}
else if (obj == "Deep") {
var myurl = "../../page/THSupervisionCenter/DeepfreezeOfOutline.aspx";
window.location.assign(myurl);
}
// location.href = "../../page/SystemManage/AlertDataManage.aspx?a='1'";
}
</script>
</div>
<div class="line">
</div>
<div class="item">
<div class="left ic2">
</div>
<div class="right">
<h1 class="fczi">
在途冷链车辆</h1>
<p>
总计:<span class="fczi"><asp:Label runat="server" ID="labInRoad_TotalNum"></asp:Label></span>
个</p>
<p>
在线:<span class="fczi"><asp:Label runat="server" ID="labInRoad_OnlinelNum"></asp:Label></span>
个</p>
<p>
离线:<span class="fczi"> <a href="#" onclick="PostTheWebUrl('Car')" style="color: #897deb;
margin-left: -5px;">
<asp:Label runat="server" ID="labInRoad_OfflinelNum" Font-Underline="true"></asp:Label>
</a></span>个</p>
<p>
停用:<span class="fczi"><asp:Label runat="server" ID="labInRoad_NoUsed"></asp:Label></span>
个</p>
</div>
</div>
<div class="line">
</div>
<div class="item">
<div class="left ic3">
</div>
<div class="right">
<h1 class="fclv">
冷藏箱</h1>
<p>
总计:<span class="fclv"><asp:Label runat="server" ID="labFreezer_TotalNum"></asp:Label></span>
个</p>
<p>
在线:<span class="fclv"><asp:Label runat="server" ID="labFreezer_OnlinelNum"></asp:Label></span>
个</p>
<p>
离线:<span class="fclv"> <a href="#" onclick="PostTheWebUrl('Deep')" style="color: #67ba2f;
margin-left: -5px;">
<asp:Label runat="server" ID="labFreezer_OfflinelNum" Font-Underline="true"></asp:Label>
</a></span>个</p>
<p>
停用:<span class="fclv"><asp:Label runat="server" ID="labFreezer_StopNum"></asp:Label></span>
个</p>
</div>
</div>
</div>
<div class="sy_info">
<div class="w95">
<div class="left">
<div class="m1">
今日在库监测详情</div>
<div class="m2">
<div class="time">
<div class="ic1">
</div>
<div class="num">
<asp:Label ID="labAccumulatedNewAlarmDuration" runat="server"></asp:Label></div>
<div class="info">
报警累计时长</div>
</div>
<div class="time">
<div class="ic2">
</div>
<div class="num">
<a href="#" onclick="PostWebUrl()" style="color: #36aeea;">
<asp:Label ID="labNewAlarmTimes" runat="server" Font-Underline="true">
</asp:Label>
</a>次</div>
<div class="info">
新增报警</div>
</div>
</div>
<script type="text/javascript">
function PostWebUrl() {
var myurl = "../../page/SystemManage/AlertDataManage.aspx" + "?" + "id=Alarm";
window.location.assign(myurl);
// location.href = "../../page/SystemManage/AlertDataManage.aspx?a='1'";
}
</script>
<div class="m3">
<div class="t1">
概述</div>
<div class="t2">
连续监测时长:<span><asp:Label ID="labAccumulatedDuration" runat="server"></asp:Label></span></div>
<div class="t2">
监测系统应用活跃度:<span><asp:Label ID="labLiveness" runat="server" Text="#95分"></asp:Label></span></div>
</div>
</div>
<div class="right">
<div class="m1">
<div class="title">
今日在库报警处理</div>
</div>
<div class="m2">
<!--圆形进度条-->
<div class="chart">
<div class="uncomplete">
已处理:<asp:Label ID="labDeal1" runat="server"></asp:Label>%</div>
<div class="complete">
未处理:<asp:Label ID="labUnDeal1" runat="server"></asp:Label>%</div>
<canvas id="pie1" width="100px" height="100px"></canvas>
</div>
<!--圆形进度条-->
</div>
</div>
</div>
</div>
<div class="sy_info">
<div class="w95">
<div class="left">
<div class="m1">
今日在途监测详情</div>
<div class="m2">
<div class="time">
<div class="ic1">
</div>
<div class="num">
<asp:Label ID="labAccumulatedNewAlarmDuration2" runat="server"></asp:Label></div>
<div class="info">
报警累计时长</div>
</div>
<div class="time">
<div class="ic2">
</div>
<div class="num">
<a href="#" onclick="PostWebUrl()" style="color: #36aeea;">
<asp:Label ID="labNewAlarmTimes2" runat="server" Font-Underline="true"></asp:Label>
</a>次</div>
<div class="info">
新增报警</div>
</div>
</div>
<div class="m3">
<div class="t1">
概述</div>
<div class="t2">
连续监测时长:<span><asp:Label ID="labAccumulatedDuration2" runat="server"></asp:Label></span></div>
<div class="t2">
发运次数:<span><asp:Label ID="labSendTimes2" runat="server"></asp:Label>次</span></div>
</div>
</div>
<div class="right">
<div class="m1">
<div class="title">
今日在途报警处理</div>
</div>
<div class="m2">
<!--圆形进度条-->
<div class="chart">
<div class="uncomplete">
已处理:<asp:Label ID="labDeal2" runat="server"></asp:Label>%</div>
<div class="complete">
未处理:<asp:Label ID="labUnDeal2" runat="server"></asp:Label>%</div>
<canvas id="pie2" width="100px" height="100px"></canvas>
</div>
<!--圆形进度条-->
</div>
</div>
</div>
</div>
<div class="sy_info">
<div class="w95">
<div class="left">
<div class="m1">
今日冷藏箱监测详情</div>
<div class="m2">
<div class="time">
<div class="ic1">
</div>
<div class="num">
<asp:Label ID="labAccumulatedNewAlarmDuration3" runat="server"></asp:Label></div>
<div class="info">
报警累计时长</div>
</div>
<div class="time">
<div class="ic2">
</div>
<div class="num">
<a href="#" onclick="PostWebUrl()" style="color: #36aeea;">
<asp:Label ID="labNewAlarmTimes3" runat="server" Font-Underline="true"></asp:Label>
</a>次</div>
<div class="info">
新增报警</div>
</div>
</div>
<div class="m3">
<div class="t1">
概述</div>
<div class="t2">
连续监测时长:<span><asp:Label ID="labAccumulatedDuration3" runat="server"></asp:Label></span></div>
<div class="t2">
发运次数:<span><asp:Label ID="labSendTimes3" runat="server"></asp:Label>次</span></div>
</div>
</div>
<div class="right">
<div class="m1">
<div class="title">
今日冷藏箱报警处理</div>
</div>
<div class="m2">
<!--圆形进度条-->
<div class="chart">
<div class="uncomplete">
已处理:<asp:Label ID="labDeal3" runat="server"></asp:Label>%</div>
<div class="complete">
未处理:<asp:Label ID="labUnDeal3" runat="server"></asp:Label>%</div>
<canvas id="pie3" width="100px" height="100px"></canvas>
</div>
<!--圆形进度条-->
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var dataEquip = null;
$(document).ready(function() {
$.ajax(
{
type: 'POST',
url: 'SCMain.aspx',
dataType: 'text',
data: { Action: 'EquipAlarmDeal' },
cache: false,
success: function(res) {
dataEquip = eval('(' + res + ')');
var Deal = dataEquip[0][1];
var UnDeal = dataEquip[1][1];
// var a = parseFloat(Deal);
// var b = parseFloat(UnDeal);
// var d = a + b;
// var c = (a / d).toFixed(2);
// var e = 1 - c;
// c = c * 100;
// e = e * 100;
// new Chart("pie1").ratePie(c);
// document.getElementById("labDeal1").innerHTML = c;
// document.getElementById("labUnDeal1").innerHTML = e;
new Chart("pie1").ratePie(Deal);
document.getElementById("labDeal1").innerHTML = Deal;
document.getElementById("labUnDeal1").innerHTML = UnDeal;
}
});
$.ajax(
{
type: 'POST',
url: 'SCMain.aspx',
dataType: 'text',
data: { Action: 'CarAlarmDeal' },
cache: false,
success: function(res) {
dataEquip = eval('(' + res + ')');
var Deal = dataEquip[0][1];
var UnDeal = dataEquip[1][1];
// var a = parseFloat(Deal);
// var b = parseFloat(UnDeal);
// var d = a + b;
//// var c = (a / d).toFixed(2);
//// var e = 1 - c;
//// c = c * 100;
//// e = e * 100;
// var c = Math.round(a / d *100);
// var e = 100 - c;
// new Chart("pie2").ratePie(c);
// document.getElementById("labDeal2").innerHTML = c;
// document.getElementById("labUnDeal2").innerHTML = e;
new Chart("pie2").ratePie(parseInt( Deal,10) );
document.getElementById("labDeal2").innerHTML = Deal;
document.getElementById("labUnDeal2").innerHTML = UnDeal;
}
});
$.ajax(
{
type: 'POST',
url: 'SCMain.aspx',
dataType: 'text',
data: { Action: 'CoolBoxAlarmDeal' },
cache: false,
success: function(res) {
dataEquip = eval('(' + res + ')');
var Deal = dataEquip[0][1];
var UnDeal = dataEquip[1][1];
// var a = parseFloat(Deal);
// var b = parseFloat(UnDeal);
// var d = a + b;
// var c = (a / d).toFixed(2);
// var e = 1 - c;
// c = c * 100;
// e = e * 100;
// new Chart("pie3").ratePie(c);
// document.getElementById("labDeal3").innerHTML = c;
// document.getElementById("labUnDeal3").innerHTML = e;
new Chart("pie3").ratePie(Deal);
document.getElementById("labDeal3").innerHTML = Deal;
document.getElementById("labUnDeal3").innerHTML = UnDeal;
}
});
});
</script>
</body>
注册界面
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="THMS.page.Register"
EnableEventValidation="false" %>
<!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 runat="server">
<link href="../CommonNew/css/main.css" rel="stylesheet" type="text/css"></link>
<script src="../CommonNew/js/wow.js" type="text/javascript"></script>
<script src="../CommonNew/js/login.js" type="text/javascript"></script>
<link href="../CommonNew/css/animate.min.css" rel="stylesheet" type="text/css"></link>
<script src="../Common/jquery-easyui-1.3.1/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="../Common/jquery-easyui-1.5/jquery.easyui.min.js" type="text/javascript"></script>
<link href="../Common/jquery-easyui-1.5/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="../Common/jquery-easyui-1.5/themes/default/easyui.css" rel="stylesheet"
type="text/css" />
<title></title>
<script>
if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
new WOW().init();
};
</script>
<style type="text/css">
body
{
background: url(../CommonNew/images/login_bg.jpg) no-repeat left #fff;
background-position: center top;
background-size: cover;
}
</style>
<script type="text/javascript" language="javascript">
$(function() {
$("#Phone").val("请输入手机号");
$("#yzmid").val("请输入短信验证码");
$("#password1").val("请输入新密码");
$("#password2").val("请输入新密码");
document.getElementById("GetYZMBtn").style.backgroundColor = "#2177c6";
document.getElementById("GetYZMBtn").style.color = "#fff";
/**
*刷新图片验证码
*/
$("#freshVerify").click(function() {
var element = document.getElementById('verify');
element.src = "../Common/Controls/Verify.ashx?" + Math.random();
})
/**
*刷新图片验证码
*/
$("#verify").click(function() {
var element = document.getElementById('verify');
element.src = "../Common/Controls/Verify.ashx?" + Math.random();
})
});
var strCheckCode = "";
function SendYZM(btn) {
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
var PhoneNum = $("#Phone").val();
var myDate = new Date();
var NowTime = myDate.toLocaleString();
strCheckCode = NowTime.replace(/[^0-9]/ig, "");
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
if (PhoneNum.length != 11) {
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "请检查手机号";
wait = 0;
Delay(3);
return;
}
var strVerify = $("#txtVerify").val();
if (strVerify == "" || strVerify == "请输入验证码") {
document.getElementById("<%=verifyMessage.ClientID %>").innerHTML = "请输入图片验证码";
wait = 0;
Delay(3);
return;
}
$.ajax(
{
type: 'POST',
url: 'Register.aspx',
dataType: 'text',
data: { Action: 'CheckCode', strVerify: strVerify },
cache: false,
success: function(strs) {
if (strs != "0") {
document.getElementById("<%=verifyMessage.ClientID %>").innerHTML = "验证码不正确";
wait = 0;
Delay(3);
} else {
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
$.ajax(
{
type: 'POST',
url: 'Register.aspx',
dataType: 'text',
data: { Action: 'GetVali', PhoneNum: PhoneNum, strCheckCode: strCheckCode },
cache: false,
beforeSend: function ShowdivShowChangeQueryInfo() { $("#OKSendValidate").show() },
success: function(strs) {
if (strs != "") {
if (strs == "0") {
// alert("验证码已发送");
document.getElementById("<%=Message.ClientID %>").innerHTML = "验证码已发送";
wait = 60;
}
else if (strs == "1") {
// alert("验证码发送失败");
document.getElementById("<%=Message.ClientID %>").innerHTML = "验证码发送失败";
wait = 0;
}
else if (strs == "2") {
// alert("当天发送次数超过三次");
document.getElementById("<%=Message.ClientID %>").innerHTML = "当天发送次数超过三次";
wait = 0;
}
else if (strs == "3") {
// alert("当前手机号已注册");
document.getElementById("<%=Message.ClientID %>").innerHTML = "当前手机号已注册";
wait = 0;
}
}
else {
// alert("未知错误,请联系管理员");
document.getElementById("<%=Message.ClientID %>").innerHTML = "未知错误,请联系管理员";
wait = 0;
}
Delay(3);
time(btn);
},
complete: function HidedivShowChangeQueryInfo() { $("#OKSendValidate").hide() }
});
}
}
})
}
function IsNum(num) {
var reNum = /^\+?[1-9][0-9]*$/;
return (reNum.test(num));
}
function IsPhoneNum(num) {
var reNum = /^0?1[3|4|5|7|8][0-9]\d{8}$/;
return (reNum.test(num));
}
function register() {
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=RegisterOKMessage.ClientID %>").innerHTML = "";
// debugger;
var strPhoneNum = $("#Phone").val();
var strValidate = $("#yzmid").val();
var strPsd1 = $("#password1").val();
var strPsd2 = $("#password2").val();
if (strPhoneNum.length != 11 || (!IsPhoneNum(strPhoneNum))) {
// alert("请检查手机号");
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "请检查手机号";
}
else if (strPhoneNum == "") {
// alert("请输入手机号");
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "请输入手机号";
}
else if (strValidate == "" || strValidate == "验证码") {
// alert("请输入验证码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=Message.ClientID %>").innerHTML = "请输入验证码";
}
else if (strCheckCode == "") {
// alert("请重新获取验证码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=Message.ClientID %>").innerHTML = "请重新获取验证码";
}
else if (strPsd1 == "" || strPsd1 == "请输入新密码") {
// alert("请检查密码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "请检查密码";
}
else if (strPsd2 == "" || strPsd2 == "请输入新密码") {
// alert("请检查密码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "";
document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "请检查密码";
}
else if (strPsd1 != strPsd2) {
// alert("两次密码输入不同");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "";
document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "两次密码输入不同";
}
else if (!(document.getElementById("CheckSure").checked)) {
// alert("请检查是否同意用户协议");
// document.getElementById("<%=RegisterOKMessage.ClientID %>").innerHTML = "请检查是否同意用户协议";
document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "请检查是否同意用户协议";
}
else {
// document.getElementById("<%=RegisterOKMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
// document.getElementById("<%=Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "";
// document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "";
$.ajax(
{
type: 'POST',
url: 'Register.aspx',
dataType: 'text',
data: { Action: 'Add', strPhoneNum: strPhoneNum, strCheckCode: strCheckCode, strValidate: strValidate, strPassword: strPsd2 },
cache: false,
beforeSend: function ShowdivShowChangeQueryInfo() { $("#OKDiv").show() },
success: function(strs) {
if (strs != "") {
if (strs == "1") {
alert("注册成功,请等待管理员审核!");
window.location.href = "homeLogin.aspx";
// document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "注册成功,请等待管理员审核!";
}
else {
// alert("验证码输入错误");
document.getElementById("<%=Message.ClientID %>").innerHTML = "注册失败,请重新注册";
$("#yzmDiv").show();
$("#PwdDiv").hide();
}
}
else {
// alert("未知错误,请联系管理员");
$("#yzmDiv").show();
$("#PwdDiv").hide();
document.getElementById("<%=Message.ClientID %>").innerHTML = "未知错误,请联系管理员";
}
Delay(3);
},
complete: function HidedivShowChangeQueryInfo() { $("#OKDiv").hide() }
});
}
Delay(3);
}
function Validate() {
// $("#yzmDiv").hide();
// $("#PwdDiv").show();
var strPhoneNum = $("#Phone").val();
var strValidate = $("#yzmid").val();
if (strPhoneNum.length != 11 || (!IsPhoneNum(strPhoneNum))) {
// alert("请检查手机号");
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "请检查手机号";
}
else if (strPhoneNum == "") {
// alert("请输入手机号");
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "请输入手机号";
}
else if (strValidate == "" || strValidate == "请输入短信验证码") {
// alert("请输入验证码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=Message.ClientID %>").innerHTML = "请输入短信验证码";
}
else if (strCheckCode == "") {
// alert("请重新获取验证码");
// document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=Message.ClientID %>").innerHTML = "请重新获取短信验证码";
}
else {
$.ajax(
{
type: 'POST',
url: 'Register.aspx',
dataType: 'text',
data: { Action: 'ValidateCode', strPhoneNum: strPhoneNum, strCheckCode: strCheckCode, strValidate: strValidate },
cache: false,
beforeSend: function ShowdivShowChangeQueryInfo() { $("#OKDiv").show() },
success: function(strs) {
if (strs != "") {
if (strs == "1") {
$("#yzmDiv").hide();
$("#PwdDiv").show();
}
else {
// alert("验证码输入错误");
document.getElementById("<%=Message.ClientID %>").innerHTML = "验证码输入错误";
Delay(3);
}
}
},
complete: function HidedivShowChangeQueryInfo() { $("#OKDiv").hide() }
});
}
Delay(3);
}
var wait = 60;
function time(btn) {
if (wait == 0) {
btn.removeAttribute("disabled");
btn.value = "获取短信验证码";
wait = 60;
document.getElementById("GetYZMBtn").style.backgroundColor = "#2177c6";
document.getElementById("GetYZMBtn").style.color = "#fff";
} else {
btn.setAttribute("disabled", true);
btn.value = wait + "秒后重新获取验证码";
wait--;
document.getElementById("GetYZMBtn").style.backgroundColor = "#e3e3e3";
document.getElementById("GetYZMBtn").style.color = "#919191";
setTimeout(function() {
time(btn);
},
1000)
}
}
function Delay(time) {
if (time > 0) {
time--;
setTimeout(function() {
Delay(time);
},
1000);
}
else {
document.getElementById("<%=psd1Message.ClientID %>").innerHTML = "";
document.getElementById("<%=psd2Message.ClientID %>").innerHTML = "";
document.getElementById("<%=RegisterOKMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=Message.ClientID %>").innerHTML = "";
document.getElementById("<%=PhoneMessage.ClientID %>").innerHTML = "";
document.getElementById("<%=verifyMessage.ClientID %>").innerHTML = "";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="outer">
<div id="middle">
<div id="inner">
<div class="reg_form">
<div class="dv_cc">
<div class="login" id="con_one_2" style="height: 380px;">
<div class=" wow flipInY">
<div class="t1">
<span class="fchuang">我有账号,立即<a href="homeLogin.aspx">登陆</a></span>
</div>
<div id="yzmDiv">
<div class="item">
<input type="text" class="user" id="Phone" value="请输入手机号" onfocus="if (value =='请输入手机号'){value =''}"
onblur="if (value ==''){value='请输入手机号'}" />
<%--<input class="easyui-textbox" id="Phone" data-options="prompt:'请输入手机号',iconCls:'icon-man',iconWidth:38">--%>
<asp:Label ID="PhoneMessage" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label>
</div>
<div class="item">
<input type="text" class="yzm" id="txtVerify" value="请输入验证码" onfocus="if (value =='请输入验证码'){value =''}"
onblur="if (value ==''){value='请输入验证码'}" />
<img src="../../CommonNew/images/icon_fresh.png" style="width: 25px; height: 25px;
margin-top: 15px; float: right" id="freshVerify" />
<img src='../Common/Controls/Verify.ashx' style="width: 70px; height: 38px; float: right;
line-height: 58px; margin-top: 10px; margin-right: 5px;" id="verify" />
<span>
<asp:Label ID="verifyMessage" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label>
</span>
</div>
<div class="item">
<input type="text" class="yzm" id="yzmid" value="请输入短信验证码" onfocus="if (value =='请输入短信验证码'){value =''}"
onblur="if (value ==''){value='请输入短信验证码'}" />
<input type="button" id="GetYZMBtn" value="获取短信验证码" onclick="SendYZM(this);return false;"
class="sent_ok" />
<%--<input class="easyui-textbox" id="SendMes" data-options="buttonText:'发送验证码',prompt:'短信验证码'">--%>
<span id="OKSendValidate" style="width: 40px; margin-left: 10px; display: none;">
<img src="../../Common/Image/loading.gif" />
</span><span>
<asp:Label ID="Message" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label>
</span>
</div>
<div class="login_btn ">
<input type="submit" id="Submit1" value="立即验证" onclick="Validate();return false;"
class="jh_img login_btn " />
<%--<asp:LinkButton ID="btn" runat="server" ForeColor="White" OnClientClick="register();return false;">立即找回</asp:LinkButton>--%>
<span id="OKdiv" style="width: 200px; margin-left: 10px; display: none;">
<img src="../../Common/Image/loading.gif" /></span>
<asp:Label ID="Label1" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label>
</div>
</div>
<div id="PwdDiv" style="display: none;">
<div class="item">
<input class="lock" value="请输入新密码" id="password1" type="password" onfocus="if (value =='请输入新密码'){value =''}"
onblur="if (value ==''){value='请输入新密码'}" />
<%--<input class="easyui-textbox" id="password1" type="password" data-options="prompt:'请输入新密码',iconCls:'icon-lock',iconWidth:38">--%>
<span>
<asp:Label ID="psd1Message" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label></span>
</div>
<div class="item">
<input class="lock" id="password2" value="请输入新密码" type="password" onfocus="if (value =='请输入新密码'){value =''}"
onblur="if (value ==''){value='请输入新密码'}" />
<%--<input class="easyui-textbox" id="password2" type="password" data-options="prompt:'请输入新密码',iconCls:'icon-lock',iconWidth:38">--%>
<span>
<asp:Label ID="psd2Message" runat="server" ForeColor="Red" Font-Size="12px" Text=''></asp:Label></span>
</div>
<div class="login_btn ">
<input type="submit" id="btn" value="立即注册" onclick="register();return false;" class="jh_img login_btn " />
<%--<asp:LinkButton ID="btn" runat="server" ForeColor="White" OnClientClick="register();return false;">立即找回</asp:LinkButton>--%>
<span id="OKdiv" style="width: 200px; margin-left: 10px; display: none;">
<img src="../../Common/Image/loading.gif" /></span>
<asp:Label ID="RegisterOKMessage" runat="server" ForeColor="Red" Font-Size="12px"
Text=''></asp:Label>
</div>
<div class="wan">
<div class="t1">
<input type="checkbox" id="CheckSure" checked="checked" class="chk_1" />
<label for="CheckSure">
</label>
</div>
<div class="t2 ">
我已阅读并同意<span class="fwb"><a href="fcf">《用户注册协议》</a></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="reg_copyright">
<div class="w1200">
<div class="app_down_btn">
<div class="center">
<a href="#" class="az">Android 客户端下载</a> <a href="#" class="pg">iPhone客户端下载</a>
</div>
</div>
<div class="gs_info">
© 2007~2016 京ICP备15066634号 北京国尚信科技有限公司</div>
<div class="gs_info">
中国<span>·</span>北京<span>·</span>海淀</div>
</div>
</div>
</form>
</body>
</html>
后台代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using BasicItem;
using System.Text;
using MenuUtility;
using BasicItem.BasicCommon;
using System.Data;
namespace THMS.page
{
public partial class Register : System.Web.UI.Page
{
private RegisterBLL _Common = new RegisterBLL();
protected void Page_Load(object sender, EventArgs e)
{
if (Request["Action"] != null)
{
string returnMsg = string.Empty;
StringBuilder returngvwMsg = new StringBuilder();
switch (Request["Action"])
{
case "GetVali":
returnMsg = getValidateCode(Request["PhoneNum"].ToString(), Request["strCheckCode"].ToString());
Response.Write(returnMsg);
break;
case "ValidateCode":
returnMsg = checkValidateCode(Request["strPhoneNum"].ToString(), Request["strCheckCode"].ToString(), Request["strValidate"].ToString());
Response.Write(returnMsg);
break;
case "Add":
returnMsg = RegisterUserInfo(Request["strPhoneNum"].ToString(), Request["strCheckCode"].ToString(), Request["strValidate"].ToString(), Request["strPassword"].ToString());
Response.Write(returnMsg);
break;
case "CheckCode":
returnMsg = CheckCode(Request["strVerify"].ToString());
Response.Write(returnMsg);
break;
}
Response.ContentType = "text/xml";
Response.Expires = 0;
Response.Flush();
Response.End();
}
}
/// <summary>
/// 获取验证码
/// </summary>
/// <param name="LogionInfor"></param>
/// <param name="strPhoneNo"></param>
/// <param name="strCheckCode"></param>
/// <returns>0:发送成功 1:发送失败 2:超过当日发送次数 3:手机号已注册</returns>
public string getValidateCode(string strPhoneNo, string strCheckCode)
{
RegisterBLL _RegisterBLL = new RegisterBLL();
return _RegisterBLL.getValidateCode(strPhoneNo, strCheckCode);
}
/// <summary>
/// 检查验证码(注册用户)
/// </summary>
/// <param name="LogionInfor"></param>
/// <param name="strPhoneNo"></param>
/// <param name="strCheckCode"></param>
/// <param name="strValidateCode"></param>
/// <returns>true:验证成功 false:验证码不正确</returns>
public string checkValidateCode(string strPhoneNo, string strCheckCode, string strValidateCode)
{
if (_Common.checkValidateCode(strPhoneNo, strCheckCode, strValidateCode))
{
return "1";
}
else
{
//验证失败
return "0";
}
}
/// <summary>
/// 检查验证码(注册用户)
/// </summary>
/// <param name="LogionInfor"></param>
/// <param name="strPhoneNo"></param>
/// <param name="strCheckCode"></param>
/// <param name="strValidateCode"></param>
/// <returns>true:注册成功 false:注册失败</returns>
public string RegisterUserInfo(string strPhoneNo, string strCheckCode, string strValidateCode, string strPassword)
{
string Password = new MD5Encrypt().EncryptMD5Str(strPassword).Replace("'", "\"");
if (_Common.checkValidateCode(strPhoneNo, strCheckCode, strValidateCode))
{
//验证成功,注册用户
if (_Common.RegisterUserInfo(strPhoneNo, Password, "1"))
{
return "1";
}
else return "0";
}
else
return "0";
}
public string CheckCode(string txtVerify)
{
return String.Compare(Session["Codegif"].ToString(), txtVerify, true).ToString();
}
}
}