Hacked By AnonymousFox
<?php
include '../lib/init.php';
include "../lib/class/phpmailer/class.phpmailer.php";
Utilisateur::verif_connect();
if(isset($_GET['commentaire'])){
$utilisateurId = $_SESSION['utilisateur']['id'];
$commentaireId = $_GET['commentaire'];
/* Informations sur le commentaire */
$sql = $bdd->query("SELECT commentaireContenu FROM formation_commentaire
WHERE commentaireId = $commentaireId ");
$data = $sql->fetchObject();
$commentaireContenu = $data->commentaireContenu;
/* Vérifier qu'il existe pas déjà une entrée en BDD pour cette abus */
$sql = $bdd->query("SELECT * FROM formation_commentaire_abus
WHERE abusUtilisateur = $utilisateurId
AND abusCommentaire = $commentaireId
AND abusEtat = 1 ");
if($sql->rowCount() == 0){
/* Alors j'ajoute l'abus en BDD */
$sql2 = $bdd->prepare("INSERT INTO formation_commentaire_abus
(abusCreated, abusUtilisateur, abusCommentaire)
VALUES
(:created, :utilisateur, :commentaire) ");
$sql2->execute(array(
'created' => time(),
'utilisateur' => $utilisateurId,
'commentaire' => $commentaireId
)
);
/* Notification à l'administrateur */
$emailAdmin = Utilisateur::emailAdmin($bdd);
$mail = new PHPmailer();
$mail->CharSet = 'UTF-8';
$mail->IsHTML(true);
$mail->From='noreply@missmandarine.com';
$mail->FromName='Miss Mandarine';
foreach ($emailAdmin as $email) { $mail->AddAddress($email); }
$mail->Subject= notifCommentaireTitre;
$mail->Body='
<html><body>
<table cellpadding="0" cellspacing="0" style="font-family:sans-serif;" align="center">
<tr width="602" height="130">
<td colspan="2">
<img src="'.BASEFRONT.'img/notification/header.jpg"/>
</td>
</tr>
<tr width="602" height="20">
<td colspan="2"><td>
</tr>
<tr>
<td width="20"></td>
<td width="582">
<span style="font-size:15px; color: #999999; margin:0px; padding:0px; margin-bottom:4px;">'.notifCommentaireLigne1.'</span>
</td>
</tr>
<tr width="602" height="20">
<td colspan="2"><td>
</tr>
<tr>
<td width="20"></td>
<td width="582">
<span style="font-size:15px; color: #999999; margin:0px; padding:0px; margin-bottom:4px;">'.Forum::autolink($commentaireContenu).'</span>
</td>
</tr>
<tr width="602" height="20">
<td colspan="2"><td>
</tr>
<tr>
<td width="20"></td>
<td width="582">
<span style="font-size:15px; color: #999999; margin:0px; padding:0px; margin-bottom:4px;">'.notifCommentaireLigne2.'</span>
</td>
</tr>
<tr width="602" height="20">
<td colspan="2"><td>
</tr>
<tr width="602" height="4">
<td colspan="2" bgColor="#171d2a"><td>
</tr>
</table>
</body></html>';
$mail->Send();
unset($mail);// <-- Fin de notification
/* Le lien de confirmation */
echo '<a href="#">'.commentaireAbusSignale.'</a>';
}
}
?>
Hacked By AnonymousFox1.0, Coded By AnonymousFox