<?vsp
--
--  $Id$
--
--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
--  project.
--
--  Copyright (C) 1998-2018 OpenLink Software
--
--  This project 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; only version 2 of the License, dated June 1991.
--
--  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.,
--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--
--
 adm_pre_page(lines);

  declare _group, idx, len, _ng_lu integer;
  declare _body_id, _id, _ng_name varchar;
  declare over, line any;

  _group := atoi (get_keyword ('Group', params, ''));

  if ('' <> get_keyword ('action', params, ''))
    {
       _id := get_keyword ('del', params, '');
       ns_delete_message (_id);
    }

  over := ns_xover_group (_group);
  idx := 0;
  len := length (over);

  SELECT NG_NAME, NG_UP_TIME INTO _ng_name, _ng_lu FROM DB.DBA.NEWS_GROUPS WHERE NG_GROUP=_group;

?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<HTML>
  <HEAD>
  <link rel="stylesheet" type="text/css" href="<?=adm_what_css()?>">
    <title>Virtuoso News</title>
    <meta name="AUTHOR" content="OpenLink Software">
    <meta name="DESCRIPTION" content="Newsgroup Articles List">
  </HEAD>
<?vsp adm_page_header(NULL, NULL); ?>

<TABLE CLASS="genlist" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="2">
<TR>
<TD CLASS="genlistheadt">Subject</TD>
<TD CLASS="genlistheadt">From</TD>
<TD CLASS="genlistheadt">Hits</TD>
<TD CLASS="genlistheadt">Receive</TD>
<TD CLASS="genlistheadt" NOWRAP>Size Kb.</TD>
<TD CLASS="genlistheadt">Delete</TD></TR>
<TR><TD CLASS="AdmBorders" COLSPAN="6"><IMG SRC="images/1x1.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>
<?vsp

  while (idx < len)
    {
    line := aref (over, idx);
    if (line is not null and isarray (line))
      {
	  _body_id := aref (line, 0);
	  http (sprintf ('<TR><TD CLASS="gendata"><a target="main2" href="mime_display.vsp?mail_no=%V&type=news">', _body_id));
--	  http (sprintf ('<TR><TD CLASS="gendata"><a href="mime_display.vsp?mail_no=%V&type=news">', _body_id));
	  http (sprintf ('%V ', substring (cast (aref (line, 1) as varchar), 1, 55)));
	  http ('</a></TD><TD CLASS="gendata">');
	  http (adm_mailaddr_pretty(substring (cast (aref (line, 2) as varchar), 1, 55)));
	  http ('</TD><TD CLASS="gendata">');
	  http (sprintf ('%i ', aref (line, 5)));
	  http ('</TD><TD CLASS="gendata" NOWRAP>');
	  http (sprintf ('%V ', substring (cast (aref (line, 3) as varchar), 1, 25)));
	  http ('</TD><TD CLASS="gendata">');
	  http (sprintf ('%i ', aref (line, 4)));
	  http ('</TD><TD CLASS="gendata">');
	  http (sprintf ('<a target="_self" href="news_read.vsp?del=%U&action=delete&Group=%i">Delete</a>', _body_id, _group));
	  http ('</TD></TR>');
      }
    idx := idx + 1;
    }

?>
<TR><TD COLSPAN="6">Newgroup Last Updated: <?=_ng_lu ?></TD></TR>
</TABLE>
<?vsp adm_page_footer(); ?>
</HTML>
