示例#1
0
    $search['completed'] = module_config::c('quote_search_completed_default', 1);
}
$quotes = module_quote::get_quotes($search);
if (class_exists('module_table_sort', false)) {
    // get full quote data.
    // todo: only grab data if we're sorting by something
    // that isn't in the default invoice listing.
    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">
示例#2
0
} else {
    $show_customer_details = false;
}
$users = module_user::get_contacts($search, true, false);
if (class_exists('module_group', false)) {
    module_group::enable_pagination_hook(array('fields' => array('owner_id' => 'user_id', 'owner_table' => 'user', 'name' => 'name', 'email' => 'email')));
}
// hack to add a "export" option to the pagination results.
if (class_exists('module_import_export', false) && module_user::can_i('view', 'Export ' . $contact_type_permission . ' Contacts')) {
    if (isset($_REQUEST['import_export_go'])) {
        $users = query_to_array($users);
        foreach ($users as $user_id => $user) {
            $users[$user_id]['is_primary'] = $user['is_primary'] == $user['user_id'] ? _l('Yes') : _l('No');
        }
    }
    module_import_export::enable_pagination_hook(array('name' => $contact_type_permission . ' Contact Export', 'fields' => array($contact_type_permission . ' Contact ID' => 'user_id', 'First Name' => 'name', 'Last Name' => 'last_name', $contact_type_permission . ' ID' => $contact_module_name . '_id', $contact_type_permission . ' Name' => $contact_module_name . '_name', 'Primary Contact' => 'is_primary', 'Phone' => 'phone', 'Email' => 'email', 'Fax' => 'fax', 'Mobile' => 'mobile'), 'extra' => array('owner_table' => 'user', 'owner_id' => 'user_id'), 'group' => array(array('title' => 'Contact Group', 'owner_table' => 'user', 'owner_id' => 'user_id'))));
}
$heading = array('main' => true, 'type' => 'h2', 'title' => _l(($show_customer_details ? 'All ' : '') . $contact_type_permission . ' Contacts'), 'button' => array());
if (isset($search[$use_master_key]) && $search[$use_master_key] && module_user::can_i('create', 'Contacts', $contact_type_permission)) {
    $heading['button'][] = array('title' => 'Add New Contact', 'url' => module_user::link_generate('new', array('type' => 'contact', $use_master_key => isset($search[$use_master_key]) ? $search[$use_master_key] : false)), 'type' => 'add');
}
print_heading($heading);
?>



<form action="" method="<?php 
echo _DEFAULT_FORM_METHOD;
?>
">
    <?php 
示例#3
0
        if (!isset($finance_debit_total[$finance['currency_id']])) {
            $finance_debit_total[$finance['currency_id']] = 0;
        }
        $finance_debit_total[$finance['currency_id']] += $finance['debit'];
    }
}
// hack to add a "export" option to the pagination results.
if (class_exists('module_import_export', false) && module_finance::can_i('view', 'Export Finance')) {
    $export_settings = array('name' => 'Finance Export', 'parent_form' => 'finance_form', 'fields' => array('Date' => 'transaction_date', 'Name' => 'name', 'URL' => 'url', 'Description' => 'description', 'Credit' => 'credit', 'Debit' => 'debit', 'Account' => 'account_name', 'Categories' => 'categories'), 'summary' => array());
    if (module_config::c('finance_list_show_totals', 1)) {
        foreach ($finance_debit_total + $finance_credit_total as $currency_id => $foo) {
            $currency = get_single('currency', 'currency_id', $currency_id);
            $export_settings['summary'][] = array('description' => _l('%s Totals:', $currency && isset($currency['code']) ? $currency['code'] : ''), 'credit' => dollar(isset($finance_credit_total[$currency_id]) ? $finance_credit_total[$currency_id] : 0, true, $currency_id), 'debit' => dollar(isset($finance_debit_total[$currency_id]) ? $finance_debit_total[$currency_id] : 0, true, $currency_id));
        }
    }
    module_import_export::enable_pagination_hook($export_settings);
}
$upcoming_finances = array();
print_heading(array('title' => _l('Financial Transactions'), 'type' => 'h2', 'main' => true, 'button' => array('title' => _l('Add New'), 'url' => module_finance::link_open('new'), 'type' => 'add')));
?>



<form action="" method="post" id="finance_form" class="search_form">

    <?php 
$categories_rel = array();
foreach (module_finance::get_categories() as $category) {
    $categories_rel[$category['finance_category_id']] = $category['name'];
}
$accounts_rel = array();
示例#4
0
foreach ($staff_members as $staff_member) {
    $staff_member_rel[$staff_member['user_id']] = $staff_member['name'];
}
if ($job_id > 0 && $job['job_id'] == $job_id) {
    $module->page_title = _l('Job: %s', $job['name']);
} else {
    $module->page_title = _l('Job: %s', _l('New'));
}
// 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(){
示例#5
0
 */
$search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (isset($_REQUEST['customer_id'])) {
    $search['customer_id'] = $_REQUEST['customer_id'];
}
$websites = module_website::get_websites($search);
// hack to add a "group" option to the pagination results.
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">
示例#6
0
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
$members = module_member::get_members($search);
// hack to add a "group" option to the pagination results.
if (class_exists('module_group', false)) {
    $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">
示例#7
0
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (!module_vendor::can_i('view', $page_type)) {
    redirect_browser(_BASE_HREF);
}
$module->page_title = _l($page_type);
$vendors = module_vendor::get_vendors($search, array('as_resource' => true));
// hack to add a "group" option to the pagination results.
if (class_exists('module_group', false)) {
    module_group::enable_pagination_hook(array('fields' => array('owner_id' => 'vendor_id', 'owner_table' => 'vendor', 'title' => $page_type_single . ' Groups', 'name' => 'vendor_name', 'email' => 'primary_user_email')));
}
if (class_exists('module_table_sort', false)) {
    module_table_sort::enable_pagination_hook(array('table_id' => 'vendor_list', 'sortable' => array('vendor_name' => array('field' => 'vendor_name'), 'primary_contact_name' => array('field' => 'primary_user_name'), 'primary_contact_email' => array('field' => 'primary_user_email'), 'vendor_group' => array('group_sort' => true, 'owner_table' => 'vendor', 'owner_id' => 'vendor_id'))));
}
// hack to add a "export" option to the pagination results.
if (class_exists('module_import_export', false) && module_vendor::can_i('view', 'Export ' . $page_type)) {
    module_import_export::enable_pagination_hook(array('name' => $page_type_single . ' Export', 'fields' => array($page_type_single . ' ID' => 'vendor_id', $page_type_single . ' Name' => 'vendor_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'), 'extra' => array(array('owner_table' => 'vendor', 'owner_id' => 'vendor_id'), array('owner_table' => 'user', 'owner_id' => 'primary_user_id')), 'group' => array(array('title' => $page_type_single . ' Group', 'owner_table' => 'vendor', 'owner_id' => 'vendor_id'))));
}
$header_buttons = array();
if (module_vendor::can_i('create', $page_type)) {
    $header_buttons[] = array('url' => module_vendor::link_open('new', false), 'title' => 'Create New ' . $page_type_single, 'type' => 'add');
}
if (class_exists('module_import_export', false) && module_vendor::can_i('view', 'Import ' . $page_type)) {
    $header_buttons[] = array('url' => module_import_export::import_link(array('callback' => 'module_vendor::handle_import', 'name' => $page_type, 'return_url' => $_SERVER['REQUEST_URI'], 'group' => 'vendor', 'fields' => array($page_type_single . ' ID' => 'vendor_id', $page_type_single . ' Name' => 'vendor_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'), 'extra' => array(array('owner_table' => 'vendor', 'owner_id' => 'vendor_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', 'Vendor', 'vendor')) {
    $header_buttons[] = array('url' => module_user::link_open_contact(false, false, array('vendor_id' => 0)), 'title' => 'View All Contacts');
}
print_heading(array('main' => true, 'type' => 'h2', 'title' => $page_type, 'button' => $header_buttons));
?>

示例#8
0
foreach ($staff_members as $staff_member) {
    $staff_member_rel[$staff_member['user_id']] = $staff_member['name'];
}
if ($quote_id > 0 && $quote['quote_id'] == $quote_id) {
    $module->page_title = _l('Quote: %s', $quote['name']);
} else {
    $module->page_title = _l('Quote: %s', _l('New'));
}
// 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(){
示例#9
0
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array();
$recent_transactions = module_finance::get_finances($search);
$total_debit = $total_credit = 0;
foreach ($recent_transactions as $recent_transaction) {
    $total_credit += $recent_transaction['credit'];
    $total_debit += $recent_transaction['debit'];
}
if (!module_finance::can_i('view', 'Finance')) {
    redirect_browser(_BASE_HREF);
}
if (class_exists('module_table_sort', false)) {
    module_table_sort::enable_pagination_hook(array('table_id' => 'finance_list', 'sortable' => array('sort_date' => array('field' => 'transaction_date', 'current' => 2), 'sort_name' => array('field' => 'name'), 'sort_credit' => array('field' => 'credit'), 'sort_debit' => array('field' => 'debit'))));
}
// hack to add a "export" option to the pagination results.
if (class_exists('module_import_export', false) && module_finance::can_i('view', 'Export Finance')) {
    module_import_export::enable_pagination_hook(array('name' => 'Finance Export', 'parent_form' => 'finance_form', 'fields' => array('Date' => 'transaction_date', 'Name' => 'name', 'URL' => 'url', 'Description' => 'description', 'Credit' => 'credit', 'Debit' => 'debit', 'Account' => 'account_name', 'Categories' => 'categories')));
}
$recent_transactions_pagination = process_pagination($recent_transactions);
$upcoming_finances = array();
?>





            <h2>
            <?php 
if (module_finance::can_i('create', 'Finance')) {
    ?>

                <span class="button">
示例#10
0
 * Envato: f2874e84-c8f9-4c6c-894f-2c79a77bf602
 * Package Date: 2012-05-29 04:20:08 
 * IP Address: 127.0.0.1
 */
$search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
$reports = module_report::get_reports($search);
// hack to add a "group" option to the pagination results.
if (class_exists('module_group', false)) {
    module_group::enable_pagination_hook(array('fields' => array('owner_id' => 'report_id', 'owner_table' => 'report', 'name' => 'name', 'email' => '')));
}
if (class_exists('module_table_sort', false)) {
    module_table_sort::enable_pagination_hook(array('table_id' => 'report_list', 'sortable' => array('report_name' => array('field' => 'name', 'current' => 1), 'report_group' => array('group_sort' => true, 'owner_table' => 'report', 'owner_id' => 'report_id'))));
}
// hack to add a "export" option to the pagination results.
if (class_exists('module_import_export', false) && module_report::can_i('view', 'Export ' . _l('Reports'))) {
    module_import_export::enable_pagination_hook(array('name' => _l('Report') . ' Export', 'fields' => array(_l('Report') . ' ID' => 'report_id', 'Report Title' => 'report_title', 'Sql' => 'notes'), 'extra' => array('owner_table' => 'report', 'owner_id' => 'report_id')));
}
?>

<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 
}
?>
示例#11
0
 public function enable_export($options)
 {
     if (class_exists('module_import_export', false)) {
         module_import_export::enable_pagination_hook($options);
     }
 }