"> <?php foreach ($cards as $card) { ?> <?php if ($card['status_id'] == $status['id']) { ?> <div class="card <?php echo 'card-type-' . $card['card_type_id']; ?> " id="card-<?php echo $card['id']; ?> "><?php printCard($card); ?> </div> <?php } ?> <?php } ?> <!-- $stories --> </td> <?php } ?> <!-- $statusNames --> </tr>
<?php include_once './html/topRow.php'; ?> </div> <div class="portfolio_row"> <div class="container"> <div class="row"> <div class="col-sm-12 text-center"> <div class="top_section_spacer"></div> <h3 class="portfolio_title">PORTFOLIO</h3> <div class="top_section_spacer"></div> </div> <?php for ($i = 0; $i < count($projects); $i++) { printCard($projects[$i][0], $projects[$i][1]); } function printCard($modalName, $img) { echo '<div class="col-sm-4">'; echo '<a data-toggle="modal" data-target="#' . $modalName . '_modal">'; echo '<div class="panel-default panel">'; echo '<img src="./imgs/Cards/' . $img . '" style="width:100%;"/>'; echo '</div>'; echo '</a>'; echo '</div>'; } ?> </div> <div class="row">
<h3 id="totalCost" class="h3" style="color: white">Total Cost: $0</h3> <input name="total" id="total" type="text" style="visibility: hidden"> <h3 class="h3" style="color: white">Use Card:</h3> <div> <select id="cardDropDown" class="element" name="cardDropDown"> <?php function printCard($row) { echo "<option name=\"" . $row["Card_Num"] . "\">" . $row["Card_Num"] . "</option>"; } $conn = connectDB("FancyHotel"); $query = "SELECT Card_Num FROM Payment WHERE Username =\"" . $_SESSION["username"] . "\""; $rs = selectQuery($conn, $query); while ($row = $rs->fetch_assoc()) { printCard($row); } $conn->close(); ?> <option id="cardNew" value="Add new card">Add new card</option> </select> </div> <!-- <button style="margin-left: 44.5%; margin-top: 10px; width: 10%" type="button" class="btn btn-warning" onclick="addPayment();">Add Card </button> --> <div id="addNewCard" style="visibility: hidden; text-align: center"> <h3 style="color:white"> Add a new card:</h3> <br> <input name="cardName" id="cardName" type="text" placeholder="Name on card"> <input name="cardNo" id="cardNo" type="number" max="9999999999999999" placeholder="Card Number">