# Copyright (c) 2007 Erwan Briand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # ***** END LICENSE BLOCK ***** session_start(); include('include/config.inc.php'); if(isset($_GET['zid'])) { require(dirname(__FILE__).'/include/members.inc.php'); $id = $_GET['zid']; $numero = $_GET['zid']; if(!empty($_POST['weblink'])) { if($_POST['weblink'] != 'http://') { if($_POST['weblink'] != '') { if (IsProjectAdmin()) { $titre = harmonise_magic_quotes_gpc(addslashes(utf8_decode($_POST['titre']))); $fileto = harmonise_magic_quotes_gpc(addslashes($_POST['weblink'])); mysql_query("INSERT INTO ct2_os_screen (text,img,projet) VALUES ('$titre','$fileto','$id') ") or die (mysql_error()); mysql_insert_id(); Header('Location: '.$_GET['p'].'-screen_'.$ct_lang.'.html'); } else { exit('Error'); } } } } else { exit('Error (1).'); } } ?>