32if (!defined(
'XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
36include_once XOOPS_ROOT_PATH.
'/include/notification_constants.php';
37include_once XOOPS_ROOT_PATH.
'/include/notification_functions.php';
39$root =& XCube_Root::getSingleton();
40$root->mLanguageManager->loadPageTypeMessageCatalog(
'notification');
42if (!isset($_POST[
'not_submit'])) {
51$update_list = $_POST[
'not_list'];
53$module_id = $xoopsModule->getVar(
'mid');
54$user_id = !empty($xoopsUser) ? $xoopsUser->getVar(
'uid') : 0;
62$notification_handler =& xoops_gethandler(
'notification');
64foreach ($update_list as $update_item) {
65 [$category, $item_id, $event] = explode(
',', $update_item[
'params']);
66 $status = !empty($update_item[
'status']) ? 1 : 0;
69 $notification_handler->unsubscribe($category, $item_id, $event, $module_id, $user_id);
71 $notification_handler->subscribe($category, $item_id, $event);
82include_once XOOPS_ROOT_PATH .
'/include/notification_functions.php';
85foreach ($update_list as $update_item) {
86 [$category, $item_id, $event] = explode(
',', $update_item[
'params']);
87 $category_info =& notificationCategoryInfo($category);
88 if (!empty($category_info[
'item_name'])) {
89 $redirect_args[$category_info[
'item_name']] = $item_id;
97foreach (array_keys($redirect_args) as $arg) {
99 $argstring .=
'?' . $arg .
'=' . $redirect_args[$arg];
102 $argstring .=
'&' . $arg .
'=' . $redirect_args[$arg];
106redirect_header($_POST[
'not_redirect'].$argstring, 2, _NOT_UPDATEOK);