<html>
<head>
<title> Customer Rentals </title>
</head>
<body>
<server>
if(client.customerID != null)
{
  cursor = database.cursor("select * from rentals, videos where rentals.returnDate IS NULL AND rentals.videoId = videos.id AND rentals.customerId = " + client.customerID);
}    
else
{
  redirect("client.html");
}
</server>
<table border>
<caption> Current Rentals </caption>
<tr>
  <th>Title</th>
  <th>Rental Date</th>
  <th>Due Date</th>
</tr>
<server>
while(cursor.next()) {
</server>
<tr>
  <th><server>write(cursor.title);</server></th> 
  <td><server>write(cursor.rentalDate.toLocaleString());</server></td> 
  <td><server>write(cursor.dueDate.toLocaleString());</server></td> 
</tr>
<server>
}
</server>
</table>
<p><A HREF="8">Rent Another</A>
<p><A HREF="3">Home</A>
</body>
</html>
