<?php

/********************************************************/
/* NSN Mailing List                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright  2000-2005 by NukeScripts Network         */
/********************************************************/

global $admin_file;
if(!defined('ADMIN_FILE')) {
    Header("Location: ../../".$admin_file.".php");
    die();
}
$aid = substr("$aid", 0,25);
$row = $db->sql_fetchrow($db->sql_query("SELECT title, admins FROM ".TABLE_MODULES." WHERE title='$module_name'"));
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".TABLE_AUTHORS." WHERE aid='$aid'"));
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i=0; $i < sizeof($admins); $i++) { if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") { $auth_user = 1; } }
if ($row2['radminsuper'] == 1 || $auth_user == 1) {
  $module_name="Mailing_List";
  get_lang($module_name);
  include_once("includes/nsnml_func.php");
  $ml_config = mlget_configs();
  if($admintest && $adminsecu)  {
  switch($op) {
    case 'MLAddBanner':include("modules/$module_name/admin/MLAddBanner.php");break;
    case 'MLAddIssue':include("modules/$module_name/admin/MLAddIssue.php");break;
    case 'MLAddList':include("modules/$module_name/admin/MLAddList.php");break;
    case 'MLAddStory':include("modules/$module_name/admin/MLAddStory.php");break;
    case 'MLAdmin':include("modules/$module_name/admin/MLAdmin.php");break;
    case 'MLConfig':include("modules/$module_name/admin/MLConfig.php");break;
    case 'MLConfigSave':include("modules/$module_name/admin/MLConfigSave.php");break;
    case 'MLCreate':include("modules/$module_name/admin/MLCreate.php");break;
    case 'MLDeleteList':include("modules/$module_name/admin/MLDeleteList.php");break;
    case 'MLDeleteListSave':include("modules/$module_name/admin/MLDeleteListSave.php");break;
    case 'MLEditList':include("modules/$module_name/admin/MLEditList.php");break;
    case 'MLEditListSave':include("modules/$module_name/admin/MLEditListSave.php");break;
    case 'MLSend':include("modules/$module_name/admin/MLSend.php");break;
    case 'MLViewIssue':include("modules/$module_name/admin/MLViewIssue.php");break;
    case 'MLViewIssues':include("modules/$module_name/admin/MLViewIssues.php");break;
    case 'MLViewListIssues':include("modules/$module_name/admin/MLViewListIssues.php");break;
    case 'MLViewLists':include("modules/$module_name/admin/MLViewLists.php");break;
    case 'MLViewListSubscribers':include("modules/$module_name/admin/MLViewListSubscribers.php");break;
    case 'MLViewSent':include("modules/$module_name/admin/MLViewSent.php");break;
    case 'MLViewSubscribers':include("modules/$module_name/admin/MLViewSubscribers.php");break;
  }
  }
} else {
  echo "Access Denied";
}

?>
