diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-25 14:17:08 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-25 14:17:08 +0000 |
commit | 681a40af319373510f30793d3b892bd9700213fb (patch) | |
tree | 06bae9ed1f84f044d2edc45e0a75303e92239ba8 /central/trunk/includes/instadisc.php | |
parent | 19ecd42bcc8f3da1cdfce989126f009cb7b990d0 (diff) | |
download | instadisc-681a40af319373510f30793d3b892bd9700213fb.tar.gz instadisc-681a40af319373510f30793d3b892bd9700213fb.tar.bz2 instadisc-681a40af319373510f30793d3b892bd9700213fb.zip |
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
Diffstat (limited to 'central/trunk/includes/instadisc.php')
-rw-r--r-- | central/trunk/includes/instadisc.php | 22 |
1 files changed, 17 insertions, 5 deletions
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) | |||
294 | $getcode3 = mysql_fetch_array($getcode2); | 294 | $getcode3 = mysql_fetch_array($getcode2); |
295 | if ($getcode3['username'] == $username) | 295 | if ($getcode3['username'] == $username) |
296 | { | 296 | { |
297 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; | ||
298 | $delcode2 = mysql_query($delcode); | ||
299 | |||
300 | $c = curl_init(); | 297 | $c = curl_init(); |
301 | curl_setopt($c, CURLOPT_URL, $url); | 298 | curl_setopt($c, CURLOPT_URL, $url); |
302 | curl_setopt($c, CURLOPT_HEADER, false); | 299 | curl_setopt($c, CURLOPT_HEADER, false); |
@@ -324,15 +321,30 @@ function instaDisc_addSubscription($username, $url) | |||
324 | $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']) . "\")"; | 321 | $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']) . "\")"; |
325 | $inssub2 = mysql_query($inssub); | 322 | $inssub2 = mysql_query($inssub); |
326 | 323 | ||
327 | return true; | 324 | $delcode = "DELETE FROM pending2 WHERE username = \"" . mysql_real_escape_string($username) . "\" AND url = \"" . mysql_real_escape_string($url) . "\""; |
325 | $delcode2 = mysql_query($delcode); | ||
326 | |||
327 | return 0; | ||
328 | } else { | ||
329 | return 4; | ||
328 | } | 330 | } |
331 | } else { | ||
332 | return 3; | ||
329 | } | 333 | } |
334 | } else { | ||
335 | return 3; | ||
330 | } | 336 | } |
337 | } else { | ||
338 | return 3; | ||
331 | } | 339 | } |
340 | } else { | ||
341 | return 3; | ||
332 | } | 342 | } |
343 | } else { | ||
344 | return 2; | ||
333 | } | 345 | } |
334 | 346 | ||
335 | return false; | 347 | return 1; |
336 | } | 348 | } |
337 | 349 | ||
338 | function instaDisc_listPendingSubscriptions($username) | 350 | function instaDisc_listPendingSubscriptions($username) |