-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathavatar.jsp
51 lines (42 loc) · 1.71 KB
/
avatar.jsp
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
<%@include file="./database/connect.jsp" %>
<%
String query = "SELECT * FROM TrUserAvatar JOIN MsAvatar ON MsAvatar.avatarID=TrUserAvatar.avatarID WHERE userID=" + session.getAttribute("userID");
ResultSet result = st.executeQuery(query);
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bidang Pekerjaan</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/home.css">
<link rel="stylesheet" href="./css/avatar.css">
<script src="js/javascript.js"></script>
</head>
<body>
<%@ include file="header.jsp" %>
<section>
<p class="title">Your Avatar Collection</p>
<div class="button shop"><a class="shop" href="./avatarShop.jsp">Shop For More Avatar</a></div>
<p style="color:red;text-align: center;font-size: 20px;background-color: white;"><% if(request.getParameter("err") != null) out.println(request.getParameter("err")); %></p>
<div class="cards">
<%
while(result.next()){
%>
<div class="card">
<center>
<img class="avatar-img" src="./assets/avatar/<%= result.getString("avatar") %>" alt="">
<div class="button"><a href="./controller/changeAvatar.jsp?id=<%= result.getString("TrUserAvatar.avatarID") %>">Use this Avatar !</a></div>
</center>
</div>
<%
}
%>
</div>
</section>
<%@ include file="footer.jsp" %>
</body>
</html>
<% con.close(); %>