<?
/**
* MiniClick
* Gestionnaire de tableau collaboratif
* Copyright (C) 2006 Guillaume Monet <gm@ibreizh.net>
*
* 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, or
* any later version.
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
*
* @package miniclick
* @version 5.0.0
*/
include("includes/connection.php");

$action = strip_tags($_GET[action]);
$table = strip_tags($_GET[table]);
$colonne = strip_tags($_GET[colonne]);
$id = strip_tags($_GET[id]);
$result = mysql_query("SELECT * FROM SEMAPHORE WHERE Table_Id='$table' AND Colonne_Id='$colonne' AND Object_Id='$id'");
if($res = mysql_fetch_object($result)){
	if($action == "IN"){
		echo "SEMON";
	}else{
		mysql_query("DELETE FROM SEMAPHORE WHERE Table_Id='$table' AND Colonne_Id='$colonne' AND Object_Id='$id'");
	}
	
}else{
	if($action == "IN"){
		mysql_query("INSERT INTO SEMAPHORE VALUES('','$table','$colonne','$id')");
		echo "SEMCRE";
	}
}
?>