Esempio n. 1
0
<?php

/** 
 * 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: 321 52e20b549dde146818983ece66d81a11
 * 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">