-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
176 lines (176 loc) · 5.8 KB
/
register.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE <html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>注册 | 大型主机科普网站</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
</head>
<body>
<div id="topBar">
<div class="wrapper">
<div class="l">
您好,欢迎访问大型主机科普网站!
</div>
<div class="r">
<a href="#" onclick="window.external.AddFavorite(location.href,'');">加入收藏</a>
<a href="#" onclick="this.style.behavior='url(#default#homepage)';this.setHomePage(location.href);">设为首页</a>
<span> <a href="login.php" target="_blank">登录</a>| <a href="register.php" target="_blank">注册</a>| <a href="manager.html" target="_blank">管理员入口</a> </span>
</div>
</div>
</div>
<div id="header">
<div class="wrapper">
<div class="logo">
<a href="/"><img src="images/logo3.png" alt="大型主机科普网站" /></a>
</div>
</div>
</div>
<div id="nav">
<ul>
<li><a href="index.php" class="a1">首页</a></li>
<li><a href="recent.php" class="a2">科技快讯</a></li>
<li><a href="technology.php" class="a3">主机技术</a></li>
<li><a href="medias.php" class="a4">科普乐园</a></li>
<li><a href="q_a.php" class="a5">知识问答</a></li>
<form class="search" method="get" action="" target="_blank">
<p> <input class="searchTxt" value="" maxlength="30" name="wd" type="text" style="background-image:url('images/search_bg.png') " /> <input src="images/search_icon.png" class="search_icon" name="" type="image" /> </p>
</form>
</ul>
</div>
<script src="js/jquery-1.11.2.min.js">
</script>
<script type="text/javascript">
function select_search_type(n){
document.getElementById('search_type1').className='';
document.getElementById('search_type2').className='';
document.getElementById('search_type3').className='';
document.getElementById('search_type'+n).className='current';
document.getElementById('search_type').value=n;
}
</script>
<script>
function usernamecommit(){
var username = document.getElementById('username');
if(username.value == ''){
alert('用户名不能为空');
}
$.post("usernamecheck.php",{username:username.value},function(msg){
if(msg == 1){
alert('此用户名已存在');
username.value = '';
}
});
}
function emailcommit(){
var email = document.getElementById('email');
if(email.value == ''){
alert('邮箱不能为空');
}
$.post("emailcheck.php",{email:email.value},function(msg){
if(msg == 1){
alert('此邮箱已存在');
email.value = '';
}
});
}
function pwdcommit(){
var pwd = document.getElementById('pwd');
if(pwd.value.length < 6 || pwd.value.length > 20){
alert('请输入长度为6至20位的密码');
pwd.value = '';
}
}
function repwdcommit(){
var repwd = document.getElementById('repwd');
var pwd = document.getElementById('pwd');
if(repwd.value != pwd.value){
alert('两次输入密码不一致');
repwd.value = '';
}
}
</script>
<div id="main">
<div id="page">
<div class="pageLeft">
<div id="bmMenu">
</div>
<div class="map2">
<a target="_blank" href="http://j.map.baidu.com/f_v1z" ><img src="images/ditu.png" /></a>
</div>
</div>
<div class="pageRight">
<div class="title_pic">
<img src="images/bm_pic.png" />
</div>
<div id="current">
所在位置:
<a href="index.php" class="curr">首页</a> >
<a href="" class="curr">注册</a>
</div>
<div id="bmMain">
<div class="m-form">
<form name="frm" action="registercheck.php" method="get">
<fieldset>
<div class="formitm">
<label class="lab">用户名:</label>
<div class="ipt">
<input type="text" class="u-ipt" name="username" id="username" onBlur="usernamecommit();"/>
</div>
</div>
<div class="formitm">
<label class="lab">邮箱:</label>
<div class="ipt">
<input type="text" class="u-ipt" name="email" id="email" onBlur="emailcommit();"/>
</div>
</div>
<div class="formitm">
<label class="lab">密码:</label>
<div class="ipt">
<input type="password" class="u-ipt" name="pwd" id="pwd" onBlur="pwdcommit();"/><br/>
<b>(请输入长度为6至20位的密码)</b>
</div>
</div>
<div class="formitm">
<label class="lab">再次输入密码:</label>
<div class="ipt">
<input type="password" class="u-ipt" name="repwd" id="repwd" onBlur="repwdcommit();"/>
</div>
</div>
<div class="formitm formitm-1"><button class="u-btn" type="submit" name="submit" id="submit">注册</button>
<button class="u-btn" type="reset">重置</button>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<div class="clearit"></div>
</div>
</div>
<div id="footer">
<div class="nav">
<ul>
<li class="jianjie"><a href="#" class="a1">华工IBM中心简介</a></li>
<li><a href="#" class="a2">网站简介</a></li>
<li><a href="#" class="a3">联系我们</a></li>
<li><a href="message.php" class="a4">留言建议</a></li>
<li><a href="#" class="a5">友情链接</a></li>
</ul>
</div>
<!-- <div class="friendlink">
<ul>
<li><a href="#" class="a1">科学松鼠会</a></li>
<li><a href="#" class="a2">蝌蚪五线谱</a></li>
<li><a href="#" class="a3">中国科普网</a></li>
<li><a href="#" class="a4"></a></li>
</ul>
</div> -->
<!-- <div class="copyright">
<div class="l">© Copyright © 2014.</div>
</div> -->
</div>
<a href="#" title="返回顶部" id="goTop"></a>
</body>
</html>