From de3e8f6809a5e32cba99c9e82ea058e759a0e030 Mon Sep 17 00:00:00 2001 From: Michael Erdely Date: Thu, 10 Oct 2024 00:51:22 -0400 Subject: [PATCH] Remove some redundant links Set default variables --- src/item.php | 12 ++++++++++++ src/templates/categories.tpl | 1 - src/templates/families.tpl | 1 - src/templates/ranks.tpl | 1 - src/templates/users.tpl | 1 - 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/item.php b/src/item.php index 34d3a48..6ec942b 100644 --- a/src/item.php +++ b/src/item.php @@ -27,6 +27,18 @@ else { $userid = $_SESSION["userid"]; } +# set default variables +$name = ""; +$description = ""; +$price = 0.00; +$source = ""; +$url = ""; +$category = 1; +$ranking = 3; +$comment = ""; +$quantity = 1; +$image_filename = ""; + // for security, let's make sure that if an itemid was passed in, it belongs // to $userid. all operations on this page should only be performed by // the item's owner. diff --git a/src/templates/categories.tpl b/src/templates/categories.tpl index 077988b..489ec69 100644 --- a/src/templates/categories.tpl +++ b/src/templates/categories.tpl @@ -94,7 +94,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {/foreach} -
Add a new category
diff --git a/src/templates/families.tpl b/src/templates/families.tpl index aa03f82..ce496f5 100644 --- a/src/templates/families.tpl +++ b/src/templates/families.tpl @@ -93,7 +93,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {/foreach} -
Add a new family
diff --git a/src/templates/ranks.tpl b/src/templates/ranks.tpl index fb68419..eeb03b6 100644 --- a/src/templates/ranks.tpl +++ b/src/templates/ranks.tpl @@ -94,7 +94,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {/foreach} -
Add a new rank
diff --git a/src/templates/users.tpl b/src/templates/users.tpl index 7c66707..164a12b 100644 --- a/src/templates/users.tpl +++ b/src/templates/users.tpl @@ -120,7 +120,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA {/foreach} -
Add a new user