| 1 | <?php if (!defined('ABSPATH')) { exit(); } |
|---|
| 2 | |
|---|
| 3 | $tables = array(); |
|---|
| 4 | |
|---|
| 5 | $tables['forms'] = array( |
|---|
| 6 | 'id' => array('type' => 'int', 'modules' => array('general-informations'), 'name' => __('ID', 'contact-manager'), 'width' => 5), |
|---|
| 7 | 'category_id' => array('type' => 'int', 'modules' => array('general-informations'), 'name' => (((isset($_GET['page'])) && (strstr($_GET['page'], 'categories'))) ? __('Parent category ID', 'contact-manager') : __('Category ID', 'contact-manager')), 'width' => 15), |
|---|
| 8 | 'name' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Name', 'contact-manager'), 'width' => 18, 'searchby' => __('the name', 'contact-manager')), |
|---|
| 9 | 'description' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Description', 'contact-manager'), 'width' => 18, 'searchby' => __('the description', 'contact-manager')), |
|---|
| 10 | 'keywords' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Keywords', 'contact-manager'), 'width' => 18, 'searchby' => __('the keywords', 'contact-manager')), |
|---|
| 11 | 'date' => array('type' => 'datetime', 'modules' => array('general-informations'), 'name' => __('Creation date', 'contact-manager'), 'width' => 18), |
|---|
| 12 | 'date_utc' => array('type' => 'datetime', 'modules' => array('general-informations'), 'name' => __('Creation date (UTC)', 'contact-manager'), 'width' => 18), |
|---|
| 13 | 'custom_fields' => array('type' => 'text', 'modules' => array('custom-fields'), 'name' => __('Custom fields', 'contact-manager'), 'width' => 18, 'searchby' => __('the custom fields', 'contact-manager')), |
|---|
| 14 | 'gift_download_url' => array('type' => 'text', 'modules' => array('gift'), 'name' => __('Gift download URL', 'contact-manager'), 'width' => 18), |
|---|
| 15 | 'gift_instructions' => array('type' => 'text', 'modules' => array('gift'), 'name' => __('Instructions to the sender', 'contact-manager'), 'width' => 18), |
|---|
| 16 | 'maximum_messages_quantity_per_sender' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Maximum messages quantity per sender', 'contact-manager'), 'width' => 12), |
|---|
| 17 | 'displays_count' => array('type' => 'int', 'modules' => array('counters'), 'name' => __('Displays count', 'contact-manager'), 'width' => 12), |
|---|
| 18 | 'messages_count' => array('type' => 'int', 'modules' => array('counters'), 'name' => __('Messages count', 'contact-manager'), 'width' => 12), |
|---|
| 19 | 'code' => array('type' => 'text', 'modules' => array('form'), 'name' => __('Code', 'contact-manager'), 'width' => 18, 'searchby' => __('the code', 'contact-manager')), |
|---|
| 20 | 'unfilled_fields_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Unfilled fields message', 'contact-manager'), 'width' => 18), |
|---|
| 21 | 'unfilled_field_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Unfilled field message', 'contact-manager'), 'width' => 18), |
|---|
| 22 | 'invalid_fields_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Invalid fields message', 'contact-manager'), 'width' => 18), |
|---|
| 23 | 'invalid_field_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Invalid field message', 'contact-manager'), 'width' => 18), |
|---|
| 24 | 'invalid_email_address_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Invalid email address message', 'contact-manager'), 'width' => 18), |
|---|
| 25 | 'invalid_captcha_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Invalid CAPTCHA message', 'contact-manager'), 'width' => 18), |
|---|
| 26 | 'failed_upload_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Failed upload message', 'contact-manager'), 'width' => 18), |
|---|
| 27 | 'too_large_file_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Too large file message', 'contact-manager'), 'width' => 18), |
|---|
| 28 | 'unauthorized_extension_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Unauthorized extension message', 'contact-manager'), 'width' => 18), |
|---|
| 29 | 'maximum_messages_quantity_reached_message' => array('type' => 'text', 'modules' => array('form', 'error-messages'), 'name' => __('Message of maximum messages quantity reached', 'contact-manager'), 'width' => 18), |
|---|
| 30 | 'messages_registration_enabled' => array('type' => 'text', 'modules' => array('messages-registration'), 'name' => __('Messages registration enabled', 'contact-manager'), 'width' => 15), |
|---|
| 31 | 'maximum_messages_quantity' => array('type' => 'text', 'modules' => array('messages-registration'), 'name' => __('Maximum messages quantity', 'contact-manager'), 'width' => 12), |
|---|
| 32 | 'message_confirmation_email_sent' => array('type' => 'text', 'modules' => array('message-confirmation-email'), 'name' => __('Message confirmation email sent', 'contact-manager'), 'width' => 15), |
|---|
| 33 | 'message_confirmation_email_sender' => array('type' => 'text', 'modules' => array('message-confirmation-email'), 'name' => __('Sender of the message confirmation email', 'contact-manager'), 'width' => 15), |
|---|
| 34 | 'message_confirmation_email_receiver' => array('type' => 'text', 'modules' => array('message-confirmation-email'), 'name' => __('Receiver of the message confirmation email', 'contact-manager'), 'width' => 15), |
|---|
| 35 | 'message_confirmation_email_subject' => array('type' => 'text', 'modules' => array('message-confirmation-email'), 'name' => __('Subject of the message confirmation email', 'contact-manager'), 'width' => 15), |
|---|
| 36 | 'message_confirmation_email_body' => array('type' => 'text', 'modules' => array('message-confirmation-email'), 'name' => __('Body of the message confirmation email', 'contact-manager'), 'width' => 18), |
|---|
| 37 | 'message_notification_email_sent' => array('type' => 'text', 'modules' => array('message-notification-email'), 'name' => __('Message notification email sent', 'contact-manager'), 'width' => 15), |
|---|
| 38 | 'message_notification_email_sender' => array('type' => 'text', 'modules' => array('message-notification-email'), 'name' => __('Sender of the message notification email', 'contact-manager'), 'width' => 15), |
|---|
| 39 | 'message_notification_email_receiver' => array('type' => 'text', 'modules' => array('message-notification-email'), 'name' => __('Receiver of the message notification email', 'contact-manager'), 'width' => 15), |
|---|
| 40 | 'message_notification_email_subject' => array('type' => 'text', 'modules' => array('message-notification-email'), 'name' => __('Subject of the message notification email', 'contact-manager'), 'width' => 15), |
|---|
| 41 | 'message_notification_email_body' => array('type' => 'text', 'modules' => array('message-notification-email'), 'name' => __('Body of the message notification email', 'contact-manager'), 'width' => 18), |
|---|
| 42 | 'sender_subscribed_to_autoresponder' => array('type' => 'text', 'modules' => array('autoresponders'), 'name' => __('Senders subscribed to an autoresponder list', 'contact-manager'), 'width' => 18), |
|---|
| 43 | 'sender_autoresponder' => array('type' => 'text', 'modules' => array('autoresponders'), 'name' => __('Senders autoresponder', 'contact-manager'), 'width' => 12), |
|---|
| 44 | 'sender_autoresponder_list' => array('type' => 'text', 'modules' => array('autoresponders'), 'name' => __('Senders autoresponder list', 'contact-manager'), 'width' => 15), |
|---|
| 45 | 'sender_subscribed_as_a_client' => array('type' => 'text', 'modules' => array('registration-as-a-client'), 'name' => __('Senders registered as clients', 'contact-manager'), 'width' => 18), |
|---|
| 46 | 'sender_client_category_id' => array('type' => 'text', 'modules' => array('registration-as-a-client'), 'name' => __('Senders client category ID', 'contact-manager'), 'width' => 15), |
|---|
| 47 | 'sender_client_status' => array('type' => 'text', 'modules' => array('registration-as-a-client'), 'name' => __('Senders client status', 'contact-manager'), 'width' => 15), |
|---|
| 48 | 'commerce_registration_confirmation_email_sent' => array('type' => 'text', 'modules' => array('registration-as-a-client'), 'name' => __('Registration confirmation email sent', 'contact-manager').' '.__('(Commerce)', 'contact-manager'), 'width' => 15), |
|---|
| 49 | 'commerce_registration_notification_email_sent' => array('type' => 'text', 'modules' => array('registration-as-a-client'), 'name' => __('Registration notification email sent', 'contact-manager').' '.__('(Commerce)', 'contact-manager'), 'width' => 15), |
|---|
| 50 | 'sender_subscribed_to_affiliate_program' => array('type' => 'text', 'modules' => array('registration-to-affiliate-program'), 'name' => __('Senders registered to the affiliate program', 'contact-manager'), 'width' => 18), |
|---|
| 51 | 'sender_affiliate_category_id' => array('type' => 'text', 'modules' => array('registration-to-affiliate-program'), 'name' => __('Senders affiliate category ID', 'contact-manager'), 'width' => 15), |
|---|
| 52 | 'sender_affiliate_status' => array('type' => 'text', 'modules' => array('registration-to-affiliate-program'), 'name' => __('Senders affiliate status', 'contact-manager'), 'width' => 15), |
|---|
| 53 | 'affiliation_registration_confirmation_email_sent' => array('type' => 'text', 'modules' => array('registration-to-affiliate-program'), 'name' => __('Registration confirmation email sent', 'contact-manager').' '.__('(Affiliation)', 'contact-manager'), 'width' => 15), |
|---|
| 54 | 'affiliation_registration_notification_email_sent' => array('type' => 'text', 'modules' => array('registration-to-affiliate-program'), 'name' => __('Registration notification email sent', 'contact-manager').' '.__('(Affiliation)', 'contact-manager'), 'width' => 15), |
|---|
| 55 | 'sender_subscribed_to_members_areas' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Senders subscribed to a member area', 'contact-manager'), 'width' => 18), |
|---|
| 56 | 'sender_members_areas' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Senders members areas', 'contact-manager'), 'width' => 12), |
|---|
| 57 | 'sender_members_areas_modifications' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Automatic modifications of the members areas', 'contact-manager'), 'width' => 18), |
|---|
| 58 | 'sender_member_category_id' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Senders member category ID', 'contact-manager'), 'width' => 15), |
|---|
| 59 | 'sender_member_status' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Senders member status', 'contact-manager'), 'width' => 15), |
|---|
| 60 | 'membership_registration_confirmation_email_sent' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Registration confirmation email sent', 'contact-manager').' '.__('(Membership)', 'contact-manager'), 'width' => 15), |
|---|
| 61 | 'membership_registration_notification_email_sent' => array('type' => 'text', 'modules' => array('membership'), 'name' => __('Registration notification email sent', 'contact-manager').' '.__('(Membership)', 'contact-manager'), 'width' => 15), |
|---|
| 62 | 'sender_subscribed_as_a_user' => array('type' => 'text', 'modules' => array('wordpress'), 'name' => __('Senders registered as users', 'contact-manager'), 'width' => 18), |
|---|
| 63 | 'sender_user_role' => array('type' => 'text', 'modules' => array('wordpress'), 'name' => __('Senders user role', 'contact-manager'), 'width' => 15), |
|---|
| 64 | 'message_custom_instructions_executed' => array('type' => 'text', 'modules' => array('custom-instructions'), 'name' => __('Custom instructions executed', 'contact-manager'), 'width' => 15), |
|---|
| 65 | 'message_custom_instructions' => array('type' => 'text', 'modules' => array('custom-instructions'), 'name' => __('PHP code of the custom instructions', 'contact-manager'), 'width' => 18), |
|---|
| 66 | 'affiliation_enabled' => array('type' => 'text', 'modules' => array('affiliation'), 'name' => __('Affiliation enabled', 'contact-manager'), 'width' => 12), |
|---|
| 67 | 'commission_amount' => array('type' => 'text', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Commission amount', 'contact-manager'), 'width' => 12), |
|---|
| 68 | 'commission2_enabled' => array('type' => 'text', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission enabled', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 12), |
|---|
| 69 | 'commission2_amount' => array('type' => 'text', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission amount', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 15)); |
|---|
| 70 | |
|---|
| 71 | $tables['forms_categories'] = $tables['forms']; |
|---|
| 72 | foreach (array('maximum_messages_quantity_per_sender', 'displays_count', 'messages_count') as $field) { unset($tables['forms_categories'][$field]); } |
|---|
| 73 | |
|---|
| 74 | $tables['messages'] = array( |
|---|
| 75 | 'id' => array('type' => 'int', 'modules' => array('general-informations'), 'name' => __('ID', 'contact-manager'), 'width' => 5), |
|---|
| 76 | 'form_id' => array('type' => 'int', 'modules' => array('general-informations'), 'name' => __('Form ID', 'contact-manager'), 'width' => 15), |
|---|
| 77 | 'receiver' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Receiver', 'contact-manager'), 'width' => 15, 'searchby' => __('the receiver', 'contact-manager')), |
|---|
| 78 | 'subject' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Subject', 'contact-manager'), 'width' => 15, 'searchby' => __('the subject', 'contact-manager')), |
|---|
| 79 | 'content' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Content', 'contact-manager'), 'width' => 18, 'searchby' => __('the content', 'contact-manager')), |
|---|
| 80 | 'keywords' => array('type' => 'text', 'modules' => array('general-informations'), 'name' => __('Keywords', 'contact-manager'), 'width' => 18, 'searchby' => __('the keywords', 'contact-manager')), |
|---|
| 81 | 'date' => array('type' => 'datetime', 'modules' => array('general-informations'), 'name' => __('Date', 'contact-manager'), 'width' => 18), |
|---|
| 82 | 'date_utc' => array('type' => 'datetime', 'modules' => array('general-informations'), 'name' => __('Date (UTC)', 'contact-manager'), 'width' => 18), |
|---|
| 83 | 'first_name' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('First name', 'contact-manager'), 'width' => 12, 'searchby' => __('the first name', 'contact-manager')), |
|---|
| 84 | 'last_name' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Last name', 'contact-manager'), 'width' => 12, 'searchby' => __('the last name', 'contact-manager')), |
|---|
| 85 | 'email_address' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Email address', 'contact-manager'), 'width' => 15, 'searchby' => __('the email address', 'contact-manager')), |
|---|
| 86 | 'website_name' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Website', 'contact-manager'), 'width' => 15, 'searchby' => __('the website name', 'contact-manager')), |
|---|
| 87 | 'website_url' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Website URL', 'contact-manager'), 'width' => 18, 'searchby' => __('the website URL', 'contact-manager')), |
|---|
| 88 | 'address' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Address', 'contact-manager'), 'width' => 15, 'searchby' => __('the address', 'contact-manager')), |
|---|
| 89 | 'postcode' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Postcode', 'contact-manager'), 'width' => 9, 'searchby' => __('the postcode', 'contact-manager')), |
|---|
| 90 | 'town' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Town', 'contact-manager'), 'width' => 12, 'searchby' => __('the town', 'contact-manager')), |
|---|
| 91 | 'country' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Country', 'contact-manager'), 'width' => 12, 'searchby' => __('the country', 'contact-manager')), |
|---|
| 92 | 'country_code' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Country code', 'contact-manager'), 'width' => 12, 'searchby' => __('the country code', 'contact-manager')), |
|---|
| 93 | 'phone_number' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Phone number', 'contact-manager'), 'width' => 12, 'searchby' => __('the phone number', 'contact-manager')), |
|---|
| 94 | 'ip_address' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('IP address', 'contact-manager'), 'width' => 12, 'searchby' => __('the IP address', 'contact-manager')), |
|---|
| 95 | 'user_agent' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Browser', 'contact-manager'), 'width' => 24), |
|---|
| 96 | 'referring_url' => array('type' => 'text', 'modules' => array('sender'), 'name' => __('Referring URL', 'contact-manager'), 'width' => 18), |
|---|
| 97 | 'custom_fields' => array('type' => 'text', 'modules' => array('custom-fields'), 'name' => __('Custom fields', 'contact-manager'), 'width' => 18, 'searchby' => __('the custom fields', 'contact-manager')), |
|---|
| 98 | 'referrer' => array('type' => 'text', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Referrer', 'contact-manager'), 'width' => 18, 'searchby' => __('the referrer', 'contact-manager')), |
|---|
| 99 | 'commission_amount' => array('type' => 'dec(12,2)', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Commission amount', 'contact-manager'), 'width' => 12), |
|---|
| 100 | 'commission_status' => array('type' => 'text', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Commission status', 'contact-manager'), 'width' => 12), |
|---|
| 101 | 'commission_payment_date' => array('type' => 'datetime', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Commission payment date', 'contact-manager'), 'width' => 18), |
|---|
| 102 | 'commission_payment_date_utc' => array('type' => 'datetime', 'modules' => array('affiliation', 'level-1-commission'), 'name' => __('Commission payment date (UTC)', 'contact-manager'), 'width' => 18), |
|---|
| 103 | 'referrer2' => array('type' => 'text', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Referrer', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 18, 'searchby' => __('the referrer', 'contact-manager').' '.__('(level 2)', 'contact-manager')), |
|---|
| 104 | 'commission2_amount' => array('type' => 'dec(12,2)', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission amount', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 15), |
|---|
| 105 | 'commission2_status' => array('type' => 'text', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission status', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 15), |
|---|
| 106 | 'commission2_payment_date' => array('type' => 'datetime', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission payment date', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 18), |
|---|
| 107 | 'commission2_payment_date_utc' => array('type' => 'datetime', 'modules' => array('affiliation', 'level-2-commission'), 'name' => __('Commission payment date (UTC)', 'contact-manager').' '.__('(level 2)', 'contact-manager'), 'width' => 18)); |
|---|