Пример #1
0
  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  This File: ticket-search.php
  Description: System File

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
if (!defined('PARENT')) {
    $HEADERS->err403(true);
}
// Access..
if (!in_array($cmd, $userAccess) && $MSTEAM->id != '1') {
    $HEADERS->err403(true);
}
// Department check for filter..
if (isset($_GET['dept']) && $_GET['dept'] > 0) {
    if (mswDeptPerms($MSTEAM->id, $_GET['dept'], $userDeptAccess) == 'fail') {
        $HEADERS->err403(true);
    }
}
// Export..
if (isset($_POST['export-search'])) {
    include_once REL_PATH . 'control/classes/class.download.php';
    $MSDL = new msDownload();
    $MSTICKET->exportTicketStats($MSDT, $MSDL);
    exit;
}
// Update..
if (isset($_POST['update'])) {
    $_POST['ticket'] = $_POST['id'];
    $cn = $MSTICKET->searchBatchUpdate();
    // If affected rows, write history log for each ticket..
Пример #2
0
            }
        }
        // If something happened, lets inform the original ticket creator..
        if ($count > 0 && !empty($new)) {
            $pLang = '';
            if ($USER->language && file_exists(LANG_BASE_PATH . $USER->language . '/mail-templates/html-wrapper.html')) {
                $pLang = $USER->language;
            }
            $MSMAIL->addTag('{NAME}', $USER->name);
            $MSMAIL->addTag('{TITLE}', $TICKET->subject);
            $MSMAIL->addTag('{PEOPLE}', implode(mswDefineNewline(), $new));
            $MSMAIL->addTag('{ID}', $tickID);
            $MSMAIL->sendMSMail(array('from_email' => $SETTINGS->email, 'from_name' => $SETTINGS->website, 'to_email' => $USER->email, 'to_name' => $USER->name, 'subject' => str_replace(array('{website}', '{ticket}'), array($SETTINGS->website, mswTicketNumber($tickID)), $emailSubjects['dispute-notify']), 'replyto' => array('name' => $SETTINGS->website, 'email' => $SETTINGS->replyto ? $SETTINGS->replyto : $SETTINGS->email), 'template' => LANG_PATH . 'admin-dispute-notification.txt', 'language' => $pLang ? $pLang : $SETTINGS->language, 'alive' => 'yes'));
        }
    }
    $OK1 = true;
}
// Remove users..
if (isset($_POST['removeusers']) && isset($_GET['disputeUsers']) && USER_DEL_PRIV == 'yes') {
    $MSTICKET->removeDisputeUsersFromTicket($msg_ticket_history['dis-user-rem']);
    $OK2 = true;
}
// Department check..
if (mswDeptPerms($MSTEAM->id, $SUPTICK->department, $userDeptAccess) == 'fail') {
    $HEADERS->err403(true);
}
$title = $msg_disputes8 . ' (#' . mswTicketNumber($_GET['disputeUsers']) . ')';
$loadJQAlertify = true;
include PATH . 'templates/header.php';
include PATH . 'templates/system/tickets/tickets-dispute-users.php';
include PATH . 'templates/footer.php';