Esempio n. 1
0
 public function init()
 {
     $this->module_name = "encrypt";
     $this->module_position = 1;
     $this->version = 2.269;
     // 2.2 - initial release
     // 2.21 - better support for new 'extra' fields
     // 2.22 - permissions.
     // 2.221 - typo.
     // 2.23 - a better "e" value in RSA to support easier server side public key encryption.
     // 2.24 - sidebar encryption in ticket extra fields.
     // 2.25 - link fix, no htmlspecialchars
     // 2.26 - save decrypted
     // 2.261 - remove console .log
     // 2.262 - fix for encrypted ticket submission + attachments
     // 2.263 - larger popup
     // 2.264 - 2013-04-07 - fix for special characters in encryption
     // 2.265 - 2013-11-23 - working on new ui
     // 2.266 - 2014-01-17 - compatibility update for custom data plugin
     // 2.267 - 2014-01-21 - updated js encryption library
     // 2.268 - 2014-10-13 - hook_filter_var for better theme support
     // 2.269 - 2015-04-12 - fix dollar sign in extra field bug
     module_config::register_js('encrypt', 'sjcl.js');
     module_config::register_js('encrypt', 'encrypt.js');
     module_config::register_css('encrypt', 'encrypt.css');
     hook_add('extra_fields_output', 'module_encrypt::extra_fields_output_callback');
 }
 public function init()
 {
     $this->links = array();
     $this->module_name = "custom_dashboard_widgets";
     $this->module_position = 1;
     $this->version = 1;
     hook_add('dashboard_widgets', 'module_custom_dashboard_widgets::my_widgets');
 }
Esempio n. 3
0
 public function init()
 {
     $this->module_name = "form";
     $this->module_position = 0;
     module_config::register_css('form', 'jquery.timepicker.css');
     module_config::register_js('form', 'jquery.timepicker.min.js');
     hook_add('header_print_js', 'module_form::hook_header_print_js');
 }
Esempio n. 4
0
 public function init()
 {
     $this->module_name = "timer";
     $this->module_position = 0;
     if (module_security::is_logged_in() && module_config::c('timer_enabled', 1) && self::can_i('view', 'Task Timer') && get_display_mode() != 'mobile') {
         module_config::register_css('timer', 'timer.css');
         module_config::register_js('timer', 'timer.js');
         hook_add('job_task_after', 'module_timer::hook_job_task_after');
         hook_add('header_print_js', 'module_timer::hook_header_print_js');
     }
 }
Esempio n. 5
0
 function init()
 {
     $this->links = array();
     $this->module_name = "company";
     $this->module_position = 10;
     if (self::can_i('edit', 'Company')) {
         $this->links[] = array("name" => "Company", "p" => "company_settings", "icon" => "icon.png", "args" => array('company_id' => false), 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0);
     }
     hook_add('customer_deleted', 'module_company::hook_customer_deleted');
     hook_add('vendor_deleted', 'module_company::hook_vendor_deleted');
     //self::$do_company_custom_config = defined('COMPANY_UNIQUE_CONFIG') && COMPANY_UNIQUE_CONFIG; //module_config::c('company_unique_config',0);
 }
Esempio n. 6
0
    function init()
    {
        $this->links = array();
        $this->module_name = "job_discussion";
        $this->module_position = 17.1;
        //17 is job
        $this->version = 2.149;
        // 2.1 - initial
        // 2.11 - date change
        // 2.12 - better linking and auto open
        // 2.13 - possible bug fix in discussion saving
        // 2.14 - bug fixing.
        // 2.141 - bug fix for IE.
        // 2.142 - send email to staff option (as well as customer)
        // 2.143 - 2013-07-29 - new _UCM_SECRET hash in config.php
        // 2.144 - 2013-12-06 - javascript for for new jquery
        // 2.145 - 2014-03-17 - make discussion button stand out a bit more ( job_discussion_button_label )
        // 2.146 - 2014-03-18 - fix for disabling job discussion plugin
        // 2.147 - 2014-05-27 - email discussions to multiple customer contacts
        // 2.148 - 2015-01-08 - AdminLTE modal popup discussions (thanks 3wCorner!)
        // 2.149 - 2015-01-10 - job discussion bug fix
        if (self::is_plugin_enabled()) {
            module_config::register_css('job_discussion', 'job_discussion.css');
            module_config::register_js('job_discussion', 'job_discussion.js');
            //if(self::can_i('view','Job Discussions')){
            if (get_display_mode() != 'mobile') {
                hook_add('job_task_after', 'module_job_discussion::hook_job_task_after');
            }
        }
        if (class_exists('module_template', false)) {
            module_template::init_template('job_discussion_email_customer', 'Dear {CUSTOMER_NAME},<br>
<br>
A new comment has been added to a task in your job: {JOB_NAME}.<br><br>
Task: {TASK_NAME} <br/><br/>
Note: {NOTE}<br/><br/>
You can view this job and the comments online by <a href="{JOB_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'New Job Comment: {JOB_NAME}', array('CUSTOMER_NAME' => 'Customers Name', 'JOB_NAME' => 'Job Name', 'FROM_NAME' => 'Your name', 'JOB_URL' => 'Link to job for customer', 'TASK_NAME' => 'name of the task the note was added to', 'NOTE' => 'Copy of the note'));
            module_template::init_template('job_discussion_email_staff', 'Dear {STAFF_NAME},<br>
<br>
A new comment has been added to a task in your job: {JOB_NAME}.<br><br>
Task: {TASK_NAME} <br/><br/>
Note: {NOTE}<br/><br/>
You can view this job and the comments online by <a href="{JOB_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'New Comment on your Job: {JOB_NAME}', array('STAFF_NAME' => 'Staff Name', 'JOB_NAME' => 'Job Name', 'FROM_NAME' => 'Your name', 'JOB_URL' => 'Link to job for staff member', 'TASK_NAME' => 'name of the task the note was added to', 'NOTE' => 'Copy of the note'));
        }
    }
Esempio n. 7
0
    public function init()
    {
        $this->links = array();
        $this->change_request_types = array();
        $this->module_name = "change_request";
        $this->module_position = 30;
        $this->version = 2.296;
        // 2.296 - 2015-06-14 - fix for newer fancybox version
        // 2.295 - 2015-04-03 - fixed translation
        // 2.294 - 2014-08-14 - better email error messages
        // 2.293 - 2014-08-01 - responsive improvements
        // 2.292 - 2014-06-09 - permission and job assignment fix
        // 2.291 - 2014-04-09 - js fix for url
        // 2.29 - 2014-01-01 - css fix for dark background websites
        // 2.289 - 2013-12-05 - fix for mod_security
        // 2.288 - 2013-08-30 - dashboard speed improvement
        // 2.287 - 2013-08-07 - new console code option
        // 2.286 - 2013-07-29 - new _UCM_SECRET hash in config.php
        // 2.285 - 2013-04-20 - permission fix
        // 2.1 - initial release
        // 2.21 - bug fix in javascript code
        // 2.22 - email/dashboard alerts and other fixes
        // 2.23 - redirecting bug fixes (please clear browser cache)
        // 2.24 - bug fix for multi-line change requests
        // 2.25 - big fix showing all changes on home page.
        // 2.26 - bug fix for wordpress themes and jquery
        // 2.27 - support for the new jQuery 1.9+
        // 2.28 - hide/show completed change requests
        // 2.281 - possible bug fix for some hosting accounts
        // 2.282 - delete change request button
        // 2.283 - bug fix in change request error logging
        // 2.284 - 2013-04-04 - better support for change request on HTTPS websites
        //module_config::register_css('change_request','change_request.css');
        if (module_config::c('change_request_enabled', 1)) {
            hook_add('website_sidebar', 'module_change_request::hook_website_sidebar');
            hook_add('website_main', 'module_change_request::hook_website_main');
            hook_add('website_save', 'module_change_request::website_form_save');
            hook_add('job_delete', 'module_change_request::hook_job_delete');
            if (class_exists('module_template', false)) {
                module_template::init_template('change_request_alert_email', 'Dear {TO_NAME},<br>
<br>
A change request has been submitted by {NAME} for the website {WEBSITE_LINK}.<br><br>
Change request details:<br><br>
{REQUEST}<br/>
', 'Change Request: {WEBSITE_NAME}', array('to_name' => 'Recipient name', 'from_name' => 'Uploader name', 'website_name' => 'Name of website', 'website_link' => 'Link to website', 'name' => 'Change request name', 'request' => 'Change request text'));
            }
        }
    }
Esempio n. 8
0
    public function init()
    {
        $this->links = array();
        $this->module_name = "faq";
        $this->module_position = 30;
        hook_add('api_callback_faq', 'module_faq::api_filter_faq');
        if (class_exists('module_template', false)) {
            module_template::init_template('faq_item', '
<a href="{FAQ_BACK}" class="faq_back">&laquo; Return to FAQ Database</a>
<h2>{QUESTION}</h2>
{ANSWER}<br/>
', 'Used when displaying an individual FAQ item to the public.', 'code');
            module_template::init_template('faq_list', '
<h2>FAQ Database</h2>
{LISTING}<br/>
', 'Used when displaying the list of FAQ items to the public.', 'code');
        }
    }
Esempio n. 9
0
 public function init()
 {
     $this->links = array();
     $this->help_types = array();
     $this->module_name = "help";
     $this->module_position = 16;
     $this->version = 2.11;
     //2.11 - 2014-04-05 - url help js
     //2.1 - 2014-03-14 - initial release of new help system
     if (module_help::is_plugin_enabled() && (module_config::c('help_only_for_admin', 1) && module_security::get_loggedin_id() == 1 || !module_config::c('help_only_for_admin', 1) && module_help::can_i('view', 'Help'))) {
         // hook for help icon in top bar
         hook_add('header_buttons', 'module_help::hook_filter_var_header_buttons');
         hook_add('header_print_js', 'module_help::header_print_js');
         module_config::register_js('help', 'help.js');
         if (module_config::can_i('view', 'Settings')) {
             $this->links[] = array("name" => "Help", "p" => "help_settings", 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0);
         }
     }
 }
Esempio n. 10
0
 public function init()
 {
     $this->links = array();
     $this->user_types = array();
     $this->module_name = "data";
     $this->module_position = 18;
     $this->version = 2.163;
     //2.163 - 2015-10-27 - new hook locations in jobs
     //2.162 - 2015-10-16 - customer link in view all
     //2.161 - 2015-08-15 - email replace fields fix
     //2.16 - 2015-03-18 - fulltext db fix
     //2.159 - 2015-03-17 - db speed improvements
     //2.158 - 2015-03-05 - untick multiple option bug fix
     //2.157 - 2015-02-05 - custom data search spacing fix
     //2.156 - 2015-01-31 - search by created/update
     //2.155 - 2015-01-27 - file download name/extension fix
     //2.154 - 2015-01-25 - fixes, pdf template and single entry
     //2.153 - 2015-01-21 - link to customer and multiple fields
     //2.1 - 2014-01-05 - awesome custom data feature - initial release
     //2.11 - 2014-01-05 - awesome custom data feature - menu fix
     //2.12 - 2014-01-08 - custom data update - better delete options
     //2.13 - 2014-01-14 - custom data update - sub lists support
     //2.14 - 2014-01-17 - encrypted field support
     //2.141 - 2014-02-03 - icons in menu
     //2.142 - 2014-02-04 - drag and drop re-arrange items bug fix
     //2.143 - 2014-02-15 - drag and drop re-arrange items bug fix
     //2.144 - 2014-02-18 - easier create new buttons
     //2.145 - 2014-02-24 - search button added to top
     //2.146 - 2014-03-07 - file upload link fix
     //2.147 - 2014-03-10 - custom data search fixed
     //2.148 - 2014-04-25 - html output improvement
     //2.149 - 2014-07-14 - menu fix and new read only fields
     //2.15 - 2014-08-10 - menu position through advanced custom_data_menu_order_X
     //2.151 - 2014-08-18 - select drop down fix
     //2.152 - 2015-01-07 - file upload improvement
     module_config::register_css('data', 'data.css');
     module_config::register_js('data', 'data.js');
     //hook_handle_callback('custom_data_hook_location',_CUSTOM_DATA_HOOK_LOCATION_JOB_FOOTER, 'job', $job_id, $job);
     hook_add('custom_data_hook_location', 'module_data::hook_location');
 }
Esempio n. 11
0
 public function init()
 {
     $this->module_name = "theme_adminlte";
     $this->module_position = 0;
     $this->version = 2.144;
     //2.144 - 2015-10-27 - iframe popup fix
     //2.143 - 2015-10-12 - fix for error reporting on widgets
     //2.142 - 2015-09-25 - ability to create more customer types
     //2.141 - 2015-06-11 - fontawesome update
     //2.14 - 2015-06-07 - new extra field settings button
     //2.139 - 2015-05-13 - theme settings fix
     //2.138 - 2015-05-03 - responsive improvements
     //2.137 - 2015-04-27 - responsive improvements
     //2.136 - 2015-03-24 - pagination fix
     //2.135 - 2015-03-15 - table manager update
     //2.134 - 2015-03-14 - new help system
     //2.133 - 2015-03-08 - timer menu fix
     //2.132 - 2015-02-24 - menu fixed/normal setting added
     //2.131 - 2015-02-08 - job discussion improvement (thanks w3corner!)
     //2.13 - 2015-01-26 - dashboard widgets save position
     //2.129 - 2015-01-21 - leads dashboard link fix
     //2.128 - 2014-12-17 - signup form on login
     //2.127 - 2014-11-26 - improved form framework
     //2.126 - 2014-11-19 - content padding fix
     //2.125 - 2014-11-05 - welcome_message_role_X template support
     //2.124 - 2014-10-13 - date and encrypt field fixes
     //2.123 - 2014-09-09 - job task message saving fix
     //2.122 - 2014-08-20 - css fixes
     //2.121 - 2014-08-18 - fix for quick pin menu item
     //2.12 - 2014-08-18 - missing javascript file
     //2.11 - 2014-08-14 - dashboard widget permissions
     //2.1 - 2014-07-31 - initial release
     hook_add('get_themes', 'module_theme_adminlte::hook_get_themes');
     if (module_theme::get_current_theme() == 'theme_adminlte') {
         hook_add('get_table_manager', 'module_theme_adminlte::hook_get_table_manager');
     }
 }
Esempio n. 12
0
    public function init()
    {
        $this->links = array();
        $this->invoice_types = array();
        $this->module_name = "invoice";
        $this->module_position = 18;
        $this->version = 2.771;
        //2.771 - 2015-10-17 - item_tax template tag fix
        //2.770 - 2015-07-19 - invoice tax discount fix
        //2.769 - 2015-07-18 - hide job if disabled
        //2.768 - 2015-04-13 - credit note pdf fix
        //2.767 - 2015-03-24 - invoice renewal tax fix
        //2.766 - 2015-03-24 - more invoice settings
        //2.765 - 2015-03-24 - blank invoice template fix
        //2.764 - 2015-03-14 - better invoice payment method defaults/overrides
        //2.763 - 2015-03-08 - arithmetic in invoice_task_list template
        //2.762 - 2015-02-24 - invoice email template fix
        //2.761 - 2015-02-12 - product defaults (tax/bill/type)
        //2.76 - 2015-02-08 - invoice_increment_date_check for unique incrementing invoice numbers per year
        //2.759 - 2014-12-31 - hourly rate fix
        //2.758 - 2014-12-22 - invoice task decimal places
        //2.757 - 2014-12-22 - sends invoice due to early subscription payment
        //2.756 - 2014-11-27 - invoice payment improvements
        //2.755 - 2014-11-26 - more work on vendor staff billing feature
        //2.754 - 2014-11-19 - fix for finance list when assigning customer credit / overpayments
        //2.753 - 2014-11-07 - hours:mins bug fix
        //2.752 - 2014-11-05 - link manual invoice to website
        //2.751 - 2014-10-13 - custom subscription invoice templates
        //2.75 - 2014-09-28 - added more tags to invoice_task_list template
        //2.749 - 2014-09-18 - overdue_email_auto_days date calculation fix
        //2.748 - 2014-09-03 - negative taxes
        //2.747 - 2014-09-02 - mark invoice as sent fix and invoice_renew_discounts
        //2.746 - 2014-08-27 - invoice search by date paid
        //2.745 - 2014-08-25 - delete invoice translation fix
        //2.744 - 2014-08-20 - invoice_payment_methods template
        //2.743 - 2014-08-19 - tax_decimal_places and tax_trim_decimal
        //2.742 - 2014-08-18 - pdf invoice printing improvement
        //2.741 - 2014-08-14 - website integration fix
        //2.74 - 2014-08-12 - external_invoice_SUFFIX
        //2.739 - 2014-08-01 - responsive improvements
        //2.738 - 2014-07-22 - invoice translation improvement Qty/Amount/Discount
        //2.737 - 2014-07-14 - improvement with hours:minutes formatting
        //2.736 - 2014-07-08 - quote and job discounts through to invoice
        //2.735 - 2014-07-02 - permission improvement
        //2.734 - 2014-07-01 - automatic invoice payment receipt option
        //2.733 - 2014-07-01 - invoice renewal monthly fix
        //2.732 - 2014-07-01 - invoice_template_print default for customer
        //2.731 - 2014-07-01 - invoice_template_print default for customer
        //2.73 - 2014-06-30 - sending overdue invoice bug fix
        //2.729 - 2014-06-27 - invoice default task fix
        //2.728 - 2014-06-24 - invoice fee calculation improvement
        //2.727 - 2014-06-24 - fix for negative quantites and amounts
        //2.726 - 2014-06-23 - invoice fee calculation improvement
        //2.725 - 2014-06-09 - hours:minutes task formatting
        //2.724 - 2014-05-23 - new invoice pdf template called invoice_print_basic (see blog)
        //2.723 - 2014-05-21 - new invoice pdf template and faster pdf generation
        //2.722 - 2014-04-10 - date_sent added to template tags
        //2.721 - 2014-04-10 - blank invoice subscription bug fix (see Settings-Invoices)
        //2.72 - 2014-04-10 - blank invoice subscription bug fix (see Settings-Invoices)
        //2.719 - 2014-04-09 - invoice page speed improvements
        //2.718 - 2014-04-03 - speed improvements
        //2.717 - 2014-03-31 - duplicate invoice bug fix
        //2.716 - 2014-03-26 - save and return button added
        //2.715 - 2014-03-20 - translation fix in invoice payments and credits
        //2.714 - 2014-03-16 - multiple tax support in jobs
        //2.713 - 2014-03-15 - comma separated default list for multiple taxes
        //2.712 - 2014-03-10 - support for payment gateway fees and discounts
        //2.711 - 2014-03-08 - {if:IS_INVOICE_PAID} template flag
        //2.71 - 2014-03-04 - subscription payments as invoice credit
        //2.699 - 2014-03-04 - allowed payment methods currency restriction fix
        //2.698 - 2014-02-24 - change total amount due to 0 for cancelled invoices
        //2.697 - 2014-02-18 - show offline payment details in main invoice page
        //2.696 - 2014-02-15 - added {RECEIPT_DETAILS} to receipt template
        //2.695 - 2014-02-06 - number_trim_decimals advanced settings
        //2.694 - 2014-02-05 - sorting by total amount due
        //2.693 - 2014-01-30 - thankyou page shown after making an invoice payment
        //2.692 - 2014-01-27 - replace fields from jobs show within invoices as well
        //2.691 - 2014-01-21 - new jquery version fix
        //2.69 - 2014-01-20 - contact email bug fix
        //2.689 - 2014-01-18 - starting work on automatic recurring payments
        //2.688 - 2014-01-11 - invoice in upcoming payments bug fix
        //2.687 - 2014-01-10 - invoice_allow_payment_amount_adjustment added
        //2.686 - 2014-01-03 - invoices with renewal date now appear in finance upcomming
        //2.685 - 2013-12-19 - invoice inrementing bug fix
        //2.684 - 2013-12-15 - support for negative invoice amounts
        //2.683 - 2013-12-11 - permission improvements
        //2.682 - 2013-11-21 - working on new UI
        //2.681 - 2013-11-15 - working on new UI
        //2.68 - 2013-11-13 - advanced option invoice_file_prefix and credit_note_file_prefix for PDFs
        //2.679 - 2013-11-12 - bug fix in new invoice refunds feature
        //2.678 - 2013-11-11 - started on invoice refunds
        //2.677 - 2013-10-30 - sql fix for clients
        //2.676 - 2013-10-11 - fix duplicate tax when saving.
        //2.675 - 2013-10-06 - feature to invoice incomplete job tasks
        //2.674 - 2013-10-05 - Settings > Invoice - option to choose what time of day for renewals/emails to occur
        //2.673 - 2013-10-04 - ability to show tax per line item in invoice PDF
        //2.672 - 2013-10-04 - option to disable website plugin
        //2.671 - 2013-10-04 - merge invoice fix
        //2.67 - 2013-10-02 - print html option
        //2.669 - 2013-10-02 - deleting invoice payment fix
        //2.668 - 2013-10-02 - assign credit currency fix
        //2.667 - 2013-09-29 - ability to disable all payment methods for an invoice
        //2.666 - 2013-09-28 - ability to disable all payment methods for an invoice
        //2.665 - 2013-09-26 - invoice expenses added below invoice
        //2.664 - 2013-09-25 - illegal offset fix
        //2.663 - 2013-09-24 - assign credit button fix
        //2.662 - 2013-09-23 - overdue emails on cancelled invoices bug fix
        //2.661 - 2013-09-20 - invoice paid date correction on split-day payments
        //2.66 - 2013-09-20 - invoice tax included fixes
        //2.659 - 2013-09-13 - ability to assign an invoice to company when customer has more than 1 company
        //2.658 - 2013-09-12 - dashboard speed improvement and better caching
        //2.657 - 2013-09-11 - update customer status after invoice delete
        //2.656 - 2013-09-10 - dashboard alerts cache fix
        //2.655 - 2013-09-09 - invoice primary contact assignment
        //2.654 - 2013-09-09 - invoice renewal redirect/date fix
        //2.653 - 2013-09-07 - bulk delete invoices
        //2.652 - 2013-09-06 - easier to disable plugins
        //2.651 - 2013-09-05 - multiple tax improvement
        //2.649 - 2013-09-03 - hide tax on invoices if none is present
        //2.648 - 2013-09-03 - support for multiple tax rates. Paid date bug fix.
        //2.647 - 2013-09-03 - invoice_auto_renew_only_paid_invoices config variable added
        //2.645 - 2013-08-30 - fix for saving renewable invoices
        //2.644 - 2013-08-30 - added memcache support for huge speed improvements
        //2.643 - 2013-08-28 - big feature - automated customer/member subscriptions
        //2.642 - 2013-08-27 - big feature - automated invoicing + automated overdue emails
        //2.641 - 2013-08-20 - invoices now overdue day after due date
        //2.64 - 2013-08-13 - fix for discount on pdf printout
        //2.639 - 2013-08-08 - fix for hours on dashboard
        //2.638 - 2013-07-29 - new _UCM_SECRET hash in config.php
        //2.637 - 2013-07-25 - invoice bug fixing
        //2.636 - 2013-07-16 - dashboard link fix
        //2.635 - 2013-07-15 - dashboard fix
        //2.634 - 2013-07-15 - bug fix
        //2.633 - 2013-07-01 - add multiple taxes to invoice
        //2.632 - 2013-06-21 - permission update - new invoice permissions
        //2.631 - 2013-06-17 - job improvement when invoice has discount
        //2.63 - 2013-06-14 - customer color coding
        //2.629 - 2013-05-28 - email template field improvements
        //2.628 - 2013-05-28 - email template field improvements
        //2.627 - 2013-05-27 - dashboard alert improvements.
        //2.626 - 2013-05-08 - invoice hours fix
        //2.625 - 2013-04-28 - rounding improvements for different currency formats
        //2.624 - 2013-04-27 - rounding improvements for different currency formats
        //2.623 - 2013-04-26 - task type selection +others on invoice creation
        //2.622 - 2013-04-26 - fix for $0 invoices
        //2.621 - 2013-04-26 - fix for deposit invoices from jobs
        //2.619 - 2013-04-21 - number formatting improvements
        //2.618 - 2013-04-21 - invoice pdf print fix
        //2.617 - 2013-04-20 - invoice merge improvement
        //2.616 - 2013-04-18 - fix for pdf downloads
        //2.615 - 2013-04-16 - PLEASE CHECK YOUR INVOICES AFTER THIS UPDATE TO ENSURE THEY ARE STILL CORRECT!
        //2.614 - 2013-04-16 - PLEASE CHECK YOUR INVOICES AFTER THIS UPDATE TO ENSURE THEY ARE STILL CORRECT!
        //2.613 - 2013-04-16 - new advanced field task_taxable_default
        // old version information prior to 2013-04-16:
        //2.421 - fix for invoice currency in printout.
        //2.422 - fix for assigning credit
        //2.423 - assigning contacts to invoices.
        //2.424 - fix for invoice prefix number.
        //2.5 - recurring invoices. task hourly rates. payment methods per invoice. payment methods text moved to template area.
        //2.51 - date fix for recurring invoices.
        //2.52 - fix for saving extra fields on renewd invoices.
        //2.521 - added currency to invoice hourly amount.
        //2.522 - blank extra fields come through as N/A in invoices now.
        //2.523 - paid date not clearing properly when renewing invoice.
        //2.524 - added member_id for better subscription integration (eg: sending an email).
        //2.525 - multiple currency fixes
        //2.53 - new theme layout
        //2.531 - date done moved into invoice layout.
        //2.532 - bug fix in invoice task list - hourly rate
        //2.533 - permission fix for viewing invoices without customer access.
        //2.534 - customise the Hours column header
        //2.535 - upgrade fix
        //2.536 - replace fields in email template
        //2.537 - CUSTOMER_GROUP, WEBSITE_GROUP and JOB_GROUP added to invoice templates
        //2.538 - testing non-taxable items in invoices
        //2.539 - perm fix
        //2.54 - invoice empty items
        //2.541 - printing from mobile
        //2.542 - invoice qty/amount fix
        //2.543 - another invoice qty/amount fix
        //2.544 - send to primary contact
        //2.545 - discount type
        //2.546 - tax fix. calculate individually on each item.
        //2.547 - date renewl on invoices, -1 day
        //2.548 - mobile fix
        //2.549 - external invoice fix
        //2.55 - fix for invoice re-generation and dates.
        //2.551 - fix for 100% discounted invoices
        //2.552 - extra fields in invoice print from customer section
        //2.553 - custom details in invoice payment area.
        //2.554 - invoice numbers A to Z, then AA to AZ, etc..
        //2.555 - support for incrementing invoice numbers - see advanced invoice_incrementing settings
        //2.556 - better support for multi-job and multi-website invoice prints
        //2.557 - before tax/after tax invoice fix
        //2.558 - 'invoice_send_alerts' advanced setting added
        //2.559 - invoice line numbers are now editable
        //2.56 - quick search based on invoice amount or invoice payment
        //2.561 - remove discount on renewed invoices
        //2.562 - support for negative invoice line items
        //2.563 - invoice bug, possible duplication fix?
        //2.564 - bug fix for incrementing invoice numbers
        //2.565 - option to use invoice name as job name (see invoice_name_match_job option)
        //2.566 - task "long description" added to invoice items like it is in job tasks
        //2.567 - quicker way to print multiple pdf's
        //2.568 - starting work on handling job deposits and customer credit
        //2.569 - added 'contact_first_name' and 'contact_last_name' to template fields.
        //2.570 - speed improvements.
        //2.571 - currency fixes and email features
        //2.572 - currency fixes and email features
        //2.573 - invoice email bug fix
        //2.574 - {INVOICE_DATE_RANGE} template tag added to invoice emails.
        //2.575 - job/invoice deposits made easier.
        //2.576 - deposits and customer credits working nicely now.
        //2.577 - choose different templates when sending an invoice to customer.
        //2.578 - cancel invoice so no more payment reminder
        //2.579 - fix for subscription in finance upcoming items
        //2.58 - invoice credit fixing.
        //2.581 - customer subscription fixes
        //2.582 - support for public invoices notes
        //2.583 - support for multiple invoice pdf print templates
        //2.584 - search by customer group
        //2.585 - speed improvements
        //2.586 - item hourly rate/qty improvements
        //2.587 - bug fix for invoice subscription renewals
        //2.588 - date fix on dashboard invoice alerts
        //2.589 - initial work on a credit note feature
        //2.59 - extra fields update - show in main listing option
        //2.591 - job deposit fix
        //2.592 - customer invoice payment fix
        //2.593 - tax added/included option
        //2.594 - big update - manual task percent, task type (hourly/qty/amount)
        //2.595 - invoice task list improvement
        //2.596 - total_amount_due made available in email template
        //2.597 - bug fix in finance
        //2.598 - 2013-04-04 - fix for 0 invoice amounts.
        //2.599 - 2013-04-04 - new 'invoice_payment_methods_online_footer' template for pdfs
        //2.61 - 2013-04-05 - support for products in invoices
        //2.611 - 2013-04-07 - invoice PDF print fix
        //2.612 - 2013-04-10 - new customer permissions
        // new version information starting from top ^^
        // todo: add completed date as a configurable column
        // todo: move invoice layout to a template system.
        module_config::register_css('invoice', 'invoice.css');
        module_config::register_js('invoice', 'invoice.js');
        hook_add('finance_recurring_list', 'module_invoice::get_finance_recurring_items');
        if (class_exists('module_template', false) && module_security::is_logged_in()) {
            module_template::init_template('invoice_payment_methods', '<table width="100%" class="tableclass" id="invoice_payment_methods">
    <tbody>
    <tr>
        <td valign="top" style="width:50%">
	        {PAYMENT_METHODS_ONLINE}
        </td>
        <td valign="top" style="width:50%">
	        {PAYMENT_METHODS_OFFLINE}
        </td>
    </tr>
    </tbody>
</table><br/>
	        ', 'Holds the invoice payment methods at the bottom.', 'code');
            module_template::init_template('invoice_payment_methods_online', '<strong>Option #1: Pay Online</strong>
	        <br/>
	        We support the following secure payment methods:
	        <br/>
	        ', 'Displayed on the invoice.', 'code');
            module_template::init_template('invoice_payment_methods_online_footer', '{PAYMENT_METHODS}
	        <br/>
	        Please <a href="{LINK}">click here</a> to pay online.
	        ', 'Displayed on the invoice.', 'code', array('LINK' => 'URL link to invoice page', 'PAYMENT_METHODS' => 'List of supported payment methods'));
            module_template::init_template('invoice_payment_methods_offline', '<strong>Option #2: Pay Offline</strong>
	        <br/>
	        We support the following offline payment methods:
	        <br/>
	        ', 'Displayed on the external invoice.', 'code');
            module_template::init_template('invoice_payment_in_full', 'Invoice has been paid in full. <br/><br/>
	        Thank you for your business.
	        ', 'Displayed on the external invoice.', 'code');
            module_template::init_template('invoice_payment_pending', 'Automatic Invoice Payment Pending. <br/><br/>
	        Thank you for your business.
	        ', 'Displayed when a user has an automatic payment pending on an invoice.', 'code');
            //module_template::init_template('invoice_payment_methods_title','','Displayed as the title on invoice for payment methods area','code');
            module_template::init_template('invoice_payment_thankyou', '<h2>Invoice Payment</h2>
	<p>Invoice Number: <strong>{INVOICE_NUMBER}</strong> </p>
	<p>Thank you for making payment on this Invoice. We will email you a receipt shortly.</p>
	', 'This page is displayed after a payment is made on an invoice.', 'code');
            module_template::init_template('invoice_payment_subscription', '<h2>Payment for Invoice {INVOICE_NUMBER}</h2>
<p>Please choose from the available payment options below:</p>
<form action="{PAYMENT_URL}" method="post">
<input type="hidden" name="invoice_payment_id" value="{INVOICE_PAYMENT_ID}">
<input type="hidden" name="payment_method" value="{PAYMENT_METHOD}">
<input type="hidden" name="payment_amount" value="{PAYMENT_AMOUNT}">
<p><input type="submit" name="payment_single" value="Pay a Once Off amount of {PRETTY_PAYMENT_AMOUNT}"></p>
<p><input type="submit" name="payment_subscription" value="Setup Automatic Payments of {PRETTY_PAYMENT_AMOUNT} every {SUBSCRIPTION_PERIOD}"></p>
</form>
', 'Used when a customer tries to pay an invoice that has a subscription option.', 'code');
            module_template::init_template('invoice_email_due', 'Dear {CUSTOMER_NAME},<br>
<br>
Please find attached your invoice {INVOICE_NUMBER}.<br><br>
The {TOTAL_AMOUNT} is due on {DATE_DUE}.<br><br>
You can also view this invoice online by <a href="{INVOICE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Invoice Owing: {INVOICE_NUMBER}', array('CUSTOMER_NAME' => 'Customers Name', 'INVOICE_NUMBER' => 'Invoice Number', 'TOTAL_AMOUNT' => 'Total amount of invoice', 'DATE_DUE' => 'Due Date', 'FROM_NAME' => 'Your name', 'INVOICE_URL' => 'Link to invoice for customer'));
            module_template::init_template('credit_note_email', 'Dear {CUSTOMER_NAME},<br>
<br>
Please find attached your Credit Note {INVOICE_NUMBER} for Invoice {CREDIT_INVOICE_NUMBER}.<br><br>
Total amount: {TOTAL_AMOUNT}<br><br>
You can view this invoice online by <a href="{INVOICE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Credit Note: {INVOICE_NUMBER}', array('CUSTOMER_NAME' => 'Customers Name', 'INVOICE_NUMBER' => 'Credit Note Number', 'CREDIT_INVOICE_NUMBER' => 'Original Invoice Number', 'TOTAL_AMOUNT' => 'Total amount of invoice', 'FROM_NAME' => 'Your name', 'INVOICE_URL' => 'Link to invoice for customer'));
            module_template::init_template('invoice_email_overdue', 'Dear {CUSTOMER_NAME},<br>
<br>
The attached invoice {INVOICE_NUMBER} is now <span style="font-weight:bold; color:#FF0000;">overdue</span>.<br><br>
The {TOTAL_AMOUNT} was due on {DATE_DUE}.<br><br>
You can also view this invoice online by <a href="{INVOICE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Invoice Overdue: {INVOICE_NUMBER}', array('CUSTOMER_NAME' => 'Customers Name', 'INVOICE_NUMBER' => 'Invoice Number', 'TOTAL_AMOUNT' => 'Total amount of invoice', 'DATE_DUE' => 'Due Date', 'FROM_NAME' => 'Your name', 'INVOICE_URL' => 'Link to invoice for customer'));
            module_template::init_template('invoice_email_paid', 'Dear {CUSTOMER_NAME},<br>
<br>
Thank you for your {TOTAL_AMOUNT} payment on invoice {INVOICE_NUMBER}.<br><br>
This invoice was paid in full on {DATE_PAID}.<br><br>
Please find attached the receipt for this invoice payment. <br>
You can also view this invoice online by <a href="{INVOICE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Invoice Paid: {INVOICE_NUMBER}', array('CUSTOMER_NAME' => 'Customers Name', 'INVOICE_NUMBER' => 'Invoice Number', 'TOTAL_AMOUNT' => 'Total amount of invoice', 'DATE_PAID' => 'Paid date', 'FROM_NAME' => 'Your name', 'INVOICE_URL' => 'Link to invoice for customer'));
        }
    }
Esempio n. 13
0
    public function init()
    {
        $this->links = array();
        $this->product_types = array();
        $this->module_name = "product";
        $this->module_position = 31;
        $this->version = 2.155;
        // 2.155 - 2015-07-18 - product search
        // 2.154 - 2015-06-28 - started work on product API
        // 2.153 - 2015-02-12 - ui fix and product defaults (tax/bill/type)
        // 2.152 - 2014-01-23 - new quote feature
        // 2.151 - 2013-11-15 - working on new UI
        // 2.15 - 2013-10-02 - bulk product delete and product category import fix
        // 2.149 - 2013-09-08 - faq permission fix
        // 2.148 - 2013-08-07 - css improvement
        // 2.147 - 2013-06-16 - javascript fix
        // 2.146 - 2013-06-07 - further work on product categories
        // 2.145 - 2013-05-28 - further work on product categories
        // 2.144 - 2013-05-28 - started work on product categories
        // 2.143 - 2013-04-27 - css fix for large product list
        // 2.142 - 2013-04-16 - product fix in invoice
        // 2.141 - 2013-04-05 - product support in invoices
        // 2.14 - product import via CSV
        // 2.13 - permission fix
        // 2.12 - product permissions
        // 2.11 - initial release
        hook_add('api_callback_product', 'module_product::api_filter_product');
        if (module_security::is_logged_in() && self::can_i('view', 'Products')) {
            module_config::register_css('product', 'product.css');
            module_config::register_js('product', 'product.js');
            if (isset($_REQUEST['_products_ajax'])) {
                switch ($_REQUEST['_products_ajax']) {
                    case 'products_ajax_search':
                        //                        $sent = headers_sent($file, $line);
                        //                        echo 'here';
                        //                        print_r($sent);
                        //                        print_r($file);
                        //                        print_r($line);
                        if (self::$_product_count === false) {
                            self::$_product_count = count(self::get_products());
                        }
                        $product_name = isset($_REQUEST['product_name']) ? $_REQUEST['product_name'] : '';
                        if (self::$_product_count > 0) {
                            $search = array();
                            if (strlen($product_name) > 2) {
                                $search['general'] = $product_name;
                            }
                            $products = self::get_products($search);
                            if (count($products) > 0) {
                                // sort products by categories.
                                $products_in_categories = array();
                                foreach ($products as $product_id => $product) {
                                    if ($product['product_category_id'] && $product['product_category_name']) {
                                        if (!isset($products_in_categories[$product['product_category_name']])) {
                                            $products_in_categories[$product['product_category_name']] = array();
                                        }
                                        $products_in_categories[$product['product_category_name']][] = $product;
                                        unset($products[$product_id]);
                                    } else {
                                    }
                                }
                                $cat_id = 1;
                                ?>

                                <ul>
                                    <?php 
                                foreach ($products_in_categories as $category_name => $cat_products) {
                                    ?>

                                        <li>
                                            <a href="#" class="product_category_parent"><?php 
                                    echo htmlspecialchars($category_name);
                                    ?>
</a> (<?php 
                                    _e('%s products', count($cat_products));
                                    ?>
)
                                            <ul style="display:none;" id="product_category_<?php 
                                    echo $cat_id++;
                                    ?>
">
                                                <?php 
                                    foreach ($cat_products as $product) {
                                        ?>

                                                    <li>
                                                       <a href="#" onclick="return ucm.product.select_product(<?php 
                                        echo $product['product_id'];
                                        ?>
);"> <?php 
                                        echo htmlspecialchars($product['name']);
                                        ?>
</a>
                                                    </li>
                                                <?php 
                                    }
                                    ?>

                                            </ul>

                                    <?php 
                                }
                                ?>

                                    <?php 
                                foreach ($products as $product) {
                                    ?>

                                    <li>
                                        <a href="#" onclick="return ucm.product.select_product(<?php 
                                    echo $product['product_id'];
                                    ?>
);"><?php 
                                    /*if($product['product_category_name']){
                                          echo htmlspecialchars($product['product_category_name']);
                                          echo ' &raquo; ';
                                      }*/
                                    echo htmlspecialchars($product['name']);
                                    ?>
</a>
                                    </li>
                                    <?php 
                                }
                                ?>

                                </ul>
                                <?php 
                            }
                        } else {
                            if (!strlen($product_name)) {
                                _e('Pleae create Products first by going to Settings > Products');
                            }
                        }
                        exit;
                    case 'products_ajax_get':
                        $product_id = (int) $_REQUEST['product_id'];
                        if ($product_id) {
                            $product = self::get_product($product_id);
                        } else {
                            $product = array();
                        }
                        echo json_encode($product);
                        exit;
                }
            }
        }
    }
Esempio n. 14
0
 public static function get_current_theme()
 {
     if (_DEMO_MODE && get_display_mode() != 'mobile' && is_dir('includes/plugin_theme/themes/pro/')) {
         hook_add('header_print_js', 'module_theme::hook_header_print_js_demo');
         if (isset($_REQUEST['demo_theme'])) {
             $_SESSION['_demo_theme'] = basename($_REQUEST['demo_theme']);
             if (!$_SESSION['_demo_theme']) {
                 $_SESSION['_demo_theme'] = module_config::c('theme_name', 'default');
             }
         }
         $current_theme = isset($_SESSION['_demo_theme']) ? $_SESSION['_demo_theme'] : module_config::c('theme_name', 'default');
     } else {
         $current_theme = module_config::c('theme_name', is_dir('includes/plugin_theme/themes/metis/') ? 'metis' : 'default');
         if (module_security::is_logged_in() && module_config::c('theme_per_user', 0)) {
             // we allow users to pick their own themes.
             $current_theme = module_config::c('theme_name_' . module_security::get_loggedin_id(), self::$current_theme);
         }
     }
     return $current_theme;
 }
Esempio n. 15
0
 public function init()
 {
     $this->links = array();
     $this->website_types = array();
     $this->module_name = "website";
     $this->module_position = 16;
     $this->version = 2.265;
     //2.265 - 2015-03-24 - import notes via csv
     //2.264 - 2015-01-23 - hook for custom data integration
     //2.263 - 2014-08-13 - website notes show summary of linked items
     //2.262 - 2014-07-31 - responsive improvements
     //2.21 - fix for customer id not getting saved.
     //2.22 - delete customer from a group
     //2.23 - theme include support.
     //2.24 - hooks for change request plugin
     //2.241 - got CSV import working nicely
     //2.242 - urlify added for better url field support
     //2.243 - bug fix in swapping customers
     //2.244 - bug fix for job currency in "edit website" page
     //2.245 - extra fields update - show in main listing option
     //2.246 - extra fields update - show in main listing option
     //2.247 - customer link fix permissions
     //2.248 - improved quick search
     //2.249 - https support in website links.
     //2.25 - 2013-04-10 - new customer permissions
     //2.251 - 2013-05-28 - email template tag improvements
     //2.252 - 2013-06-18 - customer signup fixes
     //2.253 - 2013-06-21 - permission update
     //2.254 - 2013-08-29 - support for recurring website subscriptions - eg: hosting
     //2.255 - 2013-08-29 - support for recurring website subscriptions - eg: hosting
     //2.256 - 2013-10-04 - option to disable website plugin
     //2.257 - 2013-11-15 - working on new UI
     //2.258 - 2014-03-19 - demo fix
     //2.259 - 2014-04-15 - show quotes in website view
     //2.26 - 2014-06-11 - quote/website permission fix
     //2.261 - 2014-07-02 - permission improvement
     if ($this->can_i('view', module_config::c('project_name_plural', 'Websites')) && module_website::is_plugin_enabled()) {
         hook_add('website_list', 'module_website::hook_filter_var_website_list');
         /*$this->ajax_search_keys = array(
               _DB_PREFIX.'website' => array(
                   'plugin' => 'website',
                   'search_fields' => array(
                       'url',
                       'name',
                   ),
                   'key' => 'website_id',
                   'title' => _l(module_config::c('project_name_single','Website').': '),
               ),
           );*/
         // only display if a customer has been created.
         if (isset($_REQUEST['customer_id']) && $_REQUEST['customer_id'] && $_REQUEST['customer_id'] != 'new') {
             // how many websites?
             $websites = $this->get_websites(array('customer_id' => $_REQUEST['customer_id']));
             $name = module_config::c('project_name_plural', 'Websites');
             if (count($websites)) {
                 $name .= " <span class='menu_label'>" . count($websites) . "</span> ";
             }
             $this->links[] = array("name" => $name, "p" => "website_admin", 'args' => array('website_id' => false), 'holder_module' => 'customer', 'holder_module_page' => 'customer_admin_open', 'menu_include_parent' => 0, 'icon_name' => 'globe');
         }
         $this->links[] = array("name" => module_config::c('project_name_plural', 'Websites'), "p" => "website_admin", 'args' => array('website_id' => false), 'icon_name' => 'globe');
     }
 }
Esempio n. 16
0
 public function init()
 {
     $this->links = array();
     $this->subscription_types = array();
     $this->module_name = "subscription";
     $this->module_position = 30;
     $this->version = 2.196;
     // 2.196 - 2015-07-29 - currency bug fix
     // 2.195 - 2015-06-08 - quick settings link
     // 2.194 - 2015-05-03 - responsive improvements
     // 2.193 - 2015-03-24 - blank invoice template fix
     // 2.192 - 2015-02-24 - subscription email/pdf template suffix
     // 2.191 - 2015-01-20 - database speed improvements
     // 2.19 - 2014-12-22 - subscription dashboard alerts permission fix
     // 2.189 - 2014-11-27 - payment notes follow through to finances
     // 2.188 - 2014-10-13 - select custom pdf/email template per subscription
     // 2.187 - 2014-10-06 - improved debugging
     // 2.186 - 2014-09-09 - text fix when max renewals is set
     // 2.185 - 2014-09-05 - paypal trial period feature
     // 2.184 - 2014-08-12 - bug fix subscription listing
     // 2.183 - 2014-07-25 - subscription date in task list
     // 2.182 - 2014-07-12 - subscription credit and ordering fix
     // 2.181 - 2014-07-02 - permission improvement
     // 2.18 - 2014-07-01 - cron job debuging
     // 2.179 - 2014-06-27 - invoice sidebar fix
     // 2.178 - 2014-04-10 - speed improvements
     // 2.177 - 2014-04-05 - subscription recurring limit
     // 2.176 - 2014-03-19 - sort subscriptions alphabetically on member/customer pages
     // 2.175 - 2014-03-04 - subscription payments as invoice credit
     // 2.174 - 2014-02-25 - dashboard subscription listing bug fix
     // 2.173 - 2014-01-18 - starting work on automatic recurring payments
     // 2.172 - 2013-11-15 - working on new UI
     // 2.171 - 2013-11-11 - subscriptions with tax included option
     // 2.169 - 2013-10-05 - Settings > Invoice - option to choose what time of day for renewals/emails to occur
     // 2.168 - 2013-10-02 - subscription dashboard link fix
     // 2.167 - 2013-09-27 - finance list shows customer
     // 2.166 - 2013-09-26 - invoice finances
     // 2.165 - 2013-09-13 - dashboard link fix when only 1 notification is displayed
     // 2.164 - 2013-09-11 - improved delete/re-add subscription
     // 2.163 - 2013-09-11 - template date range fix on emails
     // 2.162 - 2013-09-11 - only checks for automatic invoices if changes have been made
     // 2.161 - 2013-09-10 - send subscription invoice X days prior to renewal date
     // 2.159 - 2013-09-07 - invoice_auto_renew_only_paid_invoices fix
     // 2.158 - 2013-09-06 - duplicate entry bug fix
     // 2.157 - 2013-09-05 - checkbox fix and subscription_send_invoice_straight_away option added
     // 2.156 - 2013-09-03 - subscriptions added to customer signup form
     // 2.155 - 2013-09-03 - invoice_auto_renew_only_paid_invoices config variable added
     // 2.154 - 2013-07-30 - installation fix
     // 2.153 - 2013-07-29 - automated website subscriptions layout improvement
     // 2.152 - 2013-07-29 - automated website subscriptions layout improvement
     // 2.151 - 2013-07-28 - support for automated website subscriptions
     // 2.149 - 2013-07-28 - automatic subscription renewal and dashboard improvement
     // 2.148 - 2013-04-16 - improved subscription start date
     // 2.147 - 2013-04-16 - fix for updated invoice system
     // old history:
     // 2.13 - initial release
     // 2.131 - better integration with invoicing sysetem. eg: eamiling an invoice to a member. adding a member_id field to invoice.
     // 2.132 - delete fix.
     // 2.134 - permission fix.
     // 2.135 - submit_small in create
     // 2.136 - Delete member bug fix
     // 2.137 - hook into finance module to display nicer in finance listing
     // 2.138 - subscription support for customers.
     // 2.139 - permission fix
     // 2.140 - bug fixing
     // 2.141 - fix for subscription in finance upcoming items
     // 2.142 - customer subscription bug fix
     // 2.143 - dashboard alerts bug fix
     // 2.144 - subscription invoice number improvement
     // 2.145 - subscription next due date manual editing
     // 2.146 - 2013-04-13 - subscription next date better calculations + subscription_calc_type advanced setting
     module_config::register_css('subscription', 'subscription.css');
     module_config::register_js('subscription', 'subscription.js');
     hook_add('invoice_sidebar', 'module_subscription::hook_invoice_sidebar');
     hook_add('invoice_deleted', 'module_subscription::hook_invoice_deleted');
     hook_add('invoice_replace_fields', 'module_subscription::hook_invoice_replace_fields');
     hook_add('member_edit', 'module_subscription::hook_member_edit_form');
     hook_add('member_save', 'module_subscription::hook_member_edit_form_save');
     hook_add('member_deleted', 'module_subscription::hook_member_deleted');
     hook_add('customer_edit', 'module_subscription::hook_customer_edit_form');
     hook_add('customer_save', 'module_subscription::hook_customer_edit_form_save');
     hook_add('customer_deleted', 'module_subscription::hook_customer_deleted');
     hook_add('website_main', 'module_subscription::hook_website_edit_form');
     hook_add('website_save', 'module_subscription::hook_website_edit_form_save');
     hook_add('website_deleted', 'module_subscription::hook_website_deleted');
     hook_add('finance_recurring_list', 'module_subscription::get_finance_recurring_items');
     hook_add('finance_invoice_listing', 'module_subscription::get_invoice_listing');
     hook_add('invoice_email_template', 'module_subscription::hook_filter_var_invoice_email_template');
     /*if(self::db_table_exists('subscription_owner') && self::db_table_exists('subscription_member') && self::db_table_exists('subscription_customer')){
                 // hack to do an upgrade of subscription data once this table exists.
                 $sql = "SELECT * FROM `"._DB_PREFIX."subscription_member`";
                 $members = qa($sql);
                 foreach($members as $r){
                     if(!$r['member_id'])continue;
                     // found some old entries to update.
                     $subscription_owner = get_single('subscription_owner',array(
                         'subscription_id',
                         'owner_table',
                         'owner_id',
                     ),array(
                         $r['subscription_id'],
                         'member',
                         $r['member_id'],
                     ),true);
                     $subscription_owner_id = $subscription_owner && isset($subscription_owner['subscription_owner_id']) ? $subscription_owner['subscription_owner_id'] : false;
                     if(!$subscription_owner_id){
                         $subscription_owner_id = update_insert('subscription_owner_id',false,'subscription_owner',array(
                             'subscription_id' => $r['subscription_id'],
                             'owner_table' => 'member',
                             'owner_id' => $r['member_id'],
                             'deleted' => $r['deleted'],
                             'start_date' => $r['start_date'],
                             'next_due_date' => $r['next_due_date'],
                             'manual_next_due_date' => $r['manual_next_due_date'],
                         ));
                     }
                     if($subscription_owner_id){
                         // add this subscription_owner_id to any existing subscription_history entries
                         $sql = "UPDATE `"._DB_PREFIX."subscription_history` SET subscription_owner_id = ".(int)$subscription_owner_id." WHERE member_id = ".(int)$r['member_id']." AND subscription_id = ".(int)$r['subscription_id']."";
                         query($sql);
                         delete_from_db('subscription_member',array('subscription_id','member_id'),array($r['subscription_id'],$r['member_id']));
                     }else{
                         set_error('Failed to insert subscription owner for some reason, id: '.$r['subscription_history_id']);
                     }
     
                 }
                 $sql = "SELECT * FROM `"._DB_PREFIX."subscription_customer`";
                 $customers = qa($sql);
                 foreach($customers as $r){
                     if(!$r['customer_id'])continue;
                     // found some old entries to update.
                     $subscription_owner = get_single('subscription_owner',array(
                         'subscription_id',
                         'owner_table',
                         'owner_id',
                     ),array(
                         $r['subscription_id'],
                         'customer',
                         $r['customer_id'],
                     ),true);
                     $subscription_owner_id = $subscription_owner && isset($subscription_owner['subscription_owner_id']) ? $subscription_owner['subscription_owner_id'] : false;
                     if(!$subscription_owner_id){
                         $subscription_owner_id = update_insert('subscription_owner_id',false,'subscription_owner',array(
                             'subscription_id' => $r['subscription_id'],
                             'owner_table' => 'customer',
                             'owner_id' => $r['customer_id'],
                             'deleted' => $r['deleted'],
                             'start_date' => $r['start_date'],
                             'next_due_date' => $r['next_due_date'],
                             'manual_next_due_date' => $r['manual_next_due_date'],
                         ));
                     }
                     if($subscription_owner_id){
                         // add this subscription_owner_id to any existing subscription_history entries
                         $sql = "UPDATE `"._DB_PREFIX."subscription_history` SET subscription_owner_id = ".(int)$subscription_owner_id." WHERE customer_id = ".(int)$r['customer_id']." AND subscription_id = ".(int)$r['subscription_id']."";
                         query($sql);
                         delete_from_db('subscription_customer',array('subscription_id','customer_id'),array($r['subscription_id'],$r['customer_id']));
                     }else{
                         set_error('Failed to insert subscription owner for some reason, id: '.$r['subscription_history_id']);
                     }
     
                 }
             }*/
 }
Esempio n. 17
0
    public function init()
    {
        $this->links = array();
        $this->job_types = array();
        $this->module_name = "job";
        $this->module_position = 17;
        module_config::register_css('job', 'tasks.css');
        module_config::register_js('job', 'tasks.js');
        hook_add('calendar_events', 'module_job::hook_calendar_events');
        hook_add('job_list', 'module_job::hook_filter_var_job_list');
        hook_add('custom_data_menu_locations', 'module_job::hook_filter_custom_data_menu_locations');
        if (class_exists('module_template', false)) {
            module_template::init_template('job_task_completion_email', '<h2>Job Task Completed</h2>
We thought you would like to know that your job <strong>{JOB_NAME}</strong> task <strong>{TASK_DESCRIPTION}</strong> has been completed.
', 'Job Task Completed: {JOB_NAME}.', 'code');
            module_template::init_template('job_staff_email', 'Dear {STAFF_NAME},<br>
<br>
Please find below your {TASK_COUNT} assigned tasks for job: {JOB_NAME}.<br><br>
You can view this job by <a href="{JOB_URL}">clicking here</a>.<br><br>
{JOB_TASKS}<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Assigned Job Tasks: {JOB_NAME}', array('STAFF_NAME' => 'Customers Name', 'JOB_NAME' => 'Job Name', 'TASK_COUNT' => 'Number of assigned tasks', 'JOB_URL' => 'Link to job for customer', 'JOB_TASKS' => 'Output of job tasks for this staff member'));
            module_template::init_template('job_task_approval', 'Dear {STAFF_NAME},<br>
<br>
The task has been <strong>{APPROVED_OR_REJECTED}</strong> for the job: {JOB_NAME}.<br><br>
The job can be viewed by <a href="{JOB_URL}">clicking here</a>.<br><br>
Job Task: {JOB_TASK}<br><br>
Message: {MESSAGE}<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Job Task {APPROVED_OR_REJECTED}: {JOB_NAME}', array('APPROVED_OR_REJECTED' => 'Will be Approved or Rejected', 'JOB_NAME' => 'Job Name', 'JOB_URL' => 'Link to job for customer', 'JOB_TASK' => 'Output of job task for this staff member', 'MESSAGE' => 'Approved or Rejected message'));
        }
    }
Esempio n. 18
0
 public function init()
 {
     $this->links = array();
     $this->user_types = array();
     $this->module_name = "user";
     $this->module_position = 15;
     hook_add('contact_list', 'module_user::hook_filter_var_contact_list');
     /*if(module_security::has_feature_access(array(
     				'name' => 'Admin',
     				'module' => 'config',
     				'category' => 'Config',
     				'view' => 1,
     				'description' => 'view',
     		))){*/
     if ($this->can_i('view', 'Users', 'Config')) {
         $this->links[] = array("name" => "Users", "p" => "user_admin", "args" => array('user_id' => false), 'holder_module' => 'config', 'holder_module_page' => 'config_admin', 'menu_include_parent' => 0, 'order' => 3);
     }
     if (file_exists('includes/plugin_user/pages/contact_admin_list.php') && $this->can_i('view', 'Contacts', 'Customer')) {
         // only display if a customer has been created.
         if (isset($_REQUEST['customer_id']) && $_REQUEST['customer_id'] && $_REQUEST['customer_id'] != 'new') {
             // how many contacts?
             $contacts = $this->get_contacts(array('customer_id' => $_REQUEST['customer_id']), true, false);
             $name = _l('Contacts');
             if (mysql_num_rows($contacts) > 0) {
                 $name .= " <span class='menu_label'>" . mysql_num_rows($contacts) . "</span> ";
             }
             $this->links[] = array("name" => $name, "p" => "contact_admin", 'args' => array('user_id' => false), 'holder_module' => 'customer', 'holder_module_page' => 'customer_admin_open', 'menu_include_parent' => 0, 'icon_name' => 'user');
         }
     }
     if (file_exists('includes/plugin_user/pages/contact_admin_list.php') && $this->can_i('view', 'Contacts', 'Vendor')) {
         // only display if a vendor has been created.
         if (isset($_REQUEST['vendor_id']) && (int) $_REQUEST['vendor_id'] > 0) {
             // how many contacts?
             $contacts = $this->get_contacts(array('vendor_id' => $_REQUEST['vendor_id']), true, false);
             $name = _l('Contacts');
             if (mysql_num_rows($contacts) > 0) {
                 $name .= " <span class='menu_label'>" . mysql_num_rows($contacts) . "</span> ";
             }
             $this->links[] = array("name" => $name, "p" => "contact_admin", 'args' => array('user_id' => false), 'holder_module' => 'vendor', 'holder_module_page' => 'vendor_admin_open', 'menu_include_parent' => 0, 'icon_name' => 'user');
         }
     }
     hook_add('api_callback_user', 'module_user::api_filter_user');
 }
Esempio n. 19
0
        }
        ?>
                </span>
            <?php 
    }
    ?>
        </div>
        <?php 
    return ob_get_clean();
}
//hook_add('plugins_loaded','metis_plugins_loaded');
//function metis_plugins_loaded(){
hook_remove('layout_column_half', 'module_theme::hook_handle_layout_column');
hook_remove('layout_column_thirds', 'module_theme::hook_handle_layout_column');
hook_add('layout_column_half', 'metis_layout_column');
hook_add('layout_column_thirds', 'metis_layout_column');
//}
function metis_layout_column($column_type, $column_option = '', $column_width = false)
{
    switch ($column_type) {
        case 'layout_column_half':
            switch ($column_option) {
                case 1:
                    $column_width = $column_width ? floor(12 / (100 / $column_width)) : 6;
                    echo '<div class="row"><div class="col-md-' . $column_width . '">';
                    break;
                case 2:
                    $column_width = $column_width ? ceil(12 / (100 / $column_width)) : 6;
                    echo '</div><div class="col-md-' . $column_width . '">';
                    break;
                case 'end':
Esempio n. 20
0
    public function init()
    {
        $this->links = array();
        $this->ticket_types = array();
        $this->module_name = "ticket";
        $this->module_position = 25;
        self::$ticket_statuses = array(1 => _l('Unassigned'), 2 => _l('New'), 3 => _l('Replied'), _TICKET_STATUS_IN_PROGRESS_ID => _l('In Progress'), _TICKET_STATUS_RESOLVED_ID => _l('Resolved'), 7 => _l('Canceled'));
        /*$this->ajax_search_keys = array(
              _DB_PREFIX.'ticket' => array(
                  'plugin' => 'ticket',
                  'search_fields' => array(
                      'ticket_id',
                      'subject',
                  ),
                  'key' => 'ticket_id',
                  'title' => _l('Ticket: '),
              ),
          );*/
        module_config::register_css('ticket', 'tickets.css');
        module_config::register_js('ticket', 'tickets.js');
        hook_add('invoice_admin_list_job', 'module_ticket::hook_invoice_admin_list_job');
        hook_add('invoice_sidebar', 'module_ticket::hook_invoice_sidebar');
        hook_add('customer_contact_moved', 'module_ticket::hook_customer_contact_moved');
        hook_add('customer_deleted', 'module_ticket::hook_customer_deleted');
        // filter var hooks
        hook_add('generate_fieldset_options', 'module_ticket::hook_filter_generate_fieldset_options');
        hook_add('get_quote', 'module_ticket::hook_filter_get_quote');
        hook_add('quote_save', 'module_ticket::hook_quote_save');
        hook_add('quote_delete', 'module_ticket::hook_quote_delete');
        hook_add('api_callback_ticket', 'module_ticket::api_filter_ticket');
        if (class_exists('module_template', false)) {
            module_template::init_template('ticket_email_notify', 'Dear {STAFF_NAME},<br>
<br>
A support ticket has been assigned to you.<br>
Ticket Number: <strong>{TICKET_NUMBER}</strong><br>
Ticket Subject: <strong>{TICKET_SUBJECT}</strong><br>
To view this ticket please <a href="{TICKET_URL}">click here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Ticket Assigned: {TICKET_NUMBER}', array('STAFF_NAME' => 'Staff Name', 'TICKET_NUMBER' => 'Ticket Number', 'TICKET_SUBJECT' => 'Ticket Subject', 'TICKET_URL' => 'Link to ticket for customer'));
            module_template::init_template('ticket_container', '<span style="font-size:10px; color:#666666;">{REPLY_LINE}</span>
<span style="font-size:10px; color:#666666;">Your ticket has been updated, please see the message below:</span>


{MESSAGE}


<span style="font-size:10px; color:#666666;">Ticket Number: <strong>{TICKET_NUMBER}</strong></span>
<span style="font-size:10px; color:#666666;">Ticket Status: <strong>{TICKET_STATUS}</strong></span>
<span style="font-size:10px; color:#666666;">Your position in the support queue: <strong>{POSITION_CURRENT} out of {POSITION_ALL}</strong>.</span>
<span style="font-size:10px; color:#666666;">Estimated time for a reply: <strong>within {DAYS} days</strong></span>
<span style="font-size:10px; color:#666666;">You can view the status of your support query at any time by following this link:</span>
<span style="font-size:10px; color:#666666;"><a href="{URL}" style="color:#666666;">View Ticket {TICKET_NUMBER} History Online</a></span>

', 'The email sent along with all ticket replies.', 'text');
            module_template::init_template('ticket_admin_email', '{MESSAGE}


<span style="font-size:12px; color:#666666; font-weight: bold;">Ticket Details:</span>
<span style="font-size:10px; color:#666666;">Number of messages: <strong>{MESSAGE_COUNT}</strong></span>
<span style="font-size:10px; color:#666666;">Ticket Number: <strong>{TICKET_NUMBER}</strong></span>
<span style="font-size:10px; color:#666666;">Ticket Status: <strong>{TICKET_STATUS}</strong></span>
<span style="font-size:10px; color:#666666;">Position in the support queue: <strong>{POSITION_CURRENT} out of {POSITION_ALL}</strong>.</span>
<span style="font-size:10px; color:#666666;">Estimated time for a reply: <strong>within {DAYS} days</strong></span>
<span style="font-size:10px; color:#666666;">View the ticket: <strong>{URL_ADMIN}</strong></span>
        ', 'Sent as an email to the administrator when a new ticket is created.', 'text');
            module_template::init_template('ticket_autoreply', 'Hello,

Thank you for your email. We will reply shortly.

        ', 'Sent as an email after a support ticket is received.', 'text');
            module_template::init_template('ticket_rejection', 'Hello,

Please submit all NEW support tickets via our website by following this link:
{TICKET_URL}

New support tickets are no longer accepted via email due to high levels of spam causing delays for everyone.

Thanks,

        ', 'Email Bounced: {SUBJECT}.', 'text');
        }
    }
Esempio n. 21
0
    function init()
    {
        $this->links = array();
        $this->module_name = "file";
        $this->module_position = 21;
        $this->version = 2.567;
        // 2.567 - 2015-07-18 - bucket download zip
        // 2.566 - 2015-03-30 - pdf preview bug fix
        // 2.565 - 2015-03-08 - file approval email goes to admin as well
        // 2.564 - 2015-01-27 - file upload dashboard alert bug fix
        // 2.563 - 2015-01-26 - file tag bug fix
        // 2.562 - 2014-12-19 - file bucket feature
        // 2.561 - 2014-12-08 - file delete fix
        // 2.56 - 2014-11-19 - multiple file and drag-drop uploads
        // 2.559 - 2014-11-19 - multiple file upload and bulk delete
        // 2.558 - 2014-10-08 - file pointer css fix
        // 2.557 - 2014-08-03 - responsive improvements and new uploader version
        // 2.556 - 2014-07-21 - extra fields available in template
        // 2.555 - 2014-07-02 - file permission/alert improvements
        // 2.554 - 2014-02-23 - newsletter image fix
        // 2.553 - 2014-02-09 - file description fix
        // 2.552 - 2014-01-23 - new quote feature
        // 2.551 - 2014-01-10 - permission fix
        // 2.55 - 2014-01-05 - email fix when adding new file. default staff selected in drop down
        // 2.549 - 2014-01-03 - emailing a file to customer for approval
        // 2.548 - 2013-12-11 - new file user role settings
        // 2.547 - 2013-11-24 - upload fix when using progress bar
        // 2.546 - 2013-11-23 - file download improvement for some hosting accounts
        // 2.545 - 2013-11-15 - working on new UI
        // 2.544 - 2013-09-13 - page title translation fix
        // fix for files linked to multiple jobs
        // 2.42 - extra protection for assigning files to different customers.
        // 2.421 - job name displaying. htmlspecialchars removing.
        // 2.422 - bug fix.
        // 2.423 - bug fix creating new file under a customer.
        // 2.424 - files shared between customer accounts
        // 2.425 - bug fix for output appreaing before downloading images.
        // 2.5 - file previews.
        // 2.51 - fix ob error when no ob is present.
        // 2.511 - Delete file comments working
        // 2.512 - mime type fix for download (changed from old pdf to dynamic)
        // 2.513 - short open tags.
        // 2.514 - moves files tab to main menu, with a configuration variable. also put perms on the commenting system.
        // 2.52 - better file comment perms
        // 2.521 - file in menu perms.
        // 2.522 - file comment create perm bug fix
        // 2.523 - link fix for no customer perms
        // 2.524 - fix for mobile layout
        // 2.525 - adding files by url
        // 2.526 - swap to url bug fix
        // 2.527 - when new files are added an alert is sent (email/dashboard). alert will stay in place until that user views file.
        // 2.528 - customer contact alert email fix
        // 2.529 - newsletter system fixes
        // 2.53 - sql bug fix
        // 2.531 - email file notification fix
        // 2.532 - extra fields update - show in main listing option
        // 2.533 - better document support
        // 2.534 - improved quick search
        // 2.535 - 2013-04-10 - new customer permissions
        // 2.536 - 2013-05-11 - file upload progress indicator (swap back with 'file_upload_old' setting)
        // 2.537 - 2013-06-07 - file saving fix
        // 2.538 - 2013-06-21 - permission update
        // 2.539 - 2013-07-17 - progress bar
        // 2.54 - 2013-07-25 - pdf preview in file tab area (beta)
        // 2.541 - 2013-07-26 - pdf download fix
        // 2.542 - 2013-07-29 - new _UCM_SECRET hash in config.php
        // 2.543 - 2013-08-31 - pdf embed preview fix
        if (class_exists('module_template', false)) {
            module_template::init_template('file_upload_alert_email', 'Dear {TO_NAME},<br>
<br>
A file has been uploaded/updated by {FROM_NAME} called {FILE_NAME}.<br><br>
View this file by going here: {FILE_LINK}<br><br>
Customer: {CUSTOMER_NAME}<br/>
Description: {DESCRIPTION}
', 'File Updated: {FILE_NAME} {CUSTOMER_NAME}', array('to_name' => 'Recipient name', 'from_name' => 'Uploader name', 'file_link' => 'Link to file', 'customer_name' => 'Customer Name', 'description' => 'File notes'));
            module_template::init_template('file_comment_alert_email', 'Dear {TO_NAME},<br>
<br>
A file has been commented on by {FROM_NAME} called {FILE_NAME}.<br><br>
View this file by going here: {FILE_LINK}<br><br>
Customer: {CUSTOMER_NAME}<br/>
Comment: {COMMENT}
', 'File Comment: {FILE_NAME} {CUSTOMER_NAME}', array('to_name' => 'Recipient name', 'from_name' => 'Uploader name', 'file_link' => 'Link to file', 'customer_name' => 'Customer Name', 'comment' => 'File comment'));
        }
        hook_add('customer_deleted', 'module_file::hook_customer_deleted');
        module_config::register_css('file', 'file.css');
    }
Esempio n. 22
0
        ?>
                </span>
            <?php 
    }
    ?>
        </div>
    </div>
        <?php 
    return ob_get_clean();
}
//hook_add('plugins_loaded','adminlte_plugins_loaded');
//function adminlte_plugins_loaded(){
hook_remove('layout_column_half', 'module_theme::hook_handle_layout_column');
hook_remove('layout_column_thirds', 'module_theme::hook_handle_layout_column');
hook_add('layout_column_half', 'adminlte_layout_column');
hook_add('layout_column_thirds', 'adminlte_layout_column');
//}
function adminlte_layout_column($column_type, $column_option = '', $column_width = false)
{
    switch ($column_type) {
        case 'layout_column_half':
            switch ($column_option) {
                case 1:
                    $column_width = $column_width ? floor(12 / (100 / $column_width)) : 6;
                    echo '<div class="row"><div class="col-md-' . $column_width . '">';
                    break;
                case 2:
                    $column_width = $column_width ? ceil(12 / (100 / $column_width)) : 6;
                    echo '</div><div class="col-md-' . $column_width . '">';
                    break;
                case 'end':
Esempio n. 23
0
}
require_once module_theme::include_ucm('includes/plugin_theme_adminlte/functions.php');
module_config::register_css('theme', 'bootstrap.min.css', full_link('/includes/plugin_theme_adminlte/css/bootstrap.min.css'), 11);
module_config::register_css('theme', 'font-awesome.min.css', full_link('/includes/plugin_theme_adminlte/css/font-awesome.min.css'), 11);
module_config::register_css('theme', 'jquery.ui.min.css', full_link('/includes/plugin_theme_adminlte/css/jquery-ui-1.10.3.custom.css'), 5);
//module_config::register_css('theme','jquery.ui.structure.min.css',full_link('/includes/plugin_theme_adminlte/css/jquery-ui.structure.min.css'),6);
//module_config::register_css('theme','jquery.ui.theme.min.css',full_link('/includes/plugin_theme_adminlte/css/jquery-ui.theme.min.css'),7);
module_config::register_css('theme', 'AdminLTE.css', full_link('/includes/plugin_theme_adminlte/css/AdminLTE.css'), 12);
if (isset($_SERVER['REQUEST_URI']) && (strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL) || strpos($_SERVER['REQUEST_URI'], _EXTERNAL_TUNNEL_REWRITE))) {
    module_config::register_css('theme', 'external.css', full_link('/includes/plugin_theme_adminlte/css/external.css'), 100);
}
module_config::register_js('theme', 'jquery.min.js', full_link('/includes/plugin_theme_adminlte/js/jquery.min.js'), 1);
module_config::register_js('theme', 'jquery-ui.min.js', full_link('/includes/plugin_theme_adminlte/js/jquery-ui-1.10.3.custom.min.js'), 2);
module_config::register_js('theme', 'cookie.js', full_link('/js/cookie.js'), 3);
module_config::register_js('theme', 'javascript.js', full_link('/js/javascript.js'), 4);
module_config::register_js('theme', 'bootstrap.min.js', full_link('/includes/plugin_theme_adminlte/js/bootstrap.min.js'), 6);
module_config::register_js('theme', 'app.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/app.js'));
module_config::register_js('theme', 'adminlte.js', full_link('/includes/plugin_theme_adminlte/js/adminlte.js'));
function adminlte_dashboard_widgets()
{
    $widgets = array();
    // the 4 column widget areas:
    foreach (glob(dirname(__FILE__) . '/dashboard_widgets/widget_*.php') as $dashboard_widget_file) {
        // echo $dashboard_widget_file;
        include $dashboard_widget_file;
    }
    return $widgets;
}
// end hook function
hook_add('dashboard_widgets', 'adminlte_dashboard_widgets');
Esempio n. 24
0
    public function init()
    {
        $this->links = array();
        $this->customer_types = array();
        $this->module_name = "customer";
        $this->module_position = 5.1;
        $this->version = 2.46;
        //2.46 - 2015-10-17 - email optional required field
        //2.459 - 2015-09-27 - customer_signup_email_welcome_template config variable
        //2.458 - 2015-09-25 - ability to create more customer types
        //2.457 - 2015-09-25 - ability to create more customer types
        //2.456 - 2015-09-23 - ability to create more customer types
        //2.455 - 2015-07-18 - customer map
        //2.454 - 2015-06-15 - customer creation bug fix
        //2.453 - 2015-06-08 - leads permission fix
        //2.452 - 2015-06-08 - leads permission fix
        //2.451 - 2015-06-07 - bug fix
        //2.45 - 2015-05-17 - signup ajax fix
        //2.449 - 2015-05-03 - responsive improvements
        //2.448 - 2015-03-08 - extra field permission fix
        //2.447 - 2015-02-12 - customer/lead staff import/export
        //2.446 - 2015-01-28 - customer list sort by extra field support
        //2.445 - 2015-01-23 - hook for custom data integration
        //2.444 - 2015-01-14 - hooks added to table print out and data processing
        //2.443 - 2015-01-08 - signup fixes
        //2.442 - 2014-12-19 - signup form required fields
        //2.441 - 2014-12-17 - signup form on login
        //2.44 - 2014-12-12 - customer signup css bug fix
        //2.439 - 2014-12-09 - customer signup improvements
        //2.438 - 2014-12-08 - customer signup improvements
        //2.437 - 2014-11-26 - job extra fields added to signup
        //2.436 - 2014-11-26 - invoice delete speed improvement
        //2.435 - 2014-11-05 - import notes into system
        //2.434 - 2014-09-18 - cron job debug customer status information
        //2.433 - 2014-09-03 - delete quote when customer is deleted
        //2.432 - 2014-08-28 - invoice prefix back up
        //2.431 - 2014-08-27 - started work on customer statement email feature
        //2.43 - 2014-08-20 - customer group signup
        //2.429 - 2014-07-31 - responsive improvements
        //2.427 - 2014-07-21 - company permission improvement
        //2.426 - 2014-07-16 - cache speed fix
        //2.425 - 2014-07-15 - translation fix
        //2.424 - 2014-07-14 - import + export fixes
        //2.423 - 2014-07-02 - permission improvement
        //2.422 - 2014-06-19 - company permission fix
        //2.421 - 2014-04-15 - merged customer contact fix
        //2.42 - 2014-04-10 - customer signup subscription start
        //2.419 - 2014-03-31 - customer CSV export contact extra fields
        //2.418 - 2014-03-26 - save and return button added
        //2.417 - 2014-03-15 - password reset fix for customer contacts
        //2.416 - 2014-03-04 - return credit to customer after invoice payment is deleted
        //2.415 - 2014-03-03 - currency format fix for credit balance
        //2.414 - 2014-02-17 - leads_enabled fix
        //2.413 - 2014-01-31 - demo fix
        //2.412 - 2014-01-24 - delete customer fix
        //2.411 - 2014-01-23 - searching by extra fields
        //2.41 - 2014-01-23 - deleting customer fix
        //2.399 - 2014-01-21 - lead from customer signup page
        //2.398 - 2014-01-20 - new leads feature
        //2.397 - 2014-01-18 - new leads feature
        //2.396 - 2014-01-10 - phone / email links in contact listings
        //2.395 - 2014-01-01 - leads feature
        //2.394 - 2013-12-15 - working on new UI
        //2.393 - 2013-11-11 - new UI work
        //2.392 - 2013-11-03 - contact extra fields supported in invoice
        //2.391 - 2013-09-26 - fax/mobile added to customer import
        //2.389 - 2013-09-20 - update customer status after invoice cancel
        //2.388 - 2013-09-12 - update customer status after invoice delete
        //2.387 - 2013-09-12 - create new link fixes
        //2.386 - 2013-09-11 - customer dropdown selection fix in job creation
        //2.385 - 2013-09-10 - dashboard speed fixes
        //2.384 - 2013-09-09 - cache fix
        //2.383 - 2013-09-06 - customer signup send invoice fix
        //2.382 - 2013-09-06 - easier to disable certain plugins
        //2.381 - 2013-09-05 - subscriptions on customer signup, option for auto sending invoice
        //2.38 - 2013-09-03 - subscriptions added to customer signup form
        //2.379 - 2013-08-30 - added memcache support for huge speed improvements
        //2.378 - 2013-07-30 - customer delete improvement
        //2.377 - 2013-07-16 - customer delete fix
        //2.376 - 2013-06-21 - permission update
        //2.375 - 2013-06-18 - customer signup fixes
        //2.374 - 2013-06-18 - making room for the upcoming company feature
        //2.373 - 2013-06-14 - customer color coding
        //2.372 - 2013-05-28 - email template field first_name/last_name fix
        //2.371 - 2013-05-28 - email template field customer_address fix
        //2.37 - 2013-05-28 - email template field improvements
        //2.369 - 2013-04-27 - fix for large customer lists
        //2.31 - added group export
        //2.32 - added search by group
        //2.33 - search group permissions
        //2.331 - fix for group perms on main listing
        //2.332 - fix for customer_id null in get. retured an array with address.
        //2.333 - customer importing extra fields.
        //2.334 - customer contacts - all permissions on main customer listing.
        //2.335 - delete customer from group
        //2.336 - delete button on new customer page.
        //2.337 - import customers fixed.
        //2.34 - new feature: customer logo preview
        //2.35 - support for "ajax_contact_list" used in ticket edit area.
        //2.351 - more button on primary contact header in customer
        //2.352 - customer link htmlspecialchars fix
        //2.353 - showing notes in manual invoices
        //2.355 - importing user passwords and roles.
        //2.356 - subscriptions for customers
        //2.357 - bug fix on customers editing logos and searching by last name
        //2.358 - php5/6 fix
        //2.359 - create customer from ticket
        //2.360 - speed improvements
        //2.361 - address search fix for customers
        //2.362 - better moving customer contacts between customers
        //2.363 - show invoice list on main customer page (turn off with customer_list_show_invoices setting)
        //2.364 - extra fields update - show in main listing option
        //2.365 - support for customer signup system
        //2.366 - customer signup fixes
        //2.367 - 2013-04-10 - new customer permissions and staff selection
        //2.368 - 2013-04-10 - fix for new customer permissions
        module_config::register_css('customer', 'customer.css');
        hook_add('customer_list', 'module_customer::hook_filter_var_customer_list');
        if (class_exists('module_template', false)) {
            if (file_exists(dirname(__FILE__) . '/pages/customer_signup.php')) {
                module_template::init_template('customer_signup_thank_you_page', '<h2>Thank You</h2>
    <p>Thank you. Your  request has been submitted successfully.</p>
    <p>Please check your email.</p>
    ', 'Displayed after a customer signs up.', 'code');
                module_template::init_template('customer_signup_email_welcome', 'Dear {CUSTOMER_NAME},<br>
<br>
Thank you for completing the information form on our website. We will be in touch shortly.<br><br>
Kind Regards,<br><br>
{FROM_NAME}
', 'Welcome {CUSTOMER_NAME}', array());
                module_template::init_template('customer_signup_email_admin', 'Dear Admin,<br>
<br>
A customer has signed up in the system!<br><br>
View/Edit this customer by going here: {CUSTOMER_NAME_LINK}<br><br>
Website: {WEBSITE_NAME_LINK}<br><br>
Jobs: {JOB_LINKS}<br><br>
Notes: {NOTES}<br><br>
{UPLOADED_FILES}<br><br>
{SYSTEM_NOTE}
', 'New Customer Signup: {CUSTOMER_NAME}', array());
                module_template::init_template('customer_signup_form_wrapper', '{SIGNUP_FORM}
', 'Customer Signup Form', array());
            }
        }
    }
Esempio n. 25
0
 function init()
 {
     $this->links = array();
     $this->module_name = "finance";
     $this->module_position = 28;
     module_config::register_css('finance', 'finance.css');
     module_config::register_js('finance', 'finance.js');
     hook_add('invoice_payment_deleted', 'module_finance::hook_invoice_payment_deleted');
 }
Esempio n. 26
0
 function init()
 {
     $this->module_name = "email";
     $this->module_position = 1666;
     $this->version = 2.349;
     // 2.349 - 2015-11-19 - email integration with Custom Data
     // 2.348 - 2015-04-05 - better email duplicate checking
     // 2.347 - 2015-03-26 - remove website option if disabled
     // 2.346 - 2015-02-05 - AUTO_LOGIN_KEY template tag fix for invoice emails
     // 2.345 - 2015-01-25 - email custom data improvements
     // 2.344 - 2015-01-20 - added more email debugging
     // 2.343 - 2014-12-27 - email sql update fix
     // 2.342 - 2014-12-21 - email page speed improvement
     // 2.341 - 2014-12-19 - send limit fix
     // 2.34 - 2014-12-09 - AUTO_LOGIN_KEY template tag added
     // 2.339 - 2014-12-08 - AUTO_LOGIN_KEY template tag added
     // 2.23 - do the email string replace twice so we catch everything.
     // 2.24 - auth
     // 2.25 - bug fix, replace with arrays.
     // 2.251 - menu change.
     // 2.252 - link rewirte
     // 2.253 - permission fix
     // 2.254 - default to address for multi contacts
     // 2.255 - custom from email address
     // 2.301 - BIG UPDATE! with internal mail queue and quota limiting
     // 2.302 - from email address set to full name of user.
     // 2.303 - ability to add multiple attachments to Job/Invoice/etc.. email
     // 2.304 - showing email history in invoice/jobs/etc..
     // 2.305 - show which user emailed invoice/job/etc..
     // 2.306 - choose different templates when sending an email
     // 2.307 - email compose fix
     // 2.308 - started work on generic email compose for customers.
     // 2.309 - easier ssl/tls options added to email settings area
     // 2.31 - bcc/cc fix
     // 2.311 - related job/website email fix
     // 2.312 - 2013-04-12 - SQL fix in upgrade
     // 2.313 - 2013-04-16 - fix for sending customer emails
     // 2.314 - 2013-04-27 - default from email address is current user
     // 2.315 - 2013-05-28 - email template tag improvements
     // 2.316 - 2013-05-28 - email template first_name/last_name addition
     // 2.317 - 2013-06-04 - remember selected job/website when chagning email template
     // 2.318 - 2013-06-07 - email_from_logged_in_user option added
     // 2.319 - 2013-07-25 - print email
     // 2.32 - 2013-09-13 - invoice linked to company
     // 2.321 - 2013-11-15 - working on new UI
     // 2.322 - 2013-11-19 - working on new UI
     // 2.323 - 2014-01-03 - email tracking in files
     // 2.324 - 2014-01-20 - new quote feature
     // 2.325 - 2014-02-03 - delete emails when customer is deleted fix
     // 2.326 - 2014-02-15 - {AUTO_LOGIN_LINK} added to some emails
     // 2.327 - 2014-02-19 - bounce address fix
     // 2.328 - 2014-03-17 - speed fix in SQL
     // 2.329 - 2014-07-01 - better duplicate mail prevention
     // 2.33 - 2014-07-15 - full name in emails
     // 2.331 - 2014-07-15 - email settings fix
     // 2.332 - 2014-07-15 - cc option in email form
     // 2.333 - 2014-08-15 - responsive improvements
     // 2.334 - 2014-09-29 - email bug fix
     // 2.335 - 2014-10-06 - new version of phpMailer
     // 2.336 - 2014-10-13 - show template name in selection dropdown
     // 2.337 - 2014-11-26 - email attachment bug fix
     // 2.338 - 2014-11-27 - quote email bug fix
     hook_add('customer_deleted', 'module_email::hook_customer_deleted');
     $this->reset();
 }