Exemple #1
0
            $isbn_used = substr($textbook['ISBN_v10'], 8);
        } else {
            if ($lookup == null && !empty($textbook['ISBN_v13'])) {
                $isbn_used = substr($textbook['ISBN_v13'], 11);
            }
        }
        $lookup = BookLookup::runGoogleBooksRESTCall($isbn_used);
        if ($lookup['totalItems'] == 0) {
            $lookup = null;
            $thumbnail_url = "../assets/images/smallThumbnailPlaceholder.png";
        } else {
            if ($lookup != null) {
                $thumbnail_url = BookLookup::returnSmallThumbnailURL($lookup);
            }
        }
        $price_tag = BookLookup::returnBookPrice($lookup);
        echo '<aside><img class="thumbnail" src="' . $thumbnail_url . '"/></aside>';
        echo '<aside><p><a rel="nofollow" href="http://www.amazon.com/gp/product/' . $isbn_used . '/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=' . $isbn_used . '&linkCode=as2&tag=book0920-20&linkId=CT2AYIAC6JDFTZV4" target="blank">' . $textbook['Text_Name'] . '</a></p>';
        //return link to amazon product page
        echo '<p> Author: ' . $textbook['Primary_Author'] . '</p>';
        //book author
        echo '<p>' . $price_tag . '</p></aside>';
        //book price (if available)
        echo '</li>';
    }
}
?>
            </ul>
        </section>

<?php 
Exemple #2
0
echo "Textbook for Sale:";
?>
            </h2>
            <ul>
                <?php 
$textbook = $_SESSION["AUCTION_TEXTBOOK"];
if (!empty($textbook) && $textbook != null) {
    echo '<li class="book-result custom-box-shadow">';
    $thumbnail_url = "";
    $lookup = BookLookup::runGoogleBooksRESTCall($_SESSION["AUCTION_INFO"]->getISBN());
    if ($lookup['totalItems'] == 0) {
        $lookup = null;
        $thumbnail_url = "../assets/images/smallThumbnailPlaceholder.png";
    } else {
        if ($lookup != null) {
            $thumbnail_url = BookLookup::returnSmallThumbnailURL($lookup);
        }
    }
    echo '<aside><img class="thumbnail" src="' . $thumbnail_url . '"/></aside>';
    echo '<aside><p>' . $textbook['Text_Name'] . '</p>';
    //book name
    echo '<p>Author: ' . $textbook['Primary_Author'] . '</p>';
    //book author
}
?>
                <?php 
$bid_display_price = $_SESSION['AUCTION_INFO']->getStartBidPrice() < $_SESSION['AUCTION_BID'] ? $_SESSION['AUCTION_BID'] : $_SESSION['AUCTION_INFO']->getStartBidPrice();
if ($_SESSION['AUCTION_INFO']->getAuctionEnded()) {
    if ($_SESSION['username'] === $_SESSION['AUCTION_INFO']->getSellerUserName()) {
        echo '<p>Auction has ended. User ' . $_SESSION['AUCTION_INFO']->getWinnerUserName() . ' won the book.</p>';
    } else {