Файл: Space race/admin/page/send-email.php
Строк: 69
<?php include_once('admin.php'); ?>
<?php include_once('../classes/send_email.class.php'); ?>
<fieldset>
<legend>Рассылка</legend>
<form method="post" class="form col-md-6" action="page/send-email.php" id="send-email-form">
<div id="send-email-message"></div>
<fieldset>
<div class="form-group">
<label class="control-label" for="to">Кому <a href="#" data-rel="tooltip" tabindex="99" title="Выбор групп для рассылки"><i class="glyphicon glyphicon-question-sign"></i></a></label>
<div class="controls">
<?php $sendEmail->displayLevels(); ?>
</div>
</div>
<div class="form-group">
<label class="control-label" for="subject">Тема</label>
<div class="controls">
<input type="text" class="form-control input-xlarge" id="subject" name="subject">
</div>
</div>
<div class="form-group">
<label class="control-label" for="message">Сообщение</label>
<div class="controls">
<textarea class="form-control input-xlarge" id="message" name="message" rows="5"></textarea>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" name="send_email" class="btn btn-primary" id="send-email-submit" data-loading-text="отправляется">Разослать</button>
</div>
</form>
</fieldset>
<script>
$('#send-email-form').submit(function (e) {
"use strict";
e.preventDefault();
$('#send-email-submit').button('loading');
var post = $('#send-email-form').serialize();
var action = $('#send-email-form').attr('action');
$("#send-email-message").slideUp(350, function () {
$('#send-email-message').hide();
$.post(action, post, function (data) {
$('#send-email-message').html(data);
$('#send-email-message').slideDown('slow');
if (data.match('success') !== null) {
$('#send-email-form input').val('');
$('#send-email-submit').button('reset');
} else {
$('#send-email-submit').button('reset');
}
});
});
});
</script>