要特色:使用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小時內與您取得聯系。