summaryrefslogtreecommitdiffstats
path: root/categories.php
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-05-18 12:36:04 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-05-18 12:36:04 +0200
commitfba23ca163517597b67f4674f721d919470f3697 (patch)
tree9e9f634b59369323dc2e09e74a1c932173a1d7ac /categories.php
parentb47ab953744b4beceaa0e25395c2cad819ccb113 (diff)
downloadCatalog-fba23ca163517597b67f4674f721d919470f3697.tar.gz
Catalog-fba23ca163517597b67f4674f721d919470f3697.zip
Add functionality for changing, deleting and adding data
Diffstat (limited to 'categories.php')
-rw-r--r--categories.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/categories.php b/categories.php
index f141e3e..651eb58 100644
--- a/categories.php
+++ b/categories.php
@@ -22,7 +22,7 @@ if(isset($_SESSION['username']))
}
else
{
- echo "<dt><a href=\"login.html\">Login</a></dt>";
+ echo "<dt><a href=\"login.php\">Login</a></dt>";
}
?>
</dl>
@@ -41,11 +41,19 @@ else
if(isset($username))
{
echo "<td><a href=\"categoryedit.php?modify={$category->getId()}\">Edit</a></td>";
- echo "<td><a href=\"categoryedit.php?delete={$category->getId()}\">Delete</a></td>";
+ echo "<td><a href=\"categoryedit.php?delete={$category->getId()}\" onClick=\"return confirm('Confirm deletion.')\">Delete</a></td>";
}
echo "</tr>";
}
-
+ if(isset($username))
+ {
+ echo "<tr>";
+ echo "<td></td>";
+ echo "<td></td>";
+ echo "<td></td>";
+ echo "<td><a href=\"categoryedit.php?add={$category->getId()}\">Add</a></td>";
+ echo "</tr>";
+ }
?>
</table>
<div class="spacer"></div>