0) { mb_internal_encoding("UTF-8"); $b_name = mb_encode_mimeheader( $_POST['name'], 'UTF-8', 'Q'); $b_subject = mb_encode_mimeheader( $_POST['subject'], 'UTF-8', 'Q'); $b_message = base64_encode($_POST['message']); $i = 0; while ($row = db_array ($result['result'])) { $fTo = $row[0]; $fHeaders = 'To: ' . $fTo . "\n"; $fHeaders .= 'From: ' . $b_name . ' <' . $CONF['admin_email'] . ">\n"; $fHeaders .= 'Subject: ' . $b_subject . "\n"; $fHeaders .= 'MIME-Version: 1.0' . "\n"; $fHeaders .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; $fHeaders .= 'Content-Transfer-Encoding: base64' . "\n"; $fHeaders .= $b_message; if (!smtp_mail ($fTo, $CONF['admin_email'], $fHeaders)) { $tMessage .= "
" . $PALANG['pSendmail_result_error'] . "
"; } else { $tMessage .= "
" . $PALANG['pSendmail_result_success'] . "
"; } } } $smarty->assign ('tMessage', $PALANG['pBroadcast_success']); $smarty->assign ('smarty_template', 'message'); $smarty->display ('index.tpl'); // echo '

'.$PALANG['pBroadcast_success'].'

'; } } if ($_SERVER['REQUEST_METHOD'] == "GET" || $error == 1) { $smarty->assign ('error', $error); $smarty->assign ('smarty_template', 'broadcast-message'); $smarty->display ('index.tpl'); // include ("templates/broadcast-message.tpl"); } /* vim: set expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>