<?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                                 */
/************************************************************************/
/********************************************************/
/* NSN Mailing List                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/

$lid = $db->XMFnum($lid);
$pagetitle = " - "._ML_ADMIN." ".$ml_config['version_number'];
incoh();
title(_ML_VIEWLISTISSUES);
ML_Admin();
br('1');
Max_OpenTable();
$result = $db->sql_query("SELECT * FROM ".$prefix."_nsnml_issues WHERE lid='$lid' ORDER BY sent");
$num = $db->sql_numrows($result);
if($num) {
  echo "<table align='center' border='0' width='100%' bgcolor='$bgcolor2'>";
  echo "<tr bgcolor='$bgcolor2'>";
  echo "<td width='50%'><b>"._ML_SUBJECT."</b></td>";
  echo "<td align='center' width='40%'><b>"._ML_DATE."</b></td>";
  echo "<td align='center' width='10%'><b>"._ML_SUBSCRIBERS."</b></td>";
  while ($issue_info = $db->sql_fetchrow($result)) {
    echo "<tr bgcolor='$bgcolor1'>";
    echo "<td><a href='".$admin_file.".php?op=MLViewIssue&amp;nid=".$issue_info['nid']."'>".$issue_info['subject']."</a></td>";
    echo "<td align='center'>".date($ml_config['date_format'], $issue_info['sent'])."</td>";
    $user_info = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnml_users WHERE lid='".$issue_info['nid']."'"));
    echo "<td align='center'>".$user_info."</td>\n";
    echo "</tr>";
  }
  echo "</table>";
} else {
  echo "<center><b>"._ML_NOISSUES."</b></center>\n";
}
Max_CloseTable();
incof();

?>