Ejemplo n.º 1
0
    $columns['ticket_group'] = array('title' => 'Group', 'callback' => function ($ticket) {
        // find the groups for this customer.
        $groups = module_group::get_groups_search(array('owner_table' => 'ticket', 'owner_id' => $ticket['ticket_id']));
        $g = array();
        foreach ($groups as $group) {
            $g[] = $group['name'];
        }
        echo implode(', ', $g);
    });
}
if (module_config::c('ticket_allow_priority', 0) && module_config::c('ticket_show_priority', 1)) {
    $columns['ticket_priority'] = array('title' => 'Priority', 'callback' => function ($ticket) use($priorities) {
        echo $priorities[$ticket['priority']];
    });
}
if (module_ticket::can_edit_tickets()) {
    $columns['ticket_action'] = array('title' => ' <input type="checkbox" name="bulk_operation_all" id="bulk_operation_all" value="yehaw" > ', 'callback' => function ($ticket) {
        echo '<input type="checkbox" name="bulk_operation[' . $ticket['ticket_id'] . ']" class="ticket_bulk_check" value="yes">';
    });
}
if (class_exists('module_extra', false)) {
    $table_manager->display_extra('ticket', function ($ticket) {
        module_extra::print_table_data('ticket', $ticket['ticket_id']);
    });
}
$table_manager->set_columns($columns);
$time = time();
$today = strtotime(date('Y-m-d'));
$table_manager->row_callback = function ($row_data) use($time, $today, $limit_time) {
    // load the full vendor data before displaying each row so we have access to more details
    /*if(class_exists('module_envato',false) && isset($_REQUEST['faq_product_envato_hack']) && (!$ticket['faq_product_id'] || $ticket['faq_product_id'] == $_REQUEST['faq_product_envato_hack'])){
Ejemplo n.º 2
0
 <a href="<?php 
            echo module_ticket::link_public($ticket_id);
            ?>
" target="_blank"><?php 
            _e('click here');
            ?>
</a> <?php 
        }));
    }
    echo module_form::generate_fieldset($fieldset_data);
    unset($fieldset_data);
    handle_hook('ticket_sidebar', $ticket_id);
}
// end can edit
hook_handle_callback('layout_column_half', 2, '65');
if ($ticket_id > 0 && module_ticket::can_edit_tickets() && !$ticket['assigned_user_id']) {
    ob_start();
    ?>

            <div class="content_box_wheader" style="padding-bottom: 20px">
                <p>
                    <?php 
    _e('This ticket is not assigned to anyone.');
    ?>
<br/>
                    <?php 
    _e('If you are able to solve this ticket please assign it to yourself.');
    ?>

                </p>
                <input type="button" name="butt_assign_me" value="<?php 
Ejemplo n.º 3
0
        break;
}
if ($ticket_count > 0) {
    $module->page_title = _l('Tickets (%s)', $ticket_count);
} else {
    $module->page_title = _l('TIckets');
}
$search = isset($_REQUEST['search']) && is_array($_REQUEST['search']) ? $_REQUEST['search'] : array();
if (isset($_REQUEST['customer_id']) && (int) $_REQUEST['customer_id'] > 0) {
    $search['customer_id'] = (int) $_REQUEST['customer_id'];
} else {
    $search['customer_id'] = false;
}
$search_statuses = module_ticket::get_statuses();
$search_statuses['2,3,5'] = 'New/Replied/In Progress';
if (!isset($search['status_id']) && module_ticket::can_edit_tickets()) {
    $search['status_id'] = '2,3,5';
}
$tickets = module_ticket::get_tickets($search, true);
if (!isset($_REQUEST['nonext'])) {
    $_SESSION['_ticket_nextprev'] = array();
    while ($ticket = mysql_fetch_assoc($tickets)) {
        $_SESSION['_ticket_nextprev'][] = $ticket['ticket_id'];
    }
    if (mysql_num_rows($tickets) > 0) {
        mysql_data_seek($tickets, 0);
    }
}
$priorities = module_ticket::get_ticket_priorities();
?>
               <input type="hidden" name="creator_hash" value="<?php echo module_ticket::creator_hash(module_security::get_loggedin_id());?>">
               <strong>
               <?php echo htmlspecialchars($send_as_name);?>
               &lt;<?php echo htmlspecialchars($send_as_address);?>&gt;
               </strong>
               <?php _e('Reply To:');?> <strong><?php echo htmlspecialchars($to_user_a['email']);?></strong>
           </td>
       </tr> */
    ?>

		        </tbody>
	        </table>

	        <?php 
    $form_actions = array('class' => 'action_bar action_bar_center action_bar_single', 'elements' => array());
    if (module_ticket::can_edit_tickets() && module_config::c('ticket_allow_cc_bcc', 1)) {
        $form_actions['elements'][] = array('type' => 'button', 'name' => 'show_cc_bcc', 'value' => _l('Add CC/BCC'), 'onclick' => "\$('#ticket_cc_bcc').show(); \$(this).hide();");
    }
    if ($next_ticket) {
        $form_actions['elements'][] = array('type' => 'submit', 'class' => 'submit_button', 'name' => 'newmsg', 'value' => _l('Submit Message'));
        $form_actions['elements'][] = array('type' => 'save_button', 'name' => 'newmsg_next', 'value' => _l('Submit Message & Go To Next Ticket'));
        $form_actions['elements'][] = array('type' => 'hidden', 'name' => 'next_ticket_id', 'value' => $next_ticket);
    } else {
        if ($prev_ticket) {
            $form_actions['elements'][] = array('type' => 'save_button', 'name' => 'newmsg', 'value' => _l('Submit Message'));
            $form_actions['elements'][] = array('type' => 'save_button', 'name' => 'newmsg_next', 'value' => _l('Submit Message & Go To Prev Ticket'));
            $form_actions['elements'][] = array('type' => 'hidden', 'name' => 'next_ticket_id', 'value' => $prev_ticket);
        } else {
            $form_actions['elements'][] = array('type' => 'save_button', 'name' => 'newmsg', 'value' => _l('Submit Message'));
        }
    }
Ejemplo n.º 5
0
 public function handle_hook($hook)
 {
     switch ($hook) {
         case "invoice_paid":
             $foo = func_get_args();
             $invoice_id = (int) $foo[1];
             if ($invoice_id > 0) {
                 // see if any tickets match this invoice.
                 $ticket = get_single('ticket', 'invoice_id', $invoice_id);
                 if ($ticket) {
                     // check it's status and make it priority if it isn't already
                     if ($ticket['priority'] != _TICKET_PRIORITY_STATUS_ID) {
                         update_insert('ticket_id', $ticket['ticket_id'], 'ticket', array('priority' => _TICKET_PRIORITY_STATUS_ID));
                         // todo - send email to admin?
                         //send_email('*****@*****.**','priority ticket',var_export($ticket,true));
                     }
                 }
             }
             break;
         case "home_alerts":
             $alerts = array();
             if (module_ticket::can_edit_tickets()) {
                 if (module_config::c('ticket_alerts', 1)) {
                     // find any tickets that are past the due date and dont have a finished date.
                     $sql = "SELECT * FROM `" . _DB_PREFIX . "ticket` p ";
                     $sql .= " WHERE p.status_id <= 2 AND p.date_updated <= '" . date('Y-m-d', strtotime('-' . module_config::c('ticket_turn_around_days', 5) . ' days')) . "'";
                     $tickets = qa($sql);
                     foreach ($tickets as $ticket) {
                         $alert_res = process_alert($ticket['date_updated'], _l('Ticket Not Completed'), module_config::c('ticket_turn_around_days', 5));
                         if ($alert_res) {
                             $alert_res['link'] = $this->link_open($ticket['ticket_id']);
                             $alert_res['name'] = $ticket['subject'];
                             $alerts[] = $alert_res;
                         }
                     }
                 }
             }
             return $alerts;
             break;
     }
 }
Ejemplo n.º 6
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: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
if ($ticket_id > 0 && module_config::c('ticket_allow_billing', 1) && module_ticket::can_edit_tickets()) {
    $done_in_ticket_billing = true;
    $responsive_summary = array();
    $quotes = array();
    if (class_exists('module_quote', false) && module_quote::is_plugin_enabled()) {
        $quotes = module_quote::get_quotes(array('ticket_id' => $ticket_id));
        foreach ($quotes as $quote) {
            $responsive_summary[] = module_quote::link_open($quote['quote_id'], true, $quote);
        }
    }
    $fieldset_data = array('heading' => array('type' => 'h3', 'title' => 'Ticket Billing', 'responsive' => array('summary' => implode(', ', $responsive_summary))), 'class' => 'tableclass tableclass_form tableclass_full', 'elements' => array());
    $c = array();
    $res = module_customer::get_customers();
    while ($row = array_shift($res)) {
        $c[$row['customer_id']] = $row['customer_name'];
    }
    if ($ticket['customer_id'] < 0) {
        $ticket['customer_id'] = false;
    }
    $fieldset_data['elements'][] = array('title' => _l('Customer'), 'fields' => array(array('type' => 'select', 'name' => 'change_customer_id', 'value' => $ticket['customer_id'], 'options' => $c), array('type' => 'button', 'name' => 'new_customer', 'value' => _l('New'), 'onclick' => "window.location.href='" . module_customer::link_open('new', false) . "&move_user_id=" . $ticket['user_id'] . "';")));
Ejemplo n.º 7
0
    ?>
" class="submit_button delete_button" />
        <?php 
}
?>

        <input type="button" name="cancel" value="<?php 
echo _l('Cancel');
?>
" onclick="window.location.href='<?php 
echo module_ticket::link_open(false);
?>
';" class="submit_button" />
    </p>
    <?php 
if ((int) $ticket_id && module_ticket::can_edit_tickets()) {
    ?>

    <p align="center">
        <input type="submit" name="mark_as_unread" value="<?php 
    echo _l('Mark as unread');
    ?>
" class="submit_button" />
    </p>
        <?php 
}
?>



</form>