anchor.diff:  		    out.println("</select> <input TYPE='submit' NAME='CommitSearch' VALUE='Search'><br>");
               out.println(" <BR></BR>");
               out.println("<b><font color=Gold>Here is the list of all sensor records for satisfied the search condition.</font></b>");
  -
  +>>>>>>> f553d6a5fa074fe7571283318b7c32a20544b99e
  +
  +            String sqlString = "";
  +	    	String fdate = request.getParameter("from");
  +	    	String tdate = request.getParameter("to");
  +			String searchKey = request.getParameter("search_key");
  +            String searchLocation = request.getParameter("search_location");
  +            String searchSType= request.getParameter("search_sensor_type");
           
               if (request.getParameter("CommitSearch") != null) {
  +<<<<<<< HEAD
  +            	
  +            	if(request.getParameter("from").equals("") &&
  +            	   request.getParameter("to").equals("")) {
  +            		out.println("<br><b>Must select a time period to search.</b>");
  +                }
  +            	
  +            	out.println("haha");
  +            	
  +            	
  +            	
  +            	sqlString = "SELECT distinct ar.recording_id,ar.date_created, ar.length, ar.recorded_data, ar.description"
  +				    		+"i.image_id, i.date_created, i.recoreded_data,i.thumbnail, i.description "
  +                          +"sd.id, sd.date_created, sd.value"
  +				    		+"FROM audio_recordings ar, images i, scalar_data sd WHERE "; 
  +            	
  +				
  +				    		
  +            	if(((String)session.getAttribute("role")).equals("s")){
  +            		sqlString = sqlString +"ar.sensor_id ="+sensorId+", AND i.sensor_id = "+sensorId+", AND sd.sensor_id = "+sensorId ;
  +            		out.println("hehe");
  +			    }
  +				    	
  +
  +            	if(fdate != null){
  +				    sqlString = sqlString + "ar.date_created >= to_date('"+fdate+"','MM/DD/YYYY')"
  +				                          +" AND i.date_created  >= to_date('"+fdate+"','MM/DD/YYYY')"
  +                                        +" AND sd.date_created >= to_date('"+fdate+"','MM/DD/YYYY')";
  +				    out.println("heihei");
  +            	}
  +
  +            	if(tdate != null){
  +
  +            		sqlString = sqlString + "ar.date_created <= to_date('"+tdate+"','MM/DD/YYYY') "
  +                                        + " AND i.date_created  >= to_date('"+tdate+"','MM/DD/YYYY') "
  +                                        +" AND sd.date_created >= to_date('"+tdate+"','MM/DD/YYYY') ";
  +            		out.println("lala");
  +            	} 
  +			
  +=======
               	if(!(request.getParameter("search_key").equals("")&&
                   	request.getParameter("search_location").equals("")&&
                       request.getParameter("search_sensor_type").equals("")&&
  
positive.code:             out.println(" <TR>");
  			out.println("<TD><B><I><font color=HotPink>Time period:</font></I></B></TD>");
  			out.println("<TD><label for='from'><font color=HotPink>&nbsp;From</font></label>");
              out.println(" <INPUT TYPE='text' class='from' NAME='from' /></TD>");
  			out.println("<TD><label for='to'><font color=HotPink >To</font></label>");
              out.println(" <INPUT TYPE='text' class='to' NAME='to' /><font color=HotPink >*</font></TD>");
  
negative.code: 		    out.println("<TABLE>");
  			out.println("<TR>");
  			out.println("<TD><B><I><font color=HotPink>Search keys:&nbsp;&nbsp;&nbsp;</TD>");
  <<<<<<< HEAD
  			out.println("<TD><INPUT TYPE='text' NAME='search_key' VALUE=''>");
  			out.println("</TR>");
  			out.println("<TR>");
              out.println("<TD><B><I><font color=HotPink>Location:&nbsp;</TD>");
              out.println("<TD><INPUT TYPE='text' NAME='search_location' VALUE=''></TD>");
  =======
  			out.println("<TD><INPUT TYPE='text' NAME='search_key' VALUE=''></TD>");
  			out.println("</TR>");
  			out.println("<TR>");
              out.println(" <TD><B><I><font color=HotPink>Location:&nbsp;</TD>");
              out.println(" <TD><INPUT TYPE='text' NAME='search_location' VALUE=''></TD>");
  >>>>>>> f553d6a5fa074fe7571283318b7c32a20544b99e
  			out.println("</TR>");
  			out.println("<TR>");
              out.println(" <TD><B><I><font color=HotPink>Sensor type:&nbsp;</TD>");
  