forked from SynapseTechnologies/BuckysRoom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notify.php
executable file
·37 lines (27 loc) · 1.15 KB
/
notify.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
require(dirname(__FILE__) . '/includes/bootstrap.php');
if( !($userID = buckys_is_logged_in()) )
{
buckys_redirect('/index.php', MSG_NOT_LOGGED_IN_USER, MSG_TYPE_ERROR);
}
$view = array();
//Save Shipping info
$tradeUserIns = new BuckysTradeUser();
if (isset($_POST['action']) && $_POST['action'] == 'saveNotifyInfo') {
$result = BuckysUser::saveUserNotificationSettings($userID, $_POST);
if($result === true)
buckys_redirect('/notify.php', MSG_NOTIFICATION_SETTINGS_SAVED);
else
buckys_redirect('/notify.php', $result, MSG_TYPE_ERROR);
}
//Get offer_received info
$view['trade_user_info'] = $tradeUserIns->getUserByID($userID);
$forumNotifyInfo = BuckysUser::getUserForumSettings($userID);
if (empty($view['trade_user_info'])) {
buckys_redirect('/index.php', MSG_INVALID_REQUEST, MSG_TYPE_ERROR);
}
buckys_enqueue_stylesheet('account.css');
buckys_enqueue_stylesheet('info.css');
$BUCKYS_GLOBALS['content'] = 'notify';
$BUCKYS_GLOBALS['title'] = 'Notification Settings - BuckysRoom';
require(DIR_FS_TEMPLATE . $BUCKYS_GLOBALS['template'] . "/" . $BUCKYS_GLOBALS['layout'] . ".php");