<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<%
//로그인정보 확인
String loginId = (String)session.getAttribute("id");
String loginName=(String)session.getAttribute("name");
boolean login = (loginId == null) ? false : true;

if(login){
	out.println(loginName + "님이 로그인 되어 있습니다.");
	out.println("<a href='logout.jsp'>로그아웃</a>");
}
else
{
	out.println("로그인이 되어 있지 않습니다.");
	out.println("<a href='loginTest.jsp'>로그인</a>");
}
%>
<h1>2018학년도 2학기 수강신청 리스트</h1>
<form name="datainput" method="post" action="dataoutput.jsp">

<table border="1" algin="center">
<tr>
<td>아이디</td>
<td>
<%	
 if(session.getAttribute("id") != null){
	out.println(session.getAttribute("id"));
	}
	else{
%>
	<input type="text" name="stdName" size="50"/>
<%	}%>
</td>
</tr>

<tr>
<td>이름</td>
<td>
<%
if(session.getAttribute("name") != null){
	out.println(session.getAttribute("name"));
}
else{%>
<input type="text" name="stdName" size="50"/>
<%	}%>
</td>
</tr>

<tr>
<td>과목</td>
<td width="30">
<input type="checkbox" name="selcetCourse" value="java"/> JAVA<br>
<input type="checkbox" name="selcetCourse" value="jsp"/> JSP<br>
<input type="checkbox" name="selcetCourse" value="database"/> DataBase<br>
<input type="checkbox" name="selcetCourse" value="iso"/> iSO<br>
<input type="checkbox" name="selcetCourse" value="android"/> Android<br>
</td>

<tr align="center">
<td colspan="2">
<input type="submit" value="수강신청">
<input type="reset" value="수강취소">
</td>
</tr>
</table>
</form>
<a href="resultView.jsp">수강신청 현황 </a>
</center>
</body>
</html>