<?php
//////////////////////////////////////////////////////////////
$num = 5;
/////////////////////////////////////////////////////////////
function maketime($string)
{
if ($string < 3600) {
$string = sprintf("%02d:%02d", (int)($string / 60) % 60, $string % 60);
} else {
$string = sprintf("%02d:%02d:%02d", (int)($string / 3600) % 24, (int)($string / 60) % 60, $string % 60);
}
return $string;
}
function smiles($text)
{
$text = strtr($text, array(
// Простые смайлы
':)' => '<img src="../styles/img/smile.gif"/>',
':(' => '<img src="../styles/img/sad.gif"/>',
'[welcome]' => '<img src="../styles/img/welcome.gif"/>',
':D' => '<img src="../styles/img/smile1.gif"/>',
'[ok]' => '<img src="../styles/img/ok.gif"/>',
'[i]' => '<i>',
'[/i]' => '</i>',
'[b]' => '<b>',
'[/b]' => '</b>',
'[u]' => '<u>',
'[/u]' => '</u>',
'[q]' => '<div class="quote">Цитата:<br>',
'[/q]' => '</div>',
'[font color=red]' => '<font color=red>',
'[font color=blue]' => '<font color=blue>',
'[font color=green]' => '<font color=green>',
'[font color=yellow]' => '<font color=yellow>',
'[/font]' => '</font>',
']' => '>',
'[url=' => '<a href=http://',
'[/url]' => '</a>',
'[friend]' => '<img src="../styles/img/friend.gif"/>',
'[gord]' => '<img src="../styles/img/gord.gif"/>',
'[what]' => '<img src="../styles/img/what.gif"/>',
'[wow]' => '<img src="../styles/img/wow.gif"/>',
'[yy]' => '<img src="../styles/img/yy.gif"/>',
'[zol]' => '<img src="../styles/img/zloy.gif"/>',
'[rulez]' => '<img src="../styles/img/rulez.gif"/>',
'[funny]' => '<img src="../styles/img/funny.gif"/>',
'[fuck]' => '<img src="../styles/img/fuck.gif"/>',
'[stupid]' => '<img src="../styles/img/stupid.gif"/>',
'[slap]' => '<img src="../styles/img/slap.gif"/>',
'[xaxa]' => '<img src="../styles/img/xaxa.gif"/>',
'[tank]' => '<img src="../styles/img/tanksmile.gif"/>',
'[hi]' => '<img src="../styles/img/hi.gif"/>',
// ///////////////////////////////////////////////////////////
// смайлы для админов
'[close]' => '<img src="../styles/img/closetheme.gif"/>',
'[ban]' => '<img src="../styles/img/ban.gif"/>',
'[offtop]' => '<img src="../styles/img/offtop.gif"/>',
'[flood]' => '<img src="../styles/img/flood.gif"/>',
// //////////////////////////////////////////////////////////
'zip' => '<img src="../styles/img/zip.png"/>',
'jpeg' => '<img src="../styles/img/img.png"/>',
'jpg' => '<img src="../styles/img/img.png"/>',
'JPG' => '<img src="../styles/img/img.png"/>',
'png' => '<img src="../styles/img/img.png"/>',
'gif' => '<img src="../styles/img/img.png"/>',
'jar' => '<img src="../styles/img/jar.png"/>',
'mp3' => '<img src="../styles/img/mp3.png"/>',
'3gp' => '<img src="../styles/img/3gp.png"/>',
'порно' => '[*]',
'дыры' => '[*]',
'хуй' => '[*]',
));
return $text;
}
function quote($text)
{
echo '<div class="quote">' . $text . '</div>';
return;
}
function menu($text)
{
echo '<div class="menu">' . $text . '</div>';
return;
}
function head($text)
{
echo '<div class="head">' . $text . '</div>';
return;
}
function img($text)
{
echo '<div class="img">'.$text.'</div>';
return;
}
function admin($text)
{
echo '<div class="admin">'.$text.'</div>';
return;
}
function note($text)
{
echo "<div class='note'>".$text."</div>";
return;
}
function nav($text)
{
echo '<div class="nav">' . $text . '</div>';
return;
}
define(MES, "<img src='/styles/img/m.png'>");
define(CHAT, "<img src='/styles/img/talk.png'>");
?>