要特色:使用bootstrap搭建,登陆注册在一个页面,背景图片轮播
说明:图片820×560
代码:
<%@ page language=”java” contentType=”text/html; charset=UTF-8″
pageEncoding=”UTF-8″%>
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<title>登录注册</title>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + “://”
+ request.getServerName() + “:” + request.getServerPort()
+ path + “/”;
%>
<link rel=”shortcut icon” href=”<%=basePath %>img/brandbest.png” />
<!– Bootstrap –>
<link href=”<%=basePath %>bootstrap/css/bootstrap.min.css” rel=”stylesheet”>
<style>
body:{
}
#login_div{
width:26%;
hight:30%;
/*float:right;
margin-top:110px;
margin-right:160px; */
margin-left:37%;
margin-top:10%;
color:white;
position:absolute;
z-index:9999;
background-color:#000000;/* IE6和部分IE7内核的浏览器(如QQ浏览器)下颜色被覆盖 */
background-color:rgba(0,0,0,0.3); /* IE6和部分IE7内核的浏览器(如QQ浏览器)会读懂,但解析为透明 */
}
#regist_div{
width:26%;
hight:30%;
/*float:right;
margin-top:110px;
margin-right:160px; */
margin-left:37%;
margin-top:10%;
display:none;
color:white;
position:absolute;
z-index:9999;
background-color:#000000;/* IE6和部分IE7内核的浏览器(如QQ浏览器)下颜色被覆盖 */
background-color:rgba(0,0,0,0.3); /* IE6和部分IE7内核的浏览器(如QQ浏览器)会读懂,但解析为透明 */
}
</style>
<!– HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries –>
<!– WARNING: Respond.js doesn’t work if you view the page via file:// –>
<!–[if lt IE 9]>
<script src=”http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js”></script>
<script src=”http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js”></script>
<![endif]–>
<!– <script type=”text/javascript” src=”js/jquery-3.1.1.js”></script> –>
<script type=”text/javascript” src=”<%=basePath %>js/jquery-1.11.3.js”></script>
<script type=”text/javascript”>
$(function(){
$(“#gologin”).click(function(){
$(“#login_div”).show();
$(“#regist_div”).hide();
});
$(“#goregist”).click(function(){
$(“#login_div”).hide();
$(“#regist_div”).show();
});
});
</script>
</head>
<body>
<div class=”bg” style=”width:100%;height:100%;position:absolute;”>
<div id=”carousel-example-generic” class=”carousel slide” data-ride=”carousel”>
<!– Indicators –>
<ol class=”carousel-indicators”>
<li style=”display:none;” data-target=”#carousel-example-generic” data-slide-to=”0″ class=”active”></li>
<li style=”display:none;” data-target=”#carousel-example-generic” data-slide-to=”1″></li>
<li style=”display:none;” data-target=”#carousel-example-generic” data-slide-to=”2″></li>
</ol>
<!– Wrapper for slides –>
<div class=”carousel-inner” role=”listbox”>
<div class=”item active”>
<img style=”width:100%;” src=”<%=basePath %>img/bg1.jpg” alt=”…”>
<div class=”carousel-caption”>
<!– bg1.jpg –>
</div>
</div>
<div class=”item”>
<img style=”width:100%;” src=”<%=basePath %>img/bg2.jpg” alt=”…”>
<div class=”carousel-caption”>
<!– bg2.jpg –>
</div>
</div>
<div class=”item”>
<img style=”width:100%;” src=”<%=basePath %>img/bg3.jpg” alt=”…”>
<div class=”carousel-caption”>
<!– bg3.jpg –>
</div>
</div>
<!– … –>
</div>
<!– Controls –>
<!– <a class=”left carousel-control” href=”#carousel-example-generic” role=”button” data-slide=”prev”>
<span class=”glyphicon glyphicon-chevron-left”></span>
<span class=”sr-only”>Previous</span>
</a>
<a class=”right carousel-control” href=”#carousel-example-generic” role=”button” data-slide=”next”>
<span class=”glyphicon glyphicon-chevron-right”></span>
<span class=”sr-only”>Next</span>
</a> –>
</div>
</div>
<!– 登录框 –>
<div class=”loginAndRegist”>
<div id=”regist_div”>
<form>
<p style=”text-align:center;font-size:25px;”>用户注册 <a id=”gologin” style=”font-size:10px;cursor:pointer;”>去登录</a></p>
<div class=”form-group”>
<label for=”exampleInputEmail1″>账号</label> <input
type=”email” class=”form-control” id=”regist_name”
placeholder=”account”>
信如果自己申请过旅游签证或注册过EE的朋友,对GCKey和MyCIC一定不陌生。GCKey相当于是你登陆自己在加拿大移民局的账号的一把钥匙,通过这把钥匙,你就可以进入你自己的账号MyCIC,开始在线进行你的各项与移民局相关的申请活动,如办理签证、申请移民等,并且可以在线查看你的申请状态和进度。
下面就详细介绍下,具体该如何创建自己的账户吧。
首先,登陆官方网站:
https://www.canada.ca/en/immigration-refugees-citizenship/services/application/account.html。
选择注册“register“。
选择“register with GCKey”。
选择新建账号,点击“sign up”。
选择接受各项使用条款,点击“I accept”。
创建一个用户名。要求8-16个字符、不能有特殊符号、所含数字不能超过7个。创建完成,检查右侧的三个要求前的黑色圆点都变成绿色对勾时,即可continue下一步。若某一项要求前出现红色叉叉,则需要按照对应要求重设用户名。
创建完用户名后,要设置对应的密码,密码要求8-16个字符、不能包含用户名中连续的三个字符、字符有效、必须包含大写字母、小写字母、数字、两次输入密码一致。设置完成后继续continue下一步。
设置找回账户的账号恢复问题、答案和提示,建议截图保留,以免日后忘记密码找不回。
至此,GCKey创建完成,点击继续continue。
GCKey注册完成后,选择sign inwith GCKey,用新注册好的GCKey账户和密码进入:
https://www.canada.ca/en/immigration-refugees-citizenship/services/application/account.html。
进入注册好的GCKey账号后,接下来就要注册MyCIC账号,类似于实名制,将账号与真实的姓名和邮箱挂钩。
首先,接受隐私保密条款,点击I Accept。
根据护照上的姓名和真实信息创建账户。
设置安全问题,这里一定要记得截图,并记住自己设置的问题和答案!!!因为后续注册完成后,每次登陆都会要求随机回答一个安全问题才可以登陆。
安全问题设置完成后,就可以正式登陆到个人账户MyCIC的界面了,这样MyCIC账户就注册完成了。以后登陆MyCIC账户就直接使用GCKey的用户名和密码即可。
家觉得好的话,请大家关注点赞转发一波,谢谢!
1.制作一个测试主页
A.思维导图:
B.源码:
<?php
session_start();//启动新会话或者重用现有会话说明
?>
<html>
<head>
<meta charset="utf-8" />
<title>测试主页</title> <!--标题-->
</head>
<body>
<?php
if (isset($_SESSION['userName'])) //isset() 检测变量是否设置 如果登录成功
{
$userName = $_SESSION['userName'];//$_SESSION['username']的值赋值给变量$userName
echo "欢迎您:" . $userName; //欢迎您:登录的名称
echo '<a href = "logout.php"><input type = "button" value = "注销" /></a>'; //注销按钮
}
else {//登录失败
echo '<a href = "login.php"><input type = "button" value = "登录" /></a>';//登录按钮
echo '<a href = "register.php"><input type = "button" value = "注册" /></a>';//注册按钮
}
?>
</body>
</html>
C.结果:
*请认真填写需求信息,我们会在24小时内与您取得联系。