Access Denied
You do not have access to this resource.');
print_simple_footer();
exit;
}
$action =safe_GET('action', array('compose', 'save', 'delete'), 'compose');
$news_id =safe_GET('news_id');
$username=safe_REQUEST($_REQUEST, 'username');
$date =safe_POST('date', WT_REGEX_UNSAFE);
$title =safe_POST('title', WT_REGEX_UNSAFE);
$text =safe_POST('text', WT_REGEX_UNSAFE);
if (empty($username)) $username=$GEDCOM;
if ($action=="compose") {
echo '';
?>
";
} else if ($action=="save") {
$date=time()-$_SESSION["timediff"];
if (empty($title)) $title="No Title";
if (empty($text)) $text="No Text";
$message = array();
if ($news_id) {
$message["id"]=$news_id;
}
$message["username"] = $username;
$message["date"]=$date;
$message["title"] = $title;
$message["text"] = $text;
if (addNews($message)) {
echo WT_I18N::translate('News/Journal entry successfully saved.');
}
} else if ($action=="delete") {
if (deleteNews($news_id)) echo WT_I18N::translate('The news/journal entry has been deleted.');
}
echo "
".WT_I18N::translate('Close Window')."
";
print_simple_footer();