David Goodwin 17 years ago
parent 3e70f276c2
commit 2d3058ed9c

@ -15,9 +15,9 @@
//
// Form POST \ GET Variables:
//
// b_from
// b_subject
// b_message
// name
// subject
// message
//
//
@ -29,43 +29,36 @@ $SESSID_USERNAME = authentication_get_username();
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
$b_from = escape_string ($_POST['from']) ;
$b_subject = escape_string ($_POST['subject']) ;
$b_message = escape_string ($_POST['message']) ;
if (strlen($b_subject) == 0 || strlen($b_message) == 0 || strlen($b_from) == 0)
if (empty($_POST['subject']) || empty($_POST['message']) || empty($_POST['name']))
{
$error = 1;
}
else
{
$q = "select username from mailbox union ".
"select goto from alias ".
"where goto not in (select username from mailbox)" ;
$q = 'select username from mailbox union '.
'select goto from alias '.
'where goto not in (select username from mailbox)';
$result = db_query ($q);
if ($result['rows'] > 0)
{
$b_name = mb_encode_mimeheader( $_POST['name'], 'UTF-8', 'Q');
$b_subject = mb_encode_mimeheader( $_POST['subject'], 'UTF-8', 'Q');
$b_message = encode_base64($_POST['message']);
$i = 0;
while ($row = db_array ($result['result'])){
$fHeaders = "To: " . $fTo . "\n";
$fHeaders .= "From: " . $b_from . "\n";
while ($row = db_array ($result['result'])) {
$fTo = $row[0];
if (!empty ($PALANG['charset']))
{
$fHeaders .= "Subject: " . encode_header ($b_subject, $PALANG['charset']) . "\n";
$fHeaders .= "MIME-Version: 1.0\n";
$fHeaders .= "Content-Type: text/plain; charset=" . $PALANG['charset'] . "\n";
$fHeaders .= "Content-Transfer-Encoding: 8bit\n";
}
else
{
$fHeaders .= "Subject: " . $b_subject . "\n\n";
}
$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, $fFrom, $fHeaders))
if (!smtp_mail ($fTo, $CONF['admin_email'], $fHeaders))
{
$tMessage .= "<br />" . $PALANG['pSendmail_result_error'] . "<br />";
}

@ -17,6 +17,8 @@ $PALANG['confirm'] = 'Jste si jistí?\n';
$PALANG['confirm_domain'] = 'Opravdu chcete smazat všechny záznamy v této doméně Tohle nelze vrátit!\n';
$PALANG['check_update'] = 'Zkontrolovat aktualizace';
$PALANG['pFooter_logged_as'] = 'Přihlášen jako %s';
$PALANG['pLogin_welcome'] = 'Zde se přihlašují emailoví administrátoři pro administraci svých domén.';
$PALANG['pLogin_username'] = 'Uživatelské jméno (email)';
$PALANG['pLogin_password'] = 'Heslo';
@ -65,8 +67,8 @@ $PALANG['pOverview_mailbox_name'] = 'Jméno';
$PALANG['pOverview_mailbox_quota'] = 'Místo (MB)';
$PALANG['pOverview_mailbox_modified'] = 'Naposledy změněno';
$PALANG['pOverview_mailbox_active'] = 'Aktivní';
$PALANG['pOverview_vacation_edit'] = 'NASTAVENO';
$PALANG['pOverview_vacation_option'] = 'Autoreply Vyp.';
$PALANG['pOverview_vacation_edit'] = 'ZAPNUTO';
$PALANG['pOverview_vacation_option'] = 'vypnuto';
$PALANG['pOverview_get_domain'] = 'Doména';
$PALANG['pOverview_get_aliases'] = 'Přesměrování';
@ -152,7 +154,7 @@ $PALANG['pPassword_password2'] = 'Nové heslo (znovu)';
$PALANG['pPassword_password_text_error'] = '<span class="error_msg">Zadaná hesla jsou rozdílná nebo prázdná!</span>';
$PALANG['pPassword_button'] = 'Změnit heslo';
$PALANG['pPassword_result_error'] = '<span class="error_msg">Nepodařilo se změnit heslo!</span>';
$PALANG['pPassword_result_succes'] = 'Heslo bylo zm&#283ňno!';
$PALANG['pPassword_result_succes'] = 'Heslo bylo změněno!';
$PALANG['pEdit_vacation_set'] = 'Změnit / Nastavit zprávu o nepřítomnosti';
$PALANG['pEdit_vacation_remove'] = 'Ostranit zprávu o nepřítomnosti';
@ -215,6 +217,7 @@ $PALANG['pAdminList_virtual_alias_mailbox_count'] = 'Schránek';
$PALANG['pAdminList_virtual_alias_address'] = 'Od';
$PALANG['pAdminList_virtual_alias_goto'] = 'Cíl';
$PALANG['pAdminList_virtual_alias_modified'] = 'Naposledy Změněno';
$PALANG['pAdminList_virtual_alias_active'] = 'Aktivní';
$PALANG['pAdminList_virtual_mailbox_username'] = 'Název';
$PALANG['pAdminList_virtual_mailbox_name'] = 'Celé Jméno';
$PALANG['pAdminList_virtual_mailbox_quota'] = 'Místo (MB)';
@ -262,7 +265,7 @@ $PALANG['pAdminCreate_admin_welcome'] = 'Přidat nového doménového administr
$PALANG['pAdminCreate_admin_username'] = 'Uživatelské jméno';
$PALANG['pAdminCreate_admin_username_text'] = 'Emailová adresa';
$PALANG['pAdminCreate_admin_username_text_error1'] = 'Emailová adresa<br /><span class="error_msg">Tato adresa není platná!</span>';
$PALANG['pAdminCreate_admin_username_text_error2'] = 'Email address<br /><span class="error_msg">Taková adresa už existuje!</span>';
$PALANG['pAdminCreate_admin_username_text_error2'] = 'Emailová adresa<br /><span class="error_msg">Taková adresa již existuje!</span>';
$PALANG['pAdminCreate_admin_password'] = 'Heslo';
$PALANG['pAdminCreate_admin_password2'] = 'Heslo (znovu)';
$PALANG['pAdminCreate_admin_password_text_error'] = '<span class="error_msg">Zadaná hesla jsou rozdílná nebo prázdná!</span>';
@ -298,8 +301,8 @@ $PALANG['pUsersMain_vacationSet'] = $PALANG['pUsersMenu_vacation'] . ' je NASTAV
$PALANG['pUsersMain_edit_alias'] = 'Nastavit / změnít přesměrování';
$PALANG['pUsersMain_password'] = 'Změnit heslo';
$PALANG['pUsersVacation_welcome'] = 'Automatická podpověď';
$PALANG['pUsersVacation_welcome_text'] = 'Již míate nastavenou automatickou odpověď!';
$PALANG['pUsersVacation_welcome'] = 'Automatická odpověď';
$PALANG['pUsersVacation_welcome_text'] = 'Již máte nastavenou automatickou odpověď!';
$PALANG['pUsersVacation_subject'] = 'Předmět';
$PALANG['pUsersVacation_subject_text'] = 'Dovolená';
$PALANG['pUsersVacation_body'] = 'Obsah';
@ -327,8 +330,8 @@ $PALANG['pSearch_welcome'] = 'Vyhledávání: ';
$PALANG['pReturn_to'] = 'Odpovědět komu';
$PALANG['pBroadcast_title'] = 'Odeslat zprávu do všech schránek';
$PALANG['pBroadcast_from'] = 'From';
$PALANG['pBroadcast_from_help'] = 'Zdrojová adresa (pole Od) by měla vypadat přibližně takto: "Váš Hosting" &lt;support@my.domain.tld&gt;';
$PALANG['pBroadcast_from'] = 'Od';
$PALANG['pBroadcast_name'] = 'Vaše jméno';
$PALANG['pBroadcast_subject'] = 'Předmět';
$PALANG['pBroadcast_message'] = 'Zpráva';
$PALANG['pBroadcast_send'] = 'Odeslat zprávu';

@ -14,6 +14,8 @@ $PALANG['confirm'] = 'Are you sure you want to delete this?\n';
$PALANG['confirm_domain'] = 'Do you really want to delete all records for this domain? This can not be undone!\n';
$PALANG['check_update'] = 'Check for update';
$PALANG['pFooter_logged_as'] = 'Logged as %s';
$PALANG['pLogin_welcome'] = 'Mail admins login here to administer your domain.';
$PALANG['pLogin_username'] = 'Login (email)';
$PALANG['pLogin_password'] = 'Password';
@ -329,13 +331,13 @@ $PALANG['pReturn_to'] = 'Return to';
$PALANG['pBroadcast_title'] = 'Send broadcast message';
$PALANG['pBroadcast_from'] = 'From';
$PALANG['pBroadcast_from_help'] = 'From address should be like e.g. "Systems Team" &lt;support@my.domain.tld&gt;';
$PALANG['pBroadcast_name'] = 'Your name';
$PALANG['pBroadcast_subject'] = 'Subject';
$PALANG['pBroadcast_message'] = 'Message';
$PALANG['pBroadcast_send'] = 'Send message';
$PALANG['pBroadcast_success'] = 'Your broadcast message was sent.';
$PALANG['pAdminMenu_broadcast_message'] = 'BC message';
$PALANG['pBroadcast_error_empty'] = 'The fields From, Subject and Message should\'t be empty !';
$PALANG['pBroadcast_error_empty'] = 'The fields Name, Subject and Message should\'t be empty !';
$PALANG['pStatus_undeliverable'] = 'maybe UNDELIVERABLE ';
$PALANG['pStatus_custom'] = 'Delivers to ';

@ -11,8 +11,6 @@
<li><a target="_top" href="create-admin.php"><?php print $PALANG['pAdminMenu_create_admin']; ?></a></li>
<?php $url = "create-alias.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
<li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pAdminMenu_create_alias']; ?></a></li>
<?php $url = "create-mailbox.php"; if (isset ($_GET['domain'])) $url .= "?domain=" . $_GET['domain']; ?>
<li><a target="_top" href="<?php print $url; ?>"><?php print $PALANG['pAdminMenu_create_mailbox']; ?></a></li>
<li><a target="_top" href="broadcast-message.php"><?php print $PALANG['pAdminMenu_broadcast_message']; ?></a></li>
<li><a target="_top" href="../logout.php"><?php print $PALANG['pMenu_logout']; ?></a></li>
</ul>

@ -6,7 +6,11 @@
</tr>
<tr>
<td><?php print $PALANG['pBroadcast_from'] . ":"; ?></td>
<td><input class="flat" size="43" type="text" name="from"/></td>
<td><?php print $CONF['admin_email']; ?></td>
</tr>
<tr>
<td><?php print $PALANG['pBroadcast_name'] . ':'; ?></td>
<td><input class="flat" size="43" type="text" name="name"/></td>
</tr>
<tr>
<td><?php print $PALANG['pBroadcast_subject'] . ":"; ?></td>
@ -28,4 +32,3 @@
</table>
</form>
</div>
<p><?php print $PALANG['pBroadcast_from_help']; ?></p>

@ -24,7 +24,7 @@ window.location="<?php print $fCanceltarget; ?>"
</tr>
<tr>
<td><?php print $PALANG['pUsersVacation_body'] . ":"; ?></td>
<td><textarea class="flat" rows="10" cols="60" name="fBody" ><?php print htmlentities($tBody,ENT_QUOTES); ?></textarea></td>
<td><textarea class="flat" rows="10" cols="60" name="fBody" ><?php print htmlentities($tBody, ENT_QUOTES , 'UTF-8'); ?></textarea></td>
<td>&nbsp;</td>
</tr>
<tr>

@ -3,7 +3,7 @@
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
<?php
if(isset($_SESSION['sessid']['username'])) {
echo "Logged as " . authentication_get_username();
printf($PALANG['pFooter_logged_as'], authentication_get_username());
}
?>
&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;

@ -13,7 +13,7 @@
<td><?php print $PALANG['pUsersVacation_body'] . ":"; ?></td>
<td>
<textarea rows="10" cols="80" name="fBody">
<?php print $tBody; ?>
<?php print htmlentities($tBody, ENT_QUOTES, 'UTF-8'); ?>
</textarea>
</td>
<td>&nbsp;</td>

Loading…
Cancel
Save