# 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(); require('include/config.inc.php'); require('include/members.inc.php'); $code = $_GET['p']; $numero = $_GET['numero']; $num = $_GET['num']; if (IsProjectAdmin()) { $suppr = mysql_query("SELECT img FROM ct2_os_screen WHERE id = '$num' AND projet = '$numero' "); $row = mysql_fetch_array($suppr); $img = explode($racine, $row['img']); $img2 = explode($racineconflit, $row['img']); if (file_exists(dirname(__FILE__).'/'.$img[1]) && !empty($img[1])) { unlink(dirname(__FILE__).'/'.$img[1]); } elseif (file_exists(dirname(__FILE__).'/'.$img2[1]) && !empty($img2[1])) { unlink(dirname(__FILE__).'/'.$img2[1]); } mysql_query("DELETE FROM ct2_os_screen WHERE id = '$num' AND projet = '$numero' "); Header('Location: '.$racine.'/'.$code.'-screen_'.$_GET['ct_lang'].'.html'); } else { echo 'Error.'; } ?>