Location: PHPKode > projects > XRS - XML Publication System > xrs_rel0.2/html/admin/index.php
<?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";

//Header("Content-type: application/xhtml+xml; charset=utf-8");
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</title><meta http-equiv="Content-type" content="text/html; charset=utf-8" /></head>';
echo '<body>';

if ($PHP_AUTH_USER=='root'){
?>
<div class="root_options">
<ul>
<li><a href="auth.php">Auth config</a></li>
<li><a href="gendoc.php">Regenerate document database</a></li>
<li><a href="news.php">Edit News</a></li>
<li><a href="links.php">Edit Links</a></li>
</ul>
</div>
<?php
};

?>
<fieldset>
<legend>Add news</legend>
<form action="addnews.php" method="post">
<div class="addnews">
<textarea name="news_content" id="news_content" rows="10" cols="80"></textarea>
<br />
<input type="checkbox" name="news_html" id="news_html" value="html" /><label for="news_html">Use XHTML</label>
<select name="news_lang" id="news_lang">
<?php
include '../etc/lang.xrs';
?>
</select>
<?php
if ($PHP_AUTH_USER=='root'){
?><br />
<label for="news_author">Author:</label><input type="text" name="news_author" id="news_author" />
<?php }?>
<input type="submit" value="OK">
</div>
</form>
</fieldset>
<fieldset>
<legend>Add link</legend>
<form action="addlink.php" method="post">
<div class="addlink">
<label for="link_href">URL:</label><input type="text" name="link_href" id="link_href" size="80"><br />
<input type="text" name="link_content" id="link_content" size="80"><br />
<input type="checkbox" name="link_html" id="link_html" value="html" /><label for="link_html">Use XHTML</label>
<select name="link_lang" id="link_lang">
<?php
include '../etc/lang.xrs';
?>
</select>
<?php
if ($PHP_AUTH_USER=='root'){
?><br />
<label for="link_autor">Author:</label><input type="text" name="link_author" id="link_author" />
<?php }?>
<input type="submit" value="OK">
</div>
</form>
</fieldset>
    <p>
      <a href="http://validator.w3.org/check/referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10"
          alt="Valid XHTML 1.0!" height="31" width="88" /></a>
    </p>
    


<?php



echo '</body></html>';

?>
Return current item: XRS - XML Publication System