mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
Compare commits
5 Commits
0b4be37433
...
ce11caac12
Author | SHA1 | Date | |
---|---|---|---|
|
ce11caac12 | ||
|
bb3a68042d | ||
|
f8bfe19f1d | ||
|
d89c23ad0e | ||
|
cb3191393a |
@ -20,11 +20,11 @@
|
||||
<table width="100%" border="0" class="mkTableFormular">
|
||||
<legend>{|[STATUSICON]<b>Ticket <font color="blue">#[SCHLUESSEL]</font></b>|}</legend>
|
||||
<tr><td>{|Betreff|}:</td><td><input type="text" name="betreff" id="betreff" value="[BETREFF]" size="20"></td></tr>
|
||||
<tr><td>{|Letzte Aktion|}:</td><td>[ZEIT]</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>{|Adresse|}:</td><td><input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20"><a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]"><img src="./themes/new/images/forward.svg" border="0" style="top:6px; position:relative"></a></td></tr>
|
||||
<tr><td>{|Tags|}:</td><td><input type="text" name="tags" id="tags" value="[TAGS]" size="20"></td></tr>
|
||||
<tr><td>{|Letzte Aktion|}:</td><td>[ZEIT]</td></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
@ -172,6 +172,16 @@ class Ticket {
|
||||
return $erg;
|
||||
}
|
||||
|
||||
// Ensure status 'offen' on self-assigned tickets
|
||||
function ticket_set_self_assigned_status(array $ids) {
|
||||
$sql = "UPDATE ticket SET status = 'offen'
|
||||
WHERE
|
||||
status = 'neu'
|
||||
AND id IN (".implode(',',$ids).")
|
||||
AND warteschlange IN (SELECT label FROM warteschlangen WHERE adresse = '".$this->app->User->GetAdresse()."')";
|
||||
$this->app->DB->Update($sql);
|
||||
}
|
||||
|
||||
function ticket_list() {
|
||||
|
||||
// Process multi action
|
||||
@ -183,7 +193,7 @@ class Ticket {
|
||||
if($selectedId > 0) {
|
||||
$selectedIds[] = $selectedId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$status = $this->app->Secure->GetPOST('status');
|
||||
$warteschlange = $this->app->Secure->GetPOST('warteschlange');
|
||||
@ -194,9 +204,10 @@ class Ticket {
|
||||
}
|
||||
|
||||
$sql .= " WHERE id IN (".implode(",",$selectedIds).")";
|
||||
|
||||
$this->app->DB->Update($sql);
|
||||
|
||||
$this->ticket_set_self_assigned_status($selectedIds);
|
||||
|
||||
}
|
||||
|
||||
// List
|
||||
@ -488,6 +499,9 @@ class Ticket {
|
||||
$sql = "INSERT INTO ticket (".$columns.") VALUES (".$values.") ON DUPLICATE KEY UPDATE ".$update;
|
||||
$this->app->DB->Update($sql);
|
||||
$id = $this->app->DB->GetInsertID();
|
||||
|
||||
$this->ticket_set_self_assigned_status(array($id));
|
||||
|
||||
return($id);
|
||||
}
|
||||
|
||||
@ -578,7 +592,7 @@ class Ticket {
|
||||
|
||||
// Load values again from database
|
||||
|
||||
$sql = "SELECT t.id, t.schluessel, ".$this->app->erp->FormatDateTimeShort("zeit").", p.abkuerzung as projekt, t.bearbeiter, t.quelle, t.status, t.prio, t.adresse, t.kunde, CONCAT(w.label,' ',w.warteschlange) as warteschlange, t.mailadresse, t.betreff, t.zugewiesen, t.inbearbeitung, t.inbearbeitung_user, t.firma, t.notiz, t.bitteantworten, t.service, t.kommentar, t.privat, t.dsgvo, t.tags, t.nachrichten_anz, t.id FROM ticket t LEFT JOIN adresse a ON t.adresse = a.id LEFT JOIN projekt p on t.projekt = p.id LEFT JOIN warteschlangen w on t.warteschlange = w.label WHERE t.id=$id";
|
||||
$sql = "SELECT t.id, t.schluessel, ".$this->app->erp->FormatDateTimeShort("zeit",'zeit').", p.abkuerzung as projekt, t.bearbeiter, t.quelle, t.status, t.prio, t.adresse, t.kunde, CONCAT(w.label,' ',w.warteschlange) as warteschlange, t.mailadresse, t.betreff, t.zugewiesen, t.inbearbeitung, t.inbearbeitung_user, t.firma, t.notiz, t.bitteantworten, t.service, t.kommentar, t.privat, t.dsgvo, t.tags, t.nachrichten_anz, t.id FROM ticket t LEFT JOIN adresse a ON t.adresse = a.id LEFT JOIN projekt p on t.projekt = p.id LEFT JOIN warteschlangen w on t.warteschlange = w.label WHERE t.id=$id";
|
||||
|
||||
$ticket_from_db = $this->app->DB->SelectArr($sql)[0];
|
||||
|
||||
@ -776,12 +790,12 @@ class Ticket {
|
||||
// Attachments
|
||||
$files = $this->app->erp->GetDateiSubjektObjektDateiname('Anhang','Ticket',$drafted_messages[0]['id'],"");
|
||||
|
||||
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i';
|
||||
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,63})(?:\.[a-z]{2})?/i';
|
||||
|
||||
preg_match_all($pattern, $drafted_messages[0]['mail'], $matches);
|
||||
$to = $matches[0];
|
||||
|
||||
if ($drafted_messages[0]['mail_cc'] != '') {
|
||||
$pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i';
|
||||
preg_match_all($pattern, $drafted_messages[0]['mail_cc'], $matches);
|
||||
$cc = $matches[0];
|
||||
} else {
|
||||
|
@ -101,7 +101,7 @@
|
||||
unset($_POST['_ACTION']);
|
||||
unset($_POST['_SUBMIT']);
|
||||
|
||||
$error = ((function_exists($action)) ? $action() : '');
|
||||
$error = ((function_exists($action ?? '')) ? $action() : '');
|
||||
if($configfile=='') $error .= "<br>'configfile' for this step is missing";
|
||||
|
||||
if($error=='') {
|
||||
|
Loading…
Reference in New Issue
Block a user