Hacked By AnonymousFox

Current Path : /home/missmand/public_html/js/lightbox/
Upload File :
Current File : /home/missmand/public_html/js/lightbox/abusReponse.php.tar

home/missmand/public_html/learning/forum/abusReponse.php000064400000006273151777750660017574 0ustar00<?php
	
	include '../lib/init.php';
	include "../lib/class/phpmailer/class.phpmailer.php";
	Utilisateur::verif_connect();

	if(isset($_GET['reponse'])){

		$utilisateurId = $_SESSION['utilisateur']['id'];
		$reponseId = $_GET['reponse'];

		/* Informations sur le sujet */
		$sql = $bdd->query("SELECT sujetNom, reponseContenu FROM forum_reponse
							INNER JOIN forum_sujet ON reponseSujet = sujetId
						    WHERE reponseId = $reponseId ");
		$data = $sql->fetchObject();

		$sujetNom = $data->sujetNom;
		$reponseContenu = $data->reponseContenu;

		/* Vérifier qu'il existe pas déjà une entrée en BDD pour cette abus */
		$sql = $bdd->query("SELECT * FROM forum_reponse_abus
							WHERE abusUtilisateur = $utilisateurId
							AND abusReponse = $reponseId 
							AND abusEtat = 1 ");
		if($sql->rowCount() == 0){

			/* Alors j'ajoute l'abus en BDD */
			$sql2 = $bdd->prepare("INSERT INTO forum_reponse_abus
								   (abusCreated, abusUtilisateur, abusReponse) 
								   VALUES 
								   (:created, :utilisateur, :reponse) ");
			$sql2->execute(array(
					'created' => time(),
					'utilisateur' => $utilisateurId,
					'reponse' => $reponseId
				)
			);

			/* 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= notifReponseTitre;

			$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;">'.notifReponseLigne1.'</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;"><strong>'.notifReponseSujet.'</strong> '.$sujetNom.'</span>
							<br />
							<br />
							<span style="font-size:15px; color: #999999; margin:0px; padding:0px; margin-bottom:4px;">'.Forum::autolink($reponseContenu).'</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;">'.notifReponseLigne2.'</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="#">'.afficheReponseAbusSignale.'</a>';

		}

	}

?>home/missmand/public_html/missmandarine.ch/learning/forum/abusReponse.php000064400000006273152004103150022761 0ustar00<?php
	
	include '../lib/init.php';
	include "../lib/class/phpmailer/class.phpmailer.php";
	Utilisateur::verif_connect();

	if(isset($_GET['reponse'])){

		$utilisateurId = $_SESSION['utilisateur']['id'];
		$reponseId = $_GET['reponse'];

		/* Informations sur le sujet */
		$sql = $bdd->query("SELECT sujetNom, reponseContenu FROM forum_reponse
							INNER JOIN forum_sujet ON reponseSujet = sujetId
						    WHERE reponseId = $reponseId ");
		$data = $sql->fetchObject();

		$sujetNom = $data->sujetNom;
		$reponseContenu = $data->reponseContenu;

		/* Vérifier qu'il existe pas déjà une entrée en BDD pour cette abus */
		$sql = $bdd->query("SELECT * FROM forum_reponse_abus
							WHERE abusUtilisateur = $utilisateurId
							AND abusReponse = $reponseId 
							AND abusEtat = 1 ");
		if($sql->rowCount() == 0){

			/* Alors j'ajoute l'abus en BDD */
			$sql2 = $bdd->prepare("INSERT INTO forum_reponse_abus
								   (abusCreated, abusUtilisateur, abusReponse) 
								   VALUES 
								   (:created, :utilisateur, :reponse) ");
			$sql2->execute(array(
					'created' => time(),
					'utilisateur' => $utilisateurId,
					'reponse' => $reponseId
				)
			);

			/* 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= notifReponseTitre;

			$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;">'.notifReponseLigne1.'</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;"><strong>'.notifReponseSujet.'</strong> '.$sujetNom.'</span>
							<br />
							<br />
							<span style="font-size:15px; color: #999999; margin:0px; padding:0px; margin-bottom:4px;">'.Forum::autolink($reponseContenu).'</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;">'.notifReponseLigne2.'</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="#">'.afficheReponseAbusSignale.'</a>';

		}

	}

?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox