boinc/html/forum/subscribe.php

29 lines
648 B
PHP

<?php
require_once('subscribe.inc');
require_once('../util.inc');
db_init('../');
$action = $_GET['action'];
$thread = $_GET['thread'];
if ($thread && $action) {
$result = mysql_query("SELECT * FROM thread WHERE id = $thread");
$thread = mysql_fetch_object($result);
$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);
exit();
}
} else {
show_result_page(null, false, NULL);
}
?>