2003-07-25 20:28:35 +00:00
|
|
|
<?php
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once('../inc/subscribe.inc');
|
|
|
|
require_once('../inc/util.inc');
|
2003-07-25 20:28:35 +00:00
|
|
|
|
2004-02-03 21:48:49 +00:00
|
|
|
db_init();
|
2003-08-13 22:08:12 +00:00
|
|
|
|
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-08-13 22:08:12 +00:00
|
|
|
$result = mysql_query("SELECT * FROM thread WHERE id = $thread");
|
2003-07-25 20:28:35 +00:00
|
|
|
$thread = mysql_fetch_object($result);
|
2004-02-03 21:48:49 +00:00
|
|
|
$user = get_logged_in_user($true);
|
2003-07-26 00:20:44 +00:00
|
|
|
|
|
|
|
if ($action == "subscribe") {
|
|
|
|
subscribe($thread, $user);
|
|
|
|
exit();
|
|
|
|
} else if ($action == "unsubscribe") {
|
|
|
|
unsubscribe($thread, $user);
|
|
|
|
exit();
|
|
|
|
} else {
|
|
|
|
show_result_page(null, false, $thread);
|
2003-08-14 00:57:03 +00:00
|
|
|
exit();
|
2003-07-26 00:20:44 +00:00
|
|
|
}
|
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
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
?>
|
|
|
|
|