summaryrefslogtreecommitdiffstats
path: root/products.php
diff options
context:
space:
mode:
Diffstat (limited to 'products.php')
-rw-r--r--products.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/products.php b/products.php
index 5827254..7ecb2e0 100644
--- a/products.php
+++ b/products.php
@@ -45,14 +45,21 @@ else
</dl>
</nav>
<div id="content">
-<dl>
+<table>
<?php
foreach( $products as $product ){
- echo "<dt><a href=\"productdetails.php?id={$product->getId()}&catid={$id}\">{$product->getName()}</a></dt>";
- echo "<dd>{$product->getDescription()}</dd>";
+ echo "<tr>";
+ echo "<td><a href=\"productdetails.php?id={$product->getId()}&catid={$id}\">{$product->getName()}</a></td>";
+ echo "<td>{$product->getDescription()}</td>";
+ if(isset($username))
+ {
+ echo "<td><a href=\"productedit.php?modify={$product->getId()}\">Edit</a></td>";
+ echo "<td><a href=\"productedit.php?delete={$product->getId()}\">Delete</a></td>";
+ }
+ echo "</tr>";
}
?>
-</dl>
+</table>
<div class="spacer"></div>
</div>
<footer>Copyright by SomeCompany Ltd.</footer>