Esempio n. 1
0
 while ($displayProductCounter < $countProductOrders) {
     echo "<div class='row force-padding'>";
     echo "<div class='col-md-3'>";
     echo "\t\t<img src='http://dev.gunsdaily.net/assets/img/store/" . $finalOrderList['Order ' . $displayCounter]['ProductInfo']['Product ' . $displayProductCounter]['Product Number'] . ".png' style='height:75px; width:160px;' alt='Image not found' />";
     echo "\t</div>";
     echo "<div class='col-md-9'>";
     echo "<div class='caption'>";
     $p_number = $finalOrderList['Order ' . $displayCounter]['ProductInfo']['Product ' . $displayProductCounter]['Product Number'];
     $p_quantity = $finalOrderList['Order ' . $displayCounter]['ProductInfo']['Product ' . $displayProductCounter]['Quantity'];
     $p_price = $finalOrderList['Order ' . $displayCounter]['ProductInfo']['Product ' . $displayProductCounter]['Price'];
     echo "<h4 class='pull-right'>" . $p_quantity . " ordered. <b>\$" . $p_price . "</b></h4>";
     // Gets product ID for the product that is been echoed in the while loop
     $whileProductID = $finalOrderList['Order ' . $displayCounter]['ProductInfo']['Product ' . $displayProductCounter]['Product Number'];
     echo "<h4><a href='#'>" . $fullProductArray['Product ' . $whileProductID]['Product Name'] . " </a> ";
     echo " <i> ProductID #" . $fullProductArray['Product ' . $whileProductID]['Product ID'] . "</i></h4>";
     echo "<p>" . limit_desc($fullProductArray['Product ' . $whileProductID]['Product Desc'], 25) . "</p>";
     echo "</div>";
     echo "</div>";
     echo "</div>";
     echo "<hr>";
     $displayProductCounter++;
 }
 echo "</div>";
 echo "</div>";
 echo "</div>";
 echo "<div class='col-md-3'>";
 echo "<div class='thumbnail account-overview account-right overview-modal' style='min-height:" . $height . "'>";
 echo "<div class='title2 row'>";
 // Creates date for the order array
 $phpdate = strtotime($o_date);
 $o_date2 = date('l jS', $phpdate);
Esempio n. 2
0
 $conn = new PDO("mysql:host={$hostdb}; dbname={$namedb}", $userdb, $passdb);
 $conn->exec("SET CHARACTER SET utf8");
 // Sets encoding UTF-8
 // Define and perform the SQL SELECT query
 $sql = "SELECT * FROM `store` {$productType}";
 $result = $conn->query($sql);
 // Parse returned data, and displays them
 while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
     echo "<div class='col-sm-4 col-lg-4 col-md-4'>";
     echo "\t<div class='thumbnail'>";
     echo "\t\t<img src='/assets/img/store/" . $row['store_id'] . ".png' style='height:150px; width:320px;' alt='Image not found'>";
     echo "\t\t<div class='caption'>";
     echo "\t\t\t<h4 class='pull-right'>\$" . $row['store_price'] . "</h4>";
     echo "\t\t\t<h4><a href='#'>" . limit_desc($row['store_name'], 3) . "</a>";
     echo "\t\t\t</h4>";
     echo "\t\t\t<p>" . limit_desc($row['store_desc'], 20) . "</p>";
     echo "\t\t</div>";
     echo "\t\t<div class='ratings'>";
     echo "\t\t\t<p class='pull-right'>" . count($sqlIntoArray["STORE PRODUCT NUMBER " . $row['store_id']]) . " reviews</p>";
     echo "\t\t\t<p>";
     // Creates the stars, ceil rounds up decimal
     $starsCounter = 1;
     while ($starsCounter <= ceil($finalAverageRating["Product " . $row['store_id']])) {
         echo "<span class='fa fa-star'></span>";
         $starsCounter++;
     }
     //	while($starsCounter <= 5) {
     //		echo "<span class='fa fa-star'></span>";
     //		$starsCounter++;
     //	}
     // Calulates the amount of stars that have not been applied