2012-09-12 08:00:27 +00:00
|
|
|
<?php
|
|
|
|
|
2013-01-14 08:00:16 +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']);
|
|
|
|
if($_GET['perform'] == 'add') {
|
2013-02-22 08:00:24 +00:00
|
|
|
$DB->query("INSERT IGNORE INTO subscribed_forums (ForumID, SubscriberID) VALUES ('$ForumID', '$LoggedUser[ID]')");
|
2012-09-12 08:00:27 +00:00
|
|
|
}
|
2013-01-14 08:00:16 +00:00
|
|
|
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
|
|
|
|