if ($_POST['adminnewticket']) { $us->Set(Page::$userid, 'adminnewticket', 1); } else { $us->Set(Page::$userid, 'adminnewticket', 0); } if ($_POST['adminnewticketreply']) { $us->Set(Page::$userid, 'adminnewticketreply', 1); } else { $us->Set(Page::$userid, 'adminnewticketreply', 0); } if ($_POST['dailyreport']) { $us->Set(Page::$userid, 'dailyreport', 1); } else { $us->Set(Page::$userid, 'dailyreport', 0); } Page::PersonalSettings(); break; case 'sendmessage': $nt = Notification::getInstance(); $user = User::getInstance(); if ($_POST['sendtousers'] == 'all') { $sendto = $user->GetButch(); } elseif (is_numeric($_POST['sendtousers'])) { $sendto = $user->GetButch('', "`id` = '" . $_POST['sendtousers'] . "'"); } else { throw new Exception("Target users is not specified or in wrong format"); } try { $nt->Send($sendto, false, false, $_POST['subject'], $_POST['message']); } catch (Exception $e) { Page::$messages[] = array('type' => 'attention', 'message' => nl2br("Fatal error catched: " . $e));