Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: usercp2.php 3790 2008-04-23 22:50:33Z Tikitiki $
| * $Id: usercp2.php 4854 2010-04-07 02:44:40Z RyanGordon $
|
*/
define("IN_MYBB", 1);
|
*/
define("IN_MYBB", 1);
|
| define('THIS_SCRIPT', 'usercp2.php');
|
$templatelist = 'usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_nav';
| $templatelist = 'usercp_nav_messenger,usercp_nav_changename,usercp_nav_profile,usercp_nav_misc,usercp_nav';
|
Zeile 20 | Zeile 21 |
---|
{ error_no_permission(); }
|
{ error_no_permission(); }
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$lang->load("usercp");
|
$lang->load("usercp");
|
|
|
usercp_menu();
|
usercp_menu();
|
|
|
$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);
if($mybb->input['action'] == "do_addsubscription") { if($mybb->input['type'] != "forum")
|
$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);
if($mybb->input['action'] == "do_addsubscription") { if($mybb->input['type'] != "forum")
|
{ $thread = get_thread($mybb->input['tid']); if(!$thread['tid']) { error($lang->error_invalidthread); } $forumpermissions = forum_permissions($thread['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0) {
| { $thread = get_thread($mybb->input['tid']); if(!$thread['tid']) { error($lang->error_invalidthread); } $forumpermissions = forum_permissions($thread['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0) {
|
error_no_permission(); } add_subscribed_thread($thread['tid'], $mybb->input['notification']); if($mybb->input['referrer'])
|
error_no_permission(); } add_subscribed_thread($thread['tid'], $mybb->input['notification']); if($mybb->input['referrer'])
|
{ $url = $mybb->input['referrer'];
| { $url = htmlspecialchars_uni(addslashes($mybb->input['referrer']));
|
} else {
| } else {
|
Zeile 55 | Zeile 59 |
---|
}
if($mybb->input['action'] == "addsubscription")
|
}
if($mybb->input['action'] == "addsubscription")
|
{ if($mybb->input['type'] == "forum")
| { if($mybb->input['type'] == "forum")
|
{ $forum = get_forum($mybb->input['fid']); if(!$forum['fid'])
|
{ $forum = get_forum($mybb->input['fid']); if(!$forum['fid'])
|
{
| {
|
error($lang->error_invalidforum); } $forumpermissions = forum_permissions($forum['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
error($lang->error_invalidforum); } $forumpermissions = forum_permissions($forum['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
{
| {
|
error_no_permission();
|
error_no_permission();
|
}
| }
|
add_subscribed_forum($forum['fid']);
|
add_subscribed_forum($forum['fid']);
|
if($server_http_referer) { $url = $server_http_referer; } else
| if($server_http_referer) { $url = $server_http_referer; } else
|
{ $url = "index.php"; }
| { $url = "index.php"; }
|
Zeile 107 | Zeile 111 |
---|
$lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);
if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)
|
$lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);
if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)
|
{
| {
|
$notification_none_checked = "checked=\"checked\""; } else if($mybb->user['subscriptionmethod'] == 2)
| $notification_none_checked = "checked=\"checked\""; } else if($mybb->user['subscriptionmethod'] == 2)
|
Zeile 124 | Zeile 128 |
---|
{ $forum = get_forum($mybb->input['fid']); if(!$forum['fid'])
|
{ $forum = get_forum($mybb->input['fid']); if(!$forum['fid'])
|
{
| {
|
error($lang->error_invalidforum); } remove_subscribed_forum($forum['fid']);
| error($lang->error_invalidforum); } remove_subscribed_forum($forum['fid']);
|
Zeile 158 | Zeile 162 |
---|
} } elseif($mybb->input['action'] == "removesubscriptions")
|
} } elseif($mybb->input['action'] == "removesubscriptions")
|
{
| {
|
if($mybb->input['type'] == "forum") { $db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");
| if($mybb->input['type'] == "forum") { $db->delete_query("forumsubscriptions", "uid='".$mybb->user['uid']."'");
|