public function render()
    {
        Header::renderHeader(true);
        if (count($this->auctionDetail->imageIDs) > 0) {
            $url = "/auction/image?id=" . $this->auctionDetail->imageIDs[0];
        } else {
            $url = "/assets/img/logo.png";
        }
        echo '
          <div class="media">
             <div class="media-left">
                 <a href="#">
                    <img id="item_image" class="media-object" class="img-responsive" src="' . $url . '">
                 </a>
             </div>
             <div class="media-body">
                <h1 class="media-heading">' . $this->auctionDetail->itemName . '</h1>
                <span>Expiration time: ' . DateTimeUtils::formatDate($this->auctionDetail->endDate) . '</span>
                <div class="panel panel-default">
                     <div class="panel-body">
                        <div class="col-lg-4"> <span id="bid">Highest bid £' . $this->auctionDetail->maxBid . ' </span></div>
                        <div class="col-lg-4"><span id="number_bids">' . $this->auctionDetail->numberOfBids . ' bids</span></div>
                        <div class="col-lg-4"><span id="no_bidders">' . $this->auctionDetail->numberOfBidders . ' bidders</span></div>
                     </div>
                </div>
                <div class="panel panel-default">
                     <div class="panel-body">
                        <div class="col-lg-4"><span id="no_watchers">' . $this->auctionDetail->watchers . ' watching </span></div>
                        <div class="col-lg-4"<span id="no_views">' . $this->auctionDetail->views . ' views</span></div>


                     </div>
                </div>
             </div>
         </div>

                    </div>
                </div>
            </div>

         </div>
         <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Item description</h3>
            </div>
            <div class="panel-body">
                ' . $this->auctionDetail->itemDescription . '
            </div>
         </div>
         <form action="" method="post">
         <button class="btn btn-primary btn-large btn-block" name="report" type="report" value="report">Email Report</button>
         </form>
         <div class="panel panel-default">

            <a href="/auction/homepage">Back to search results</a>
         </div>
        ';
    }
    public function render()
    {
        Header::renderHeader(true);
        echo '

        <div id="uploadSuccess" class="container">
            <div class="row-fluid">

                <div class="col-lg-9 col-lg-offset-1">
                    <h1>Successfully Uploaded Item!</h1>

                    <div>
                        <div>
                            <label>Product Name</label>
                        </div>
                        <div class="form-control">' . $this->auctionDetail->itemName . '
                        </div>
                        <div><label>Product Description</label></div>
                        <div class="form-control">
                            ' . $this->auctionDetail->itemDescription . '
                        </div>
                        <div class="col-lg-4 col-lg-offset-1">
                            <div><label>Start Price</label></div>

                            <div class="form-control">

                                ' . $this->auctionDetail->startPrice . '

                            </div>
                        </div>
                        <div class="col-lg-4 col-lg-offset-2">
                            <div><label>Item condition</label></div>
                            <div class="form-control">' . $this->auctionDetail->itemCondition . '
                            </div>
                        </div>
                        <div class="col-lg-4 col-lg-offset-1">
                            <div><label>End Date</label></div>
                            <div class="form-control">

                            ' . DateTimeUtils::formatDate($this->auctionDetail->endDate) . '
                            </div>
                        </div>
                        <div class="col-lg-4 col-lg-offset-2">
                            <div><label>Start date</label></div>
                            <div class="form-control">' . DateTimeUtils::formatDate($this->auctionDetail->startDate) . '
                            </div>
                        </div>

                        <div class="col-lg-4 col-lg-offset-3" id="upload-image">';
        foreach ($this->auctionDetail->imageIDs as $image) {
            echo '<img style="width: 100%;" src="/auction/image?id=' . $image . '">';
        }
        echo '</div>
                    </div>
                </div>
            </div>
        </div>';
    }
    public function render()
    {
        //Echo the view
        //renders the header automatically
        Header::renderHeader();
        $bidManager = new BidManager();
        $auctionId = (int) $_GET['id'];
        ?>

  <div id="bidHistory" class="container">
    <div class="well well-small">
    	<?php 
        ?>
      <h2><?php 
        echo $bidManager->getAuctionTitle($auctionId);
        ?>
's Bid History Page</h2>
      <br>
      <table>
        <tr>
          <th>Amount</th>
          <th>Time of bid</th> 
          <th>Username</th>
          <th>First Name</th>
          <th>Last Name</th>
        </tr>

      <?php 
        foreach ($bidManager->getBidHistory($auctionId) as $history) {
            echo "<tr>";
            echo "<td>" . $history->amount . "</td>";
            echo "<td>" . $history->time_of_bid . "</td>";
            echo "<td>" . $history->username . "</td>";
            echo "<td>" . $history->first_name . "</td>";
            echo "<td>" . $history->last_name . "</td>";
            echo "</tr>";
        }
        echo "</table>";
        ?>
                   

    </div>
  </div>

<?php 
    }
    public function render()
    {
        //Echo the view
        //renders the header automatically
        Header::renderHeader();
        $feedbackManager = new FeedbackManager();
        $userId = (int) $_GET['id'];
        ?>

  <div id="feedback" class="container">
    <div class="well well-small">
    	<?php 
        echo "<h2>" . $feedbackManager->getUserName($userId) . "'s Feedback Page</h2>";
        ?>
    	<br>
	<table>
	  <tr>
	    <th>Comment</th>
      <th>Rating</th>
	    <th>From</th> 
	    <th>What item</th>
	    <th>When</th>
	  </tr>

	<?php 
        foreach ($feedbackManager->getUserFeedback($userId) as $feedback) {
            echo "<tr>";
            echo "<td>" . $feedback->comment . "</td>";
            echo "<td>" . $feedback->rating . "</td>";
            echo "<td>" . $feedback->first_name . " " . $feedback->last_name . "</td>";
            echo "<td>" . $feedback->title . "</td>";
            echo "<td>" . $feedback->end_date . "</td>";
            echo "</tr>";
        }
        echo "</table>";
        ?>
                        

    </div>
  </div>

<?php 
    }
    public function render()
    {
        Header::renderHeader();
        $SettingsManager = new SettingsManager();
        $userManager = new UserManager();
        $loggedInUser = $userManager->getLoggedInUser();
        $updateFailedBlock = '';
        if ($this->updateFailed) {
            $updateFailedBlock .= '<h6 id="update_fail"><i class="glyphicon glyphicon-alert"></i>  Some of your information is incorrect.</h6></span>';
        }
        echo '<div id="settings" class="container">
    <div class="well well-small">
      <h2>Settings</h2>
      <ul class="nav nav-tabs">
        <li class="active"><a data-toggle="tab" href="#uPassword">Update Password</a></li>
        <li><a data-toggle="tab" href="#uEmail">Update Email</a></li>
        <li><a data-toggle="tab" href="#emailNotifications">Email Notifications</a></li>
      </ul>

      <div class="tab-content">
        <div id="uPassword" class="tab-pane fade in active">
          <h3>Update Password</h3>
          <p>Update your password here</p>
          <form class="form-horizontal" action="/auction/settingsPasswordForm" method="post" role="form">
            <div class="form-group">
              <label class="control-label col-sm-2" for="pwd"><span class="glyphicon glyphicon-lock form-control-feedback"></span></label>
              <div class="col-sm-10">
                <input type="password" name="oldPassword" class="form-control" required="required" id="oldpwd" placeholder="Enter old password">
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2" for="pwd"><span class="glyphicon glyphicon-lock form-control-feedback"></span></label>
              <div class="col-sm-10">          
                <input type="password" name="newPassword" class="form-control" required="required" id="UserPassword" placeholder="Enter new password">
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2" for="pwd"><span class="glyphicon glyphicon-lock form-control-feedback"></span></label>
              <div class="col-sm-10">          
                <input type="password" name="password_check" class="form-control" required="required" id="UserPasswordCheck" onkeyup="checkPass(); return false;" placeholder="Confirm new password">
                <span id="confirmMessage" class="confirmMessage"></span>
              </div>
            </div>
            ' . $updateFailedBlock . '
            <div class="form-group">        
              <div class="col-sm-12">
                <button type="submit" class="btn btn-primary btn-large btn-block">Submit</button>
              </div>
            </div>
          </form>

        </div>
        <div id="uEmail" class="tab-pane fade">
          <h3>Update Email</h3>
          <p>Update your email here</p>
            <form class="form-horizontal" action="/auction/settingsEmailForm" method="post" role="form">
            <div class="form-group">
              <label class="control-label col-sm-2" for="email"><span class="glyphicon glyphicon-envelope form-control-feedback"></label>
              <div class="col-sm-10">
                <input type="email" class="form-control" name="OldEmail" id="OldEmail" required="required" placeholder="Enter old email">
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2" for="pwd"><span class="glyphicon glyphicon-envelope form-control-feedback"></label>
              <div class="col-sm-10">          
                <input type="email" class="form-control" name="NewEmail" id="NewEmail" required="required" placeholder="Enter new email">
              </div>
              <span id="confirmEmailMessage" class="confirmEmailMessage"></span>
            </div>
            <?php echo $updateFailedBlock; ?>
            <div class="form-group">        
              <div class="col-sm-12">
                <button type="submit" class="btn btn-primary btn-large btn-block">Submit</button>
              </div>
            </div>
          </form>
        </div>
        <div id="emailNotifications" class="tab-pane fade">
                  <h3>Email Notifications</h3>
          <form class="form-horizontal" action="/auction/settingsNotificationsForm" method="post" role="form">
            <label for="emailNotifications"><p>Check this to receive notifications on your items, uncheck to turn off</p></label>
          <input type="checkbox" name="notification" value="Y" ' . ($loggedInUser->notifications ? 'checked="checked"' : "") . '">
            <button type="submit" class="btn btn-primary btn-large btn-block">Submit</button>
          </form>
        </div>
      </div>
    </div>
  </div>';
    }
    public function render()
    {
        Header::renderHeader(true);
        //echo"<pre>".var_export($this->ProfileSellerDetail, true)."</pre>";
        $user_id = $this->ProfileDetail->user_id;
        $username = $this->ProfileDetail->username;
        $first_name = $this->ProfileDetail->first_name;
        $last_name = $this->ProfileDetail->last_name;
        $description = $this->ProfileDetail->description;
        $feedback_id = $this->ProfileDetail->feedback_id;
        $rating = $this->ProfileDetail->rating;
        $num_of_ratings = $this->ProfileDetail->num_of_ratings;
        ?>

<div id="profile" class="container">
    <div class="well well-small">

    <div class="details">
        <h3><?php 
        echo $username;
        ?>
</h3>
        <h4><?php 
        echo $first_name . " " . $last_name;
        ?>
</h4>
        <p><?php 
        $ratingRound = round($rating * (100 / 5));
        echo $ratingRound;
        ?>
% positive feedback</p>
    </div>

    <div class="description">
        <h4>User bio: </h4>
        <p><?php 
        echo $description;
        ?>
</p>
    </div>

    <div class="feedback">
        <div class="rightAlign">
            <?php 
        echo '<a href="/auction/feedback?id=' . $user_id . '"><button type="button" class="btn btn-primary">See all feedback</button></a>';
        ?>
        </div>
        <h4>Feedback</h4>
        <div class="star-rating">
            <?php 
        for ($x = 1; $x < 6; $x++) {
            if ($x > round($rating)) {
                echo '<i class="glyphicon glyphicon-star-empty"></i>';
            } else {
                echo '<i class="glyphicon glyphicon-star"></i>';
            }
        }
        echo '(' . $num_of_ratings . ')';
        ?>
        </div>
    </div>
</div>
</div>
        
<?php 
    }
    public function render()
    {
        //Echo the view
        //renders the header automatically
        Header::renderHeader();
        $giveFeedbackManager = new GiveFeedbackManager();
        $feedbackManager = new FeedbackManager();
        $updateFailedBlock = '';
        if ($this->updateFailed) {
            $updateFailedBlock .= '<h6 id="update_fail"><i class="glyphicon glyphicon-alert"></i>  Some of your information is incorrect.</h6></span>';
        }
        $user_to_id = $_REQUEST['user_to_id'];
        $auction_id = $_REQUEST['auction_id'];
        ?>

  <div id="giveFeedback" class="container">
    <div class="well well-small">
    	<h3>Feedback</h3>
    	<?php 
        echo "<h4>On user: "******"</h4>";
        ?>
    	<?php 
        foreach ($giveFeedbackManager->getAuction($auction_id) as $auction) {
            echo "<h4>On auction: " . $auction->title . "</h4>";
        }
        echo '<form class="form-horizontal" action="/auction/giveFeedbackForm?user_to_id=' . $user_to_id . '&auction_id=' . $auction_id . '" method="post" role="form">';
        ?>
        <div class="form-group">
          <label class="control-label col-sm-3">Rating:</label>
          <div class="col-sm-9">
            <select name="rating" class="form-control" id="sel1">
					    <option value="1">1</option>
					    <option value="2">2</option>
					    <option value="3">3</option>
					    <option value="4">4</option>
					    <option value="5">5</option>
					  </select>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-sm-3" for="pwd">Comments:</label>
          <div class="col-sm-9">          
            <textarea type="text" name="comment" class="form-control" rows="5" required="required" id="comment" placeholder="Enter comments about user"></textarea>
          </div>
        </div>
        <?php 
        echo $updateFailedBlock;
        ?>
        <div class="form-group">        
          <div class="col-sm-12">
            <button type="submit" class="btn btn-primary btn-large btn-block">Submit</button>
          </div>
        </div>
      </form>
		</div>
	</div>



<?php 
    }
    public function render()
    {
        $auctionManager = new AuctionManager();
        $categories = $auctionManager->getAllCategories();
        Header::renderHeader(true);
        echo '
        <div id="upload" class="container">
            <div class="row-fluid">

                <div class="col-lg-10 col-lg-offset-1">
                    <form action="/auction/upload" style="" class="login-form" id="UserLoginForm" method="post" accept-charset="utf-8" enctype="multipart/form-data">
                    <fieldset class="form-group">
                        <label for="item_title">Product Name</label>
                        <input type="text" class="form-control" id="item_title" name="item_title" placeholder="Product Name" required="required">
                    </fieldset>
                    <div class="form-group">
                        <label for="item_description">Product Description</label>
                        <input type="text" class="form-control" id="item_description" name="description" placeholder="Product Description" required="required">
                    </div>
                    <fieldset class="form-group col-lg-4">
                        <label for="item_start_price">Start Price</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-gbp"></i>
                            </span>
                        <input type="number" min="0.01" step="0.01" class="form-control" id="item_start_price" name="start_price" placeholder="0.00" required="required">
                        </div>
                    </fieldset>
                    <fieldset class="form-group col-lg-4 col-lg-offset-2">

                        <label for="item_reserve_price">Reserve Price</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-gbp"></i>
                            </span>
                        <input type="number" min="0.01" step="0.01" class="form-control" id="item_reserve_price" name="reserve_price" placeholder="0.00" required="required">
                        </div>
                    </fieldset>
                    <fieldset class="form-group col-lg-4">
                        <label for="item_start_date">Start Date</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i>
                            </span>
                            <input type="date" class="form-control" id=item_start_date name="start_date"/>
                        </div>
                    </fieldset>
                    <fieldset class="form-group col-lg-4 col-lg-offset-2">
                        <label for="item_start_time">Start time</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i>
                            </span>
                            <input type="time" class="form-control" id=item_start_time name="start_time"/>
                        </div>
                    </fieldset>
                    <fieldset class="form-group col-lg-4">
                        <label for="item_start_date">End Date</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i>
                            </span>
                            <input type="date" class="form-control" id=item_end_date name="end_date" required="required" />
                        </div>
                    </fieldset>
                    <fieldset class="form-group col-lg-4 col-lg-offset-2">
                        <label for="item_start_time">End time</label>
                        <div class="input-group">
                        <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i>
                            </span>
                            <input type="time" class="form-control" id=item_end_time name="end_time"/>
                        </div>
                    </fieldset>
                    <fieldset class=" form-group col-lg-4">
                           <label for="ItemCondition">Item Condition</label>
                          <select name="item_condition" class="form-control" id="ItemCondition" required="required">
                                    <option value="">Please choose</option>
                                    <option value="New - in box">New - in box</option>
                                    <option value="New">New</option>
                                    <option value="Used once">Used once</option>
                                    <option value="Used">Used</option>
                                    <option value="Small defect">Small defect</option>
                                    <option value="Needs fixing">Needs fixing</option>
                          </select>
                    </fieldset>
                    <fieldset class="form-group col-lg-4 col-lg-offset-2">
                        <label for="category">Category</label>
                    <select multiple="multiple" name="category[]" class="form-control" id="category" required="required">
                        ';
        foreach ($categories as $category) {
            echo "<option value=" . $category->id . ">" . $category->name . "</option>";
        }
        echo '
                    </select>
                    </fieldset>
                    <fieldset class="form-group">
                    <label for="fileToUpload">Select image to upload:</label>
                        <input type="file" class="form-control" name="userfile" id="userfile" required="required" accept="image/*" >
                    </fieldset>

                    <div class="form-group">
                                <button class="btn btn-primary btn-large btn-block" name="submit" type="submit" value="submit"> Submit </button>
                     </div>
                     </form>
                </div>
            </div> <!-- row-fluid -->
        </div> <!-- regisister container -->';
    }
    public function render()
    {
        //Echo the view
        //renders the header automatically
        Header::renderHeader();
        $auctionManager = new AuctionManager();
        $sortSelected = isset($_POST['sort']) ? $_POST['sort'] : "";
        echo '
        <div id="searchresults" class="container">

            <h1>BidBucket</h1>
            <h6 id="homeSubheader">Where cool items hang out</h6>

        <div class="surroundss">

        <div class="menu">
            <h3>Categories</h3>
            <ul>
            ';
        foreach ($auctionManager->getAllCategories() as $category) {
            echo '<a href ="/auction/homepage?searchTerm=&categoryID=' . $category->id . '"><li>' . $category->name . '</li></a>';
        }
        echo '
            </ul>
       </div>
        <div class="main">
            <p id="currentAuctionsHeader">Current Auctions</p>
            <form name="sortform" method="post" class="form-inline">
                <div class="form-group">
                    <label for="sort">Sort:</label>
                        <select class="form-control" name="sort" onchange="this.form.submit()">';
        foreach (AuctionManager::$sorts as $sort) {
            $selected = $sortSelected == $sort ? "selected" : "";
            echo '<option ' . $selected . ' value="' . $sort . '">' . $sort . '</option>';
        }
        echo '
                        </select>
                        <noscript><input type="submit" value="Submit"></noscript>
                </div>
            </form>
            <br>';
        foreach ($this->auctionDetails as $auction) {
            if (count($auction->imageIDs) > 0) {
                $url = "/auction/image?id=" . $auction->imageIDs[0];
            } else {
                $url = "/assets/img/logo.png";
            }
            $watching = "Not watching";
            if ($auction->isWatching == 1) {
                $watching = "Watching";
            }
            echo '
                <table>
                    <tr>
                      <td rowspan="8"><img src="' . $url . '" align="left" width="120" alt="logo"></td>
                      <td><a href="/auction/auction?id=' . $auction->auctionId . '"><h3>' . $auction->itemName . '</h3></a></td>
                    </tr>
                    <tr><td><b>Current price</b>: £ ' . $auction->maxBid . ' </td></tr>
                    <tr><td><b>Number of bids</b>: ' . $auction->numberOfBids . '</td></tr>
                    <tr><td><b>Condition</b>: ' . $auction->itemCondition . '</td></tr>
                    <tr><td><b>Starting price</b>: £ ' . $auction->startPrice . '</td></tr>
                    <tr><td><b>Start date</b>: ' . DateTimeUtils::formatDate($auction->startDate) . '</td></tr>
                    <tr><td><b>End date</b>: ' . DateTimeUtils::formatDate($auction->endDate) . '</td></tr>
                    <tr><td>' . $watching . '</td></tr>
                </table>
                <br><br>';
        }
        echo '</div>
  </div>
</div>';
    }
    public function render()
    {
        //Echo the view
        //renders the header automatically
        Header::renderHeader();
        $auctionSellerManager = new AuctionSellerManager();
        $auctionManager = new AuctionManager();
        $sortSelected = isset($_POST['sort']) ? $_POST['sort'] : "";
        echo '
        <div id="searchresults" class="container">
        <div class="surroundss">
        <div class="menu">
            <h3>Categories</h3>
            <ul>
            ';
        // change this to output the seller items
        foreach ($auctionManager->getAllCategories() as $category) {
            echo '<a href ="/auction/homepage?searchTerm=&categoryID=' . $category->id . '"><li>' . $category->name . '</li></a>';
        }
        echo '
            </ul>
       </div>
        <div class="main">
            <h1>Welcome to BidBucket</h1>
            <p>Here is a list of all of your auctions</p>
            <form name="sortform" method="post" class="form-inline">
                <div class="form-group">
                    <label for="sort">Sort:</label>
                        <select class="form-control" name="sort" onchange="this.form.submit()">';
        foreach (AuctionSellerManager::$sorts as $sort) {
            $selected = $sortSelected == $sort ? "selected" : "";
            echo '<option ' . $selected . ' value="' . $sort . '">' . $sort . '</option>';
        }
        echo '
                        </select>
                </div>
            </form>';
        foreach ($this->auctionReport as $auction) {
            if (count($auction->imageIDs) > 0) {
                $url = "/auction/image?id=" . $auction->imageIDs[0];
            } else {
                $url = "/assets/img/logo.png";
            }
            echo '
                <table>
                    <tr>
                      <td rowspan="7"><img src="' . $url . '" align="left" width="120" alt="logo"></td>
                      <td><a href="/auction/auctionseller?id=' . $auction->auctionId . '"><h3>' . $auction->itemName . '</h3></a></td>
                    </tr>
                    <tr><td><b>Current price</b>: £ ' . $auction->maxBid . ' </td></tr>
                    <tr><td><b>Number of bids</b>: ' . $auction->numberOfBids . '</td></tr>
                    <tr><td><b>No of unique bidders</b>: ' . $auction->numberOfBidders . '</td></tr>
                    <tr><td><b>No of watchers</b>: ' . $auction->watchers . '</td></tr>
                    <tr><td><b>No of views</b>: ' . $auction->views . '</td></tr>
                    <tr><td><b>End date</b>: ' . DateTimeUtils::formatDate($auction->endDate) . '</td></tr>
                </table>
                <br><br>';
        }
        echo '</div>
</div>
</div>';
    }
 public function render()
 {
     Header::renderHeader(true);
     $userManager = new UserManager();
     $isCurrentUserHighestBidder = $userManager->getLoggedInUser()->userID == $this->auctionDetail->highestBidderID;
     $step = round($this->auctionDetail->maxBid * 0.05, 2);
     $minValue = $this->auctionDetail->maxBid + $step;
     if (count($this->auctionDetail->imageIDs) > 0) {
         $url = "/auction/image?id=" . $this->auctionDetail->imageIDs[0];
     } else {
         $url = "/assets/img/logo.png";
     }
     $loggedInUser = $userManager->getLoggedInUser();
     /**
      * Search - needs to be abstracted
      */
     echo '
     <div class="container">
       <div class="media">
          <div class="media-left">
              <a href="#">
                 <img id="item_image" class="media-object" class="img-responsive" src="' . $url . '">
              </a>
          </div>
          <div class="media-body">
             <h1 class="media-heading">' . $this->auctionDetail->itemName . '</h1>
             <div class="panel panel-default">
                  <div class="panel-body">';
     if ($this->auctionDetail->isAuctionExpired) {
         echo '
                 <span><b>Item expired!</b></span><br><br>';
     }
     if (!$this->auctionDetail->isAuctionStarted) {
         echo '
                 <span><b>Item is not on auction yet!</b></span><br><br>';
     }
     echo '
                 <p><b>Auction start time</b>: ' . DateTimeUtils::formatDate($this->auctionDetail->startDate) . '</p>
                 <p><b>Expiration time</b>   : ' . DateTimeUtils::formatDate($this->auctionDetail->endDate) . '</p>';
     if (!$this->auctionDetail->isAuctionExpired && $this->auctionDetail->isAuctionStarted) {
         echo '
                      <span id="bid_price">£ ' . $this->auctionDetail->maxBid . '</span>
                      <a href="/auction/bidHistory?id=' . $this->auctionDetail->auctionId . '"><span id="bid_number">  ' . $this->auctionDetail->numberOfBids . '  bids</span></a>
                     <div><i>' . ($isCurrentUserHighestBidder ? "You are the current highest bidder!" : "") . '</i></div>
     ';
         //if the user is a buyer, they can bid on or watch an item
         if ($loggedInUser->roleID == 1) {
             echo '
                  <form method="post">
                     <input type="hidden" value="' . $this->auctionDetail->auctionId . '" name="id">
                     <input type="hidden" value="' . $this->auctionDetail->itemName . '" name="itemName">
                     <div class="form-group">
                         <input type="number" min="' . $minValue . '" class="form-control" placeholder="Enter your max. bid" name="newBid" value="' . $this->auctionDetail->maxBid . '">
                     </div>
                     <button type="submit" class="btn btn-default" id="submitBid">Submit</button>
                     <span>';
             if (!$this->auctionDetail->isWatching) {
                 echo '<a href="/auction/auction?id=' . $this->auctionDetail->auctionId . '&isWatching=1"><br><i class="glyphicon glyphicon-eye-open"></i>' . ' ' . ' Start watching </a>';
             } else {
                 echo '<a href="/auction/auction?id=' . $this->auctionDetail->auctionId . '&isWatching=0"><br><i class="glyphicon glyphicon-eye-close"></i> Unwatch </a>';
             }
             echo '
                     </span>
                  </form>
                  ';
         }
     }
     echo '
             </div>
          </div>
      </div>';
     echo '<div class="panel panel-default">
         <div class="panel-heading">
             <a href="/auction/profile?id=' . $this->auctionDetail->sellerID . '"><h3 class="panel-title">' . $this->auctionDetail->sellerName . '</h3></a>
             <div class="star-rating">
                 <div>';
     for ($x = 1; $x < 6; $x++) {
         if ($x > round($this->auctionDetail->sellerRating)) {
             echo '<i class="glyphicon glyphicon-star-empty"></i>';
         } else {
             echo '<i class="glyphicon glyphicon-star"></i>';
         }
     }
     echo '(' . $this->auctionDetail->numberOfRatings . ')';
     echo '
                 </div>
             </div>
         </div>
         <div class="panel-body">
             <a href="/auction/feedback?id=' . $this->auctionDetail->sellerID . '">View detailed feedback</a>
         </div>
      </div>
      <div class="panel panel-default">
         <div class="panel-heading">
             <h3 class="panel-title">Item description</h3>
         </div>
         <div class="panel-body">
             ' . $this->auctionDetail->itemDescription . '
         </div>
      </div>
      <div class="panel panel-default">
         <div class="panel-heading">
             <h3 class="panel-title">Item condition</h3>
         </div>
         <div class="panel-body">
             ' . $this->auctionDetail->itemCondition . '
         </div>
         <a href="/auction/homepage">Back to search results</a>
      </div>
      </div>
     ';
 }