<!--- 
 Filename:   WapIndex4.cfm
 Created by:  Nate Weiss (NMW)
 Purpose:   A home card for browsing and searching films via WAP
--->

<!--- Include WAP Content-Type and Prologue --->
<cfinclude template="WapIncludePrologue.cfm">
<!--- Get movies from database --->
<cfquery datasource="ows" name="getMovies" 
 cachedwithin="#createTimeSpan(0,0,15,0)#">
 SELECT FilmID, MovieTitle, Summary 
 FROM Films
 ORDER BY MovieTitle
</cfquery>

<wml>
 <card id="home">
  <p>
   <!--- Welcome message --->
   <b>OrangeWAP Studios</b><br/>
   <i>Celluloid by Cell</i><br/>
   <!--- Links to other pages --->
   <a href="#movies">Browse Movies</a><br/>
   <a href="#search">Search Movies</a><br/>
  </p>
 </card>
 <card id="movies">
  <!--- Present a link for each movie --->
  <p>
   <b>Orange Whip Movies</b><br />
   <cfoutput query="getMovies">
    <cfset movieCardURL = "WapMov.cfm?FilmID=#FilmID#">
    <a href="#movieCardURL#">#MovieTitle#</a><br/>
   </cfoutput>
  </p>   
 </card>
 
 <card id="search">
  <p>
   <b>Movie Search</b>
  </p>   
 </card>
</wml>
