if ($message != '' && $subject != '') { if ($send_to == 0) { $list = $user->listUsers(); } else { $list = $rights->getGroupMembers($send_to); } $counter = 0; if (null != $list && count($list) > 0) { foreach ($list as $u) { if ($copy || $u['userid'] != $me['userid']) { $counter++; if ($pm) { sendPm($login->currentUserId(), $u['userid'], $subject, $message); } if ($mail) { $eMail->send($subject, str_replace("\n", "<br />", replaceHtmlEntities($message)), $u['email']); } } } } $notify->add($lang->get('news'), str_replace('%c', $counter, $lang->get('send_done'))); } } $added = true; require_once $mod_dir . "/news.rss.php"; } else { $notify->add($lang->get('news'), $lang->get('news_error_fill_all')); } } if (!$added) { // add add breadcrumb
global $box; $boxes->runAll(); $smarty->assign('box', $box); // run notification files $notify->runFiles(); // get the menu $include = (bool) $config->get('core', 'include-submenu') == '1'; $mnu = $menu->getMenu(0, null, null, $include); $smarty->assign('menu', $mnu); $smarty->assign('submenu', $menu->getSubMenu()); if (@$menu->active_menu_entry['template'] != '') { $template = $menu->active_menu_entry['template']; } // if preview (get parameter) is set take this template if (isset($_GET['tpl'])) { $template = replaceHtmlEntities($_GET['tpl']); } // generate the complete template path $template_path = $mobile . "/" . $template; // check if template exists if (!is_dir('templates/' . $template_path)) { $template_path = $mobile . '/default'; if ($mobile != 'mobile') { $notify->add('Template', "The selected template '" . $template . "' doesn't exist. Using template 'default' instead."); } // if default also doesn't exist, raise error if (!is_dir('templates/' . $template_path)) { $notify->raiseError('Template', "The template 'default' doesn't exist."); } } // the css path - can be used in the smarty templates