From 681a40af319373510f30793d3b892bd9700213fb Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 25 Aug 2008 14:17:08 +0000 Subject: Central: Added Activate Subscription form Also added an option to the user panel that allows you to edit configuration values if you're an admin. Refs #25 --- central/trunk/includes/instadisc.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'central/trunk/includes') diff --git a/central/trunk/includes/instadisc.php b/central/trunk/includes/instadisc.php index d07e53b..6b3d630 100644 --- a/central/trunk/includes/instadisc.php +++ b/central/trunk/includes/instadisc.php @@ -294,9 +294,6 @@ function instaDisc_addSubscription($username, $url) $getcode3 = mysql_fetch_array($getcode2); if ($getcode3['username'] == $username) { - $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; - $delcode2 = mysql_query($delcode); - $c = curl_init(); curl_setopt($c, CURLOPT_URL, $url); curl_setopt($c, CURLOPT_HEADER, false); @@ -324,15 +321,30 @@ function instaDisc_addSubscription($username, $url) $inssub = "INSERT INTO subscriptions (username,url,owner,category) VALUES (\"" . mysql_real_escape_string($username) . "\", \"" . mysql_real_escape_string($header['Subscription']) . "\", \"true\", \"" . mysql_real_escape_string($header['Category']) . "\")"; $inssub2 = mysql_query($inssub); - return true; + $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; + $delcode2 = mysql_query($delcode); + + return 0; + } else { + return 4; } + } else { + return 3; } + } else { + return 3; } + } else { + return 3; } + } else { + return 3; } + } else { + return 2; } - return false; + return 1; } function instaDisc_listPendingSubscriptions($username) -- cgit 1.4.1