<!--If you see line like the current or like this /* bla bla bla */ a change must be made to fit your needs-->

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
       <!-- Change the title of the web page with your own -->
<title>Result for LZ1ABC sound log</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {
	color: #990033;
	font-weight: bold;
}
.style2 {
	color: #0033CC;
	font-weight: bold;
	font-size: 18px;
}
.style3 {
	font-size: 19px;
	color: #3333CC;
	font-weight: bold;
}
.style4 {color: #FF9900}
-->
</style>
</head>
<body>

    <%@ page import="logfunctions.*" %>
    
	<% 
     String lines[]; 	
     String links[];
	 
	 if(request.getParameter("callsign").length()<3){
  		out.println("The callsign must be longer than 3 symbols!");
	    return; 
	 }
	
	/*-------------------------------------------------->>Insert your callsign instead of lz1abc*/
	else if(request.getParameter("callsign").compareToIgnoreCase("lz1abc")==0){
   		out.println("Not my callsing!");
		return; 
	}
	/*----------------------------------------------------------------------->>Enter the full path of the database file here(instead of E:\\database.log), use double \\ for specifying path */
	lines= SoundLogFunctions.findCallsign(request.getParameter("callsign"), "D:\\apache-tomcat-5.5.17\\webapps\\ROOT\\SoundFiles\\database.log");
	
	if(lines.length==1){
		if(lines[0].substring(0,3).compareToIgnoreCase("QSO")!=0){
			out.println(lines[0]);
			return;
		}
	}
	
	links= SoundLogFunctions.generateLinks(lines);						
	%><span class="style4">QSOs with</span> <span class="style3"><%= request.getParameter("callsign").toUpperCase() %></span> : 
	<table width="1000" border="2"><%
	
	for(int i=0; i<links.length; i++){
            if(lines[i]==null)
				break;
            %><tr>			<!-- You can change the image in the left part of the table, just replace m104hst1280x1024.jpg with your own path-->
                <td width="25"><img src="m104hst1280x1024.jpg" width="50" height="40"></td>
                <td width="957"><% 
																	   /*If your files are not with .mp3 extension, change it with the right one(for example .ogg)*/   
								 out.println("<BR><A HREF=\"/SoundFiles/"+links[i]+".wav\">" + lines[i] + "</A><BR>");	//print the links
							        		               /*Change the "/SoundFiles/" path with the path that is valid for you(for example: "/cqww2006cw/).")
														   	 Note that if you use /somedirectory/ , this means that some directory is located in the ROOT directory
															 If you use somedirectory/ (without stroke infront),  this means the somedirectory is located in the SoundLog directory */
								%>&nbsp;</td>
              </tr><%	  
	}
             
     %>
</table>
     <p>Use the <span class="style2">Back</span> button of your browser for a new search. </p>
     <hr>
    <pre class="style2">                          
</body>
</html>
