2012-09-12 08:00:27 +00:00
|
|
|
<?php
|
|
|
|
|
2013-04-17 08:00:58 +00:00
|
|
|
ini_set('display_errors', '1');
|
|
|
|
authorize();
|
2012-09-12 08:00:27 +00:00
|
|
|
|
2013-01-14 08:00:16 +00:00
|
|
|
$ForumID = db_string($_GET['forumid']);
|
2013-04-17 08:00:58 +00:00
|
|
|
if ($_GET['perform'] == 'add') {
|
|
|
|
$DB->query("INSERT IGNORE INTO subscribed_forums (ForumID, SubscriberID) VALUES ('$ForumID', '$LoggedUser[ID]')");
|
|
|
|
} elseif ($_GET['perform'] == 'remove') {
|
|
|
|
$DB->query("DELETE FROM subscribed_forums WHERE ForumID = '$ForumID' AND SubscriberID = '$LoggedUser[ID]'");
|
2012-09-12 08:00:27 +00:00
|
|
|
}
|
|
|
|
header('Location: forums.php?action=viewforum&forumid=' . $ForumID);
|
2013-01-14 08:00:16 +00:00
|
|
|
?>
|
2012-09-12 08:00:27 +00:00
|
|
|
|