c-innovacion2/resoft/field_manager/process/main/image/list.jsp

113 lines
4.9 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/field_manager/include/manager_head.jsp"%>
<%
String c_home = r_call(request.getParameter("c_home"));
String c_maker = r_call(request.getParameter("c_maker"));
String c_image = r_call(request.getParameter("c_image"));
if(c_image == null || c_image.equals("")){
%>
<script>
alert("Wrong Connection.")
</script>
<%
}else{
%>
<center>
<br>
<br>
<br>
<table width="1000" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr style="font-size:14px;">
<td height="60">
<%
int c_main_type = 0;
String sql_ok2 = "select c_name, c_eng_name, c_main_type from tbl_field where c_no = " + c_home ;
ResultSet rss = stmt.executeQuery(sql_ok2);
if(rss.next()){
c_main_type= rss.getInt("c_main_type");
%>
<b><%=rss.getString("c_name")%> / <%=rss.getString("c_eng_name")%> Main / Image <%=c_image%>. Management</b>
<%
}
rss.close();
%>
<br>
<br>
<img src="/images/type<%=c_main_type%>_<%=c_image%>.gif">
</td>
</tr>
</table>
<table width="1000" cellSpacing="0" cellPadding="0" border="0" bgcolor=ffffff>
<tr style="font-size:14px;">
<td width="60" height="40" scope="col" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Order</td>
<td width="100" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Name</td>
<td height="" scope="col" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">IMage</td>
<td width="250" height="" scope="col" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Link</td>
<td width="50" height="" scope="col" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Window</td>
<td width="70" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">use</td>
<td width="70" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Del</td>
<td width="80" style="text-align:center; border-top:2px solid #9BBB67; border-bottom:1px solid #9BBB67">Ordering</td>
</tr>
<%
int old_order = 0;
String sql1=" SELECT * from tbl_image where c_home = "+ c_home +" and c_maker = "+ c_maker +" and c_relation = "+ c_image +" order by c_order asc";
ResultSet rst = stmt.executeQuery(sql1);
int n_order = 0;
while (rst.next()) {
n_order= n_order + 1;
%>
<tr>
<td width="" height="35" align="center"><%=n_order%></td>
<td style="text-align:center; padding:5px"><%=rst.getString("c_name")%></td>
<td style="text-align:center; padding:5px"><img src="http://apply.ci.concytec.gob.pe/upload/main/<%=rst.getString("c_file")%>" width="100%"></td>
<td style="text-align:center; padding:5px"><%=rst.getString("c_title1")%></td>
<td style="text-align:center; padding:5px">
<%if(rst.getString("c_title2").equals("_self")){%>
Current window
<%}else{%>
New window
<%}%>
</td>
<td style="text-align:center; padding:5px">
<%if(rst.getInt("c_view") == 0){%>
<a href="change2.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>&c_image=<%=c_image%>&c_view=1&c_no=<%=rst.getString("c_no")%>">[Use]</a>
<%}else{%>
<a href="change2.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>&c_image=<%=c_image%>&c_view=0&c_no=<%=rst.getString("c_no")%>">[Not Use]</a>
<%}%>
</td>
<td width="" align="center"><a href="#none" onclick="if(confirm('After deletion, recovery is not possible.\nAre you sure you want to delete it??')){location.href='delete.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>&c_image=<%=c_image%>&c_no=<%=rst.getString("c_no")%>'}">[Del]</td>
<td width="" align="center">
<% if(old_order > 0){%>
<a href="change.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>&c_image=<%=c_image%>&now_order=<%= rst.getInt("c_order")%>&change_order=<%=old_order%>">▲</a>
<% }%>
</td>
</tr>
<tr>
<td colspan="0" height="1" bgcolor="e5e5e6"></td>
</tr>
<%
old_order = rst.getInt("c_order");
}
rst.close();
%>
<tr>
<td></td>
<td height="35" align="right" colspan="9" style="padding-bottom:10px;padding-top:10px">
<a href="insert.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>&c_image=<%=c_image%>" style="width: 98px; line-height: 30px; text-align: center;display: inline-block; background: #5e7cc4; border: 1px solid #555; border-radius: 5px; color: #ffffff;">Insert Iamge</a>
<a href="../list.jsp?c_home=<%=c_home%>&c_maker=<%=c_maker%>" style="width: 98px; line-height: 30px; text-align: center;display: inline-block; background: #cdcdcd; border: 1px solid #555; border-radius: 5px; color: #333333;">To Main Management</a>
</td>
<td></td>
</tr>
</table>
<%}%>
<%@ include file="/field_manager/include/manager_bottom.jsp"%>