<?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                                 */
/************************************************************************/

	include("modules/$module_name/l_config.php");
	if(defined('USER_ALLOW')) {
		$user2 = base64_decode($user);
		$user2 = addslashes($user2);
		$cookie = explode(":", $user2);
		cookiedecode($user);
		$ratinguser = $cookie[1];
	} else {
		$ratinguser = "$anonymous";
	}
	$blocknow = 0;
	if ($blockunregmodify == 1 && $ratinguser=="$anonymous") {
		incoh();
		menu(1);
		br('1');
		Max_OpenTable();
		echo "<center><font class=\"content\">"._ONLYREGUSERSMODIFY."</font></center>";
		$blocknow = 1;
		Max_CloseTable();
		incof();
	}
	if ($blocknow != 1) {
		$cat = explode("-", $cat);
		if ($cat[1]=="") {
			$cat[1] = 0;
		}
		$title = stripslashes(check_html($title, "nohtml"));
		$url = stripslashes($url);
		$description = stripslashes($description);
		$lid = $db->XMFnum($lid);
		$cat[0] = $db->XMFnum($cat[0]);
		$cat[1] = $db->XMFnum($cat[1]);
		$db->sql_query("insert into ".TABLE_LINKS_MODREQUEST." values (NULL, '$lid', '$cat[0]', '$cat[1]', '".addslashes($title)."', '".addslashes($url)."', '".addslashes($description)."', '".addslashes($ratinguser)."', 0)");
		incoh();
		menu(1);
		br('1');
		Max_OpenTable();
		echo "<center><font class=\"content\">"._THANKSFORINFO." "._LOOKTOREQUEST."</font></center>";
		Max_CloseTable();
		incof();
	}
