<?php
$db = mysql_connect("localhost", "root") or die ("Unable to connect to server");
mysql_select_db("georgetown10",$db);
$nowPlayingQuery = "SELECT tblmovie.iMovieID,tblmovie.sMovieName,tblmovie.hypMovieWebSite,tblmovie.imgMoviePromoPic,tblmovie.iMovieHoursLength,tblmovie.iMovieMinutesLength,tblgenre.sGenreName,tblrating.sRatingName FROM tblmovie,tblrating,tblgenre WHERE tblmovie.iRatingID = tblrating.iRatingID AND tblmovie.iGenreID = tblgenre.iGenreID AND blnMovieNowPlaying = 1";
$upcomingResult = "SELECT iMovieID,sMovieName,imgMoviePromoPic FROM tblmovie WHERE blnMovieHighlightedUpcoming = 1";
$newReleaseResult = "SELECT iMovieID,sMovieName,imgMoviePromoPic FROM tblmovie WHERE blnMovieNewRelease = 1";
$nowPlayingResult = mysql_query($nowPlayingQuery,$db);
$upcomingResult = mysql_query($upcomingQuery,$db);
$newReleaseResult = mysql_query($newReleaseQuery,$db);
?>
<table class="main">
<tr>
<td colspan="3">
<img src="images/banner.png" class="banner" alt="Georgetown 10 Banner" width="750" height="200">
</td>
</tr>
<tr>
<td class="left_container">
<br><br><img src="images/new_releases.png" alt="New Releases" width="200" height="100">
<table class="film_strip">
<?php
while ($myrow = mysql_fetch_array($newReleaseResult))
{
print (<tr class="film"><td class="film">);
printf("<a href=\"movie_info.php?id=%s\"><img src=\"%s\" alt=\"%s\" width=\"86\" height=\"132\" class=\"film\"></a>", $myrow["iMovieID"], $myrow["imgMoviePromoPic"], $myrow["sMovieName"]);
print (</td></tr>);
}
?>
</table>
<br>
<a href="
http://www.fandango.com"><img src="images/fandango.png" class="link" alt="Fandango" width="162" height="100"></a>
<br><br>
<img src="images/imdb_header.png" class="imdb" alt="IMDB Search Header" width="200" height="18">
<table class="imdb">
<tr>
<td>
<span class="imdb_text">Enter the name of a movie, TV show, or person and then click "Go" to get more information about it from
<A href="
http://www.imdb.com">imdb.com</a>.</span>
</td>
</tr>
<tr>
<td>
<form action="
http://www.imdb.com/Find" method=post>
<input type=hidden name=select value="All">
<input type=text name="for" size=14>
<input type="submit" value="Go">
</form>
</td>
</tr>
<tr>
<td>
<span class="imdb_text">Search provided by <A href="
http://www.imdb.com">The Internet Movie Database</a>.
To put a search on your web site, <A href="
http://us.imdb.com/how_to_link">click here</A>.</span>
</td>
</tr>
</table>
</td>
<td class="middle_container">
<img src="images/movie_times.png" alt="Movie Times" width="400" height="100">
<?php
while ($myrow = mysql_fetch_array($nowPlayingResult))
{
$count = 0;
print ("<table class=\"movie_time\">");
print ("<tr>");
print ("<td rowspan=\"3\" class=\"movie_pic\">");
printf ("<a href=\"%s\"><img src=\"images/PromoPix/%s\" class=\"film\" alt=\"%s\" width=\"86\" height=\"132\"></a>", $myrow["hypMovieWebSite"], $myrow["imgMoviePromoPic"], $myrow["sMovieName"]);
print ("</td>");
print ("<td colspan=\"2\" class=\"title\">">;
printf ("<a href=\"movie_info.php?id=%s\">%s</a>", $myrow["iMovieID"], $myrow["sMovieName"]);
print ("</td>");
print ("</tr>");
print ("<tr>");
print ("<td class=\"rating_length\">");
printf ("(%s)<br>", $myrow["sRatingName"]);
printf ("%shr %smin", $myrow["iMovieHoursLength"], $myrow["iMovieMinutesLength"]);
print ("</td>");
print ("<td class=\"times\">");
$movieTimeResult = mysql_query("SELECT iTimeStartHour, iTimeStartMinute FROM tbltime WHERE iMovieID = ".$myrow["iMovieID"]);
while ($innerRow = mysql_fetch_array($movieTimeResult))
{
if (count > 0)
{
print (" | ");
}
printf ("%s:%s", $innerRow["iTimeStartHour"], $innerRow["iTimeStartMinute"]);
++count;
}
print ("</td>");
print ("</tr>");
print ("</table><br>");
}
?>
<br>
<span class="bottom">
For all trailers in this site: <a href="
http://www.apple.com/trailers/"><img src="images/quicktime.png" class="link" alt="Quicktime Movie Trailers" width="88" height="31"></a> to view.
<br><br>
<img src="images/wds.png" class="wds" width="200" height="25" alt="White Dragon Systems">
</span>
</td>
<td class="right_container">
<br><br><img src="images/upcoming_releases.png" alt="Upcoming Releases" width="200" height="100">
<table class="film_strip">
<?php
while ($myrow = mysql_fetch_array($upcomingResult))
{
print (<tr class="film"><td class="film">);
printf("<a href=\"movie_info.php?id=%s\"><img src=\"%s\" alt=\"%s\" width=\"86\" height=\"132\" class=\"film\"></a>", $myrow["iMovieID"], $myrow["imgMoviePromoPic"], $myrow["sMovieName"]);
print (</td></tr>);
}
?>
</table>
</td>
</tr>
</table>
It's my understanding that you can pop in and out of PHP (so to speak)...