2012-09-12 08:00:27 +00:00
|
|
|
<?php
|
|
|
|
|
2013-05-01 08:00:16 +00:00
|
|
|
ini_set('display_errors', '1');
|
|
|
|
authorize();
|
2012-09-12 08:00:27 +00:00
|
|
|
|
|
|
|
$UserID = db_string($_GET['userid']);
|
2013-05-01 08:00:16 +00:00
|
|
|
if ($_GET['perform'] == 'add') {
|
2013-02-22 08:00:24 +00:00
|
|
|
$DB->query("INSERT IGNORE INTO subscribed_users (UserID, SubscriberID) VALUES ('$UserID', '$LoggedUser[ID]')");
|
2013-05-01 08:00:16 +00:00
|
|
|
} elseif ($_GET['perform'] == 'remove') {
|
2012-09-12 08:00:27 +00:00
|
|
|
$DB->query("DELETE FROM subscribed_users WHERE UserID = '$UserID' AND SubscriberID = '$LoggedUser[ID]'");
|
|
|
|
}
|
|
|
|
header('Location: user.php?id=' . $UserID);
|
|
|
|
?>
|