<?php
/*
///////////////////////////////////////////
  Author : EuroDesign (iNeeXT)
  URL : http://design.h2m.in
  Support : ineext@mail.ru
  Guest v1.0
///////////////////////////////////////////
*/

////////////////////////////Функция бб-кодов////////////////////////////////

function bb_code($post) {
$post = preg_replace('|\[b](.+)\[\/b]|','<b>$1</b>',$post);
$post = preg_replace('|\[center](.+)\[\/center]|','<center>$1</center>',$post);
$post = preg_replace('|\[blink](.+)\[\/blink]|','<blink>$1</blink>',$post);
$post = preg_replace('|\[i](.+)\[\/i]|','<i>$1</i>',$post);
$post = preg_replace('|\[u](.+)\[\/u]|','<u>$1</u>',$post);
$post = preg_replace('|\[big](.+)\[\/big]|','<big>$1</big>',$post);
$post = preg_replace('|\[small](.+)\[\/small]|','<small>$1</small>',$post);
$post = preg_replace('|\[del](.+)\[\/del]|','<del>$1</del>',$post);
$post = preg_replace('#\[q\](.*?)\[/q\]#si', '<q>\1</q>', $post);
$post = str_replace(array('[b]','[i]','[u]','[big]','[small]','[del]','[/b]','[/i]','[/u]','[/big]','[/small]','[/del]'),'',$post);
return $post;
}

////////////////////////////Функция смайлов////////////////////////////////

 function smiles($post)
{
$post = str_replace(')p','<img src="images/smiles/)P.gif"/>',$post);
$post = str_replace('=)','<img src="images/smiles/=).gif"/>',$post);
$post = str_replace('=]','<img src="images/smiles/=].gif"/>',$post);
$post = str_replace('[admin]','<img src="images/smiles/admin.gif"/>',$post);
$post = str_replace('[answer]','<img src="images/smiles/answer.gif"/>',$post);
$post = str_replace('[close]','<img src="images/smiles/close.gif"/>',$post);
$post = str_replace('[dollar]','<img src="images/smiles/dollar.gif"/>',$post);
$post = str_replace('[dumay]','<img src="images/smiles/dumay.gif"/>',$post);
$post = str_replace('[elvis]','<img src="images/smiles/elvis.gif"/>',$post);
$post = str_replace('[flowers]','<img src="images/smiles/flowers.gif"/>',$post);
$post = str_replace('[hachu]','<img src="images/smiles/hachu.gif"/>',$post);
$post = str_replace('[in_love]','<img src="images/smiles/in_love.gif"/>',$post);
$post = str_replace('[kaleka]','<img src="images/smiles/kaleka.gif"/>',$post);
$post = str_replace('[man]','<img src="images/smiles/man.gif"/>',$post);
$post = str_replace('[mod]','<img src="images/smiles/mod.gif"/>',$post);
$post = str_replace('[molodec]','<img src="images/smiles/molodec.gif"/>',$post);
$post = str_replace('[monah]','<img src="images/smiles/monah.gif"/>',$post);
$post = str_replace('[moroz]','<img src="images/smiles/moroz.gif"/>',$post);
$post = str_replace('[neznay]','<img src="images/smiles/neznay.gif"/>',$post);
$post = str_replace('[ninzya]','<img src="images/smiles/ninzya.gif"/>',$post);
$post = str_replace('[ofigel]','<img src="images/smiles/ofigel.gif"/>',$post);
$post = str_replace('[ok]','<img src="images/smiles/ok.gif"/>',$post);
$post = str_replace('[OoO]','<img src="images/smiles/OoO.gif"/>',$post);
$post = str_replace('[open]','<img src="images/smiles/open.gif"/>',$post);
$post = str_replace('[pank]','<img src="images/smiles/pank.gif"/>',$post);
$post = str_replace('[plachu]','<img src="images/smiles/plachu.gif"/>',$post);
$post = str_replace('[podmig]','<img src="images/smiles/podmig.gif"/>',$post);
$post = str_replace('[sleza]','<img src="images/smiles/sleza.gif"/>',$post);
$post = str_replace('[smele2]','<img src="images/smiles/smele2.gif"/>',$post);
$post = str_replace('[smile1]','<img src="images/smiles/smile1.gif"/>',$post);
$post = str_replace('[smile3]','<img src="images/smiles/smile3.gif"/>',$post);
$post = str_replace('[smile4]','<img src="images/smiles/smile4.gif"/>',$post);
$post = str_replace('[smile]','<img src="images/smiles/smile.gif"/>',$post);
$post = str_replace('[somnevays]','<img src="images/smiles/somnevays.gif"/>',$post);
$post = str_replace('[soska]','<img src="images/smiles/soska.gif"/>',$post;
$post = str_replace('[ura]','<img src="images/smiles/ura.gif"/>',$post);
$post = str_replace('[uuu]','<img src="images/smiles/uuu.gif"/>',$post);
$post = str_replace('[xuy]','<img src="images/smiles/xuy.gif"/>',$post);
$post = str_replace('[yxaxa]','<img src="images/smiles/yxaxa.gif"/>',$post);
$post = str_replace('[zloy]','<img src="images/smiles/zloy.gif"/>',$post);
return ($post);
}

////////////////////////////Функция антимата////////////////////////////////

 function antimat($post)
{
$post = str_ireplace(array('лох','гей','пидар','сука','ебать','нах'),'[мат]',$post);              //P.S Добавляйте сами больше есле надо больше
return $post;
}
////////////////////////////Функция антирекламы////////////////////////////////
 function antirek($post)
{
$post= str_replace(array('wen.ru','h2m.ru','hak.su','puz.su','wen9.com','wen.su','fiz.su','muk.su',               //P.S Добавляйте сами больше есле надо больше
'nab.su','.ru','.su','.net','.com','.org','.org.ru','net.ru','pp.ru','.ua','.asia',
'host','dum.su'),'[реклама]',$post);
return $post;
}
?>