* Package Date: 2015-11-25 02:55:20 * IP Address: 67.79.165.254 */ if (!$module->can_i('view', 'Products') || !$module->can_i('edit', 'Products')) { redirect_browser(_BASE_HREF); } // hack to add a "group" option to the pagination results. if (class_exists('module_group', false) && module_product::can_i('edit', 'Products')) { module_group::enable_pagination_hook(array('bulk_actions' => array('delete' => array('label' => 'Delete selected products', 'type' => 'delete', 'callback' => 'module_product::bulk_handle_delete')))); } $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array(); $products = module_product::get_products($search); $heading = array('title' => 'Products', 'type' => 'h2', 'main' => true, 'button' => array()); if (module_product::can_i('create', 'Products')) { if (class_exists('module_import_export', false)) { $link = module_import_export::import_link(array('callback' => 'module_product::handle_import', 'name' => 'Products', 'return_url' => $_SERVER['REQUEST_URI'], 'fields' => array('Product ID' => 'product_id', 'Product Name' => 'name', 'Product Category' => 'category_name', 'Hours/Qty' => 'quantity', 'Amount' => 'amount', 'Description' => 'description'))); $heading['button'][] = array('title' => "Import Products", 'type' => 'add', 'url' => $link); } $heading['button'][] = array('title' => "Create New Product", 'type' => 'add', 'url' => module_product::link_open('new')); } print_heading($heading); ?> <form action="" method="post"> <?php /** START TABLE LAYOUT **/ $table_manager = module_theme::new_table_manager(); $columns = array();
foreach ($quotes as $quote_id => $quote) { $quotes[$quote_id] = array_merge($quote, module_quote::get_quote($quote['quote_id'])); $quotes[$quote_id]['website_name'] = $quote['website_name']; } module_table_sort::enable_pagination_hook(array('table_id' => 'quote_list', 'sortable' => array('quote_title' => array('field' => 'name', 'current' => 1), 'quote_start_date' => array('field' => 'date_create'), 'quote_completed_date' => array('field' => 'date_approved'), 'quote_website' => array('field' => 'website_name'), 'quote_customer' => array('field' => 'customer_name'), 'quote_type' => array('field' => 'type'), 'quote_status' => array('field' => 'status'), 'quote_progress' => array('field' => 'total_percent_complete'), 'quote_total' => array('field' => 'total_amount'), 'quote_total_amount_invoiced' => array('field' => 'total_amount_invoiced'), 'quote_group' => array('group_sort' => true, 'owner_table' => 'quote', 'owner_id' => 'quote_id')))); } // hack to add a "export" option to the pagination results. if (class_exists('module_import_export', false) && module_quote::can_i('view', 'Export Quotes')) { module_import_export::enable_pagination_hook(array('name' => 'Quote Export', 'fields' => array('Quote ID' => 'quote_id', 'Quote Title' => 'name', 'Hourly Rate' => 'hourly_rate', 'Start Date' => 'date_create', 'Completed Date' => 'date_approved', module_config::c('project_name_single', 'Website') . ' Name' => 'website_name', 'Customer Name' => 'customer_name', 'Type' => 'type', 'Status' => 'status', 'Staff Member' => 'staff_member', 'Tax Name' => 'total_tax_name', 'Tax Percent' => 'total_tax_rate', 'Renewal Date' => 'date_renew'), 'extra' => array('owner_table' => 'quote', 'owner_id' => 'quote_id'))); } $header = array('title' => _l('Customer Quotes'), 'main' => true, 'button' => array()); if (module_quote::can_i('create', 'Quotes')) { $header['button'][] = array('url' => module_quote::link_open('new'), 'title' => 'Add New Quote', 'type' => 'add'); } if (class_exists('module_import_export', false) && module_quote::can_i('view', 'Import Quotes')) { $link = module_import_export::import_link(array('callback' => 'module_quote::handle_import', 'callback_preview' => 'module_quote::handle_import_row_debug', 'name' => 'Quotes', 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'quote', 'fields' => array('Quote Title' => 'name', 'Hourly Rate' => 'hourly_rate', 'Start Date' => 'date_create', 'Completed Date' => 'date_approved', module_config::c('project_name_single', 'Website') . ' Name' => 'website_name', 'Customer Name' => 'customer_name', 'Type' => 'type', 'Status' => 'status', 'Staff Member' => 'staff_member', 'Tax Name' => 'total_tax_name', 'Tax Percent' => 'total_tax_rate', 'Renewal Date' => 'date_renew'), 'extra' => array('owner_table' => 'quote', 'owner_id' => 'quote_id'))); $header['button'][] = array('url' => $link, 'title' => 'Import Quotes', 'type' => 'add'); } print_heading($header); ?> <form action="" method="post"> <?php $search_bar = array('elements' => array('name' => array('title' => _l('Quote Title:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 30)), 'type' => array('title' => _l('Type:'), 'field' => array('type' => 'select', 'name' => 'search[type]', 'value' => isset($search['type']) ? $search['type'] : '', 'options' => module_quote::get_types())), 'status' => array('title' => _l('Status:'), 'field' => array('type' => 'select', 'name' => 'search[status]', 'value' => isset($search['status']) ? $search['status'] : '', 'options' => module_quote::get_statuses())), 'accepted' => array('title' => _l('Accepted:'), 'field' => array('type' => 'select', 'name' => 'search[accepted]', 'value' => isset($search['accepted']) ? $search['accepted'] : '', 'options' => array(1 => _l('Both Accepted and Un-Accepted Quotes'), 2 => _l('Only Accepted Quotes'), 3 => _l('Only Un-Accepted Quotes')))))); echo module_form::search_bar($search_bar); /** START TABLE LAYOUT **/ $table_manager = module_theme::new_table_manager(); $columns = array();
</tbody> </table> <input type="hidden" name="duplicate_ids" value="<?php echo json_encode(array_keys($duplicate_word_ids)); ?> "> <?php $form_actions = array('class' => 'action_bar action_bar_center', 'elements' => array(array('type' => 'delete_button', 'name' => 'delete_duplicates', 'value' => _l('Remove These Incorrect Words')), array('type' => 'button', 'name' => 'cancel', 'value' => _l('Cancel'), 'onclick' => "window.location.href='" . str_replace('check_duplicates', '', htmlspecialchars($_SERVER['REQUEST_URI'])) . "';"))); echo module_form::generate_form_actions($form_actions); ?> </form> <?php } else { $heading = array('title' => _l('Translation for: %s', htmlspecialchars($language['language_name'] ? $language['language_name'] : _l('New'))), 'type' => 'h2', 'main' => true, 'button' => array(array('url' => htmlspecialchars($_SERVER['REQUEST_URI']) . (strpos($_SERVER['REQUEST_URI'], '?') === false ? '?' : '&') . 'export=true', 'title' => 'Export CSV'))); if (class_exists('module_import_export', false)) { $heading['button'][] = array('url' => module_import_export::import_link(array('callback' => 'module_language::handle_import', 'name' => _l('Language'), 'return_url' => $_SERVER['REQUEST_URI'], 'options' => array('new_words' => array('label' => _l('New Words'), 'form_element' => array('name' => 'new_words', 'type' => 'select', 'blank' => false, 'value' => 'ignore', 'options' => array('add_new' => _l('Add missing words from CSV into Database'), 'ignore' => _l('Skip missing words, only add those already in Database')))), array('label' => '', 'form_element' => array('name' => 'language_id', 'type' => 'hidden', 'value' => $language_id))), 'fields' => array('Word' => 'word', 'Translation' => 'translation'))), 'title' => 'Import CSV'); } print_heading($heading); ?> <form action="" method="post"> <input type="hidden" name="_process" value="save_language_translation"> <?php module_form::print_form_auth(); module_form::prevent_exit(array('valid_exits' => array('.submit_button'))); $fieldset_data = array('elements' => array(array('title' => _l('Language Code'), 'field' => array('name' => 'language_code', 'value' => isset($language['language_code']) ? $language['language_code'] : '', 'type' => 'text', 'help' => 'Example: es or de', 'size' => 5)), array('title' => _l('Language Name'), 'field' => array('name' => 'language_name', 'value' => isset($language['language_name']) ? $language['language_name'] : '', 'type' => 'text', 'help' => 'Example: Spanish or German;')))); echo module_form::generate_fieldset($fieldset_data); unset($fieldset_data);
} // check permissions. if (class_exists('module_security', false)) { module_security::sanatise_data('job', $job); } $job_tasks = module_job::get_tasks($job_id); if (class_exists('module_import_export', false)) { if (module_job::can_i('view', 'Export Job Tasks')) { module_import_export::enable_pagination_hook(array('name' => 'Job Tasks Export', 'fields' => array('Job Name' => 'job_name', 'Task ID' => 'task_id', 'Order' => 'task_order', 'Short Description' => 'description', 'Long Description' => 'long_description', 'Hours' => 'hours', 'Hours Completed' => 'completed', 'Amount' => 'amount', 'Billable' => 'billable', 'Fully Completed' => 'fully_completed', 'Date Due' => 'date_due', 'Invoice #' => 'invoice_number', 'Staff Member' => 'user_name', 'Approval Required' => 'approval_required'))); if (isset($_REQUEST['import_export_go']) && $_REQUEST['import_export_go'] == 'yes') { // do the task export. module_import_export::run_pagination_hook($job_tasks); } } if (module_job::can_i('view', 'Import Job Tasks')) { $import_tasks_link = module_import_export::import_link(array('callback' => 'module_job::handle_import_tasks', 'name' => 'Job Tasks', 'job_id' => $job_id, 'return_url' => $_SERVER['REQUEST_URI'], 'fields' => array('Task ID' => array('task_id', false, 'The existing system ID for this task. Will overwrite existing task ID. Leave blank to create new task.'), 'Order' => array('task_order', false, 'The numerical order the tasks will appear in.'), 'Short Description' => array('description', true), 'Long Description' => 'long_description', 'Hours' => 'hours', 'Hours Completed' => 'completed', 'Amount' => 'amount', 'Billable' => array('billable', false, '1 for billable, 0 for non-billable'), 'Fully Completed' => array('fully_completed', false, '1 for fully completed, 0 for not completed'), 'Date Due' => array('date_due', false, 'When this task is due for completion'), 'Staff Member' => array('user_name', false, 'One of: ' . implode(', ', $staff_member_rel)), 'Approval Required' => array('approval_required', false, '1 if the administrator needs to approve this task, 0 if it does not require approval')))); } } ?> <script type="text/javascript"> $(function(){ if(typeof ucm.job != 'undefined'){ ucm.job.ajax_task_url = '<?php echo module_job::link_ajax_task($job_id, false); ?> '; <?php if (module_invoice::can_i('create', 'Invoices')) {
if (!module_customer::can_i('view', $page_type)) { redirect_browser(_BASE_HREF); } $module->page_title = _l($page_type); $staff_members = module_user::get_staff_members(); $staff_member_rel = array(); foreach ($staff_members as $staff_member) { $staff_member_rel[$staff_member['user_id']] = $staff_member['name']; } $customers = module_customer::get_customers($search, array('as_resource' => true)); $header_buttons = array(); if (module_customer::can_i('create', $page_type)) { $header_buttons[] = array('url' => module_customer::link_open('new', false), 'title' => 'Create New ' . $page_type_single, 'type' => 'add'); } if (class_exists('module_import_export', false) && module_customer::can_i('view', 'Import ' . $page_type)) { $header_buttons[] = array('url' => module_import_export::import_link(array('callback' => 'module_customer::handle_import' . ($current_customer_type_id ? '_leads' : ''), 'name' => $page_type, 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'customer', 'fields' => array($page_type_single . ' ID' => 'customer_id', $page_type_single . ' Name' => 'customer_name', 'Credit' => 'credit', 'Address Line 1' => 'line_1', 'Address Line 2' => 'line_2', 'Address Suburb' => 'suburb', 'Address Country' => 'country', 'Address State' => 'state', 'Address Region' => 'region', 'Address Post Code' => 'post_code', 'Primary Contact First Name' => 'primary_user_name', 'Primary Contact Last Name' => 'primary_user_last_name', 'Primary Phone' => 'primary_user_phone', 'Primary Email' => 'primary_user_email', 'Primary Fax' => 'primary_user_fax', 'Primary Mobile' => 'primary_user_mobile', 'Primary Language' => 'primary_user_language', 'Invoice Prefix' => 'default_invoice_prefix', 'Tax Name' => 'default_tax_name', 'Tax Rate' => 'default_tax', 'Password' => 'password', 'User Role Name' => 'role', 'Notes' => 'notes', 'Staff' => 'customer_staff'), 'extra' => array(array('owner_table' => 'customer', 'owner_id' => 'customer_id'), array('owner_table' => 'user', 'owner_id' => 'primary_user_id')))), 'title' => 'Import ' . $page_type, 'type' => 'add'); } if (file_exists('includes/plugin_user/pages/contact_admin_list.php') && module_user::can_i('view', 'All ' . $page_type_single . ' Contacts', 'Customer', 'customer')) { $header_buttons[] = array('url' => module_user::link_open_contact(false), 'title' => 'View All Contacts'); } print_heading(array('main' => true, 'type' => 'h2', 'title' => $page_type, 'button' => $header_buttons)); ?> <form action="" method="post"> <?php $search_bar = array('elements' => array('name' => array('title' => _l('Names, Phone or Email:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 15)), 'address' => array('title' => _l('Address:'), 'field' => array('type' => 'text', 'name' => 'search[address]', 'value' => isset($search['address']) ? $search['address'] : '', 'size' => 15)))); if (class_exists('module_extra', false)) { $search_bar['extra_fields'] = 'customer'; }
$hook = array('fields' => array('owner_id' => 'member_id', 'owner_table' => 'member'), 'bulk_actions' => array('delete' => array('label' => 'Delete these members', 'type' => 'delete', 'callback' => 'module_member::handle_bulk_delete'))); if (class_exists('module_newsletter', false)) { $hook['bulk_actions']['delete_double_optin'] = array('label' => 'Delete failed double-opt-in members', 'type' => 'delete', 'callback' => 'module_member::handle_bulk_delete_double_optin'); } module_group::enable_pagination_hook($hook); } // hack to add a "export" option to the pagination results. if (class_exists('module_import_export', false) && module_member::can_i('view', 'Export Members')) { module_import_export::enable_pagination_hook(array('name' => 'Member Export', 'fields' => array('Member ID' => 'member_id', 'First Name' => 'first_name', 'Last Name' => 'last_name', 'Business Name' => 'business', 'Email' => 'email', 'Phone' => 'phone', 'Mobile' => 'mobile'), 'extra' => array('owner_table' => 'member', 'owner_id' => 'member_id'))); } $header = array('title' => _l('Members'), 'type' => 'h2', 'main' => true, 'button' => array()); if (module_member::can_i('create', 'Members')) { $header['button'] = array(array('url' => module_member::link_open('new'), 'title' => _l('Create New Member'), 'type' => 'add')); } if (class_exists('module_import_export', false) && module_member::can_i('view', 'Import Members')) { $link = module_import_export::import_link(array('callback' => 'module_member::handle_import', 'name' => 'Members', 'return_url' => $_SERVER['REQUEST_URI'], 'group' => array('member', 'newsletter_subscription'), 'fields' => array('Member ID' => 'member_id', 'First Name' => 'first_name', 'Last Name' => 'last_name', 'Business Name' => 'business', 'Email' => 'email', 'Phone' => 'phone', 'Mobile' => 'mobile'), 'extra' => array('owner_table' => 'member', 'owner_id' => 'member_id'))); $header['button'][] = array('url' => $link, 'title' => 'Import members', 'type' => 'add'); } print_heading($header); ?> <form action="" method="post"> <?php $search_bar = array('elements' => array('name' => array('title' => _l('Names, Phone or Email:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '')))); if (class_exists('module_group', false) && module_member::can_i('view', 'Member Groups')) { $search_bar['elements']['group'] = array('title' => _l('Group:'), 'field' => array('type' => 'select', 'name' => 'search[group_id]', 'value' => isset($search['group_id']) ? $search['group_id'] : '', 'options' => module_group::get_groups('member'), 'options_array_id' => 'name')); } if (class_exists('module_newsletter', false)) { $search_bar['elements']['group'] = array('title' => _l('Newsletter:'), 'field' => array('type' => 'select', 'name' => 'search[group_id2]', 'value' => isset($search['group_id2']) ? $search['group_id2'] : '', 'options' => module_group::get_groups('newsletter_subscription'), 'options_array_id' => 'name'));
if (class_exists('module_group', false)) { module_group::enable_pagination_hook(array('fields' => array('owner_id' => 'website_id', 'owner_table' => 'website', 'name' => 'name', 'email' => ''))); } if (class_exists('module_table_sort', false)) { module_table_sort::enable_pagination_hook(array('table_id' => 'website_list', 'sortable' => array('website_name' => array('field' => 'name', 'current' => 1), 'website_url' => array('field' => 'url'), 'website_customer' => array('field' => 'customer_name'), 'website_status' => array('field' => 'status'), 'website_group' => array('group_sort' => true, 'owner_table' => 'website', 'owner_id' => 'website_id')))); } // hack to add a "export" option to the pagination results. if (class_exists('module_import_export', false) && module_website::can_i('view', 'Export ' . module_config::c('project_name_plural', 'Websites'))) { module_import_export::enable_pagination_hook(array('name' => module_config::c('project_name_single', 'Website') . ' Export', 'fields' => array(module_config::c('project_name_single', 'Website') . ' ID' => 'website_id', 'Customer Name' => 'customer_name', 'Customer Contact First Name' => 'customer_contact_fname', 'Customer Contact Last Name' => 'customer_contact_lname', 'Customer Contact Email' => 'customer_contact_email', module_config::c('project_name_single', 'Website') . ' Name' => 'name', 'URL' => 'url', module_config::c('project_name_single', 'Website') . ' Status' => 'status'), 'extra' => array('owner_table' => 'website', 'owner_id' => 'website_id'))); } $header_buttons = array(); if (module_website::can_i('create', 'Websites')) { $header_buttons[] = array('url' => module_website::link_open('new'), 'type' => 'add', 'title' => _l('Add New ' . module_config::c('project_name_single', 'Website'))); } if (class_exists('module_import_export', false) && module_website::can_i('view', 'Import ' . module_config::c('project_name_plural', 'Websites'))) { $link = module_import_export::import_link(array('callback' => 'module_website::handle_import', 'callback_preview' => 'module_website::handle_import_row_debug', 'name' => module_config::c('project_name_plural', 'Websites'), 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'website', 'fields' => array(module_config::c('project_name_single', 'Website') . ' ID' => 'website_id', 'Customer Name' => 'customer_name', 'Customer Contact First Name' => 'customer_contact_fname', 'Customer Contact Last Name' => 'customer_contact_lname', 'Customer Contact Email' => 'customer_contact_email', module_config::c('project_name_single', 'Website') . ' Name' => 'name', 'URL' => 'url', module_config::c('project_name_single', 'Website') . ' Status' => 'status', 'Notes' => 'notes'), 'options' => array('duplicates' => array('label' => _l('Duplicates'), 'form_element' => array('name' => 'duplicates', 'type' => 'select', 'blank' => false, 'value' => 'ignore', 'options' => array('ignore' => _l('Skip Duplicates'), 'overwrite' => _l('Overwrite/Update Duplicates'))))), 'extra' => array('owner_table' => 'website', 'owner_id' => 'website_id'))); $header_buttons[] = array('url' => $link, 'type' => 'add', 'title' => _l("Import " . module_config::c('project_name_plural', 'Websites'))); } print_heading(array('type' => 'h2', 'main' => true, 'title' => _l('Customer ' . module_config::c('project_name_plural', 'Websites')), 'button' => $header_buttons)); ?> <form action="" method="post"> <?php $search_bar = array('elements' => array('name' => array('title' => _l('Name/URL:'), 'field' => array('type' => 'text', 'name' => 'search[generic]', 'value' => isset($search['generic']) ? $search['generic'] : '', 'size' => 30)), 'status' => array('title' => _l('Status:'), 'field' => array('type' => 'select', 'name' => 'search[status]', 'value' => isset($search['status']) ? $search['status'] : '', 'options' => module_website::get_statuses())))); echo module_form::search_bar($search_bar); /** START TABLE LAYOUT **/ $table_manager = module_theme::new_table_manager();
} // check permissions. if (class_exists('module_security', false)) { module_security::sanatise_data('quote', $quote); } $quote_tasks = module_quote::get_quote_items($quote_id, $quote); if (class_exists('module_import_export', false)) { if (module_quote::can_i('view', 'Export Quote Tasks')) { module_import_export::enable_pagination_hook(array('name' => 'Quote Tasks Export', 'fields' => array('Quote Name' => 'quote_name', 'Task ID' => 'quote_task_id', 'Order' => 'task_order', 'Short Description' => 'description', 'Long Description' => 'long_description', 'Hours' => 'hours', 'Amount' => 'amount', 'Billable' => 'billable', 'Staff Member' => 'user_name'))); if (isset($_REQUEST['import_export_go']) && $_REQUEST['import_export_go'] == 'yes') { // do the task export. module_import_export::run_pagination_hook($quote_tasks); } } if (module_quote::can_i('view', 'Import Quote Tasks')) { $import_tasks_link = module_import_export::import_link(array('callback' => 'module_quote::handle_import_tasks', 'name' => 'Quote Tasks', 'quote_id' => $quote_id, 'return_url' => $_SERVER['REQUEST_URI'], 'fields' => array('Task ID' => array('quote_task_id', false, 'The existing system ID for this task. Will overwrite existing task ID. Leave blank to create new task.'), 'Order' => array('task_order', false, 'The numerical order the tasks will appear in.'), 'Short Description' => array('description', true), 'Long Description' => 'long_description', 'Hours' => 'hours', 'Hours Completed' => 'completed', 'Amount' => 'amount', 'Billable' => array('billable', false, '1 for billable, 0 for non-billable'), 'Staff Member' => array('user_name', false, 'One of: ' . implode(', ', $staff_member_rel))))); } } ?> <script type="text/javascript"> $(function(){ if(typeof ucm.quote != 'undefined'){ ucm.quote.ajax_task_url = '<?php echo module_quote::link_ajax_task($quote_id, false); ?> '; <?php if (module_invoice::can_i('create', 'Invoices')) {
<h2> <?php if (module_report::can_i('create', 'reports')) { ?> <span class="button"> <?php echo create_link("Add New " . _l('Report'), "add", module_report::link_open('new')); ?> </span> <?php } ?> <?php if (class_exists('module_import_export', false) && module_report::can_i('view', 'Import ' . _l('Reports'))) { $link = module_import_export::import_link(array('callback' => 'module_report::handle_import', 'name' => _l('Reports'), 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'report', 'fields' => array(_l('Report') . ' ID' => 'report_id', 'Report Title' => 'report_title', 'Sql' => 'notes'), 'extra' => array('owner_table' => 'report', 'owner_id' => 'report_id'))); ?> <!-- <span class="button"> <?php echo create_link("Import " . _l('Reports'), "add", $link); ?> </span> --> <?php } ?> <?php echo _l('Reports'); ?> </h2> <form action="" method="post">