<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* 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.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
if ($acces == 1) {
if($admintest && $adminsecu)  {


		incoh();
		Max_OpenTable();
		echo "<center><font class=\"title\"><b>"._HEADLINESADMIN."</b></font></center>";
		Max_CloseTable();
		br('1');
		Max_OpenTable();
		echo "<form action=\"".$admin_file.".php\" method=\"post\">"
		."<table border=\"1\" width=\"100%\" align=\"center\"><tr>"
		."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>"._SITENAME."</b></td>"
		."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>"._URL."</b></td>"
		."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>"._FUNCTIONS."</b></td><tr>";
		$result = $db->sql_query("select `hid`, `sitename`, `headlinesurl` from `".$prefix."_headlines` order by `hid`");
		while ($row = $db->sql_fetchrow($result)) {
			$hid          = intval($row['hid']);
			$sitename     = stripslashes($row['sitename']);
			$headlinesurl = stripslashes($row['headlinesurl']);
			echo "<td bgcolor=\"$bgcolor1\" align=\"center\">$sitename</td>"
			."<td bgcolor=\"$bgcolor1\" align=\"center\"><a href=\"$headlinesurl\" target=\"new\">$headlinesurl</a></td>"
			."<td bgcolor=\"$bgcolor1\" align=\"center\">[ <a href=\"".$admin_file.".php?op=HeadlinesEdit&amp;hid=$hid\">"._EDIT."</a> | <a href=\"".$admin_file.".php?op=HeadlinesDel&amp;hid=$hid&amp;ok=0\">"._DELETE."</a> ]</td><tr>";
		}
		echo "</form></td></tr></table>";
		Max_CloseTable();
		br('1');
		Max_OpenTable();
		echo "<font class=\"option\"><b>"._ADDHEADLINE."</b></font><br /><br />"
		."<font class=\"content\">"
		."<form action=\"".$admin_file.".php\" method=\"post\">"
		."<table border=\"0\" width=\"100%\"><tr><td>"
		.""._SITENAME.":</td><td><input type=\"text\" name=\"xsitename\" size=\"31\" maxlength=\"30\" /></td></tr><tr><td>"
		.""._RSSFILE.":</td><td><input type=\"text\" name=\"headlinesurl\" size=\"50\" maxlength=\"200\" /></td></tr><tr><td>"
		."</td></tr></table>"
		."<input type=\"hidden\" name=\"op\" value=\"HeadlinesAdd\" />"
		."<input type=\"submit\" value=\""._ADD."\" />"
		."</form>";
		Max_CloseTable();
		incof();


}
}else {
	echo "Access Denied";
}