'email-log', 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), 'EventHandlerClass' => Array ('class' => 'EmailLogEventHandler', 'file' => 'email_log_eh.php', 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array ('class' => 'EmailLogTagProcessor', 'file' => 'email_log_tp.php', 'build_event' => 'OnBuild'), 'AutoLoad' => true, 'QueryString' => Array ( 1 => 'id', 2 => 'Page', 3 => 'PerPage', 4 => 'event', 5 => 'mode', ), 'ScheduledTasks' => Array ( 'rotate_email_logs' => Array ('EventName' => 'OnRotate', 'RunSchedule' => '0 0 * * *'), ), 'IDField' => 'EmailLogId', 'TableName' => TABLE_PREFIX . 'EmailLog', 'TitleField' => 'EmailLogId', 'TitlePresets' => Array ( 'email_log_list' => Array ('prefixes' => Array ('email-log_List'), 'format' => '!la_tab_EmailLog!'), 'email_log_edit' => Array ( 'prefixes' => Array ('email-log'), 'format' => "!la_title_ViewingEmailLog! '#email-log_titlefield#'", ), ), 'PermSection' => Array ('main' => 'in-portal:emaillog'), 'Sections' => Array ( 'in-portal:emaillog' => Array ( 'parent' => 'in-portal:reports', 'icon' => 'email_log', 'label' => 'la_tab_EmailLog', 'url' => Array ('t' => 'logs/email_logs/email_log_list', 'pass' => 'm'), 'permissions' => Array ('view', 'edit', 'delete'), 'priority' => 5, 'type' => stTREE, ), ), 'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s FROM %1$s LEFT JOIN ' . TABLE_PREFIX . 'Users to_user ON %1$s.ToUserId = to_user.PortalUserId', ), 'CalculatedFields' => Array ( '' => Array ( 'ToUser' => 'IF (ISNULL(to_user.Username), IF (%1$s.ToUserId = ' . USER_ROOT . ', "root", IF (%1$s.ToUserId = ' . USER_GUEST . ', "Guest", "n/a")), IF(to_user.Username = "", to_user.Email, to_user.Username))', ), ), 'ListSortings' => Array ( '' => Array ( 'Sorting' => Array ('SentOn' => 'desc'), ) ), 'Fields' => Array ( 'EmailLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), 'From' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'To' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'OtherRecipients' => Array ('type' => 'string', 'default' => NULL), 'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'HtmlBody' => Array ('type' => 'string', 'default' => NULL), 'TextBody' => Array ('type' => 'string', 'default' => NULL), 'Status' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array ( EmailLogStatus::SENT => 'la_opt_Sent', EmailLogStatus::ERROR => 'la_opt_Error' ), 'use_phrases' => 1, 'not_null' => 1, 'default' => EmailLogStatus::SENT ), 'ErrorMessage' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'SentOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'), 'TemplateName' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''), 'EventType' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Text_Admin', 0 => 'la_Text_User'), 'use_phrases' => 1, 'default' => NULL ), 'EventParams' => Array ('type' => 'string', 'default' => NULL), 'AccessKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''), 'ToUserId' => Array('type' => 'int', 'default' => NULL), 'ItemPrefix' => Array( 'type' => 'string', 'max_len' => 50, 'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT DISTINCT %s FROM ' . TABLE_PREFIX . 'EmailLog ORDER BY Phrase', 'option_key_field' => 'ItemPrefix', 'option_title_field' => 'CONCAT("la_prefix_", ItemPrefix) AS Phrase', 'use_phrases' => 1, 'not_null' => 1, 'default' => '' ), 'ItemId' => Array('type' => 'int', 'default' => NULL), ), 'VirtualFields' => array( 'ToUser' => array('type' => 'string', 'default' => ''), ), 'Grids' => Array ( 'Default' => Array ( 'Fields' => Array ( 'EmailLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 80), 'From' => Array ('title' => 'column:la_fld_Sender', 'filter_block' => 'grid_like_filter', 'width' => 200), 'To' => Array ('title' => 'column:la_fld_Recipient', 'filter_block' => 'grid_like_filter', 'width' => 200), 'ToUser' => Array ('title' => 'column:la_fld_RecipientUser', 'filter_block' => 'grid_like_filter', 'width' => 120), 'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), 'TemplateName' => Array ('filter_block' => 'grid_like_filter', 'width' => 170), 'EventType' => Array ('title' => 'column:la_fld_Type', 'filter_block' => 'grid_options_filter', 'width' => 60), 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100), 'ErrorMessage' => Array ('filter_block' => 'grid_like_filter', 'width' => 200), 'SentOn' => Array ('title' => 'la_prompt_SentOn', 'filter_block' => 'grid_date_range_filter', 'width' => 145), // 'EventParams' => Array ('title' => 'la_col_EventParams', 'filter_block' => 'grid_like_filter'), 'ItemPrefix' => Array('filter_block' => 'grid_options_filter'), 'ItemId' => Array('filter_block' => 'grid_range_filter', 'width' => 80), ), ), ), );