<?php
/* Функция смайлов. */
function smiles($var)
{
$result = mysql_query("SELECT command, folder FROM smiles");
$i = 0;
while($smile = mysql_fetch_assoc($result))
{
$i+= 1;
$smiles['!'.$i]='<img src="'.$smile['folder'].'" alt="'.$smile['command'].'" />';
}
$var = strtr($var,$smiles);
return $var;
}
?>