Example #1
0
 function init()
 {
     $this->version = 2.255;
     // 2.255 - 2015-06-07 - link to settings
     // 2.254 - 2015-04-12 - minor bug fix
     // 2.253 - 2015-03-08 - wysiwyg and dropdown/select extra fields
     // 2.252 - 2015-03-08 - wysiwyg and dropdown/select extra fields
     // 2.251 - 2015-02-05 - text/check extra field types
     // 2.25 - 2015-01-28 - sorting by extra fields
     // 2.249 - 2014-12-22 - extra field dates/delete/list/rename fixes
     // 2.248 - 2014-10-03 - hook_filter_var for better theme support
     // 2.247 - 2014-08-02 - responsive fixes
     // 2.16 - fix to disable editing when page isn't editable. this caused double ups on extra keys in table listings.
     // 2.17 - hooks for the encryption module to take over.
     // 2.18 - bug fix with new extra field types.
     // 2.19 - better saving of extra fields etc.. in sync with member external signup extra field feature
     // 2.2 - started work on sorting extra fields
     // 2.21 - bug fix
     // 2.22 - see Settings-Extra Fields for new options.
     // 2.23 - Extra bug fix
     // 2.24 - permission improvement
     // 2.241 - clickable links in extra fields
     // 2.242 - clickable links in extra fields
     // 2.243 - new delete button in Settings > Extra Fields
     // 2.244 - 2013-11-15 - working on new UI
     // 2.245 - 2013-12-19 - extra fields now available when creating a job
     // 2.246 - 2014-01-23 - searching by extra fields
     $this->links = array();
     $this->module_name = "extra";
     $this->module_position = 8882;
     module_config::register_css('extra', 'extra.css');
     module_config::register_js('extra', 'extra.js');
 }
Example #2
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');
 }
Example #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');
 }
Example #4
0
 public function init()
 {
     $this->links = array();
     $this->module_name = "backup";
     $this->module_position = 30;
     module_config::register_js('backup', 'backup.js');
     module_config::register_css('backup', 'backup.css');
 }
Example #5
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');
     }
 }
Example #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'));
        }
    }
Example #7
0
 function init()
 {
     $this->links = array();
     $this->module_name = "social";
     $this->module_position = 25.1;
     $this->version = 2.131;
     // 2.131 - 2014-08-04 - responsive improvements
     // 2.13 - 2014-05-23 - social fixes
     // 2.12 - 2014-04-05 - ability to disable social plugin
     // 2.11 - 2014-04-05 - better message archiving
     // 2.1 - 2014-03-25 - initial release
     if (self::is_plugin_enabled()) {
         module_config::register_css('social', 'social.css', true, 5);
         module_config::register_js('social', 'social.js', true, 5);
     }
 }
Example #8
0
 function init()
 {
     $this->links = array();
     $this->module_name = "social_twitter";
     $this->module_position = 25.2;
     $this->version = 2.131;
     // 2.131 - 2014-08-04 - responsive im
     // 2.13 - 2014-05-23 - social fixes
     // 2.12 - 2014-04-05 - ability to disable social plugin
     // 2.11 - 2014-04-05 - better message archiving
     // 2.1 - 2014-04-05 - initial release
     if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
         module_config::register_js('social_twitter', 'social_twitter.js');
         module_config::register_css('social_twitter', 'social_twitter.css');
     }
     //hook_add('get_social_methods','module_social_twitter::hook_get_social_methods');
 }
Example #9
0
 function init()
 {
     $this->links = array();
     $this->module_name = "social_facebook";
     $this->module_position = 25.2;
     $this->version = 2.132;
     // 2.132 - 2014-10-13 - support for local FB app/api
     // 2.131 - 2014-08-04 - responsive improvements
     // 2.13 - 2014-05-23 - social fixes
     // 2.12 - 2014-04-05 - ability to disable social plugin
     // 2.11 - 2014-04-05 - better message archiving
     // 2.1 - 2014-04-05 - initial release
     if (module_social::is_plugin_enabled() && self::is_plugin_enabled()) {
         module_config::register_js('social_facebook', 'social_facebook.js');
         module_config::register_css('social_facebook', 'social_facebook.css');
     }
     //hook_add('get_social_methods','module_social_facebook::hook_get_social_methods');
 }
Example #10
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);
         }
     }
 }
Example #11
0
 public function init()
 {
     $this->module_name = "pin";
     $this->module_position = 0;
     module_config::register_css('pin', 'pin.css');
     module_config::register_js('pin', 'pin.js');
     $this->version = 2.11;
     //2.11 css tweak
     if (isset($_REQUEST['pin_process']) && module_security::is_logged_in() && module_pin::can_i('edit', 'Header Pin')) {
         switch ($_REQUEST['pin_process']) {
             case 'pin_save':
                 switch ($_REQUEST['pin_action']) {
                     case 'modify':
                         if ($_REQUEST['pin_id'] && $_REQUEST['current_title']) {
                             $this->update_pin($_REQUEST['pin_id'], false, $_REQUEST['current_title']);
                             set_message('Pin modified successfully');
                             redirect_browser($_REQUEST['current_url']);
                         }
                         break;
                     case 'delete':
                         if ($_REQUEST['pin_id']) {
                             $this->delete_pin($_REQUEST['pin_id']);
                             set_message('Pin deleted successfully');
                             redirect_browser($_REQUEST['current_url']);
                         }
                         break;
                     case 'add':
                         if ($_REQUEST['current_url'] && $_REQUEST['current_title']) {
                             $pin_id = $this->add_pin($_REQUEST['current_url'], $_REQUEST['current_title']);
                             if ($pin_id) {
                                 set_message('Pin added successfully');
                             } else {
                                 set_message('Pin already exists');
                             }
                             redirect_browser($_REQUEST['current_url']);
                         }
                         break;
                 }
                 break;
         }
     }
 }
Example #12
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');
 }
Example #13
0
//module_config::register_css('theme','metis_style.css',full_link('/includes/plugin_theme/themes/metis/css/metis_style.css'));
if (!isset($_REQUEST['display_mode']) || isset($_REQUEST['display_mode']) && $_REQUEST['display_mode'] != 'iframe' && $_REQUEST['display_mode'] != 'ajax') {
    $_REQUEST['display_mode'] = 'metis';
}
require_once module_theme::include_ucm('includes/plugin_theme/themes/metis/metis_functions.php');
/**
* <link rel="stylesheet" href="assets/lib/bootstrap/css/bootstrap.css">
   <link rel="stylesheet" href="assets/css/main.css"/>
   <link rel="stylesheet" href="assets/lib/Font-Awesome/css/font-awesome.css"/>

   <link rel="stylesheet" href="assets/css/theme.css">
<script src="assets/lib/modernizr-build.min.js"></script>
*
* <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
   <script>window.jQuery || document.write('<script src="assets/lib/jquery.min.js"><\/script>')</script>
   <script src="assets/lib/bootstrap/js/bootstrap.js"></script>
   <script type="text/javascript" src="assets/js/style-switcher.js"></script>
   <script src="assets/js/main.js"></script>
*/
module_config::register_css('theme', 'bootstrap.css', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/css/bootstrap.min.css'), 5);
module_config::register_css('theme', 'main.css', full_link('/includes/plugin_theme/themes/metis/css/main.css'), 6);
module_config::register_css('theme', 'font-awesome.css', full_link('/includes/plugin_theme/themes/metis/lib/font-awesome-4.0.3/css/font-awesome.css'), 7);
module_config::register_css('theme', 'theme.css', full_link('/includes/plugin_theme/themes/metis/css/theme.css'), 8);
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/themes/metis/css/external.css'), 100);
}
module_config::register_js('theme', 'bootstrap.js', full_link('/includes/plugin_theme/themes/metis/lib/bootstrap/js/bootstrap.min.js'));
module_config::register_js('theme', 'main.js', full_link('/includes/plugin_theme/themes/metis/js/main.js'));
module_config::register_js('theme', 'metis.js', full_link('/includes/plugin_theme/themes/metis/js/metis.js'));
//module_config::register_js('theme','config.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/config.js'));
//module_config::register_js('theme','script.js',full_link('/includes/plugin_theme/themes/whitelabel1/js/script.js'));
Example #14
0
    public function init()
    {
        $this->links = array();
        $this->quote_types = array();
        $this->module_name = "quote";
        $this->module_position = 15.9;
        module_config::register_css('quote', 'quote.css');
        module_config::register_js('quote', 'quote.js');
        if (class_exists('module_template', false) && module_security::is_logged_in()) {
            module_template::init_template('quote_external', '{HEADER}<h2>Quote Overview</h2>
Quote Name: <strong>{QUOTE_NAME}</strong> <br/>
{PROJECT_TYPE} Name: <strong>{PROJECT_NAME}</strong> <br/>
Create Date: <strong>{DATE_CREATE}</strong><br/>
Quote Status: <strong>{if:DATE_APPROVED}Accepted on {DATE_APPROVED}{else}Pending{endif:DATE_APPROVED}</strong> <br/>
{DESCRIPTION}
<br/>
{if:date_approved}
<h2>Quote Has Been Accepted</h2>
<p>Thank you, the quote was accepted by <strong>{APPROVED_BY}</strong> on <strong>{DATE_APPROVED}</strong>.</p>
{else}
<h2>Quote Approval Pending</h2>
<p>If you would like to approve this quote please complete the form below:</p>
<form action="" method="POST">
<p>Your Name: <input type="text" name="quote_approve_name"> </p>
<p><input type="checkbox" name="quote_approve_go" value="yes"> Yes, I approve this quote. </p>
<p><input type="submit" name="quote_approve" value="Approve Quote" class="submit_button save_button"></p>
</form>
{endif:date_approved}

<h2>Task List</h2> <br/>
{TASK_LIST}
', 'Used when displaying the external view of a quote for approval.', 'code');
            module_template::init_template('quote_pdf', '<html>
<head>
<title>Quote</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body{
font-family:Helvetica, sans-serif;
padding:0;
margin:0;
}
td{
font-family:Helvetica, sans-serif;
padding:2px;
}
h3{
font-size: 22px;
font-weight: bold;
margin:10px 0 10px 0;
padding:0 0 5px 0;
border-bottom:1px solid #6f6f6f;
width:100%;
}
.style11 {
font-size: 24px;
font-weight: bold;
margin:0;
padding:0;
}
.task_header,
.task_header th{
background-color:#e8e8e8;
color: #6f6f6f;
font-weight: bold;
}
tr.odd{
background-color:#f9f9f9;
}
</style>
</head>
<body>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="1" align="center">
<tbody>
<tr>
<td colspan="2" align="left" valign="top"><img title="Logo" src="http://ultimateclientmanager.com/images/logo_ucm.png" alt="Logo" width="202" height="60" /></td>
<td colspan="2" align="left" valign="top"><span class="style11">QUOTE</span></td>
</tr>
<tr>
<td width="12%">&nbsp;</td>
<td width="43%">&nbsp;</td>
<td width="14%">&nbsp;</td>
<td width="31%">&nbsp;</td>
</tr>
<tr>
<td><strong>ABN:</strong></td>
<td>12 345 678 912</td>
<td><strong>Quote No: <br /> </strong></td>
<td>{QUOTE_NUMBER}</td>
</tr>
<tr>
<td><strong>Email: </strong></td>
<td>your@company.com</td>
<td><strong>Issued Date:</strong></td>
<td>{DATE_CREATE}</td>
</tr>
<tr>
<td><strong>Web: </strong></td>
<td>www.company.com</td>
<td><strong>Valid Until:</strong></td>
<td>{DATE_CREATE+30d}</td>
</tr>
</tbody>
</table>
<h3>RECIPIENT</h3>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="1" align="center">
<tbody>
<tr>
<td valign="top" width="12%"><strong>Company:</strong></td>
<td valign="top" width="43%">{CUSTOMER_NAME}</td>
<td valign="top" width="14%"><strong>Email:</strong></td>
<td valign="top" width="31%">{CONTACT_EMAIL}</td>
</tr>
<tr>
<td valign="top"><strong>Contact:</strong></td>
<td valign="top">{CONTACT_NAME}</td>
<td valign="top"><strong>{PROJECT_TYPE}:</strong>&nbsp;</td>
<td valign="top">{PROJECT_NAME}&nbsp;</td>
</tr>
<tr>
<td valign="top"><strong>Phone:</strong></td>
<td valign="top">{CONTACT_PHONE}</td>
<td valign="top">&nbsp;</td>
<td valign="top">&nbsp;</td>
</tr>
</tbody>
</table>
<h3>QUOTE DETAILS</h3>
<div>{TASK_LIST}</div>
<p>&nbsp;</p>
<h3>QUOTE APPROVAL</h3>
<p>{if:DATE_APPROVED}Thank you, this Quote was approved by <strong>{APPROVED_BY}</strong> on <strong>{DATE_APPROVED}</strong>{else} If you are happy with this quote please click the buttom below to process approval.</p>
<p><a href="{QUOTE_LINK}">Approve This Quote</a>{endif:DATE_APPROVED}</p>
</body>
</html>', 'Used for printing out an quote for the customer.', 'html');
            module_template::init_template('quote_email', 'Dear {CUSTOMER_NAME},<br>
<br>
Please find attached details on your quote: {QUOTE_NAME}.<br><br>
You can view and approve this quote online by <a href="{QUOTE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Quote: {QUOTE_NAME}', array('CUSTOMER_NAME' => 'Customers Name', 'QUOTE_NAME' => 'Quote Name', 'TOTAL_AMOUNT' => 'Total amount of quote', 'TOTAL_AMOUNT_DUE' => 'Total amount of quote remaining to be paid', 'FROM_NAME' => 'Your name', 'QUOTE_URL' => 'Link to quote for customer', 'QUOTE_TASKS' => 'Output of quote tasks similar to public link'));
            module_template::init_template('quote_staff_email', 'Dear {STAFF_NAME},<br>
<br>
Please find below your {TASK_COUNT} assigned tasks for quote: {QUOTE_NAME}.<br><br>
You can view this quote by <a href="{QUOTE_URL}">clicking here</a>.<br><br>
{QUOTE_TASKS}<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Assigned Quote Tasks: {QUOTE_NAME}', array('STAFF_NAME' => 'Customers Name', 'QUOTE_NAME' => 'Quote Name', 'TASK_COUNT' => 'Number of assigned tasks', 'QUOTE_URL' => 'Link to quote for customer', 'QUOTE_TASKS' => 'Output of quote tasks for this staff member'));
            module_template::init_template('quote_approved_email', 'Dear {TO_NAME},<br>
<br>
This Quote has been approved: {QUOTE_NAME}.<br><br>
This Quote was approved by <strong>{APPROVED_BY}</strong> on <strong>{DATE_APPROVED}</strong>
You can view this quote by <a href="{QUOTE_URL}">clicking here</a>.<br><br>
Thank you,<br><br>
{FROM_NAME}
', 'Quote Approved: {QUOTE_NAME}', array('QUOTE_NAME' => 'Quote Name', 'QUOTE_URL' => 'Link to quote for customer'));
        }
    }
Example #15
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;
                }
            }
        }
    }
Example #16
0
/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
@set_time_limit(0);
if (!module_config::can_i('view', 'Upgrade System')) {
    echo 'upgrade denied. ssorry';
    exit;
}
module_config::register_css('config', 'upgrade.css', 11);
module_config::register_js('config', 'upgrade.js', 11);
require_once 'includes/plugin_config/class.upgrade.php';
$ucm_upgrade_manager = new ucm_upgrade_manager();
if (!isset($setup_upgrade_hack)) {
    print_heading(array('title' => 'Upgrade System', 'type' => 'h2', 'main' => true));
}
if (isset($_REQUEST['save_license_codes']) && isset($_REQUEST['license_codes']) && is_array($_REQUEST['license_codes'])) {
    $license_codes = '';
    foreach ($_REQUEST['license_codes'] as $license_code) {
        $license_code = trim($license_code);
        if (strlen($license_code) > 5 || $license_code == 'free') {
            $license_codes .= $license_code . '|';
        }
    }
    $license_codes = rtrim($license_codes, '|');
    module_config::save_config('_installation_code', $license_codes);
Example #17
0
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca, 0a3014a3-2b8f-460b-8850-d6025aa845f8
 * Package Date: 2015-11-25 03:08:08 
 * IP Address: 67.79.165.254
 */
if (isset($_REQUEST['sort_order']) && is_array($_REQUEST['sort_order']) && isset($_REQUEST['auth']) && module_form::get_secure_key() == $_REQUEST['auth'] && module_security::is_logged_in()) {
    module_config::save_config('dash_widgets_sort_' . module_security::get_loggedin_id(), json_encode($_REQUEST['sort_order']));
}
module_config::register_css('theme', 'morris.css', full_link('/includes/plugin_theme_adminlte/css/morris.css'), 12);
module_config::register_css('theme', 'ionicons.min.css', full_link('/includes/plugin_theme_adminlte/css/ionicons.min.css'), 12);
module_config::register_js('theme', 'raphael-min.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/raphael-min.js'), 12);
module_config::register_js('theme', 'morris.min.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/morris.min.js'), 13);
module_config::register_js('theme', 'dashboard.js', full_link('/includes/plugin_theme_adminlte/js/AdminLTE/dashboard.js'), 14);
$calling_module = 'home';
$home_widgets = handle_hook('dashboard_widgets', $calling_module);
$home_widgets2 = hook_handle_callback('dashboard_widgets');
if (is_array($home_widgets2)) {
    $home_widgets = array_merge($home_widgets, $home_widgets2);
}
// group the widgets into columsn.
// the default columns is 3, but each widget can specify which column group they want to appear in.
// layout the default widget structure in the order we want it to display on the page:
$widget_columns = array();
$widget_columns[4] = array(1 => array(), 2 => array(), 3 => array(), 4 => array());
$widget_columns[1] = array(1 => array());
$widget_columns[2] = array(1 => array(), 2 => array());
$widget_columns[3] = array(1 => array(), 2 => array(), 3 => array());
// then display the welcome message:
Example #18
0
    $_REQUEST['display_mode'] = 'adminlte';
}
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');
Example #19
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');
 }
Example #20
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'));
        }
    }
Example #21
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'));
        }
    }
Example #22
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']);
                     }
     
                 }
             }*/
 }
Example #23
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');
        }
    }