54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
|
<%@include file="/include/include.jsp"%>
|
|
<%
|
|
String call_home = r_call(request.getParameter("c_home"));
|
|
String call_maker = r_call(request.getParameter("c_maker"));
|
|
String call_image = r_call(request.getParameter("c_image"));
|
|
|
|
int c_num = 0;
|
|
String sql_sub="SELECT * from tbl_image where c_home = "+ call_home +" and c_maker = "+ call_maker +" and c_relation = "+ call_image +" and c_view=0 order by c_order asc";
|
|
ResultSet rs_sub22 = stmt.executeQuery(sql_sub);
|
|
while (rs_sub22.next()) {
|
|
c_num = c_num + 1;
|
|
%>
|
|
<%if(!rs_sub22.getString("c_title1").equals("")){%>
|
|
<a href="<%=rs_sub22.getString("c_title1")%>" target="<%=rs_sub22.getString("c_title2")%>">
|
|
<%}%>
|
|
<img id="im<%=call_image%>_<%=c_num%>" src="/upload/main/<%=rs_sub22.getString("c_file")%>" alt="" style="<%if(c_num > 1){%>display:none<%}%>;width:100%" >
|
|
</a>
|
|
<% }
|
|
rs_sub22.close();
|
|
int call_time = 6000;
|
|
if(call_image.equals("1")){
|
|
call_time = 7000;
|
|
}
|
|
if(call_image.equals("2")){
|
|
call_time = 6000;
|
|
}
|
|
if(call_image.equals("3")){
|
|
call_time = 5000;
|
|
}
|
|
%>
|
|
<script>
|
|
function img<%=call_image%>(flag){
|
|
<%for(int i = 1; i < c_num + 1; i++){%>
|
|
document.getElementById("im<%=call_image%>_<%=i%>").style.display = "none";
|
|
<%}%>
|
|
document.getElementById("im<%=call_image%>_" + flag).style.display = "block";
|
|
}
|
|
timerIDcal<%=call_image%> = 5<%=call_image%>;
|
|
function timerX2cal<%=call_image%>(flag){
|
|
img<%=call_image%>(flag);
|
|
if (flag == <%=c_num%>){ //flag 알림판 갯수만큼 숫자
|
|
flag = 1;
|
|
}else{
|
|
flag = flag + 1;
|
|
}
|
|
clearTimeout(<%=call_image%>);
|
|
timerIDcal<%=call_image%> = setTimeout("timerX2cal<%=call_image%>("+flag+")",<%=call_time%>);
|
|
}
|
|
timerX2cal<%=call_image%>(1)
|
|
|
|
</script>
|
|
<%@include file="/include/include_b.jsp"%>
|