$isactive = $adb->query_result($adb->pquery($sql, array($contact_mailid)), 0, 'isactive');
         }
         if ($isactive == 1) {
             $url = "<a href='" . $PORTAL_URL . "/index.php?module=Tickets&action=index&ticketid=" . $modObj->id . "&fun=detail'>Ticket Details</a>";
             $email_body = $subject . '<br><br>' . getPortalInfo_Ticket($modObj->id, $sub, $contactname, $url, "edit");
         } else {
             $data['sub'] = $modObj->column_fields['ticket_title'];
             $data['parent_name'] = $parentname;
             $data['status'] = $modObj->column_fields['ticketstatus'];
             $data['category'] = $modObj->column_fields['ticketcategories'];
             $data['severity'] = $modObj->column_fields['ticketseverities'];
             $data['priority'] = $modObj->column_fields['ticketpriorities'];
             $data['description'] = $modObj->column_fields['description'];
             $data['solution'] = $modObj->column_fields['solution'];
             $data['mode'] = 'edit';
             $email_body = getTicketDetails($modObj->id, $data);
         }
     }
     if ($user_emailid != '') {
         $mail_status = send_mail('HelpDesk', $user_emailid, $HELPDESK_SUPPORT_NAME, $HELPDESK_SUPPORT_EMAIL_ID, $subject, $email_body);
     }
     if ($emailoptout == 0) {
         //send mail to parent
         if (!empty($parent_id)) {
             $parent_email = getParentMailId($parent_module, $parent_id);
             $mail_status = send_mail('HelpDesk', $parent_email, $HELPDESK_SUPPORT_NAME, $HELPDESK_SUPPORT_EMAIL_ID, $subject, $email_body);
         }
     }
 }
 //update the log information for ticket history
 $adb->pquery("update vtiger_troubletickets set update_log=? where ticketid=?", array($fldvalue, $modObj->id));
示例#2
0
文件: Save.php 项目: hardikk/HNH
}
if ($isactive == 1) {
    $url = "<a href='" . $PORTAL_URL . "/index.php?module=HelpDesk&action=index&ticketid=" . $focus->id . "&fun=detail'>" . $mod_strings['LBL_TICKET_DETAILS'] . "</a>";
    $email_body = $bodysubject . '<br><br>' . getPortalInfo_Ticket($focus->id, $_REQUEST['ticket_title'], $contactname, $url, $_REQUEST['mode']);
} else {
    $data['sub'] = $_REQUEST['ticket_title'];
    $data['ticketno'] = $focus->column_fields['ticket_no'];
    $data['parent_name'] = $parentname;
    $data['status'] = $focus->column_fields['ticketstatus'];
    $data['category'] = $focus->column_fields['ticketcategories'];
    $data['severity'] = $focus->column_fields['ticketseverities'];
    $data['priority'] = $focus->column_fields['ticketpriorities'];
    $data['description'] = $focus->column_fields['description'];
    $data['solution'] = $focus->column_fields['solution'];
    $data['mode'] = $_REQUEST['mode'];
    $email_body = getTicketDetails($focus->id, $data);
}
$_REQUEST['return_id'] = $return_id;
if ($_REQUEST['return_module'] == 'Products' & $_REQUEST['product_id'] != '' && $focus->id != '') {
    $return_id = vtlib_purify($_REQUEST['product_id']);
}
//send mail to the assigned to user and the parent to whom this ticket is assigned
//only if NOTIFY_OWNER_EMAILS is true
if (PerformancePrefs::getBoolean('NOTIFY_OWNER_EMAILS', true) === true) {
    //send mail to the assigned to user and the parent to whom this ticket is assigned
    require_once 'modules/Emails/mail.php';
    $user_emailid = getUserEmailId('id', $focus->column_fields['assigned_user_id']);
    if ($user_emailid != '') {
        if ($_REQUEST['mode'] != 'edit') {
            $mail_status = send_mail('HelpDesk', $user_emailid, $HELPDESK_SUPPORT_NAME, $HELPDESK_SUPPORT_EMAIL_ID, $subject, $email_body);
        } else {