home *** CD-ROM | disk | FTP | other *** search
/ PC Extra 07 & 08 / pca1507.iso / extra / cursus / java.exe / eclipse.project / view_family.jsp < prev    next >
Encoding:
Extensible Markup Language  |  2003-05-21  |  3.7 KB  |  118 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5.  
  6. <%@ page session="true" errorPage="error.jsp" %>
  7. <%@ page import="com.magpiesoftware.db.*" %>
  8. <%@ page import="com.magpiesoftware.bean.*" %>
  9. <%@ page import="java.util.*, com.magpiesoftware.util.*"%>
  10.  
  11. <%@ include file="begin.jsp"%>
  12.  
  13. <head>
  14.   <title>Uw stamboom op het internet</title>
  15.   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  16.   <link rel="stylesheet" href="stylesheet.css" type="text/css"/>
  17.  
  18. </head>
  19.  
  20. <body class="bgcontent">
  21.  
  22. <%
  23.   String id = request.getParameter("id");
  24.   int idval = id!=null && id.length()>0 ? Integer.parseInt(id) : 0;
  25.  
  26.   FamilyBean bean = Relatives.getFamilyById(idval);
  27.   if (idval>0) {
  28. %>
  29.  
  30. <br/>
  31. <div align="center" class="txt"><b>Familie Listing</b><br/></div>
  32.  
  33. <div align="center">
  34. <br/>
  35. <br/>
  36. <br/>
  37. <span class="txt"><b></b></span>
  38. <table border="0" cellspacing="0" cellpadding="2" width="95%">
  39. <tr>
  40.   <td class="bglight" width="20">  </td>
  41.   <td class="bglight" width="100">  Familie <%=idval%></td>
  42.   <td class="bglight" >  </td>
  43.   <td class="bglight" >  </td>
  44. </tr>
  45.  
  46. <%
  47.   IndividualBean husband = Relatives.getIndividualById( Integer.parseInt(bean.getHusband()));
  48.   IndividualBean wife = Relatives.getIndividualById( Integer.parseInt(bean.getWife()));
  49. %>
  50.  
  51. <tr>
  52.   <td class="txt"> </td>
  53.   <td class="txtb">Echtgenoot</td>
  54.   <td class="txt"><a href="view_individual.jsp?id=<%=bean.getHusband()%>"><%=husband.getFirst()%> <%=husband.getLast()%> (<%=bean.getHusband()%>)</a></td>
  55.   <td class="txt" valign="middle" align="center" rowspan="7"></td>
  56. </tr>
  57.  
  58. <tr>
  59.   <td class="txt"> </td>
  60.   <td class="txtb">Echtgenote</td>
  61.   <td class="txt"><a href="view_individual.jsp?id=<%=bean.getWife()%>"><%=wife.getFirst()%> <%=wife.getLast()%> (<%=bean.getWife()%>)</a></td>
  62. </tr>
  63.  
  64. <tr>
  65.   <td class="txt"> </td>
  66.   <td class="txtb">Huwelijk </td>
  67.   <td class="txt"><%=bean.getMarried().getDate()%> <%=bean.getMarried().getPlace()%></td>
  68. </tr>
  69.  
  70. <tr>
  71.   <td class="txt"> </td>
  72.   <td class="txtb" valign="top">Kinderen</td>
  73.   <td class="txt"  valign="top">
  74.     <ul>
  75.  
  76. <%
  77.   Map children = Relatives.getChildrenByFamily( Integer.parseInt(bean.getId()));
  78.   for (Iterator itc = children.keySet().iterator(); itc.hasNext(); ) {
  79.     String key = (String)itc.next();
  80.     IndividualBean child = (IndividualBean)children.get(key);
  81. %>
  82.       <li><a href="view_individual.jsp?id=<%=child.getId()%>"><%=key%></a><br/>
  83.  
  84.       <%
  85.         Object[] families = Relatives.getFamilyByIndividualId( Integer.parseInt(child.getId()));
  86.  
  87.         for (int i=0; i<families.length; i++) {
  88.           FamilyBean relFamily = (FamilyBean)families[i];
  89.  
  90.           if ( Integer.parseInt(relFamily.getId())>0) {
  91.             IndividualBean relhusband = Relatives.getIndividualById( Integer.parseInt(relFamily.getHusband()));
  92.             IndividualBean relwife = Relatives.getIndividualById( Integer.parseInt(relFamily.getWife()));
  93.  
  94.       %>
  95.          Marriage <a href="view_family.jsp?id=<%=relFamily.getId()%>"><%=relhusband.getFirst()%> <%=relhusband.getLast()%> x <%=relwife.getFirst()%> <%=relwife.getLast()%> (<%=relFamily.getId()%>)</a><br/><br/></li>
  96.       <%
  97.           }
  98.         }
  99.       %>
  100. <%}%>
  101.     </ul>
  102.   </td>
  103. </tr>
  104.  
  105. </table>
  106. <br/>
  107.  
  108. <%}%>
  109.  
  110. <br/>
  111.  
  112. </div>
  113. <div class="txt" align="center">[<a href="javascript:history.back()">terug</a>] [<a href="#" onclick="self.window.print()">afdrukken listing</a>]</div>
  114.  
  115. <%@ include file="end.jsp"%>
  116.  
  117. </body>
  118. </html>