<!---
Name:        results2.cfm
Author:      Ben Forta (ben@forta.com)
Description: Creating search screens
Created:     4/15/01
--->

<!--- Get movie list from database --->
<CFQUERY NAME="movies" DATASOURCE="ows">
SELECT MovieTitle, PitchText, Summary, DateInTheaters
FROM Films
<!--- Search by movie title --->
<CFIF MovieTitle IS NOT "">
    WHERE MovieTitle LIKE '%#FORM.MovieTitle#%'
</CFIF>
<!--- Search by tag line --->
<CFIF PitchText IS NOT "">
    WHERE PitchText LIKE '%#FORM.PitchText#%'
</CFIF>
<!--- Search by rating --->
<CFIF RatingID IS NOT "">
    WHERE RatingID = #FORM.RatingID#
</CFIF>
ORDER BY MovieTitle
</CFQUERY>

<!--- Create HTML page --->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Orange Whip Studios - Movies</TITLE>
</HEAD>

<BODY>

<!--- Page header --->
<CFINCLUDE TEMPLATE="header.cfm">

<!--- Display movie list --->
<TABLE>
<TR>
 <CFOUTPUT>
 <TH COLSPAN="2">
  <FONT SIZE="+3">Movie List (#Movies.RecordCount# movies)</FONT>
 </TH>
 </CFOUTPUT>
</TR>
<CFOUTPUT QUERY="movies">
<TR>
 <TD>
  <FONT SIZE="+2"><B>#CurrentRow#: #MovieTitle#</B></FONT><BR>
  <FONT SIZE="+1"><I>#PitchText#</I></FONT>
 </TD>
 <TD>Released: #DateFormat(DateInTheaters)#</TD>
</TR>
<TR>
 <TD COLSPAN="2">#Summary#</TD>
</TR>
</CFOUTPUT>
</TABLE>

</BODY>
</HTML>

