mirror of
https://github.com/easy-wi/developer.git
synced 2025-02-20 11:23:28 +08:00
Merge pull request #1266 from Nexus633/master
Update PhpMailer (#1208), Fix Mailtransport, Fix a lot of bugs in Tickets
This commit is contained in:
commit
14f90f666b
@ -10,6 +10,8 @@
|
||||
<edit2>Bearbeitet von</edit2>
|
||||
<edit>In Bearbeitung</edit>
|
||||
<error_topic>Fehler: Keine Unterkategorie ausgewählt!</error_topic>
|
||||
<error_no_topic>Keine Kategorie vorhanden</error_no_topic>
|
||||
<error_no_topic2>Keine Unterkategorie vorhanden</error_no_topic2>
|
||||
<heading>Supportkategorien</heading>
|
||||
<name>Name</name>
|
||||
<new>Neue Kategorie anlegen</new>
|
||||
|
@ -9,7 +9,9 @@
|
||||
<default>Standard</default>
|
||||
<edit2>Redigeret af</edit2>
|
||||
<edit>Redigeret</edit>
|
||||
<error_topic></error_topic>
|
||||
<error_topic>Fejl: Ingen underkategori valgt!</error_topic>
|
||||
<error_no_topic>Ingen kategori tilgængelig</error_no_topic>
|
||||
<error_no_topic2>Ingen underkategori tilgængelig</error_no_topic2>
|
||||
<heading>Support Kategori</heading>
|
||||
<name>Navn</name>
|
||||
<new>Tilføj kategori</new>
|
||||
|
@ -10,6 +10,8 @@
|
||||
<edit2>Modificato da</edit2>
|
||||
<edit>Modificato</edit>
|
||||
<error_topic>Errore: Nessun sottoargomento selezionato!</error_topic>
|
||||
<error_no_topic>Nessuna categoria disponibile</error_no_topic>
|
||||
<error_no_topic2>Nessuna sottocategoria disponibile</error_no_topic2>
|
||||
<heading>Tipologia di supporto</heading>
|
||||
<name>Nome</name>
|
||||
<new>Aggiungi categoria</new>
|
||||
|
@ -10,6 +10,8 @@
|
||||
<edit2>Edited by</edit2>
|
||||
<edit>Edited</edit>
|
||||
<error_topic>Error: No Subtopic selected!</error_topic>
|
||||
<error_no_topic>Нет доступных категорий</error_no_topic>
|
||||
<error_no_topic2>Подкатегория недоступна</error_no_topic2>
|
||||
<heading>Support category</heading>
|
||||
<name>Name</name>
|
||||
<new>Add category</new>
|
||||
|
@ -10,6 +10,8 @@
|
||||
<edit2>Edited by</edit2>
|
||||
<edit>Edited</edit>
|
||||
<error_topic>Error: No Subtopic selected!</error_topic>
|
||||
<error_no_topic>No category available</error_no_topic>
|
||||
<error_no_topic2>No subcategory available</error_no_topic2>
|
||||
<heading>Support category</heading>
|
||||
<name>Name</name>
|
||||
<new>Add category</new>
|
||||
|
@ -462,11 +462,12 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
|
||||
} else if ($ui->smallletters('action', 2, 'post') == 'wr') {
|
||||
|
||||
$query = $sql->prepare("SELECT `userid`,`state` FROM `tickets` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query = $sql->prepare("SELECT `userid`,`state`,`topic` FROM `tickets` WHERE `id`=? AND `resellerid`=? LIMIT 1");
|
||||
$query->execute(array($id,$resellerLockupID));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$userid = $row['userid'];
|
||||
$state = $row['state'];
|
||||
$topicid = $row['topic'];
|
||||
}
|
||||
|
||||
if (isset($state) and $state != 'C' and $ui->w('state',1, 'post') != 'C') {
|
||||
@ -495,7 +496,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$query = $sql->prepare("SELECT `mail_ticket` FROM `userdata` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($userid));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($row['mail_ticket'] == 'Y') sendmail('emailnewticket',$userid,$ui->post['ticket'], array($id,$admin_id));
|
||||
if ($row['mail_ticket'] == 'Y') sendmail('emailnewticket',$userid,$ui->post['ticket'], array($id,$admin_id,$topicid));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -62,7 +62,19 @@ while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$table[$row['id']] = $topic;
|
||||
}
|
||||
|
||||
if (empty($table)) {
|
||||
if (!defined('EASYWIDIR')) {
|
||||
define('EASYWIDIR', dirname(__FILE__));
|
||||
}
|
||||
include(EASYWIDIR . '/stuff/methods/functions.php');
|
||||
$sprache = getlanguagefile('tickets', $user_language, $reseller_id);
|
||||
$table[0] = $sprache->error_no_topic2;
|
||||
$topic_require = false;
|
||||
}
|
||||
|
||||
require_once IncludeTemplate($template_to_use, 'ajax_userpanel_ticket_category.tpl', 'ajax');
|
||||
|
@ -38,6 +38,9 @@
|
||||
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
use PHPMailer\PHPMailer\Exception;
|
||||
|
||||
if (!defined('EASYWIDIR')) {
|
||||
define('EASYWIDIR', '');
|
||||
}
|
||||
@ -649,12 +652,17 @@ if (!function_exists('passwordgenerate')) {
|
||||
include(EASYWIDIR . '/stuff/keyphrasefile.php');
|
||||
}
|
||||
if (!class_exists('PHPMailer')) {
|
||||
include(EASYWIDIR . '/third_party/phpmailer/PHPMailerAutoload.php');
|
||||
|
||||
include(EASYWIDIR . '/third_party/phpmailer6/Exception.php');
|
||||
include(EASYWIDIR . '/third_party/phpmailer6/PHPMailer.php');
|
||||
include(EASYWIDIR . '/third_party/phpmailer6/SMTP.php');
|
||||
}
|
||||
|
||||
if ($template == 'emailnewticket') {
|
||||
$writerid = $shorten[1];
|
||||
$topicid = $shorten[2];
|
||||
$shorten = $shorten[0];
|
||||
|
||||
}
|
||||
|
||||
//Load costomer
|
||||
@ -734,7 +742,17 @@ if (!function_exists('passwordgenerate')) {
|
||||
$username = ($row['vname'] . ' ' . $row['name'] == ' ') ? $row['cname'] : $row['vname'] . ' ' . $row['name'];
|
||||
}
|
||||
|
||||
$query = $sql->prepare("SELECT `topic` FROM `ticket_topics` WHERE `id`=? LIMIT 1");
|
||||
$query->execute(array($topicid));
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
$topicname = $row['topic'];
|
||||
}
|
||||
|
||||
if(isset($topicname)){
|
||||
$topic = '#' . $shorten . ' | ' . $topicname;
|
||||
}else{
|
||||
$topic = '#' . $shorten;
|
||||
}
|
||||
|
||||
|
||||
} else if (isset($dataTemplate['subject'])) {
|
||||
@ -886,7 +904,7 @@ if (!function_exists('passwordgenerate')) {
|
||||
));
|
||||
|
||||
} else {
|
||||
$smtpConnect = $mail->smtpConnect();
|
||||
$smtpConnect = true;
|
||||
}
|
||||
|
||||
if ($smtpConnect and $mail->send()) {
|
||||
|
@ -62,6 +62,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
|
||||
$table = array();
|
||||
$table2 = array();
|
||||
$topic_require = true;
|
||||
|
||||
$i = 1;
|
||||
|
||||
@ -85,6 +86,11 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
$topic = $row['topic'];
|
||||
}
|
||||
|
||||
if (empty($topic)) {
|
||||
$row['id'] = 0;
|
||||
$topic = $sprache->error_no_topic;
|
||||
}
|
||||
|
||||
$table[] = array('id' => $row['id'], 'topic' => $topic);
|
||||
|
||||
if ($i == 1) {
|
||||
@ -108,18 +114,32 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
|
||||
$table2[] = array('id' => $row2['id'], 'topic' => $topic);
|
||||
}
|
||||
|
||||
if(!isset($table2) || empty($table2)){
|
||||
$table2[] = array('id' => 0, 'topic' => $sprache->error_no_topic2);
|
||||
$topic_require = false;
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
||||
}
|
||||
|
||||
if(!isset($table) || empty($table)){
|
||||
$table[] = array('id' => 0, 'topic' => $sprache->error_no_topic);
|
||||
$table2[] = array('id' => 0, 'topic' => $sprache->error_no_topic2);
|
||||
}
|
||||
|
||||
$template_file = 'userpanel_tickets_add.tpl';
|
||||
|
||||
} else if ($ui->smallletters('action', 2, 'post') == 'ad') {
|
||||
|
||||
if ($ui->id('topic', 30, 'post')) {
|
||||
if ($ui->id('topic', 30, 'post') || $ui->post['topic'] == 0) {
|
||||
if($ui->post['topic'] == 0){
|
||||
$topic = $ui->post['maintopic'];
|
||||
}else{
|
||||
$topic = $ui->id('topic', 30, 'post');
|
||||
}
|
||||
$userPriority = $ui->id('userPriority', 30, 'post');
|
||||
$ticketText = htmlentities($ui->post['ticket']);
|
||||
|
||||
@ -143,7 +163,7 @@ if ($ui->w('action', 4, 'post') and !token(true)) {
|
||||
}
|
||||
|
||||
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($row['mail_ticket'] == 'Y') sendmail('emailnewticket', $row['id'], $ticketText, array($lastID, $user_id));
|
||||
if ($row['mail_ticket'] == 'Y') sendmail('emailnewticket', $row['id'], $ticketText, array($lastID, $user_id, $topic));
|
||||
}
|
||||
|
||||
$template_file = $spracheResponse->table_add;
|
||||
|
@ -51,7 +51,7 @@
|
||||
<td><?php echo $table_row['priority'];?></td>
|
||||
<td><?php echo $table_row['userPriority'];?></td>
|
||||
<td><?php echo $table_row['supporter'];?></td>
|
||||
<td><a href="switch.php?id=<?php echo $table_row['user_id'];?>"><?php echo $table_row['user'];?></a></td>
|
||||
<td><a href="switch.php?id=<?php echo $table_row['user_id'];?>" target="_blank"><?php echo $table_row['user'];?></a></td>
|
||||
<td><?php echo $table_row['writedate'];?></td>
|
||||
<td><a href="admin.php?w=ti&d=md&id=<?php echo $table_row['id'];?>"><span class="btn btn-primary btn-sm"><i class="fa fa-pencil-square-o"></i> <?php echo $gsprache->mod;?></span></a></td>
|
||||
</tr>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<option></option>
|
||||
<?php foreach($table as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" ><?php echo $v;?></option>>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach($table as $k=>$v){ ?>
|
||||
<option value="<?php echo $k;?>" <?php if($i == 0) echo "selected";?>><?php echo $v;?></option>
|
||||
<?php $i++; } ?>
|
@ -33,20 +33,22 @@
|
||||
<div class="form-group">
|
||||
<label for="topic_maintopic"><?php echo $sprache->topic_name;?></label>
|
||||
<select class="form-control" id="topic_maintopic" name="maintopic" required="required">
|
||||
<option></option>
|
||||
<?php foreach ($table as $table_row){ ?>
|
||||
<option value="<?php echo $table_row['id'];?>" ><?php echo $table_row['topic'];?></option>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($table as $table_row){ ?>
|
||||
<option value="<?php echo $table_row['id'];?>" <?php if($i == 0) echo "selected"; ?>><?php echo $table_row['topic'];?></option>
|
||||
<?php $i++; } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="topic_name_sub"><?php echo $sprache->topic_name_sub;?></label>
|
||||
<select class="form-control" id="topic_name_sub" name="topic" required="required">
|
||||
<option></option>
|
||||
<?php foreach ($table2 as $table_row2){ ?>
|
||||
<option value="<?php echo $table_row2['id'];?>" ><?php echo $table_row2['topic'];?></option>>
|
||||
<?php } ?>
|
||||
<?php
|
||||
$i = 0;
|
||||
foreach ($table2 as $table_row2){ ?>
|
||||
<option value="<?php echo $table_row2['id'];?>" <?php if($i == 0) echo "selected"; ?>><?php echo $table_row2['topic'];?></option>
|
||||
<?php $i++; } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user