47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
<?php
|
|
|
|
require_once("lib.php");
|
|
$mflib = new MFLib();
|
|
|
|
$mflib->limitperpage = 15;
|
|
|
|
$mflib->setCookie();
|
|
session_start();
|
|
|
|
$mflib->initialize();
|
|
|
|
if (isset($_SESSION["uuid"]) && $_SESSION["uuid"] != "") {
|
|
if ($mflib->dataGetWishlist() != null) {
|
|
echo "
|
|
<tr>
|
|
<th>Item Name</th>
|
|
<th>Price</th>
|
|
<th>Creator</th>
|
|
<th>Rating</th>
|
|
<th>Edit</th>
|
|
</tr>";
|
|
|
|
foreach ($mflib->dataGetWishlist() as $row) {
|
|
if (strlen($row["name"]) >= 40) {
|
|
$NAME = substr(substr($row["name"], 0, 40), 0, strrpos(substr($row["name"], 0, 40), ' ')) . " ...";
|
|
} else $NAME = $row["name"];
|
|
|
|
if (!isset($row["rating"])) {
|
|
$row["rating"] = "None";
|
|
}
|
|
|
|
echo "
|
|
<tr>
|
|
<td alt=\"" . $row["name"] . "\"><a href=\"" . $row["url_link"] . "\">" . $NAME . "</td>
|
|
<td>" . $row["currency"] . "" . str_replace(".00", "", sprintf ("%.2f", $row["price"])) . "</td>
|
|
<td>" . $row["creator"] . "</td>
|
|
<td>" . $row["rating"] . "</td>
|
|
<td><a class=\"deletebutton\" id=\"del\" itemid=\"" . $row["id"] . "\">Delete</a></td>
|
|
</tr>";
|
|
}
|
|
} else {
|
|
echo "<table id=\"wishlist\"><p>You have nothing currently in your Wishlist</p></table>";
|
|
}
|
|
}
|
|
|
|
?>
|