Ticket system now with drafts and attachement of sent mails
This commit is contained in:
parent
a9c85b0c81
commit
7bbcdf206b
|
|
@ -32485,6 +32485,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
|
||||||
htmlentities($text, ENT_NOQUOTES, 'UTF-8', false)
|
htmlentities($text, ENT_NOQUOTES, 'UTF-8', false)
|
||||||
, ENT_NOQUOTES
|
, ENT_NOQUOTES
|
||||||
);
|
);
|
||||||
|
|
||||||
if($texthtml!=$text)
|
if($texthtml!=$text)
|
||||||
{
|
{
|
||||||
$text = $texthtml;
|
$text = $texthtml;
|
||||||
|
|
@ -43997,6 +43998,16 @@ function Firmendaten($field,$projekt="")
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function GetDateiStichwoerter($dateiid) {
|
||||||
|
$stichwoerter = $this->app->DB->SelectArr("SELECT subjekt, objekt, parameter FROM datei_stichwoerter WHERE datei=".$dateiid);
|
||||||
|
if (empty($stichwoerter)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return $stichwoerter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function GetDateiSubjektObjekt($subjekt,$objekt,$parameter)
|
function GetDateiSubjektObjekt($subjekt,$objekt,$parameter)
|
||||||
{
|
{
|
||||||
$dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' GROUP by datei");
|
$dateien = $this->app->DB->SelectArr("SELECT datei FROM datei_stichwoerter WHERE subjekt LIKE '$subjekt' AND objekt LIKE '$objekt' AND parameter='$parameter' GROUP by datei");
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
-->
|
-->
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
[MESSAGE]
|
[MESSAGE]
|
||||||
<form action="" method="post">
|
<form action="" enctype="multipart/form-data" method="POST">
|
||||||
[FORMHANDLEREVENT]
|
[FORMHANDLEREVENT]
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row-height">
|
<div class="row-height">
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<table width="100%" border="0" class="mkTableFormular">
|
<table width="100%" border="0" class="mkTableFormular">
|
||||||
<legend>{|[STATUSICON]<b>Ticket <font color="blue">#[SCHLUESSEL]</font></b>|}</legend>
|
<legend>{|[STATUSICON]<b>Ticket <font color="blue">#[SCHLUESSEL]</font></b>|}</legend>
|
||||||
<tr><td>{|Betreff|}:</td><td>[BETREFF]</td></tr>
|
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" size="20"></td></tr>
|
||||||
<tr><td>{|Zeit|}:</td><td>[ZEIT]</td></tr>
|
<tr><td>{|Zeit|}:</td><td>[ZEIT]</td></tr>
|
||||||
<tr><td>{|Von|}:</td><td>[KUNDE] [MAILADRESSE]</td></tr>
|
<tr><td>{|Von|}:</td><td>[KUNDE] [MAILADRESSE]</td></tr>
|
||||||
<tr><td>{|Projekt|}:</td><td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20"></td></tr>
|
<tr><td>{|Projekt|}:</td><td><input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20"></td></tr>
|
||||||
|
|
|
||||||
|
|
@ -35,32 +35,22 @@
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>Anhänge:</td>
|
<td>Anhänge:</td>
|
||||||
<td>
|
<td>
|
||||||
<table width="100%" class="mkTable" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<th width="20"></th>
|
|
||||||
<th>Datei</th>
|
|
||||||
<th width=20></th>
|
|
||||||
</tr>
|
|
||||||
[ANHAENGE]
|
[ANHAENGE]
|
||||||
</table>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="file" name="userfile" id="userfile")"/></td>
|
<td><input type="file" name="upload[]" id="file" multiple/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="bottom">
|
<td align="left" valign="bottom">
|
||||||
<button name="submit" value="addfile" id="addfile" class="ui-button-icon">Hinzufügen</button>
|
<button name="submit" value="addfile" id="addfile" class="ui-button-icon">Hinzufügen</button>
|
||||||
</td>
|
</td>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.getElementById("userfile").onchange = function(e) {
|
document.getElementById("file").onchange = function(e) {
|
||||||
document.getElementById("addfile").click();
|
document.getElementById("addfile").click();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td colspan="3"><br></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class Ticket {
|
||||||
$defaultorder = 1;
|
$defaultorder = 1;
|
||||||
$defaultorderdesc = 0;
|
$defaultorderdesc = 0;
|
||||||
|
|
||||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=ticket&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.png\" border=\"0\"></a> <a href=\"#\" onclick=DeleteDialog(\"index.php?module=ticket&action=delete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . "</td></tr></table>";
|
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=ticket&action=edit&id=%value%\"><img src=\"./themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.png\" border=\"0\"></a>" . "</td></tr></table>";
|
||||||
|
|
||||||
|
|
||||||
$timedifference = "if (
|
$timedifference = "if (
|
||||||
|
|
@ -114,6 +114,37 @@ class Ticket {
|
||||||
return $this->app->DB->SelectArr("SELECT n.id, n.betreff, n.verfasser, n.mail, n.mail_cc, n.zeit, n.zeitausgang, n.versendet, n.text, n.verfasser_replyto, mail_replyto FROM ticket_nachricht n INNER JOIN ticket t ON t.schluessel = n.ticket WHERE (".$where.") AND t.id = ".$ticket_id." ORDER BY n.zeit DESC");
|
return $this->app->DB->SelectArr("SELECT n.id, n.betreff, n.verfasser, n.mail, n.mail_cc, n.zeit, n.zeitausgang, n.versendet, n.text, n.verfasser_replyto, mail_replyto FROM ticket_nachricht n INNER JOIN ticket t ON t.schluessel = n.ticket WHERE (".$where.") AND t.id = ".$ticket_id." ORDER BY n.zeit DESC");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function add_attachments_html($ticket_id, $message_id,$templatepos,$showdelete) {
|
||||||
|
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('Anhang','Ticket',$message_id);
|
||||||
|
|
||||||
|
if (!empty($file_attachments)) {
|
||||||
|
|
||||||
|
$this->app->Tpl->Add('NACHRICHT_ANHANG',"<hr style=\"border-style:solid; border-width:1px\">");
|
||||||
|
|
||||||
|
foreach ($file_attachments as $file_attachment) {
|
||||||
|
|
||||||
|
if ($showdelete) {
|
||||||
|
$deletetext = '<a href=index.php?module=ticket&action=edit&id='.$ticket_id.'&cmd=deleteattachment'.'&fileid='.$file_attachment.'>'.
|
||||||
|
'<img src="./themes/' . $this->app->Conf->WFconf['defaulttheme'] . '/images/delete.svg" />';
|
||||||
|
} else {
|
||||||
|
$deletetext = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->app->Tpl->Add($templatepos,
|
||||||
|
"<a href=\"index.php?module=dateien&action=send&id=".$file_attachment.
|
||||||
|
"\">".
|
||||||
|
htmlentities($this->app->erp->GetDateiName($file_attachment)).
|
||||||
|
" (".
|
||||||
|
$this->app->erp->GetDateiSize($file_attachment).
|
||||||
|
")".
|
||||||
|
"</a>".
|
||||||
|
$deletetext.
|
||||||
|
"</a>".
|
||||||
|
"</br>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws NumberGeneratorException
|
* @throws NumberGeneratorException
|
||||||
|
|
@ -231,11 +262,16 @@ class Ticket {
|
||||||
function ticket_edit() {
|
function ticket_edit() {
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
|
||||||
|
if (empty($id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->app->Tpl->Set('ID', $id);
|
$this->app->Tpl->Set('ID', $id);
|
||||||
|
|
||||||
$this->app->erp->MenuEintrag("index.php?module=ticket&action=edit&id=$id", "Details");
|
$this->app->erp->MenuEintrag("index.php?module=ticket&action=edit&id=$id", "Details");
|
||||||
$this->app->erp->MenuEintrag("index.php?module=ticket&action=list", "Zurück zur Übersicht");
|
$this->app->erp->MenuEintrag("index.php?module=ticket&action=list", "Zurück zur Übersicht");
|
||||||
$id = $this->app->Secure->GetGET('id');
|
$id = $this->app->Secure->GetGET('id');
|
||||||
|
$cmd = $this->app->Secure->GetGET('cmd');
|
||||||
$input = $this->GetInput();
|
$input = $this->GetInput();
|
||||||
$submit = $this->app->Secure->GetPOST('submit');
|
$submit = $this->app->Secure->GetPOST('submit');
|
||||||
$msg = $this->app->erp->base64_url_decode($this->app->Secure->GetGET('msg'));
|
$msg = $this->app->erp->base64_url_decode($this->app->Secure->GetGET('msg'));
|
||||||
|
|
@ -266,7 +302,7 @@ class Ticket {
|
||||||
// END Header
|
// END Header
|
||||||
|
|
||||||
// Check for draft
|
// Check for draft
|
||||||
$drafted_messages = $this->get_messages_of_ticket($id, "zeitausgang IS NULL");
|
$drafted_messages = $this->get_messages_of_ticket($id, "zeitausgang IS NULL AND versendet = '1'");
|
||||||
|
|
||||||
if (!empty($drafted_messages)) {
|
if (!empty($drafted_messages)) {
|
||||||
|
|
||||||
|
|
@ -274,7 +310,7 @@ class Ticket {
|
||||||
if ($submit != '') {
|
if ($submit != '') {
|
||||||
$this->save_draft($drafted_messages[0]['id'],$input);
|
$this->save_draft($drafted_messages[0]['id'],$input);
|
||||||
// Reload
|
// Reload
|
||||||
$drafted_messages = $this->get_messages_of_ticket($id, "zeitausgang IS NULL");
|
$drafted_messages = $this->get_messages_of_ticket($id, "zeitausgang IS NULL AND versendet = '1'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the draft for editing
|
// Load the draft for editing
|
||||||
|
|
@ -290,9 +326,45 @@ class Ticket {
|
||||||
$this->app->YUI->AutoComplete("email_cc","emailname");
|
$this->app->YUI->AutoComplete("email_cc","emailname");
|
||||||
$this->app->YUI->AutoComplete("email_bcc","emailname");
|
$this->app->YUI->AutoComplete("email_bcc","emailname");
|
||||||
$this->app->YUI->CkEditor("email_text","internal", null, 'JQUERY');
|
$this->app->YUI->CkEditor("email_text","internal", null, 'JQUERY');
|
||||||
$this->app->Tpl->Parse('NEW_MESSAGE', "ticket_new_message.tpl");
|
|
||||||
|
// Delete attachment from draft
|
||||||
|
if ($cmd=='deleteattachment') {
|
||||||
|
$fileid = $this->app->Secure->GetGET('fileid');
|
||||||
|
|
||||||
|
// Check if this file is only attached to this draft and nowhere else
|
||||||
|
$check = $this->app->erp->GetDateiStichwoerter($fileid);
|
||||||
|
|
||||||
|
$save_to_delete = true;
|
||||||
|
foreach ($check as $stichwort) {
|
||||||
|
if ($stichwort['subjekt'] != 'anhang' || $stichwort['objekt'] != 'Ticket' || $stichwort['parameter'] != $drafted_messages[0]['id']) {
|
||||||
|
$save_to_delete = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($save_to_delete) {
|
||||||
|
$this->app->erp->DeleteDatei($fileid);
|
||||||
|
} else {
|
||||||
|
$msg .= "<div class=\"success\">Fehler beim Löschen der Datei: In Verwendung.</div>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Upload of attachments
|
||||||
|
if(isset($_FILES['upload']) && is_array($_FILES['upload']))
|
||||||
|
{
|
||||||
|
foreach($_FILES['upload']['tmp_name'] as $key => $file)
|
||||||
|
{
|
||||||
|
if($file != "")
|
||||||
|
{
|
||||||
|
$fileid = $this->app->erp->CreateDatei($_FILES['upload']['name'][$key], $_FILES['upload']['name'][$key], "", "", $_FILES['upload']['tmp_name'][$key], $this->app->User->GetName());
|
||||||
|
// stichwoerter hinzufuegen
|
||||||
|
$this->app->erp->AddDateiStichwort($fileid, "anhang", "Ticket", $drafted_messages[0]['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->add_attachments_html($id,$drafted_messages[0]['id'],'ANHAENGE',true);
|
||||||
|
$this->app->Tpl->Parse('NEW_MESSAGE', "ticket_new_message.tpl");
|
||||||
|
}
|
||||||
// END Draft
|
// END Draft
|
||||||
|
|
||||||
// Get all messsages
|
// Get all messsages
|
||||||
|
|
@ -307,11 +379,17 @@ class Ticket {
|
||||||
$recv_messages = $this->get_messages_of_ticket($id,"n.versendet != 1");
|
$recv_messages = $this->get_messages_of_ticket($id,"n.versendet != 1");
|
||||||
$this->app->Tpl->Set('EMAIL_AN', $recv_messages[0]['mail']);
|
$this->app->Tpl->Set('EMAIL_AN', $recv_messages[0]['mail']);
|
||||||
|
|
||||||
|
if (!empty($recv_messages)) {
|
||||||
if (!str_starts_with(strtoupper($recv_messages[0]['betreff']),"RE:")) {
|
if (!str_starts_with(strtoupper($recv_messages[0]['betreff']),"RE:")) {
|
||||||
$betreff = "RE: ".$recv_messages[0]['betreff'];
|
$betreff = "RE: ".$recv_messages[0]['betreff'];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$betreff = $recv_messages[0]['betreff'];
|
$betreff = $recv_messages[0]['betreff'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$betreff = $result[0]['betreff'];
|
||||||
|
}
|
||||||
|
|
||||||
$anschreiben = $this->app->DB->Select("SELECT anschreiben FROM adresse WHERE id='".$result[0]['adresse']."' LIMIT 1");
|
$anschreiben = $this->app->DB->Select("SELECT anschreiben FROM adresse WHERE id='".$result[0]['adresse']."' LIMIT 1");
|
||||||
if($anschreiben=="")
|
if($anschreiben=="")
|
||||||
|
|
@ -325,43 +403,23 @@ class Ticket {
|
||||||
$sql = "INSERT INTO `ticket_nachricht` (
|
$sql = "INSERT INTO `ticket_nachricht` (
|
||||||
`ticket`, `zeit`, `text`, `betreff`, `medium`, `versendet`,
|
`ticket`, `zeit`, `text`, `betreff`, `medium`, `versendet`,
|
||||||
`verfasser`, `mail`,`status`, `verfasser_replyto`, `mail_replyto`
|
`verfasser`, `mail`,`status`, `verfasser_replyto`, `mail_replyto`
|
||||||
) VALUES ('".$result[0]['schluessel']."',NOW(),'".$anschreiben."','".$betreff."','email','1','','','neu','".$senderName."','".$senderAddress."');";
|
) VALUES ('".$result[0]['schluessel']."',NOW(),'".$anschreiben."','".$betreff."','email','1','','".$recv_messages[0]['mail']."','neu','".$senderName."','".$senderAddress."');";
|
||||||
|
|
||||||
$this->app->DB->Insert($sql);
|
$this->app->DB->Insert($sql);
|
||||||
}
|
|
||||||
|
|
||||||
// Show new message dialog
|
// Show new message dialog
|
||||||
$this->app->YUI->AutoComplete("email_an","emailname");
|
header("Location: index.php?module=ticket&action=edit&id=$id");
|
||||||
$this->app->YUI->AutoComplete("email_cc","emailname");
|
$this->app->ExitXentral();
|
||||||
$this->app->YUI->AutoComplete("email_bcc","emailname");
|
}
|
||||||
$this->app->YUI->CkEditor("email_text","internal", null, 'JQUERY');
|
|
||||||
$this->app->Tpl->Parse('NEW_MESSAGE', "ticket_new_message.tpl");
|
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case 'entwurfloeschen':
|
case 'entwurfloeschen':
|
||||||
if (!empty($drafted_messages)) {
|
if (!empty($drafted_messages)) {
|
||||||
$sql = "UPDATE ticket_nachricht SET ticket = '' WHERE id=".$drafted_messages[0]['id'];
|
$sql = "UPDATE ticket_nachricht SET ticket = '' WHERE id=".$drafted_messages[0]['id'];
|
||||||
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Das Element wurde gelöscht..</div>");
|
$this->app->DB->Update($sql);
|
||||||
|
$msg = $this->app->erp->base64_url_encode("<div class=\"success\">Der Entwurf wurde gelöscht.</div>");
|
||||||
header("Location: index.php?module=ticket&action=edit&msg=$msg&id=$id");
|
header("Location: index.php?module=ticket&action=edit&msg=$msg&id=$id");
|
||||||
|
$this->app->ExitXentral();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'addfile':
|
|
||||||
|
|
||||||
$msg .= $result['userfile'];
|
|
||||||
|
|
||||||
$this->app->Tpl->Set('EMAIL_AN', $input['email_an']);
|
|
||||||
$this->app->Tpl->Set('EMAIL_TEXT', $input['email_text']);
|
|
||||||
$this->app->Tpl->Set('EMAIL_BETREFF', $input['email_betreff']);
|
|
||||||
$this->app->Tpl->Set('EMAIL_SENDER', $input['email_sender']);
|
|
||||||
|
|
||||||
$this->app->YUI->AutoComplete("email_an","emailname");
|
|
||||||
$this->app->YUI->AutoComplete("email_cc","emailname");
|
|
||||||
$this->app->YUI->AutoComplete("email_bcc","emailname");
|
|
||||||
$this->app->YUI->CkEditor("email_text","internal", null, 'JQUERY');
|
|
||||||
$this->app->Tpl->Parse('NEW_MESSAGE', "ticket_new_message.tpl");
|
|
||||||
|
|
||||||
break;
|
|
||||||
*/
|
|
||||||
case 'absenden':
|
case 'absenden':
|
||||||
|
|
||||||
if (empty($drafted_messages)) {
|
if (empty($drafted_messages)) {
|
||||||
|
|
@ -373,12 +431,12 @@ class Ticket {
|
||||||
$drafted_messages[0]['betreff'].= " Ticket #".$result[0]['schluessel'];
|
$drafted_messages[0]['betreff'].= " Ticket #".$result[0]['schluessel'];
|
||||||
}
|
}
|
||||||
|
|
||||||
echo($drafted_messages[0]['id']."<br>");
|
// Attachments
|
||||||
echo($drafted_messages[0]['verfasser_replyto']."<br>");
|
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
|
||||||
echo($drafted_messages[0]['mail_replyto']."<br>");
|
|
||||||
echo($drafted_messages[0]['mail']."<br>");
|
foreach ($files as $file) {
|
||||||
echo($drafted_messages[0]['betreff']."<br>");
|
$msg .= $file."<br>";
|
||||||
echo($drafted_messages[0]['text']."<br>");
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$this->app->erp->MailSend(
|
$this->app->erp->MailSend(
|
||||||
|
|
@ -388,7 +446,8 @@ class Ticket {
|
||||||
$drafted_messages[0]['mail'],
|
$drafted_messages[0]['mail'],
|
||||||
$drafted_messages[0]['betreff'],
|
$drafted_messages[0]['betreff'],
|
||||||
$drafted_messages[0]['text'],
|
$drafted_messages[0]['text'],
|
||||||
'',0,false,'','',
|
$files,
|
||||||
|
0,false,'','',
|
||||||
true
|
true
|
||||||
) != 0
|
) != 0
|
||||||
) {
|
) {
|
||||||
|
|
@ -397,7 +456,7 @@ class Ticket {
|
||||||
$sql = "UPDATE `ticket_nachricht` SET `zeitausgang` = NOW(), `betreff` = '".$drafted_messages[0]['betreff']."' WHERE id = ".$drafted_messages[0]['id'];
|
$sql = "UPDATE `ticket_nachricht` SET `zeitausgang` = NOW(), `betreff` = '".$drafted_messages[0]['betreff']."' WHERE id = ".$drafted_messages[0]['id'];
|
||||||
$this->app->DB->Insert($sql);
|
$this->app->DB->Insert($sql);
|
||||||
|
|
||||||
$msg = '<div class="info">Die E-Mail wurde erfolgreich versendet an '.$input['email_an'].'. '.$this->app->erp->mail_error.'</div>';
|
$msg .= '<div class="info">Die E-Mail wurde erfolgreich versendet an '.$input['email_an'].'. '.$this->app->erp->mail_error.'</div>';
|
||||||
header("Location: index.php?module=ticket&action=edit&id=".$id."&msg=".$this->app->erp->base64_url_encode($msg));
|
header("Location: index.php?module=ticket&action=edit&id=".$id."&msg=".$this->app->erp->base64_url_encode($msg));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -433,24 +492,8 @@ class Ticket {
|
||||||
$this->app->Tpl->Set("NACHRICHT_EMAILADRESSE",$message['mail']);
|
$this->app->Tpl->Set("NACHRICHT_EMAILADRESSE",$message['mail']);
|
||||||
$this->app->Tpl->Set("NACHRICHT_TEXT",$message['text']);
|
$this->app->Tpl->Set("NACHRICHT_TEXT",$message['text']);
|
||||||
|
|
||||||
$file_attachments = $this->app->erp->GetDateiSubjektObjekt('Anhang','Ticket',$message['id']);
|
$this->app->Tpl->Set('NACHRICHT_ANHANG',"");
|
||||||
|
$this->add_attachments_html($id,$message['id'],'NACHRICHT_ANHANG',false);
|
||||||
if (!empty($file_attachments)) {
|
|
||||||
|
|
||||||
$this->app->Tpl->Add('NACHRICHT_ANHANG',"<hr style=\"border-style:solid; border-width:1px\">");
|
|
||||||
|
|
||||||
foreach ($file_attachments as $file_attachment) {
|
|
||||||
$this->app->Tpl->Add('NACHRICHT_ANHANG',
|
|
||||||
"<a href=\"index.php?module=dateien&action=send&id=".$file_attachment.
|
|
||||||
"\">".
|
|
||||||
htmlentities($this->app->erp->GetDateiName($file_attachment)).
|
|
||||||
" (".
|
|
||||||
$this->app->erp->GetDateiSize($file_attachment).
|
|
||||||
")".
|
|
||||||
"</a>".
|
|
||||||
"</br>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->app->Tpl->Parse('MESSAGES', "ticket_nachricht.tpl");
|
$this->app->Tpl->Parse('MESSAGES', "ticket_nachricht.tpl");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue