- <?php
- //////////////////////////////////////////////////////
- //
- // RemoveSpam By Thomas K ( http://iow4.net )
- //
- /////////////////////////////////////////////////////
-
- define('IN_PHPBB', true);
- $phpbb_root_path = './';
- include($phpbb_root_path.'extension.inc');
-
- //================================================
- // 1er Vérification du parametre contenant l'id du post
- //================================================
-
- if (empty($_POST['post_id']))
- {
- exit('Erreur : Parametre post_id requis');
- }
-
- //===================================================
- // 2eme Vérification du parametre contenant l'id du post
- //===================================================
-
- include($phpbb_root_path.'config.'.$phpEx);
- include($phpbb_root_path.'includes/db.'.$phpEx);
- include($phpbb_root_path.'includes/constants.'.$phpEx);
-
- if (!($topic_info = $db->sql_fetchrow($db->sql_query('SELECT * FROM '.$table_prefix.'posts WHERE post_id=\''.$_POST['post_id'].'\''))))
- {
- exit('Erreur : Parametre post_id errone');
- }
-
- //====================================================
- // On met l'user qui a posté dans la liste de bannis
- //====================================================
-
- if (!$db->sql_query('INSERT INTO '.$table_prefix."banlist VALUES('','".$topic_info['poster_id']."','".$topic_info['poster_ip']."','') "))
- {
- exit('Erreur : Insertion de l\'utilisateur dans la banlist impossible');
- }
-
- //==========================
- // On desactive son compte
- //==========================
-
- if (!$db->sql_query('UPDATE '.$table_prefix.'users SET user_active=\'0\' WHERE user_id=\''.$topic_info['poster_id'].'\''))
- {
- exit('Erreur : Desactivation du compte spammeur impossible');
- }
-
- //=================================
- // On suprime le message SPAM
- //=================================
-
- if (!($db->sql_query('DELETE FROM '.$table_prefix.'posts WHERE post_id=\''.$_POST['post_id'].'\'')) OR !($db->sql_query('DELETE FROM '.$table_prefix."posts_text WHERE post_id='".$_POST['post_id']."'")))
- {
- exit('Erreur : Supression du message SPAM impossible');
- }
-
- //=================================
- // redirection
- //=================================
-
- header("location:$phpbb_root_path");
- ?>
-
-
<?php
//////////////////////////////////////////////////////
//
// RemoveSpam By Thomas K ( http://iow4.net )
//
/////////////////////////////////////////////////////
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path.'extension.inc');
//================================================
// 1er Vérification du parametre contenant l'id du post
//================================================
if (empty($_POST['post_id']))
{
exit('Erreur : Parametre post_id requis');
}
//===================================================
// 2eme Vérification du parametre contenant l'id du post
//===================================================
include($phpbb_root_path.'config.'.$phpEx);
include($phpbb_root_path.'includes/db.'.$phpEx);
include($phpbb_root_path.'includes/constants.'.$phpEx);
if (!($topic_info = $db->sql_fetchrow($db->sql_query('SELECT * FROM '.$table_prefix.'posts WHERE post_id=\''.$_POST['post_id'].'\''))))
{
exit('Erreur : Parametre post_id errone');
}
//====================================================
// On met l'user qui a posté dans la liste de bannis
//====================================================
if (!$db->sql_query('INSERT INTO '.$table_prefix."banlist VALUES('','".$topic_info['poster_id']."','".$topic_info['poster_ip']."','') "))
{
exit('Erreur : Insertion de l\'utilisateur dans la banlist impossible');
}
//==========================
// On desactive son compte
//==========================
if (!$db->sql_query('UPDATE '.$table_prefix.'users SET user_active=\'0\' WHERE user_id=\''.$topic_info['poster_id'].'\''))
{
exit('Erreur : Desactivation du compte spammeur impossible');
}
//=================================
// On suprime le message SPAM
//=================================
if (!($db->sql_query('DELETE FROM '.$table_prefix.'posts WHERE post_id=\''.$_POST['post_id'].'\'')) OR !($db->sql_query('DELETE FROM '.$table_prefix."posts_text WHERE post_id='".$_POST['post_id']."'")))
{
exit('Erreur : Supression du message SPAM impossible');
}
//=================================
// redirection
//=================================
header("location:$phpbb_root_path");
?>