示例#1
0
            echo lang('ALLSTATS_unit_ok');
            ?>
	</center></small></strong></td>
                    
                </tr>
<?php 
            $unit_user = unit_of_user($_SESSION['helpdesk_user_id']);
            $ee = explode(",", $unit_user);
            foreach ($ee as $key => $value) {
                ?>



                <tr>
                    <td style=""><small><?php 
                echo get_unit_name_return4news($value);
                ?>
	</small></td>
                    <td style=""><small><center><?php 
                echo get_unit_stat_free($value);
                ?>
	</center></small></td>
                    <td style=""><small><center><?php 
                echo get_unit_stat_lock($value);
                ?>
	</center></small></td>
                    <td style=""><small><center><?php 
                echo get_unit_stat_ok($value);
                ?>
		</center></small></td>
                </tr>
示例#2
0
function get_last_action_ticket($ticket_id)
{
    global $dbConnection;
    $stmt = $dbConnection->prepare('select date_op, msg, init_user_id, to_user_id, to_unit_id from ticket_log where ticket_id=:ticket_id order by date_op DESC limit 1');
    $stmt->execute(array(':ticket_id' => $ticket_id));
    $fio = $stmt->fetch(PDO::FETCH_ASSOC);
    $r = $fio['msg'];
    $uss = nameshort(name_of_user_ret($fio['init_user_id']));
    $uss_to = nameshort(name_of_user_ret($fio['to_user_id']));
    $unit_to = get_unit_name_return4news($fio['to_unit_id']);
    if ($r == 'refer') {
        $red = '<i class=\'fa fa-long-arrow-right\'></i> ' . lang('TICKET_ACTION_refer') . ' <em>' . $uss . '</em> ' . lang('TICKET_ACTION_refer_to') . ' ' . $unit_to . ' ' . $uss_to;
    }
    if ($r == 'ok') {
        $red = '<i class=\'fa fa-check-circle-o\'></i> ' . lang('TICKET_ACTION_ok') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'no_ok') {
        $red = '<i class=\'fa fa-circle-o\'></i> ' . lang('TICKET_ACTION_nook') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'lock') {
        $red = '<i class=\'fa fa-lock\'></i> ' . lang('TICKET_ACTION_lock') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'unlock') {
        $red = '<i class=\'fa fa-unlock\'></i> ' . lang('TICKET_ACTION_unlock') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'create') {
        $red = '<i class=\'fa fa-star-o\'></i> ' . lang('TICKET_ACTION_create') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'edit_msg') {
        $red = '<i class=\'fa fa-pencil-square\'></i> ' . lang('TICKET_ACTION_edit') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'edit_prio') {
        $red = '<i class=\'fa fa-pencil-square\'></i> ' . lang('TICKET_ACTION_edit') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'edit_subj') {
        $red = '<i class=\'fa fa-pencil-square\'></i> ' . lang('TICKET_ACTION_edit') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'comment') {
        $red = '<i class=\'fa fa-comment\'></i> ' . lang('TICKET_ACTION_comment') . ' <em>' . $uss . '</em>';
    }
    if ($r == 'arch') {
        $red = '<i class=\'fa fa-archive\'></i> ' . lang('TICKET_ACTION_arch') . '';
    }
    return $red;
}