From 98be190dd56ff7fa422311f910e700069568db4c Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sat, 21 Feb 2009 10:26:52 -0500 Subject: Added comment editing and deleting --- includes/functions.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'includes/functions.php') diff --git a/includes/functions.php b/includes/functions.php index 16de184..9eb1634 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -282,4 +282,26 @@ function displayRelated($title, $avoid = 0) } } +function getCommentUrl($getcomment3) +{ + $page_id = $getcomment3['page_id']; + $comType = substr($page_id,0,strpos($page_id,'-')); + $comID = substr($page_id,strpos($page_id,'-')+1); + + if ($comType == 'updates') + { + $getupdate = "SELECT * FROM updates WHERE id = " . $comID; + $getupdate2 = mysql_query($getupdate); + $getupdate3 = mysql_fetch_array($getupdate2); + + return '/blog/' . $getupdate3['slug'] . '/'; + } else if ($comType == 'polloftheweek') + { + return '/poll/' . $comID . '.php'; + } else if ($comType == 'quote') + { + return '/quotes/' . $comID . '.php'; + } +} + ?> -- cgit 1.4.1