Файл: www/smile.php
Строк: 58
<?php
include 'inc/mysql.php';
include 'inc/check.php';
include 'inc/functions.php';
top();
include 'inc/account.php';
$titlestr='Смайлы';
include 'inc/interface.php';
/*
function smiles($msg)
{
$msg=eregi_replace('(:|=)-?){4,}|:ROFL:|*ROFL*|ROFL!{1,}', '<img src="/smiles/rofl.gif" alt="*ROFL*" />', $msg);
$msg=eregi_replace('*BRAVO*', '<img src="/smiles/clapping.gif" alt="*BRAVO*" />', $msg);
$msg=eregi_replace(':BRAVO:', '<img src="/smiles/clapping.gif" alt=":BRAVO:" />', $msg);
$msg=eregi_replace(':clapping:', '<img src="/smiles/clapping.gif" alt=":clapping:" />', $msg);
$msg=eregi_replace(':БРАВО:', '<img src="/smiles/clapping.gif" alt=":БРАВО:" />', $msg);
$msg=eregi_replace('*БРАВО*', '<img src="/smiles/clapping.gif" alt="*БРАВО*" />', $msg);
// большая улыбка
$msg=ereg_replace('((:-?)|+|=)D', '<img src="/smiles/biggrin.gif" alt="\0" />', $msg);
//
$msg=eregi_replace('*TIRED*||-?0|:boredom:', '<img src="/smiles/boredom.gif" alt="*TIRED*" />', $msg);
// плохо
$msg=eregi_replace(':-?(!|~)|:bad:|(:|+|=)(~', '<img src="/smiles/bad.gif" alt=":-!" />', $msg);
// улыбка
$msg=eregi_replace('(:-?|+)){1,3}|:smile:|*smile*', '<img src="/smiles/smile.gif" alt="\0" />', $msg);
// грусть
$msg=eregi_replace('(:-?|+)({1,3}|:sad:|*sad*', '<img src="/smiles/sad.gif" alt="\0" />', $msg);
// подмигивание
$msg=ereg_replace('(^| );-?)', '<img src="/smiles/wink.gif" alt="\0" />', $msg);
$msg=str_replace('^_~', '<img src="/smiles/wink.gif" alt="^_~" />', $msg);
$msg=eregi_replace(':wink:', '<img src="/smiles/wink.gif" alt=":wink:" />', $msg);
// язык
$msg=ereg_replace('(:-?)(P|b|p)', '<img src="/smiles/blum3.gif" alt="\0" />', $msg);
$msg=eregi_replace(':tongue:', '<img src="/smiles/blum3.gif" alt=":tongue:" />', $msg);
// крутой
$msg=ereg_replace('((8|B)-?))', '<img src="/smiles/dirol.gif" alt="\0" />', $msg);
$msg=eregi_replace(':COOL:|COOL!{1,}', '<img src="/smiles/dirol.gif" alt="\0" />', $msg);
//
$msg=str_replace(':-[', '<img src="/smiles/blush2.gif" alt=":-[" />', $msg);
// шок
$msg=eregi_replace('(O|0)_(O|0)', '<img src="/smiles/shok.gif" alt="\0" />', $msg);
// поцелуй
$msg=eregi_replace('(:-?)(*|{})|^.^|:kiss:|*kiss*', '<img src="/smiles/kiss.gif" alt="\0" />', $msg);
// плак
$msg=ereg_replace(':'-?({1,}', '<img src="/smiles/cray.gif" alt="\0" />', $msg);
// секрет
$msg=eregi_replace(':-?(X|#)|:secret:', '<img src="/smiles/secret.gif" alt="\0" />', $msg);
// агрессия
$msg=eregi_replace('(>)(:|+)(o|0)|:angry:|:-@', '<img src="/smiles/aggressive.gif" alt="\0" />', $msg);
// дурак
$msg=ereg_replace('(:-?|=)|', '<img src="/smiles/fool.gif" alt="\0" />', $msg);
// be
$msg=ereg_replace(':-/', '<img src="/smiles/beee.gif" alt="\0" />', $msg);
// смех
$msg=eregi_replace('8P|*JOKINGLY*', '<img src="/smiles/mosking.gif" alt="\0" />', $msg);
// дьявол
$msg=eregi_replace('(]|}):-?>|:diablo:|*DIABLO*|>:-?]', '<img src="/smiles/diablo.gif" alt="\0" />', $msg);
// музыка
$msg=eregi_replace('[:-?}', '<img src="/smiles/music2.gif" alt="\0" />', $msg);
// воздушный поцелуй
$msg=eregi_replace('*KISSED*', '<img src="/smiles/air_kiss.gif" alt="\0" />', $msg);
// стоп
$msg=eregi_replace('*STOP*|:stop:|stop!{1,}', '<img src="/smiles/stop.gif" alt="\0" />', $msg);
$msg=eregi_replace('*KISSING*', '<img src="/smiles/kiss_3.gif" alt="\0" />', $msg);// поцелуй
$msg=ereg_replace('@}->--|@}-:--|@>}--', '<img src="/smiles/give_rose.gif" alt="\0" />', $msg);// роза
$msg=eregi_replace('*THUMBS_UP*|:GOOD:|*GOOD*|good!{1,}', '<img src="/smiles/good.gif" alt="\0" />', $msg);// все отлично
$msg=eregi_replace('*DRINK*|:drink:', '<img src="/smiles/drinks.gif" alt="\0" />', $msg);// пить
$msg=eregi_replace('*IN_LOVE*|LOVE!{1,}', '<img src="/smiles/man_in_love.gif" alt="\0" />', $msg);// влюблен
$msg=str_replace('@=', '<img src="/smiles/bomb.gif" alt="@=" />', $msg);// бомба
$msg=eregi_replace('%-?)|:-?$|:wacko:', '<img src="/smiles/wacko.gif" alt="\0" />', $msg);// потерян
$msg=eregi_replace('*WASSUP*', '<img src="/smiles/mamba.gif" alt="*WASSUP*" />', $msg);
$msg=eregi_replace('*SUP*', '<img src="/smiles/mamba.gif" alt="*SUP*" />', $msg);
$msg=eregi_replace('*MAMBA*', '<img src="/smiles/mamba.gif" alt="*MAMBA*" />', $msg);
$msg=eregi_replace(':MAMBA:', '<img src="/smiles/mamba.gif" alt=":MAMBA:" />', $msg);
$msg=eregi_replace('*PARDON*', '<img src="/smiles/pardon.gif" alt="*PARDON*" />', $msg);
$msg=eregi_replace(':pardon:', '<img src="/smiles/pardon.gif" alt=":pardon:" />', $msg);
$msg=eregi_replace('*NO*', '<img src="/smiles/nea.gif" alt="*NO*" />', $msg);
$msg=eregi_replace('*CRAZY*', '<img src="/smiles/crazy.gif" alt="*CRAZY*" />', $msg);
$msg=eregi_replace(':crazy:', '<img src="/smiles/crazy.gif" alt="*CRAZY*" />', $msg);
$msg=eregi_replace('*DONT_KNOW*', '<img src="/smiles/dntknw.gif" alt="*DONT_KNOW*" />', $msg);
$msg=eregi_replace('*UNKNOWN*', '<img src="/smiles/dntknw.gif" alt="*DONT_KNOW*" />', $msg);
$msg=eregi_replace(':HZ:', '<img src="/smiles/dntknw.gif" alt="*DONT_KNOW*" />', $msg);
$msg=eregi_replace('*SORRY*', '<img src="/smiles/sorry.gif" alt="*SORRY*" />', $msg);
$msg=eregi_replace(':sorry:', '<img src="/smiles/sorry.gif" alt="*SORRY*" />', $msg);
$msg=eregi_replace('*YAHOO!**|:YAHOO:|YAHOO!{1,}', '<img src="/smiles/yahoo.gif" alt="\0" />', $msg);
$msg=eregi_replace('*DANCE*', '<img src="/smiles/dance4.gif" alt="*DANCE*" />', $msg);
$msg=eregi_replace(':dance:', '<img src="/smiles/dance4.gif" alt="*DANCE*" />', $msg);
$msg=eregi_replace('*HELP*', '<img src="/smiles/help.gif" alt="*HELP*" />', $msg);
$msg=eregi_replace('*OK*', '<img src="/smiles/ok.gif" alt="*OK*" />', $msg);
$msg=eregi_replace('*HELLO*', '<img src="/smiles/preved.gif" alt="*HELLO*" />', $msg);
$msg=eregi_replace('*PREVED*', '<img src="/smiles/preved.gif" alt="*PREVED*" />', $msg);
$msg=eregi_replace('*PRIVET*', '<img src="/smiles/preved.gif" alt="*PRIVET*" />', $msg);
$msg=eregi_replace('*HI*', '<img src="/smiles/preved.gif" alt="*HI*" />', $msg);
$msg=eregi_replace('*ACUTE*', '<img src="/smiles/acute.gif" alt="*ACUTE*" />', $msg);
$msg=eregi_replace('*BYE*', '<img src="/smiles/bye.gif" alt="*BYE*" />', $msg);
$msg=eregi_replace('*WRITE*', '<img src="/smiles/mail1.gif" alt="*WRITE*" />', $msg);
$msg=eregi_replace('*MAIL*', '<img src="/smiles/mail1.gif" alt="*MAIL*" />', $msg);
$msg=eregi_replace('*WALL*', '<img src="/smiles/dash1.gif" alt="*WALL*" />', $msg);
$msg=eregi_replace('*DASH*', '<img src="/smiles/dash1.gif" alt="*DASH*" />', $msg);
$msg=eregi_replace('*YES*', '<img src="/smiles/yes3.gif" alt="*YES*" />', $msg);
$msg=eregi_replace('*SCRATCH*', '<img src="/smiles/scratch_one-s_head.gif" alt="*SCRATCH*" />', $msg);
$msg=eregi_replace('*LOL!**|:LOL:|LOL!{1,}', '<img src="/smiles/lol.gif" alt="\0" />', $msg);
$msg=eregi_replace('*HAPPY*', '<img src="/smiles/i-m_so_happy.gif" alt="*HAPPY*" />', $msg);
$msg=eregi_replace(':happy:', '<img src="/smiles/i-m_so_happy.gif" alt=":happy:" />', $msg);
$msg=eregi_replace('*db*', '<img src="/smiles/pleasantry.gif" alt="*db*" />', $msg);
$msg=eregi_replace(':db:', '<img src="/smiles/pleasantry.gif" alt=":db:" />', $msg);
return $msg;
}*/
if (isset($_SESSION['auth']) && $_SESSION['auth']==1){
echo '<div class="title">Смайлы</div>';
echo '<div class="border-top"></div>';
echo '<div class="help">';
if (is_file('smiles/smiles.txt'))
{
$f=file('smiles/smiles.txt');
echo "<table >";
for ($i=1;$i<=56;$i++)
{
echo "<tr>";
$smile=explode(' ', $f[$i]);
echo "<td>";
echo smiles(stripcslashes(htmlspecialchars($smile[0])));
echo "</td>";
echo "<td>";
echo stripcslashes(htmlspecialchars($f[$i]));
echo "</td>";
echo "</tr>";
}
echo "</table>";
}
echo '</div>';
}else{
header("Location: /?");
}
down();
?>