81 lines
2.8 KiB
Plaintext
81 lines
2.8 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/include.jsp"%>
|
|
<%
|
|
if(session.getAttribute("member_no") == null || session.getAttribute("member_no").equals("")){
|
|
%>
|
|
<script>
|
|
alert("Disconnected.\Please log in again.");
|
|
opener.reload_go()
|
|
self.close();
|
|
</script>
|
|
<%
|
|
}else{
|
|
%>
|
|
<%
|
|
String call = r_call(request.getParameter("call"));
|
|
String c_edu_no = r_call(request.getParameter("c_edu_no"));
|
|
String c_edu_project_no = r_call(request.getParameter("c_edu_project_no"));
|
|
String c_project_no = r_call(request.getParameter("c_project_no"));
|
|
String c_team_no = r_call(request.getParameter("c_team_no"));
|
|
String c_curi_no = r_call(request.getParameter("c_curi_no"));
|
|
|
|
if(call.equals("") || c_edu_no.equals("") || c_edu_project_no.equals("") || c_project_no.equals("") || c_team_no.equals("") || c_curi_no.equals("")){
|
|
%>
|
|
<script>
|
|
alert("Wrong connection.")
|
|
self.close()
|
|
</script>
|
|
<%
|
|
}else{
|
|
if(call.equals("0")){
|
|
String sql_sr2 = "select * from tbl_edu_target where c_edu_project_no = "+ c_edu_project_no +" and c_team_no = "+ c_team_no +" and c_member_no = "+ session.getAttribute("member_no") +" ";
|
|
ResultSet rs_sr2 = stmt.executeQuery(sql_sr2);
|
|
if (rs_sr2.next()) {
|
|
if(rs_sr2.getInt("c_now") == 0){
|
|
String sql_p = "update tbl_edu_target set c_now = 1, c_answer_date = now() where c_edu_project_no = "+ c_edu_project_no +" and c_team_no = "+ c_team_no +" and c_member_no = "+ session.getAttribute("member_no") +" ";
|
|
stmt2.execute(sql_p);
|
|
}
|
|
}
|
|
rs_sr2.close();
|
|
|
|
sql_sr2 = "select * from tbl_edu_result where c_project_no = "+ c_project_no +" and c_edu_project_no = "+ c_edu_project_no +" and c_edu_no = "+ c_edu_no +" and c_team_no = "+ c_team_no +" and c_member_no = "+ session.getAttribute("member_no") +" and c_curi_no = "+ c_curi_no +" ";
|
|
rs_sr2 = stmt.executeQuery(sql_sr2);
|
|
if (rs_sr2.next()) {
|
|
}else{
|
|
String sql_p2 = "insert into tbl_edu_result (c_project_no,c_edu_project_no,c_edu_no,c_team_no,c_member_no,c_curi_no,c_start_date) values ("+ c_project_no +","+ c_edu_project_no +","+ c_edu_no +","+ c_team_no +","+ session.getAttribute("member_no") +","+ c_curi_no +",now())";
|
|
stmt2.execute(sql_p2);
|
|
|
|
}
|
|
rs_sr2.close();
|
|
|
|
|
|
}
|
|
|
|
|
|
String sql_sr=" select * from tbl_edu_curi where c_no = " + c_curi_no;
|
|
ResultSet rs_sr = stmt.executeQuery(sql_sr);
|
|
if (rs_sr.next()) {
|
|
%>
|
|
<html>
|
|
<head>
|
|
<title><%=rs_sr.getString("c_title")%></title>
|
|
</head>
|
|
<body>
|
|
<font color=#787878><b>* <%=rs_sr.getString("c_title")%></b></font>
|
|
<video oncontextmenu="return false;" id="myVideo" width="100%" controls >
|
|
<source src="http://apply.ci.concytec.gob.pe/upload/movie/<%=rs_sr.getString("c_movie")%>" type="video/mp4">
|
|
|
|
</video>
|
|
</body>
|
|
</html>
|
|
<script>
|
|
opener.reload_go();
|
|
</script>
|
|
<% }
|
|
rs_sr.close();
|
|
%>
|
|
<%}%>
|
|
<%}%>
|
|
|
|
<%@include file="/include/include_b.jsp"%>
|