2003-07-25 20:28:35 +00:00
|
|
|
<?php
|
|
|
|
require_once('subscribe.inc');
|
|
|
|
require_once('../util.inc');
|
|
|
|
|
2003-07-26 00:20:44 +00:00
|
|
|
$action = $_GET['action'];
|
2003-07-25 20:28:35 +00:00
|
|
|
$thread = $_GET['thread'];
|
|
|
|
|
2003-07-26 00:20:44 +00:00
|
|
|
if ($thread && $action) {
|
2003-07-25 20:28:35 +00:00
|
|
|
$result = sql_query("SELECT * FROM thread WHERE id = $thread");
|
|
|
|
$thread = mysql_fetch_object($result);
|
2003-07-26 00:20:44 +00:00
|
|
|
$user = get_logged_in_user($true, '../');
|
|
|
|
|
|
|
|
if ($action == "subscribe") {
|
|
|
|
subscribe($thread, $user);
|
|
|
|
exit();
|
|
|
|
} else if ($action == "unsubscribe") {
|
|
|
|
unsubscribe($thread, $user);
|
|
|
|
exit();
|
|
|
|
} else {
|
|
|
|
show_result_page(null, false, $thread);
|
|
|
|
}
|
2003-07-25 20:28:35 +00:00
|
|
|
} else {
|
2003-07-26 00:20:44 +00:00
|
|
|
show_result_page(null, false, NULL);
|
2003-07-25 20:28:35 +00:00
|
|
|
}
|
2003-07-26 00:20:44 +00:00
|
|
|
|
2003-07-25 20:28:35 +00:00
|
|
|
?>
|