<?php
// xrs - Keep It Simple And Stupid XML Powered Publication System
// Copyright (C) 2002-2003 Ales Hakl <ales at hakl dot net>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
include '../etc/auth.php';
include './functions.php';
echo '<?xml version="1.0" encoding="utf-8" ?>';
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
echo '<head><title>xrs - Admin center - News</title><meta http-equiv="Content-type" content="text/html; charset=utf-8" /></head>';
echo '<body>';
$news=Array();
if ($news_content!='') {
if ($news_html=='html') {
$news['content']=$news_content;
}else{
$news['content']=NL2BR(HTMLSpecialChars($news_content));
}
if ($PHP_AUTH_USER=="root"){
$news['author']=$news_author;
}else{
$news['author']=$PHP_AUTH_USER;
}
$news['lang']=$news_lang;
$news['date']=Time();
gen_news(ProcessNews('../data/news.xml',true,$news));
echo '<div class="message">News sucessfully added.<a href="index.php">Return to administration index.</a></div>';
}
echo '</body></html>'
?>