示例#1
0
 function TDistribution()
 {
     global $actions, $str;
     // обязательно вызывать
     TNotify::TNotify();
     TTable::TTable();
     $str[get_class_name($this)] = array('title' => array('Отправить', 'Send'), 'plugins' => array('Вид сообщения', 'Plugin'), 'basic_caption' => array('Параметры', 'Properties'), 'sms' => array('SMS сообщение', 'SMS message'), 'email' => array('Электронная почта', 'E-mail'), 'news' => array('Рассылка новостей', 'News'), 'objects' => array('Рассылка объектов', 'Objects'), 'templates' => array('Шаблоны', 'Templates'), 'saved' => array('Данные успешно сохранены', 'Data has been saved successfully'));
     //собственныйе экшены
     $actions[$this->name] = array('send' => array('Отправить', 'Send', 'link' => 'cnt.Send();', 'img' => 'icon.countries.gif', 'display' => 'block', 'show_title' => true), 'preview' => array('Предварительный просмотр', 'Preview', 'link' => 'cnt.sendForm.Preview();', 'img' => 'icon.view.gif', 'display' => 'block', 'show_title' => true), 'save' => array('Сохранить', 'Send', 'link' => 'cnt.sendForm.Save();', 'img' => 'icon.save.gif', 'display' => 'block', 'show_title' => true));
     global $notify_subscribe;
     foreach ($notify_subscribe as $key => $val) {
         $notify_subscribe[$key] = str_replace('__ROOT_ID__', domainRootId(), $val);
     }
 }
示例#2
0
文件: utils.lib.php 项目: romlg/cms36
/**
 * Отправляет уведомление по заданному событитю (старая функция)
 *
 * @param string $event
 * @param int $user_id - идентификтаор пользователя
 * @param array $data - массив данных для парса в шаблон
 * @param string $attach - вложение
*/
function SendNotify($event, $user_id, $data = array(), $attach = '')
{
    // event - событие для нотификации
    // user_id - идентификатор пользователя из таблицы auth_users
    // data - массив для парса в шаблон
    switch (ENGINE_TYPE) {
        case 'site':
            require_once 'sms3.6/admin/lib/table.phpe';
            if (is_file('admin/modules/notify/notify.php')) {
                include_once 'admin/modules/notify/notify.php';
            } else {
                include_once 'sms3.6/admin/modules/notify/notify.php';
            }
            break;
        case 'admin':
            require_once call_user_func('core', 'table');
            require_once call_user_func('module', 'notify');
            break;
    }
    //-----------------------------------------------
    $notify = new TNotify();
    $ret = $notify->Send($event, $user_id, $data, $attach);
    return $ret;
}
示例#3
0
文件: events.php 项目: romlg/cms36
 function TEvents()
 {
     global $actions, $str;
     // обязательно вызывать
     TNotify::TNotify();
     TTable::TTable();
     // экшены для метода Show (когда отображаем табличку)
     $actions[$this->name] = array('edit' => &$actions['table']['edit']);
     if (is_devel()) {
         $actions[$this->name]['create'] =& $actions['table']['create'];
         $actions[$this->name]['delete'] = array('Удалить', 'Delete', 'link' => 'cnt.deleteItem();', 'img' => 'icon.delete.gif', 'display' => 'none');
     }
     $actions[$this->name . '.editform'] = array('save' => array('Сохранить', 'Save', 'link' => 'cnt.document.forms.editform.submit();', 'img' => 'icon.edit.gif', 'display' => 'none'), 'tpl' => array('Шаблон', 'Template', 'link' => 'cnt.showTemplate();', 'img' => '../third/template.png', 'display' => 'none'), 'close' => &$actions['table']['close']);
     // строковые константы модуля
     $str[get_class_name($this)] = array_merge($str[get_class_name($this)], array('title' => array('События', 'Events'), 'description' => array('Описание для клиента', 'Description for client'), 'name' => array('Событие', 'Event'), 'method' => array('Тип уведомления', 'Notify type'), 'email' => array('Отправка по e-mail', 'Send by e-mail'), 'sms' => array('Отправка по sms', 'Send by sms'), 'saved' => array('Сохранение прошло успешно', 'Retention passed successfully'), 'error' => array('Ошибка', 'Error'), 'recipient' => array('Получатель', 'Recipient'), 'client' => array('Клиент', 'Client'), 'admin' => array('Администратор', 'Admin'), 'header' => array('получатели', 'recivers'), 'delete' => array('удалить', 'delete'), 'comments' => array('Комментарии', 'Comments'), 'fullname' => array('имя', 'fullname'), 'where' => array('куда', 'where'), 'error_name' => array('Событие с таким именем уже существует', 'Event with this name already exists.')));
     $id = get('id', 0, 'pg');
     if ($id) {
         $id = sql_getValue("SELECT name FROM " . $this->table . " WHERE id=" . $id);
         $edit = array('Событие: ' . $id, 'Event: ');
     } else {
         $edit = array('Настройка события', 'Events properties');
     }
     $str[get_class_name($this)]['editform'] = $edit;
 }