#CACHE{0}
#HTTP_HEADER{Content-Type: text/html}
$frm = $HTTP_GET_VARS ;
$frm = str_replace('"', "'", $frm) ;
switch ($frm["actionweb"])
{
case "ajout_theme" :
if ($_GET[id_rubrique]<>"")
{
$sql = "DELETE FROM spip_mots_rubriques WHERE id_mot = '".$_GET[id_mot]."' AND id_rubrique='".$_GET[id_rubrique]."'; " ;
$result=mysql_query($sql);
if(!$result):echo("
".$str_queryError."
".$sql."
".mysql_error()."
");@mysql_free_result($result);exit();endif;
$sql = "INSERT INTO spip_mots_rubriques (id_mot, id_rubrique) VALUE ('".$_GET[id_mot]."','".$_GET[id_rubrique]."')" ;
}
elseif ($_GET[id_article]<>"")
{
$sql = "DELETE FROM spip_mots_articles WHERE id_mot = '".$_GET[id_mot]."' AND id_article='".$_GET[id_article]."' ;" ;
$result=mysql_query($sql);
if(!$result):echo("".$str_queryError."
".$sql."
".mysql_error()."
");@mysql_free_result($result);exit();endif;
$sql = "INSERT INTO spip_mots_articles (id_mot, id_article) VALUE ('".$_GET[id_mot]."','".$_GET[id_article]."')" ;
}
$result=mysql_query($sql);
if(!$result):echo("".$str_queryError."
".$sql."
".mysql_error()."
");@mysql_free_result($result);exit();endif;
break ;
case "supp_theme" :
if ($_GET[id_rubrique]<>"")
$sql = "DELETE FROM spip_mots_rubriques WHERE id_mot = '".$_GET[id_mot]."' AND id_rubrique='".$_GET[id_rubrique]."' " ;
elseif ($_GET[id_article]<>"")
$sql = "DELETE FROM spip_mots_articles WHERE id_mot = '".$_GET[id_mot]."' AND id_article='".$_GET[id_article]."' " ;
$result=mysql_query($sql);
if(!$result):echo("".$str_queryError."
".$sql."
".mysql_error()."
");@mysql_free_result($result);exit();endif;
break ;
}
?>