<?
function admin_smiles($msg)
{
global $set,$user;

$f_smiles=file(BASEDIR."smiles/smiles_mod.txt");
for ($i=0;$i<count($f_smiles);$i++)
{
$str_sm=explode(' ',trim($f_smiles[$i]));
$str_sm2='';
for ($z=1;$z<count($str_sm);$z++)
{
if ($z>1){$str_sm2.=' ';}
$str_sm2.=$str_sm[$z];
}
$str_sm2=explode(',',$str_sm2);
for ($i2=0;$i2<count($str_sm2);$i2++)
{
$str_sm2[$i2]=stripcslashes(htmlspecialchars($str_sm2[$i2]));
$msg=str_replace("$str_sm2[$i2]", "<img src=\"".BASEDIR."SYSTEM/images/smiles/$str_sm[0].gif\" alt=\"\" />", $msg);
}
}

return $msg;
}

?>
