Exemple #1
0
function getInvitationContent($avatar, $message, $isSecure)
{
    $host = ($isSecure ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $TML = new SmartyClass();
    $TML->assign('message', empty($message) ? Resources::Get('invite.default.message') : $message);
    $TML->assign('operatorimage', empty($avatar) ? null : $host . $avatar);
    $TML->assign('theme', Browser::getCurrentTheme());
    $TML->assign('addressprefix', $host);
    $invitation = $TML->fetch('invite.tpl');
    $invitation = addslashes($invitation);
    $invitation = str_replace("\n", "' + \n'", $invitation);
    $invitation = str_replace("\r", '', $invitation);
    return $invitation;
}