<?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         */
/********************************************************/
defined('MAXIMUS') or Header("Location: index.php");
$pagetitle = " - "._ML_TITLE." ".$ml_config['version_number'];
incoh();
title(_ML_TITLE." ".$ml_config['version_number']);
Max_OpenTable();
$query2 = "UPDATE `".$prefix."_nsnml_users` SET `active`='1', `act_key`='0', `joined`='".time()."' WHERE `email`='$email' AND `lid`='$lid'";
$result = $db->sql_query("SELECT * FROM `".$prefix."_nsnml_users` WHERE `email`='$email' AND `act_key`='$check' AND `lid`='$lid'");
if ($db->sql_numrows($result) != 1) {
  echo "<center><b>"._ML_ERROR_SUBLINK."</b></center>";
} elseif(!$db->sql_query($query2)) {
   $result = $db->sql_error($query);
   echo "<center><b>".$result['code'].": ".$result['message']."</b></center>\n";
} else {
  $result = $db->sql_query("SELECT * FROM `".$prefix."_nsnml_lists` WHERE `lid`='$lid'");
  $list_info = $db->sql_fetchrow($result);
  echo "<center><b>"._ML_MAIN."</b>: ".$list_info['title']."<br />\n";
  echo "<b>"._ML_SUBCOMPLETED."</b></center>";
}
Max_CloseTable();
incof();