</a>
      </li>

      <li>
        <a href="#awarded-auctions">
          Awarded
        </a>
      </li>

    </ul>
  </div>


  <div class="col-md-10">
    <?php 
$average_stars_user = getAverageStarsForUser($userId);
$auction_set_unfiltered = retrieve_buyer_auctions();
$auction_set = filter_non_expired_auctions($auction_set_unfiltered);
$auction_set = filter_auctions_not_won($auction_set, $_SESSION['userId']);
$auction_set = filter_auctions_already_rated($auction_set, $_SESSION['role']);
if ($auction_set) {
    $output = "\n        <div class=\"alert alert-warning\" role=\"alert\">\n          <button type=\"button\" class=\"close fui-cross\"\n              data-dismiss=\"alert\">\n          </button>\n          <h4>Leave Feedback!</h4>\n          <table class=\"table\" id=\"table-account-feedback\">\n            <col width=\"200px\">";
    foreach ($auction_set as $auction) {
        $encoded_seller_id = urlencode(htmlentities($auction['seller']));
        $encoded_auction_id = urlencode(htmlentities($auction['auctionId']));
        $imageName = htmlentities($auction['imageName']);
        $title = htmlentities($auction['title']);
        $description = htmlentities($auction['description']);
        $winning_price = htmlentities($auction['winning_price']);
        $link = "leave_feedback.php?user_id={$encoded_seller_id}";
        $link .= "&auction_id={$encoded_auction_id}";
示例#2
0
<?php

require_once '../includes/dbconnection.php';
require_once '../includes/session.php';
require_once '../includes/navigation.php';
require_once '../includes/form_processing.php';
require_once '../includes/layouts/header.php';
$userId = $_GET['for_user_id'];
$feedbackMainResult = getFeedbackInformation($userId);
$feedbackMainResultForAverageStars = getAverageStarsForUser($userId);
?>

    <div class="container">
        <?php 
$feedback = mysqli_fetch_assoc(getFeedbackInformation($userId));
?>
        <?php 
if ($feedback['comment'] !== null) {
    $outputIntroduction = "<h1>" . "Feedback for" . " " . "{$feedback["firstName"]}" . " " . "{$feedback["lastName"]}" . " " . "(" . "{$feedbackMainResultForAverageStars["stars"]}" . " stars" . ")" . "</h1>";
    $outputIntroduction .= "<h4>" . "</h4>";
    echo $outputIntroduction;
    if ($feedback["role"] == 1) {
        echo "<h4>" . "User Type:" . " Buyer" . "</h4>";
    } else {
        echo "<h4>" . "User Type:" . " Seller" . "</h4>";
    }
    $outputTableHeader = " <table class=\"feedback-table table table-striped\">\n        <col width=\"300px\">\n        <col width=\"200px\">\n        <col width=\"200px\">\n        <col width=\"400px\">\n\n        <thead>\n            <tr>\n                <th><h4>Auction Item</h4></th>\n                <th><h4>Ratings</h4></th>\n                <th><h4>Date</h4></th>\n                <th><h4>Feedback</h4></th>\n            </tr>\n        </thead>\n        <tbody>";
    echo $outputTableHeader;
    while ($row = mysqli_fetch_assoc($feedbackMainResult)) {
        $link = "auction.php?auctionId=" . urlencode($row['auctionId']);
        $output1 = "<tr>\n            <td>\n            <a href=\"{$link}\"><h6>{$row['auctionTitle']}</h6></a>\n            <a href=\"{$link}\"><img class=\"feedback_img\" src=\"img/auctions/{$row['imageName']}\" class=\"feedback-table\"></a>\n\n                </td>\n            <td>\n            <div class=\"feedback-result-rating\">";