diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-18 12:36:04 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-18 12:36:04 +0200 |
| commit | fba23ca163517597b67f4674f721d919470f3697 (patch) | |
| tree | 9e9f634b59369323dc2e09e74a1c932173a1d7ac /categories.php | |
| parent | b47ab953744b4beceaa0e25395c2cad819ccb113 (diff) | |
| download | Catalog-fba23ca163517597b67f4674f721d919470f3697.tar.gz Catalog-fba23ca163517597b67f4674f721d919470f3697.zip | |
Add functionality for changing, deleting and adding data
Diffstat (limited to 'categories.php')
| -rw-r--r-- | categories.php | 14 |
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> |
