Public Member Functions | |
count_all_redirections ($filter_sql= '') | |
Counts all activated redirections from junction table messages_ip_addresses. | |
get_all_redirections ($limit_from=0, $limit_results=20, $order_by= 'ip_address', $order_by_direction= 'ASC', $filter_sql= '') | |
Gets all activated redirections from junction table messages_ip_addresses. | |
count_all_messages ($filter_sql= '') | |
Counts all messages. | |
get_all_messages ($limit_from=0, $limit_results=20, $order_by= 'id', $order_by_direction= 'asc', $filter_sql= '') | |
Gets all redirection messages. | |
activate_test_connection_end_message ($user_id) | |
Deny ip addresses with expired test connections. | |
activate_unallowed_connecting_place_message ($user_id) | |
Activates notifications for ip addresses with unallowed connecting place. | |
deactivate_message ($message_id) | |
Deactivates all redirections of given message. | |
get_message_by_type ($type) | |
Returns message by given type. | |
get_message_id_by_type ($type) | |
Returns id of message by given type. |
Static Public Member Functions | |
static | get_types () |
Returns all message's types. | |
static | get_self_cancel_messages ($translate=TRUE) |
Gets set of self cancel messages. | |
static | is_self_cancable ($type) |
Check if message may be self cancable. | |
static | is_white_list_ignorable ($type) |
Check if message may ignore the white list. | |
static | is_special_message ($type) |
Check if message is special message. | |
static | has_redirection_content ($type) |
Check if message contains redirection content. | |
static | has_email_content ($type) |
Check if message contains email content. | |
static | has_sms_content ($type) |
Check if message contains sms content. | |
static | can_be_activate_directly ($type) |
Check if message can be activated directly. | |
static | can_be_activate_automatically ($type) |
Check if message can be activated manually. | |
static | activate_special_notice ($type, $member_id, $user_id, $email, $sms, $comment=NULL) |
Activates notice messages (only e-mail and sometimes also SMS) for accept payment notice, approoving/refusing of application for membership to a single member. | |
static | activate_redirection (Message_Model $message, $ips, $user_id=NULL, $comment=NULL) |
Activate redirection for given IPs. | |
static | send_emails (Message_Model $message, $contacts, $comment=NULL) |
Send emails with redirection message to given contacts. | |
static | send_email (Message_Model $message, $email, $object=NULL, $push=FALSE) |
Generic function to send e-mail. | |
static | send_sms_messages (Message_Model $message, $contacts, $user_id=NULL, $comment=NULL) |
Send SMS messages with redirection message to given contacts. |
Public Attributes | |
const | USER_MESSAGE = 0 |
user message, can be added and deleted by user | |
const | CONTACT_INFORMATION = 1 |
not exactly message, it is content of side panel, should be used for information for all redirections | |
const | CANCEL_MESSAGE = 2 |
content of page shown after canceling redirection | |
const | UNKNOWN_DEVICE_MESSAGE = 3 |
content of page with text for unknown device | |
const | INTERRUPTED_MEMBERSHIP_MESSAGE = 4 |
content of page for interrupted member, this redirection can be set in system | |
const | DEBTOR_MESSAGE = 5 |
content of page for debtor, this redirection can be set in system | |
const | PAYMENT_NOTICE_MESSAGE = 6 |
content of page for payment notice, this redirection can be set in system and can be canceled by user | |
const | UNALLOWED_CONNECTING_PLACE_MESSAGE = 7 |
content of page for unallowed connecting place, depends on allowed subnets | |
const | RECEIVED_PAYMENT_NOTICE_MESSAGE = 8 |
content of page for received payment notice | |
const | APPLICANT_APPROVE_MEMBERSHIP = 9 |
content of page for approved application for membership | |
const | APPLICANT_REFUSE_MEMBERSHIP = 10 |
content of page for refused application for membership | |
const | CONNECTION_REQUEST_APPROVE = 11 |
content of page for approved request for connection | |
const | CONNECTION_REQUEST_REFUSE = 12 |
content of page for refused request for connection | |
const | CONNECTION_REQUEST_INFO = 13 |
content of page for information about request for connection | |
const | MONITORING_HOST_DOWN = 14 |
content of page for information about host down in monitoring | |
const | MONITORING_HOST_UP = 15 |
content of page for information about host up in monitoring | |
const | CONNECTION_TEST_EXPIRED = 16 |
content of page for information about connection test expiration | |
const | INTERRUPTED_MEMBERSHIP_BEGIN_NOTIFY_MESSAGE = 17 |
notification e-mail message that is sended to a interupted member at the start of his interuption | |
const | INTERRUPTED_MEMBERSHIP_END_NOTIFY_MESSAGE = 18 |
notification e-mail message that is sended to a interupted member at the end of his interuption | |
const | FORMER_MEMBER_MESSAGE = 19 |
content of page for information about former membership e-mail content of this message is send to the former member at the day when the end membership begins | |
const | SELF_CANCEL_DISABLED = 0 |
self cancel disabled, remote computer cannot cancel this message | |
const | SELF_CANCEL_MEMBER = 1 |
self cancel enabled, every member's IP address will have cancelled given redirection | |
const | SELF_CANCEL_IP = 2 |
self cancel enabled, redirection is canceled only for current remote computer |
|
static |
Activate redirection for given IPs.
Message_Model | $message | Message to redirect |
Mysql_Result | $ips | IPs to redirect |
mixed | $user_id | ID of who added redirection or NULL |
string | $comment | Comment |
Exception | On error |
|
static |
Activates notice messages (only e-mail and sometimes also SMS) for accept payment notice, approoving/refusing of application for membership to a single member.
integer | $type | 8 => payment, 9 => application approve, 10 => application refuse |
integer | $member_id | Member ID |
integer | $user_id | Who redirects |
integer | E-mail state | |
integer | $sms | SMS state |
string | $comment | Comment for member |
Message_Model::activate_test_connection_end_message | ( | $user_id | ) |
Deny ip addresses with expired test connections.
integer | $user_id | Who redirects |
Message_Model::activate_unallowed_connecting_place_message | ( | $user_id | ) |
Activates notifications for ip addresses with unallowed connecting place.
integer | $user_id | Who redirects |
|
static |
Check if message can be activated manually.
integer | $type | Message type |
|
static |
Check if message can be activated directly.
integer | $type | Type of message |
Message_Model::count_all_messages | ( | $filter_sql = '' | ) |
Counts all messages.
Message_Model::count_all_redirections | ( | $filter_sql = '' | ) |
Counts all activated redirections from junction table messages_ip_addresses.
Message_Model::deactivate_message | ( | $message_id | ) |
Deactivates all redirections of given message.
integer | $message_id |
Message_Model::get_all_messages | ( | $limit_from = 0 , |
|
$limit_results = 20 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'asc' , |
|||
$filter_sql = '' |
|||
) |
Gets all redirection messages.
integer | $limit_from | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction | |
array | $filter_values |
Message_Model::get_all_redirections | ( | $limit_from = 0 , |
|
$limit_results = 20 , |
|||
$order_by = 'ip_address' , |
|||
$order_by_direction = 'ASC' , |
|||
$filter_sql = '' |
|||
) |
Gets all activated redirections from junction table messages_ip_addresses.
Message_Model::get_message_by_type | ( | $type | ) |
Message_Model::get_message_id_by_type | ( | $type | ) |
Returns id of message by given type.
integer | $type |
|
static |
Gets set of self cancel messages.
bool | $translate | Translate messages |
|
static |
Returns all message's types.
|
static |
Check if message contains email content.
integer | $type | Type of message |
|
static |
Check if message contains redirection content.
integer | $type | Type of message |
|
static |
Check if message contains sms content.
integer | $type | Type of message |
|
static |
Check if message may be self cancable.
integer | $type | Type of message |
|
static |
Check if message is special message.
integer | $type | Type of message |
|
static |
Check if message may ignore the white list.
integer | $type | Type of message |
|
static |
Generic function to send e-mail.
Message_Model | $message | Message which will be send |
string | E-mail address where send e-mail | |
mixed | $object | Generic object to autofill message variables |
boolean | $push | Whether message will be push on top of queue |
Exception |
|
static |
Send emails with redirection message to given contacts.
Message_Model | $message | Message to send |
Mysql_Result | $contacts | Contacts to send |
string | $comment | Comment |
Exception | On error |
|
static |
Send SMS messages with redirection message to given contacts.
Message_Model | $message | Message to send |
Mysql_Result | $contacts | Contacts to send |
mixed | $user_id | ID of who added redirection or NULL |
string | $comment | Comment |
Exception | On error |