<h1><?php echo "{$title}"; ?> </h1> <h2>Info</h2> <p> <?php echo $book; ?> </p> <?php } $ck = new cookieMonster(); $ck->setBooksCookie($titleid); } ?> <p><a href="list.php">No Thanks</a></p> <?php if (!$titleid) { ?> <p>Email Address: <input type="text" name="email" /><a href="home.php">Buy!!</a></p> <?php } else { ?> <form action="home.php" method="post">
<html> <head> <title>Home Page</title> </head> <?php require_once 'db/persistence.php'; $dbp = new persistDisplay(); require_once 'cookie/cookie.php'; $ck = new cookieMonster(); $ck->checkViewedBooks(); ?> <body> <h1>Home Page</h1> <p>A Great Document Website</p> <p>You haven't viewed any documents yet</p> <p><strong>Documents you have viewed:</strong></p> <?php $bookViewed = $ck->booksViewed; foreach ($bookViewed as $kID) { $bookTitle = $dbp->getTitles($kID); echo "<p>{$bookTitle[$kID]}</p>"; } ?>
<!DOCTYPE html> <HTML> <head> <title>Document List</title> </head> <body> <?php require_once 'cookie/cookie.php'; $ck = new cookieMonster(); require_once 'db\\persistence.php'; $dbp = new persistDisplay(); $titles = $dbp->getTitles(); ?> <h1>Documents</h1> <?php foreach ($titles as $id => $title) { $bId = $ck->getValidBookCookie($id); if ($bId != 0 || $bId != '') { ?> <p><?php echo "*" . $title; ?> <a href="detail.php?id=<?php echo $id; ?> ">More Info</a></p> <?php