<?php
/********************************************************/
/* NSN GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
if (!defined('ADMIN_ALLOW') && !defined('ADMIN_MAX')) {
	die ("Access Denied");
}
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".TABLE_NSNGD_EXTENSIONS." WHERE ext='$xext'"));
if ($numrows>0) {
  $pagetitle = _EXTENSIONSADMIN.": "._DL_ERROR;
  incoh();
  title($pagetitle);
  DLadminmain();
  br('1');
  Max_OpenTable();
  echo "<center><b>"._ERRORTHEEXTENSION." $xext "._ALREADYEXIST."</b></center><br />\n";
  echo "<center>"._GOBACK."</center>\n";
  Max_CloseTable();
  incof();
} else {
  $db->sql_query("INSERT INTO ".TABLE_NSNGD_EXTENSIONS." VALUES (NULL, '$xext', '$xfile', '$ximage')");
  redirect_url("".$admin_file.".php?op=Extensions");
}