<?php

@mysql_connect("mysql.csail.mit.edu","filmsai","filmsAI+3456") or die("Foo!");
@mysql_select_db("filmsAI") or die("Bar!");

$entry=@mysql_query("SELECT * FROM `testTJG2` ORDER BY date ASC");

while ($current = mysql_fetch_array ($entry)) {
	
	$number = $current["reel"];					
	$title = $current["title"];
	$date = $current["date"];
	$description = $current["description"];
	$desc = substr($description,0,80);
	$filename = $current["url"];
	$tempname = split("-", $filename);
	$firstbit = $tempname[0];
	$firstchar = substr_replace($firstbit, "", -1);
	$firstchar++;			

	if($filename){
	echo ('
	<center>
	<table style="text-align: left; width: 100%;" border="0" cellpadding="0" cellspacing="5">
		<tbody>		
			<tr>
				<td width="5%">
				</td>
				<td	> '.$date.'
				</td>
				<td>
					<b>'.$title.'</b>  
					<a href="http://projects.csail.mit.edu/films/dynamicPage.php?reel%23='.$firstbit.'&amp;res='.$list.'">'.$filename.'</a> 
					<br />
					'.$desc.' . . . <br />
					
				</td>
			</tr>
		</tbody>
	</table>
	</center>
	
	');
	
}}
?>
