<?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 GR Downloads                                     */
/* By: NukeScripts Network (webmaster@nukescripts.net)  */
/* http://www.nukescripts.net                           */
/* Copyright © 2000-2005 by NukeScripts Network         */
/********************************************************/
defined('MAXIMUS') or Header("Location: index.php");

$lid = $GLOBALS['db']->XMFnum($lid);
$cat = $GLOBALS['db']->XMFnum($cat);
$filesize = $GLOBALS['db']->XMFnum($filesize);
if(defined('USER_ALLOW')) {
  cookiedecode($user);
  $ratinguser = $cookie[1];
} else {
  $ratinguser = $anonymous;
}
if ($dl_config['blockunregmodify'] == 1 && !defined('USER_ALLOW')) {
  incoh();
  menu('1');
  br('1');
  Max_OpenTable();
  echo "<center><font class='content'>"._DONLYREGUSERSMODIFY."</font></center>\n";
  Max_CloseTable();
  incof();
} else {
  $title = stripslashes(FixQuotes($title));
  $url = stripslashes(FixQuotes($url));
  $description = stripslashes(FixQuotes($description));
  $sub_ip = $_SERVER['REMOTE_ADDR'];
  $GLOBALS['db']->sql_query("INSERT INTO `".TABLE_NSNGD_MODS."` VALUES (NULL, $lid, $cat, 0, '$title', '$url', '$description', '$ratinguser', '$sub_ip', 0, '$auth_name', '$email', '$filesize', '$version', '$homepage')");
  incoh();
  menu('1');
  br('1');
  Max_OpenTable();
  echo "<center><font class='content'>"._THANKSFORINFO." "._LOOKTOREQUEST."</font></center>\n";
  Max_CloseTable();
  incof();
}