Exemplo n.º 1
0
                 // this option isn't in the listing. add it in.
                 $user_temp = module_user::get_user($ticket['user_id'], false);
                 $c[$ticket['user_id']] = $user_temp['name'] . ' ' . $user_temp['last_name'];
                 if ($user_temp['customer_id'] >= 0) {
                     $c[$ticket['user_id']] .= ' ' . _l('(under different customer)');
                 } else {
                     // user not assigned to a customer.
                 }
             }
             echo '<a name="#change_contact"></a>';
             echo print_select_box($c, 'change_user_id', $ticket['user_id']);
         } else {
             echo module_user::link_open_contact($ticket['user_id'], true);
             if (module_ticket::can_edit_tickets()) {
                 echo ' ';
                 echo '<a href="' . module_ticket::link_open($ticket_id) . '&show_change_contact#change_contact">' . _l('Change') . '</a>';
             }
         }
         /*
                                 $c = array();
                                 $res = module_user::get_users(array('customer_id'=>$ticket['customer_id']));
                                 while($row = array_shift($res)){
                                     $c[$row['user_id']] = $row['name'];
                                 }
                                 if(false && module_ticket::can_i('edit','Related to')){
                                     echo print_select_box($c,'user_id',$ticket['user_id']);
                                 }else if($ticket['user_id']){
                                     echo isset($c[$ticket['user_id']]) ? $c[$ticket['user_id']] : 'N/A';
                                 }*/
     }));
 }
Exemplo n.º 2
0
        ?>
"><?php 
        echo htmlspecialchars($i['name']);
        ?>
 (<?php 
        echo $i['count'];
        echo $i['cost'] ? ' - ' . dollar($i['count'] * $i['cost']) : '';
        ?>
)</a> <?php 
    }
}
/** START TABLE LAYOUT **/
$table_manager = module_theme::new_table_manager();
$columns = array();
$columns['ticket_number'] = array('title' => 'Number', 'callback' => function ($ticket) {
    echo module_ticket::link_open($ticket['ticket_id'], true, $ticket);
    echo ' (' . $ticket['message_count'] . ')';
}, 'cell_class' => 'row_action');
$columns['ticket_subject'] = array('title' => 'Subject', 'callback' => function ($ticket) {
    $ticket['subject'] = preg_replace('#Message sent via your Den#', '', $ticket['subject']);
    if ($ticket['priority']) {
    }
    if ($ticket['unread']) {
        echo '<strong>';
        echo ' ' . _l('* ') . ' ';
        echo htmlspecialchars($ticket['subject']);
        echo '</strong>';
    } else {
        echo htmlspecialchars($ticket['subject']);
    }
});
Exemplo n.º 3
0
    public static function hook_invoice_sidebar($callback, $invoice_id)
    {
        // see if any tickets match this  invoice.
        $tickets = get_multiple('ticket', array('invoice_id' => $invoice_id));
        if ($tickets) {
            foreach ($tickets as $ticket) {
                ?>

                <h3><?php 
                _e('Priority Support Ticket');
                ?>
</h3>
                <table border="0" cellspacing="0" cellpadding="2" class="tableclass tableclass_form tableclass_full">
                    <tbody>
                    <tr>
                        <th class="width1">
                            <?php 
                _e('Ticket');
                ?>

                        </th>
                        <td>
                            <?php 
                echo module_ticket::link_open($ticket['ticket_id'], true, $ticket);
                ?>

                        </td>
                    </tr>
                    <tr>
                        <th>
                            <?php 
                _e('Subject');
                ?>

                        </th>
                        <td>
                            <?php 
                echo htmlspecialchars($ticket['subject']);
                ?>

                        </td>
                    </tr>
                    <tr>
                        <th>
                            <?php 
                _e('Status');
                ?>

                        </th>
                        <td>
                            <?php 
                $s = module_ticket::get_statuses();
                echo $s[$ticket['status_id']];
                ?>

                        </td>
                    </tr>
                    </tbody>
                </table>
                <?php 
            }
        }
    }
Exemplo n.º 4
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_safe) {
    die('failed');
}
$ticket_id = (int) $_REQUEST['ticket_id'];
$ticket = module_ticket::get_ticket($ticket_id);
print_heading(_l('Notify Staff About Ticket: %s', module_ticket::ticket_number($ticket['ticket_id'])));
// template for sending emails.
// are we sending the paid one? or the dueone.
$template = module_template::get_template_by_key('ticket_email_notify');
$ticket['ticket_number'] = module_ticket::ticket_number($ticket['ticket_id']);
$ticket['from_name'] = module_security::get_loggedin_name();
$ticket['ticket_url'] = module_ticket::link_open($ticket_id);
$ticket['ticket_subject'] = $ticket['subject'];
// sending to the staff member.
$to = module_user::get_user($ticket['assigned_user_id']);
$ticket['staff_name'] = $to['name'] . ' ' . $to['last_name'];
$to = array($to);
$template->assign_values($ticket);
module_email::print_compose(array('to' => $to, 'bcc' => module_config::c('admin_email_address', ''), 'content' => $template->render('html'), 'subject' => $template->replace_description(), 'success_url' => module_ticket::link_open($ticket_id), 'cancel_url' => module_ticket::link_open($ticket_id)));
Exemplo n.º 5
0
if ((int) $ticket_id && module_ticket::can_i('delete', 'Tickets')) {
    ?>

        <input type="submit" name="butt_del" id="butt_del" value="<?php 
    echo _l('Delete');
    ?>
" 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 
}