/** * 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 */ $page_title = _l('Ticket Staff Report'); $search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d'))); if (!module_statistic::can_i('view', 'Ticket Staff Report')) { redirect_browser(_BASE_HREF); } $staff_members = module_ticket::get_ticket_staff(); // we get all the ticket messages that were sent within this time period // (without autoresponders?) $sql = "SELECT * FROM `" . _DB_PREFIX . "ticket_message` WHERE message_time >= " . (int) strtotime(input_date($search['date_from'])) . " AND message_time <= " . (int) strtotime(input_date($search['date_to'])); $messages = qa($sql); ?> <form action="" method="post" id="statistic_form"> <?php $search_bar = array('elements' => array('date' => array('title' => _l('Date:'), 'fields' => array(array('type' => 'date', 'name' => 'search[date_from]', 'value' => isset($search['date_from']) ? $search['date_from'] : ''), _l('to'), array('type' => 'date', 'name' => 'search[date_to]', 'value' => isset($search['date_to']) ? $search['date_to'] : ''))))); echo module_form::search_bar($search_bar); ?> </form> <p> </p>