Alors aprés de longue Heures de recherches
C'est très moche techniquement parlant mais ca a l'air de fonctionner parfaitement
Ajout ceci:
//Ajout de smileys
$smiley_1 = array(":)", ":=)");//http://www.weeboo.fr/img/smilies/default/smile.png
$smiley_2 = array(":|", "=|");//http://www.weeboo.fr/img/smilies/default/neutral.png
$smiley_3 = array(":(", "=(");//http://www.weeboo.fr/img/smilies/default/sad.png
$smiley_4 = array(":D", "=D");//http://www.weeboo.fr/img/smilies/default/big_smile.png
$smiley_5 = array(":o", ":O");//http://www.weeboo.fr/img/smilies/default/yikes.png
$smiley_6 = array(";)");//http://www.weeboo.fr/img/smilies/default/wink.png
$smiley_7 = array(":/");//http://www.weeboo.fr/img/smilies/default/hmm.png
$smiley_8 = array(":P", ":p");//http://www.weeboo.fr/img/smilies/default/tongue.png
$smiley_9 = array(":lol:");//http://www.weeboo.fr/img/smilies/default/lol.png
$smiley_10 = array(":mad:");//http://www.weeboo.fr/img/smilies/default/mad.png
$smiley_11 = array(":rolleyes:");//http://www.weeboo.fr/img/smilies/default/roll.png
$smiley_12 = array(":cool:");//http://www.weeboo.fr/img/smilies/default/cool.png
$message = str_replace($smiley_1, "<img src='/img/smilies/default/smile.png' />", $message);
$message = str_replace($smiley_2, "<img src='/img/smilies/default/neutral.png' />", $message);
$message = str_replace($smiley_3, "<img src='/img/smilies/default/sad.png' />", $message);
$message = str_replace($smiley_4, "<img src='/img/smilies/default/big_smile.png' />", $message);
$message = str_replace($smiley_5, "<img src='/img/smilies/default/yikes.png' />", $message);
$message = str_replace($smiley_6, "<img src='/img/smilies/default/wink.png' />", $message);
$message = str_replace($smiley_7, "<img src='/img/smilies/default/hmm.png' />", $message);
$message = str_replace($smiley_8, "<img src='/img/smilies/default/tongue.png' />", $message);
$message = str_replace($smiley_9, "<img src='/img/smilies/default/lol.png' />", $message);
$message = str_replace($smiley_10, "<img src='/img/smilies/default/mad.png' />", $message);
$message = str_replace($smiley_11, "<img src='/img/smilies/default/roll.png' />", $message);
$message = str_replace($smiley_12, "<img src='/img/smilies/default/cool.png' />", $message);
//Fin de l'ajout
juste avant ca:
// add the new message
$content[] = array(
md5(uniqid(rand(), true)),
$user,
date('r'),
$message
);
Ca donne ceci:
// check double message
$last = end($content);
if(!empty($last) && $last[1]===$user && $last[3]===$message) {
header('HTTP/1.x 403 Forbidden');
exit();
}
//Ajout de smileys
$smiley_1 = array(":)", ":=)");//http://www.weeboo.fr/img/smilies/default/smile.png
$smiley_2 = array(":|", "=|");//http://www.weeboo.fr/img/smilies/default/neutral.png
$smiley_3 = array(":(", "=(");//http://www.weeboo.fr/img/smilies/default/sad.png
$smiley_4 = array(":D", "=D");//http://www.weeboo.fr/img/smilies/default/big_smile.png
$smiley_5 = array(":o", ":O");//http://www.weeboo.fr/img/smilies/default/yikes.png
$smiley_6 = array(";)");//http://www.weeboo.fr/img/smilies/default/wink.png
$smiley_7 = array(":/");//http://www.weeboo.fr/img/smilies/default/hmm.png
$smiley_8 = array(":P", ":p");//http://www.weeboo.fr/img/smilies/default/tongue.png
$smiley_9 = array(":lol:");//http://www.weeboo.fr/img/smilies/default/lol.png
$smiley_10 = array(":mad:");//http://www.weeboo.fr/img/smilies/default/mad.png
$smiley_11 = array(":rolleyes:");//http://www.weeboo.fr/img/smilies/default/roll.png
$smiley_12 = array(":cool:");//http://www.weeboo.fr/img/smilies/default/cool.png
$message = str_replace($smiley_1, "<img src='/img/smilies/default/smile.png' />", $message);
$message = str_replace($smiley_2, "<img src='/img/smilies/default/neutral.png' />", $message);
$message = str_replace($smiley_3, "<img src='/img/smilies/default/sad.png' />", $message);
$message = str_replace($smiley_4, "<img src='/img/smilies/default/big_smile.png' />", $message);
$message = str_replace($smiley_5, "<img src='/img/smilies/default/yikes.png' />", $message);
$message = str_replace($smiley_6, "<img src='/img/smilies/default/wink.png' />", $message);
$message = str_replace($smiley_7, "<img src='/img/smilies/default/hmm.png' />", $message);
$message = str_replace($smiley_8, "<img src='/img/smilies/default/tongue.png' />", $message);
$message = str_replace($smiley_9, "<img src='/img/smilies/default/lol.png' />", $message);
$message = str_replace($smiley_10, "<img src='/img/smilies/default/mad.png' />", $message);
$message = str_replace($smiley_11, "<img src='/img/smilies/default/roll.png' />", $message);
$message = str_replace($smiley_12, "<img src='/img/smilies/default/cool.png' />", $message);
//Fin de l'ajout
// add the new message
$content[] = array(
md5(uniqid(rand(), true)),
$user,
date('r'),
$message
);