Merge remote-tracking branch 'origin/master' into 0.10.0

This commit is contained in:
Michael Kaufmann
2018-06-21 08:12:00 +02:00
6 changed files with 352 additions and 316 deletions

View File

@@ -415,7 +415,7 @@ if ($page == 'domains' || $page == 'overview') {
Domains::getLocal($userinfo, $_POST)->update();
} catch (Exception $e) {
dynamic_error($e->getMessage());
}
}
redirectTo($filename, array(
'page' => $page,
's' => $s

View File

@@ -47,7 +47,7 @@ if ($page == 'overview') {
WHERE `d`.`customerid`= :customerid
AND `d`.`email_only`='0'
AND `d`.`id` <> :standardsubdomain " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()
);
);
Database::pexecute($domains_stmt, array("customerid" => $userinfo['customerid'], "standardsubdomain" => $userinfo['standardsubdomain']));
$paging->setEntries(Database::num_rows());
$sortcode = $paging->getHtmlSortCode($lng);
@@ -58,16 +58,16 @@ if ($page == 'overview') {
$parentdomains_count = 0;
$domains_count = 0;
$domain_array = array();
while ($row = $domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$row['domain'] = $idna_convert->decode($row['domain']);
$row['aliasdomain'] = $idna_convert->decode($row['aliasdomain']);
$row['domainalias'] = $idna_convert->decode($row['domainalias']);
if ($row['parentdomainid'] == '0' && $row['caneditdomain'] == '1') {
$parentdomains_count++;
}
/**
* check for set ssl-certs to show different state-icons
*/
@@ -91,29 +91,29 @@ if ($page == 'overview') {
}
}
}
$row['termination_date'] = str_replace("0000-00-00", "", $row['termination_date']);
if($row['termination_date'] != "") {
$cdate = strtotime($row['termination_date'] . " 23:59:59");
$today = time();
if($cdate < $today) {
$row['termination_css'] = 'domain-expired';
} else {
$row['termination_css'] = 'domain-canceled';
}
}
$domains_count++;
$domain_array[$row['domain']] = $row;
}
ksort($domain_array);
$domain_id_array = array();
foreach ($domain_array as $sortkey => $row) {
$domain_id_array[$row['id']] = $sortkey;
}
$domain_sort_array = array();
foreach ($domain_array as $sortkey => $row) {
if ($row['parentdomainid'] == 0) {
@@ -122,45 +122,45 @@ if ($page == 'overview') {
// when searching and the results are subdomains only, we need to get
// the parent domain to this subdomain
if (!isset($domain_id_array[$row['parentdomainid']])) {
$domain_id_array[$row['parentdomainid']] = "[parent-domain]";
$domain_id_array[$row['parentdomainid']] = "[parent-domain]";
}
$domain_sort_array[$domain_id_array[$row['parentdomainid']]][$sortkey] = $row;
}
}
$domain_array = array();
if ($paging->sortfield == 'd.domain' && $paging->sortorder == 'asc') {
ksort($domain_sort_array);
} elseif ($paging->sortfield == 'd.domain' && $paging->sortorder == 'desc') {
krsort($domain_sort_array);
}
$i = 0;
foreach ($domain_sort_array as $sortkey => $domain_array) {
if ($paging->checkDisplay($i)) {
if (isset($domain_array[$sortkey])) {
$row = htmlentities_array($domain_array[$sortkey]);
if (Settings::Get('system.awstats_enabled') == '1') {
$statsapp = 'awstats';
$statsapp = 'awstats';
} else {
$statsapp = 'webalizer';
$statsapp = 'webalizer';
}
eval("\$domains.=\"" . getTemplate("domains/domains_delimiter") . "\";");
}
if ($paging->sortfield == 'd.domain' && $paging->sortorder == 'asc') {
ksort($domain_array);
} elseif ($paging->sortfield == 'd.domain' && $paging->sortorder == 'desc') {
krsort($domain_array);
}
foreach ($domain_array as $row) {
if (strpos($row['documentroot'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = makeCorrectDir(str_replace($userinfo['documentroot'], "/", $row['documentroot']));
}
// get ssl-ips if activated
$show_ssledit = false;
if (Settings::Get('system.use_ssl') == '1' && domainHasSslIpPort($row['id']) && $row['caneditdomain'] == '1' && $row['letsencrypt'] == 0) {
@@ -170,10 +170,10 @@ if ($page == 'overview') {
eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";");
}
}
$i+= count($domain_array);
}
eval("echo \"" . getTemplate("domains/domainlist") . "\";");
} elseif ($action == 'delete' && $id != 0) {
try {
@@ -184,10 +184,10 @@ if ($page == 'overview') {
dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
$alias_stmt = Database::prepare("SELECT COUNT(`id`) AS `count` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `aliasdomain` = :aliasdomain");
$alias_check = Database::pexecute_first($alias_stmt, array("aliasdomain" => $id));
if (isset($result['parentdomainid']) && $result['parentdomainid'] != '0' && $alias_check['count'] == 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
@@ -218,14 +218,14 @@ if ($page == 'overview') {
AND `email_only` = '0'
AND `caneditdomain` = '1'
ORDER BY `domain` ASC"
);
);
Database::pexecute($stmt, array("customerid" => $userinfo['customerid']));
$domains = '';
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$domains .= makeoption($idna_convert->decode($row['domain']), $row['domain']);
}
$aliasdomains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true);
$domains_stmt = Database::prepare("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c`
WHERE `d`.`aliasdomain` IS NULL
@@ -235,13 +235,13 @@ if ($page == 'overview') {
AND `d`.`email_only`='0'
AND `d`.`customerid`= :customerid
ORDER BY `d`.`domain` ASC"
);
);
Database::pexecute($domains_stmt, array("customerid" => $userinfo['customerid']));
while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$aliasdomains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id']);
}
$redirectcode = '';
if (Settings::Get('customredirect.enabled') == '1') {
$codes = getRedirectCodesArray();
@@ -249,7 +249,7 @@ if ($page == 'overview') {
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id']);
}
}
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$ssl_ip_stmt = Database::prepare("
@@ -263,10 +263,10 @@ if ($page == 'overview') {
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
$openbasedir = makeoption($lng['domain']['docroot'], 0, NULL, true) . makeoption($lng['domain']['homedir'], 1, NULL, true);
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid']);
$phpconfigs = '';
$has_phpconfigs = false;
if (isset($userinfo['allowed_phpconfigs']) && !empty($userinfo['allowed_phpconfigs']))
@@ -287,18 +287,18 @@ if ($page == 'overview') {
}
}
}
$subdomain_add_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_add.php';
$subdomain_add_form = htmlform::genHTMLForm($subdomain_add_data);
$title = $subdomain_add_data['domain_add']['title'];
$image = $subdomain_add_data['domain_add']['image'];
eval("echo \"" . getTemplate("domains/domains_add") . "\";");
}
}
} elseif ($action == 'edit' && $id != 0) {
try {
$json_result = SubDomains::getLocal($userinfo, array(
'id' => $id
@@ -307,7 +307,7 @@ if ($page == 'overview') {
dynamic_error($e->getMessage());
}
$result = json_decode($json_result, true)['data'];
if (isset($result['customerid']) && $result['customerid'] == $userinfo['customerid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
try {
@@ -318,7 +318,7 @@ if ($page == 'overview') {
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$result['domain'] = $idna_convert->decode($result['domain']);
$domains = makeoption($lng['domains']['noaliasdomain'], 0, $result['aliasdomain'], true);
// also check ip/port combination to be the same, #176
$domains_stmt = Database::prepare("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d` , `" . TABLE_PANEL_CUSTOMERS . "` `c` , `".TABLE_DOMAINTOIP."` `dip`
@@ -334,13 +334,13 @@ if ($page == 'overview') {
WHERE `id_domain` = :id)
GROUP BY `d`.`id`, `d`.`domain`
ORDER BY `d`.`domain` ASC"
);
);
Database::pexecute($domains_stmt, array("id" => $result['id'], "customerid" => $userinfo['customerid']));
while ($row_domain = $domains_stmt->fetch(PDO::FETCH_ASSOC)) {
$domains .= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']);
}
if (preg_match('/^https?\:\/\//', $result['documentroot']) && validateUrl($result['documentroot'])) {
if (Settings::Get('panel.pathedit') == 'Dropdown') {
$urlvalue = $result['documentroot'];
@@ -353,7 +353,7 @@ if ($page == 'overview') {
$urlvalue = '';
$pathSelect = makePathfield($userinfo['documentroot'], $userinfo['guid'], $userinfo['guid'], $result['documentroot']);
}
$redirectcode = '';
if (Settings::Get('customredirect.enabled') == '1') {
$def_code = getDomainRedirectId($id);
@@ -362,7 +362,7 @@ if ($page == 'overview') {
$redirectcode .= makeoption($rc['code']. ' ('.$lng['redirect_desc'][$rc['desc']].')', $rc['id'], $def_code);
}
}
// check if we at least have one ssl-ip/port, #1179
$ssl_ipsandports = '';
$ssl_ip_stmt = Database::prepare("
@@ -376,13 +376,13 @@ if ($page == 'overview') {
if (isset($resultX['countSSL']) && (int)$resultX['countSSL'] > 0) {
$ssl_ipsandports = 'notempty';
}
// Fudge the result for ssl_redirect to hide the Let's Encrypt steps
$result['temporary_ssl_redirect'] = $result['ssl_redirect'];
$result['ssl_redirect'] = ($result['ssl_redirect'] == 0 ? 0 : 1);
$openbasedir = makeoption($lng['domain']['docroot'], 0, $result['openbasedir_path'], true) . makeoption($lng['domain']['homedir'], 1, $result['openbasedir_path'], true);
// create serveralias options
$serveraliasoptions = "";
$_value = '2';
@@ -394,19 +394,19 @@ if ($page == 'overview') {
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_wildcard'], '0', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_www'], '1', $_value, true, true);
$serveraliasoptions .= makeoption($lng['domains']['serveraliasoption_none'], '2', $_value, true, true);
$ips_stmt = Database::prepare("SELECT `p`.`ip` AS `ip` FROM `".TABLE_PANEL_IPSANDPORTS."` `p`
LEFT JOIN `".TABLE_DOMAINTOIP."` `dip`
ON ( `dip`.`id_ipandports` = `p`.`id` )
WHERE `dip`.`id_domain` = :id_domain
GROUP BY `p`.`ip`"
);
);
Database::pexecute($ips_stmt, array("id_domain" => $result['id']));
$result_ipandport['ip'] = '';
while ($rowip = $ips_stmt->fetch(PDO::FETCH_ASSOC)) {
$result_ipandport['ip'] .= $rowip['ip'] . "<br />";
}
$phpconfigs = '';
$has_phpconfigs = false;
if (isset($userinfo['allowed_phpconfigs']) && !empty($userinfo['allowed_phpconfigs']))
@@ -427,16 +427,16 @@ if ($page == 'overview') {
}
}
}
$domainip = $result_ipandport['ip'];
$result = htmlentities_array($result);
$subdomain_edit_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domains_edit.php';
$subdomain_edit_form = htmlform::genHTMLForm($subdomain_edit_data);
$title = $subdomain_edit_data['domain_edit']['title'];
$image = $subdomain_edit_data['domain_edit']['image'];
eval("echo \"" . getTemplate("domains/domains_edit") . "\";");
}
} else {
@@ -444,7 +444,7 @@ if ($page == 'overview') {
}
}
} elseif ($page == 'domainssleditor') {
if ($action == '' || $action == 'view') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$do_insert = isset($_POST['do_insert']) ? (($_POST['do_insert'] == 1) ? true : false) : false;
@@ -460,12 +460,12 @@ if ($page == 'overview') {
// back to domain overview
redirectTo($filename, array('page' => 'domains', 's' => $s));
}
$stmt = Database::prepare("SELECT * FROM `".TABLE_PANEL_DOMAIN_SSL_SETTINGS."`
WHERE `domainid`= :domainid"
);
);
$result = Database::pexecute_first($stmt, array("domainid" => $id));
$do_insert = false;
// if no entry can be found, behave like we have empty values
if (!is_array($result) || !isset($result['ssl_cert_file'])) {
@@ -477,23 +477,23 @@ if ($page == 'overview') {
);
$do_insert = true;
}
$result = htmlentities_array($result);
$ssleditor_data = include_once dirname(__FILE__).'/lib/formfields/customer/domains/formfield.domain_ssleditor.php';
$ssleditor_form = htmlform::genHTMLForm($ssleditor_data);
$title = $ssleditor_data['domain_ssleditor']['title'];
$image = $ssleditor_data['domain_ssleditor']['image'];
eval("echo \"" . getTemplate("domains/domain_ssleditor") . "\";");
}
} elseif ($page == 'domaindnseditor' && $userinfo['dnsenabled'] == '1' && Settings::Get('system.dnsenabled') == '1') {
require_once __DIR__.'/dns_editor.php';
} elseif ($page == 'sslcertificates') {
require_once __DIR__.'/ssl_certificates.php';
}
}

View File

@@ -238,7 +238,11 @@ if ($page == 'overview') {
}
} elseif ($action == 'answer' && $id != 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$replyticket = ticket::getInstanceOf($userinfo, -1);
try {
$replyticket = ticket::getInstanceOf($userinfo, -1);
} catch(Exception $e) {
standard_error($e->getMessage());
}
$replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false);
$replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false);
$replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false);
@@ -246,6 +250,11 @@ if ($page == 'overview') {
if ($replyticket->Get('message') == null) {
standard_error(array('stringisempty', 'mymessage'));
} else {
try {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
} catch(Exception $e) {
standard_error($e->getMessage());
}
$now = time();
$replyticket->Set('customer', (int)$userinfo['customerid'], true, true);
$replyticket->Set('lastchange', $now, true, true);
@@ -256,8 +265,6 @@ if ($page == 'overview') {
$replyticket->Insert();
// Update priority if changed
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
if ($replyticket->Get('priority') != $mainticket->Get('priority')) {
$mainticket->Set('priority', $replyticket->Get('priority'), true);
}
@@ -272,7 +279,11 @@ if ($page == 'overview') {
}
} else {
$ticket_replies = '';
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
try {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
} catch(Exception $e) {
standard_error($e->getMessage());
}
$dt = date("d.m.Y H:i\h", $mainticket->Get('dt'));
$status = ticket::getStatusText($lng, $mainticket->Get('status'));
@@ -351,7 +362,11 @@ if ($page == 'overview') {
} elseif ($action == 'close' && $id != 0) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
try {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
} catch(Exception $e) {
standard_error($e->getMessage());
}
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '3', true, true);
@@ -359,7 +374,11 @@ if ($page == 'overview') {
$log->logAction(USR_ACTION, LOG_NOTICE, "closed support-ticket '" . $mainticket->Get('subject') . "'");
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
try {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
} catch(Exception $e) {
standard_error($e->getMessage());
}
ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject'));
}
} elseif ($action == 'reopen' && $id != 0) {
@@ -377,7 +396,11 @@ if ($page == 'overview') {
}
$now = time();
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
try {
$mainticket = ticket::getInstanceOf($userinfo, (int)$id);
} catch(Exception $e) {
standard_error($e->getMessage());
}
$mainticket->Set('lastchange', $now, true, true);
$mainticket->Set('lastreplier', '0', true, true);
$mainticket->Set('status', '0', true, true);

View File

@@ -1340,6 +1340,12 @@ class Domains extends ApiCommand implements ResourceEntity
} elseif ($result['wwwserveralias'] != $wwwserveralias || $result['letsencrypt'] != $letsencrypt) {
// or when wwwserveralias or letsencrypt was changed
triggerLetsEncryptCSRForAliasDestinationDomain($aliasdomain, $this->logger());
if ($aliasdomain === 0) {
// in case the wwwserveralias is set on a main domain, $aliasdomain is 0
// --> the call just above to triggerLetsEncryptCSRForAliasDestinationDomain
// is a noop...let's repeat it with the domain id of the main domain
triggerLetsEncryptCSRForAliasDestinationDomain($id, $this->logger());
}
}
$this->logger()->logAction(ADM_ACTION, LOG_WARNING, "[API] updated domain '" . $result['domain'] . "'");

View File

@@ -19,46 +19,53 @@
*
* Support Tickets - Tickets-Class
*/
class ticket {
class ticket
{
/**
* Userinfo
*
* @var array
*/
private $userinfo = array();
/**
* Ticket ID
* @var tid
*
* @var int
*/
private $tid = - 1;
/**
* Ticket Data Array
* @var t_data
*
* @var array
*/
private $t_data = array();
/**
* Ticket-Object-Array
* @var tickets
*
* @var ticket[]
*/
static private $tickets = array();
private static $tickets = array();
/**
* Class constructor.
*
* @param array userinfo
* @param int ticket id
* @param
* array userinfo
* @param
* int ticket id
*/
private function __construct($userinfo, $tid = - 1) {
private function __construct($userinfo, $tid = - 1)
{
$this->userinfo = $userinfo;
$this->tid = $tid;
// initialize data array
$this->initData();
// read data from database
$this->readData();
}
@@ -66,21 +73,24 @@ class ticket {
/**
* Singleton ftw ;-)
*
* @param array userinfo
* @param int ticket id
* @param
* array userinfo
* @param
* int ticket id
*/
static public function getInstanceOf($_usernfo, $_tid) {
if (!isset(self::$tickets[$_tid])) {
self::$tickets[$_tid] = new ticket($_usernfo, $_tid);
static public function getInstanceOf($_usernfo, $_tid)
{
if (! isset(self::$tickets[$_tid . '-' . $_usernfo['userid']])) {
self::$tickets[$_tid . '-' . $_usernfo['userid']] = new ticket($_usernfo, $_tid);
}
return self::$tickets[$_tid];
return self::$tickets[$_tid . '-' . $_usernfo['userid']];
}
/**
* Initialize data-array
*/
private function initData() {
private function initData()
{
$this->Set('customer', 0, true, true);
$this->Set('admin', 1, true, true);
$this->Set('subject', '', true, true);
@@ -100,16 +110,33 @@ class ticket {
/**
* Read ticket data from database.
*/
private function readData() {
if (isset($this->tid)
&& $this->tid != - 1
) {
$_ticket_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = :tid'
);
$_ticket = Database::pexecute_first($_ticket_stmt, array('tid' => $this->tid));
private function readData()
{
if (isset($this->tid) && $this->tid != - 1) {
if ($this->userinfo['customerid'] > 0) {
$_ticket_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = :tid AND `customerid` = :cid');
$tdata = array(
'tid' => $this->tid,
'cid' => $this->userinfo['customerid']
);
} else {
$_ticket_stmt = Database::prepare('
SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = :tid' . ($this->userinfo['customers_see_all'] ? '' : ' AND `adminid` = :adminid'));
$tdata = array(
'tid' => $this->tid
);
if ($this->userinfo['customers_see_all'] != '1') {
$tdata['adminid'] = $this->userinfo['adminid'];
}
}
$_ticket = Database::pexecute_first($_ticket_stmt, $tdata);
if ($_ticket == false) {
throw new Exception("Invalid ticket id");
}
$this->Set('customer', $_ticket['customerid'], true, false);
$this->Set('admin', $_ticket['adminid'], true, false);
$this->Set('subject', $_ticket['subject'], true, false);
@@ -130,8 +157,8 @@ class ticket {
/**
* Insert data to database
*/
public function Insert() {
public function Insert()
{
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TICKETS . "` SET
`customerid` = :customerid,
@@ -146,8 +173,7 @@ class ticket {
`status` = :status,
`lastreplier` = :lastreplier,
`by` = :by,
`answerto` = :answerto"
);
`answerto` = :answerto");
$ins_data = array(
'customerid' => $this->Get('customer'),
'adminid' => $this->Get('admin'),
@@ -171,8 +197,9 @@ class ticket {
/**
* Update data in database
*/
public function Update() {
public function Update()
{
// Update "main" ticket
$upd_stmt = Database::prepare('
UPDATE `' . TABLE_PANEL_TICKETS . '` SET
@@ -180,8 +207,7 @@ class ticket {
`lastchange` = :lastchange,
`status` = :status,
`lastreplier` = :lastreplier
WHERE `id` = :tid'
);
WHERE `id` = :tid');
$upd_data = array(
'priority' => $this->Get('priority'),
'lastchange' => $this->Get('lastchange'),
@@ -196,38 +222,44 @@ class ticket {
/**
* Moves a ticket to the archive
*/
public function Archive() {
public function Archive()
{
// Update "main" ticket
$upd_stmt = Database::prepare('
UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `id` = :tid'
);
Database::pexecute($upd_stmt, array('tid' => $this->tid));
UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `id` = :tid');
Database::pexecute($upd_stmt, array(
'tid' => $this->tid
));
// Update "answers" to ticket
$upd_stmt = Database::prepare('
UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `answerto` = :tid'
);
Database::pexecute($upd_stmt, array('tid' => $this->tid));
UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `answerto` = :tid');
Database::pexecute($upd_stmt, array(
'tid' => $this->tid
));
return true;
}
/**
* Remove ticket from database
*/
public function Delete() {
public function Delete()
{
// Delete "main" ticket
$del_stmt = Database::prepare('
DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = :tid'
);
Database::pexecute($del_stmt, array('tid' => $this->tid));
DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = :tid');
Database::pexecute($del_stmt, array(
'tid' => $this->tid
));
// Delete "answers" to ticket"
$del_stmt = Database::prepare('
DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = :tid'
);
Database::pexecute($del_stmt, array('tid' => $this->tid));
DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = :tid');
Database::pexecute($del_stmt, array(
'tid' => $this->tid
));
return true;
}
@@ -237,16 +269,17 @@ class ticket {
public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null)
{
global $mail, $theme;
// Some checks are to be made here in the future
if ($customerid != - 1) {
// Get e-mail message for customer
$usr_stmt = Database::prepare('
SELECT `name`, `firstname`, `company`, `email`
FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = :customerid'
);
$usr = Database::pexecute_first($usr_stmt, array('customerid' => $customerid));
FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = :customerid');
$usr = Database::pexecute_first($usr_stmt, array(
'customerid' => $customerid
));
$replace_arr = array(
'FIRSTNAME' => $usr['firstname'],
'NAME' => $usr['name'],
@@ -268,23 +301,21 @@ class ticket {
SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid`= :adminid
AND `language`= :lang
AND `templategroup`= 'mails' AND `varname`= :tplsubject"
);
AND `templategroup`= 'mails' AND `varname`= :tplsubject");
$result = Database::pexecute_first($result_stmt, $tpl_seldata);
$mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_subject), $replace_arr));
unset($tpl_seldata['tplsubject']);
$tpl_seldata['tplmailbody'] = $template_body;
$result_stmt = Database::prepare("
SELECT `value` FROM `" . TABLE_PANEL_TEMPLATES . "`
WHERE `adminid`= :adminid
AND `language`= :lang
AND `templategroup`= 'mails' AND `varname`= :tplmailbody"
);
AND `templategroup`= 'mails' AND `varname`= :tplmailbody");
$result = Database::pexecute_first($result_stmt, $tpl_seldata);
$mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_body), $replace_arr));
if ($customerid != - 1) {
$_mailerror = false;
try {
@@ -294,28 +325,30 @@ class ticket {
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']);
$mail->Send();
} catch(phpmailerException $e) {
} catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'));
$rstlog = FroxlorLogger::getInstanceOf(array(
'loginname' => 'ticket_class'
));
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $usr['email']);
}
$mail->ClearAddresses();
} else {
$admin_stmt = Database::prepare("
SELECT `name`, `email` FROM `" . TABLE_PANEL_ADMINS . "`
WHERE `adminid` = :adminid"
);
$admin = Database::pexecute_first($admin_stmt, array('adminid' => $this->userinfo['adminid']));
WHERE `adminid` = :adminid");
$admin = Database::pexecute_first($admin_stmt, array(
'adminid' => $this->userinfo['adminid']
));
$_mailerror = false;
try {
$mail->SetFrom(Settings::Get('ticket.noreply_email'), Settings::Get('ticket.noreply_name'));
@@ -324,20 +357,22 @@ class ticket {
$mail->MsgHTML(str_replace("\n", "<br />", $mail_body));
$mail->AddAddress($admin['email'], $admin['name']);
$mail->Send();
} catch(phpmailerException $e) {
} catch (phpmailerException $e) {
$mailerr_msg = $e->errorMessage();
$_mailerror = true;
} catch (Exception $e) {
$mailerr_msg = $e->getMessage();
$_mailerror = true;
}
if ($_mailerror) {
$rstlog = FroxlorLogger::getInstanceOf(array('loginname' => 'ticket_class'));
$rstlog = FroxlorLogger::getInstanceOf(array(
'loginname' => 'ticket_class'
));
$rstlog->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg);
standard_error('errorsendingmail', $admin['email']);
}
$mail->ClearAddresses();
}
}
@@ -345,21 +380,18 @@ class ticket {
/**
* Add a support-categories
*/
static public function addCategory($_category = null, $_admin = 1, $_order = 1) {
if ($_category != null
&& $_category != ''
) {
static public function addCategory($_category = null, $_admin = 1, $_order = 1)
{
if ($_category != null && $_category != '') {
if ($_order < 1) {
$_order = 1;
}
$ins_stmt = Database::prepare("
INSERT INTO `" . TABLE_PANEL_TICKET_CATS . "` SET
`name` = :name,
`adminid` = :adminid,
`logicalorder` = :lo"
);
`logicalorder` = :lo");
$ins_data = array(
'name' => $_category,
'adminid' => $_admin,
@@ -374,23 +406,24 @@ class ticket {
/**
* Edit a support-categories
*/
static public function editCategory($_category = null, $_id = 0, $_order = 1) {
if ($_category != null
&& $_category != ''
&& $_id != 0
) {
static public function editCategory($_category = null, $_id = 0, $_order = 1)
{
if ($_category != null && $_category != '' && $_id != 0) {
if ($_order < 1) {
$_order = 1;
}
$upd_stmt = Database::prepare("
UPDATE `" . TABLE_PANEL_TICKET_CATS . "` SET
`name` = :name,
`logicalorder` = :lo
WHERE `id` = :id
");
Database::pexecute($upd_stmt, array('name' => $_category, 'lo' => $_order, 'id' => $_id));
Database::pexecute($upd_stmt, array(
'name' => $_category,
'lo' => $_order,
'id' => $_id
));
return true;
}
return false;
@@ -399,40 +432,43 @@ class ticket {
/**
* Delete a support-categories
*/
static public function deleteCategory($_id = 0) {
static public function deleteCategory($_id = 0)
{
if ($_id != 0) {
$result_stmt = Database::prepare("
SELECT COUNT(`id`) as `numtickets` FROM `" . TABLE_PANEL_TICKETS . "`
WHERE `category` = :cat"
);
$result = Database::pexecute_first($result_stmt, array('cat' => $_id));
WHERE `category` = :cat");
$result = Database::pexecute_first($result_stmt, array(
'cat' => $_id
));
if ($result['numtickets'] == "0") {
$del_stmt = Database::prepare("
DELETE FROM `" . TABLE_PANEL_TICKET_CATS . "` WHERE `id` = :id"
);
Database::pexecute($del_stmt, array('id' => $_id));
DELETE FROM `" . TABLE_PANEL_TICKET_CATS . "` WHERE `id` = :id");
Database::pexecute($del_stmt, array(
'id' => $_id
));
return true;
} else {
return false;
}
}
return false;
}
/**
* Return a support-category-name
*/
static public function getCategoryName($_id = 0) {
static public function getCategoryName($_id = 0)
{
if ($_id != 0) {
$stmt = Database::prepare("
SELECT `name` FROM `" . TABLE_PANEL_TICKET_CATS . "` WHERE `id` = :id"
);
$category = Database::pexecute_first($stmt, array('id' => $_id));
SELECT `name` FROM `" . TABLE_PANEL_TICKET_CATS . "` WHERE `id` = :id");
$category = Database::pexecute_first($stmt, array(
'id' => $_id
));
return $category['name'];
}
return null;
@@ -440,32 +476,33 @@ class ticket {
/**
* get the highest order number
*
* @param object $_uid admin-id (optional)
*
*
* @param object $_uid
* admin-id (optional)
*
* @return int highest order number
*/
static public function getHighestOrderNumber($_uid = 0) {
static public function getHighestOrderNumber($_uid = 0)
{
$where = '';
$sel_data = array();
if ($_uid > 0) {
$where = " WHERE `adminid` = :adminid";
$sel_data['adminid'] = $_uid;
}
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`".$where.";";
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`" . $where . ";";
$result_stmt = Database::prepare($sql);
$result = Database::pexecute_first($result_stmt, $sel_data);
return (isset($result['highestorder']) ? (int)$result['highestorder'] : 0);
return (isset($result['highestorder']) ? (int) $result['highestorder'] : 0);
}
/**
* returns the last x archived tickets
*/
static public function getLastArchived($_num = 10, $_admin = 1) {
static public function getLastArchived($_num = 10, $_admin = 1)
{
if ($_num > 0) {
$archived = array();
$counter = 0;
$result_stmt = Database::prepare("
@@ -477,12 +514,13 @@ class ticket {
FROM `" . TABLE_PANEL_TICKETS . "` `main`
WHERE `main`.`answerto` = '0' AND `main`.`archived` = '1'
AND `main`.`adminid` = :adminid
ORDER BY `main`.`lastchange` DESC LIMIT 0, ".(int)$_num
);
Database::pexecute($result_stmt, array('adminid' => $_admin));
ORDER BY `main`.`lastchange` DESC LIMIT 0, " . (int) $_num);
Database::pexecute($result_stmt, array(
'adminid' => $_admin
));
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$archived[$counter]['id'] = $row['id'];
$archived[$counter]['customerid'] = $row['customerid'];
$archived[$counter]['adminid'] = $row['adminid'];
@@ -496,9 +534,9 @@ class ticket {
$archived[$counter]['lastchange'] = $row['lastchange'];
$archived[$counter]['status'] = $row['status'];
$archived[$counter]['by'] = $row['by'];
$counter++;
$counter ++;
}
if (isset($archived[0]['id'])) {
return $archived;
} else {
@@ -516,129 +554,102 @@ class ticket {
static public function getArchiveSearchStatement($subject = null, $priority = null, $fromdate = null, $todate = null, $message = null, $customer = - 1, $admin = 1, $categories = null)
{
$search_params = array();
$query = "
SELECT `main`.*, (
SELECT COUNT(`sub`.`id`) FROM `" . TABLE_PANEL_TICKETS . "` `sub`
WHERE `sub`.`answerto` = `main`.`id`
) as `ticket_answers`
FROM `" . TABLE_PANEL_TICKETS . "` `main`
WHERE `main`.`archived` = '1' AND `main`.`adminid` = :admin"
;
WHERE `main`.`archived` = '1' AND `main`.`adminid` = :admin";
$search_params['admin'] = $admin;
if ($subject != NULL
&& $subject != ''
) {
if ($subject != NULL && $subject != '') {
$query .= " AND `main`.`subject` LIKE :subject";
$search_params['subject'] = "%".$subject."%";
$search_params['subject'] = "%" . $subject . "%";
}
if ($priority != null
&& isset($priority[0])
&& $priority[0] != ''
) {
if (isset($priority[1])
&& $priority[1] != ''
) {
if (isset($priority[2])
&& $priority[2] != ''
) {
if ($priority != null && isset($priority[0]) && $priority[0] != '') {
if (isset($priority[1]) && $priority[1] != '') {
if (isset($priority[2]) && $priority[2] != '') {
$query .= " AND (`main`.`priority` = '1' OR `main`.`priority` = '2' OR `main`.`priority` = '3')";
} else {
$query .= " AND (`main`.`priority` = '1' OR `main`.`priority` = '1')";
}
} elseif (isset($priority[2])
&& $priority[2] != ''
) {
} elseif (isset($priority[2]) && $priority[2] != '') {
$query .= " AND (`main`.`priority` = '1' OR `main`.`priority` = '3')";
} else {
$query .= " AND `main`.`priority` = '1'";
}
} elseif($priority != null
&& isset($priority[1])
&& $priority[1] != ''
) {
if (isset($priority[2])
&& $priority[2] != ''
) {
} elseif ($priority != null && isset($priority[1]) && $priority[1] != '') {
if (isset($priority[2]) && $priority[2] != '') {
$query .= " AND (`main`.`priority` = '2' OR `main`.`priority` = '3')";
} else {
$query .= " AND `main`.`priority` = '2'";
}
} elseif($priority != null) {
if (isset($priority[3])
&& $priority[3] != ''
) {
} elseif ($priority != null) {
if (isset($priority[3]) && $priority[3] != '') {
$query .= " AND `main`.`priority` = '3'";
}
}
if ($fromdate != null
&& $fromdate > 0
) {
if ($fromdate != null && $fromdate > 0) {
$query .= " AND `main`.`lastchange` > :fromdate";
$search_params['fromdate'] = strtotime($fromdate);
}
if ($todate != null
&& $todate > 0
) {
if ($todate != null && $todate > 0) {
$query .= " AND `main`.`lastchange` < :todate";
$search_params['todate'] = strtotime($todate);
}
if ($message != null
&& $message != ''
) {
if ($message != null && $message != '') {
$query .= " AND `main`.`message` LIKE :message";
$search_params['message'] = "%".$message."%";
$search_params['message'] = "%" . $message . "%";
}
if ($customer != - 1) {
$query .= " AND `main`.`customerid` = :customer";
$search_params['customer'] = $customer;
}
if ($categories != null) {
$cats = array();
foreach ($categories as $index => $catid) {
if ($catid != "") {
$cats[] = $catid;
}
}
if (count($cats) > 0) {
$query .= " AND (";
}
foreach ($cats as $catid) {
if (isset($catid) && $catid > 0) {
$query .= "`main`.`category` = :catid_".$catid." OR ";
$search_params['catid_'.$catid] = $catid;
$query .= "`main`.`category` = :catid_" . $catid . " OR ";
$search_params['catid_' . $catid] = $catid;
}
}
if (count($cats) > 0) {
$query = substr($query, 0, strlen($query) - 3);
$query .= ") ";
}
}
return array('0' => $query, '1' => $search_params);
return array(
'0' => $query,
'1' => $search_params
);
}
/**
@@ -646,8 +657,7 @@ class ticket {
*/
static public function getStatusText($_lng, $_status = 0)
{
switch($_status)
{
switch ($_status) {
case 0:
return $_lng['ticket']['open'];
break;
@@ -668,8 +678,7 @@ class ticket {
*/
static public function getPriorityText($_lng, $_priority = 0)
{
switch($_priority)
{
switch ($_priority) {
case 1:
return $_lng['ticket']['high'];
break;
@@ -684,19 +693,19 @@ class ticket {
private function convertLatin1ToHtml($str)
{
$html_entities = array (
"Ä" => "&Auml;",
"ä" => "&auml;",
"Ö" => "&Ouml;",
"ö" => "&ouml;",
"Ü" => "&Uuml;",
"ü" => "&uuml;",
"ß" => "&szlig;"
/*
* @TODO continue this table for all the special-characters
*/
$html_entities = array(
"Ä" => "&Auml;",
"ä" => "&auml;",
"Ö" => "&Ouml;",
"ö" => "&ouml;",
"Ü" => "&Uuml;",
"ü" => "&uuml;",
"ß" => "&szlig;"
/*
* @TODO continue this table for all the special-characters
*/
);
foreach ($html_entities as $key => $value) {
$str = str_replace($key, $value, $str);
}
@@ -706,45 +715,47 @@ class ticket {
/**
* function customerHasTickets
*
* @param int customer-id
*
* @return array/bool array of ticket-ids if customer has any, else false
* @param
* int customer-id
*
* @return array/bool array of ticket-ids if customer has any, else false
*/
static public function customerHasTickets($_cid = 0) {
static public function customerHasTickets($_cid = 0)
{
if ($_cid != 0) {
$result_stmt = Database::prepare("
SELECT `id` FROM `" . TABLE_PANEL_TICKETS . "` WHERE `customerid` = :cid"
);
Database::pexecute($result_stmt, array('cid' => $_cid));
SELECT `id` FROM `" . TABLE_PANEL_TICKETS . "` WHERE `customerid` = :cid");
Database::pexecute($result_stmt, array(
'cid' => $_cid
));
$tickets = array();
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
$tickets[] = $row['id'];
}
return $tickets;
}
return false;
}
/**
* Get a data-var
*/
public function Get($_var = '', $_vartrusted = false) {
public function Get($_var = '', $_vartrusted = false)
{
if ($_var != '') {
if (!$_vartrusted) {
if (! $_vartrusted) {
$_var = htmlspecialchars($_var);
}
if (isset($this->t_data[$_var])) {
if (strtolower($_var) == 'message') {
// avoid double line-breaks, #1413
$this->t_data[$_var] = str_replace("<br />\n", "\n", $this->t_data[$_var]);
return nl2br($this->t_data[$_var]);
} elseif(strtolower($_var) == 'subject') {
} elseif (strtolower($_var) == 'subject') {
return nl2br($this->t_data[$_var]);
} else {
return $this->t_data[$_var];
@@ -758,25 +769,21 @@ class ticket {
/**
* Set a data-var
*/
public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false) {
if ($_var != ''
&& $_value != ''
) {
if (!$_vartrusted) {
public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false)
{
if ($_var != '' && $_value != '') {
if (! $_vartrusted) {
$_var = strip_tags($_var);
}
if (!$_valuetrusted) {
if (! $_valuetrusted) {
$_value = strip_tags($_value, '<br />');
}
if (strtolower($_var) == 'message'
|| strtolower($_var) == 'subject'
) {
if (strtolower($_var) == 'message' || strtolower($_var) == 'subject') {
$_value = $this->convertLatin1ToHtml($_value);
}
$this->t_data[$_var] = $_value;
}
}

View File

@@ -57,7 +57,7 @@
<footer>
<span>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAQCAYAAAC1MDndAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOO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C1Pi++PK+Objy5q80/NeXSDl9wrgnDkaAIlyzCj5zh1FCb00JL07Jd2LKfgBx+LWXE6XJP6pcMiUiMg8/FmRd3GEYHNiZ+H6wgZP/i+T7MzPJo5wkjYU2t01cWfjp6hH2WZn0adVbM7KALAS3weYftwZIVgTIHtxS8YtD6kOYX2Uqi8iIKCsD6CDhXnNi+iI+vXhwD3g83tHs9l8K5JZZbfh2UL7x0jyeLFljVzUhtoc0DWOwBnCoga25s6wrHDhG8+2I1j0YOu/AwBUU7aBHvM/ZwAAAABJRU5ErkJggg==" style="height: 13px; margin: 0 2px 3px 0; vertical-align:middle;"/>
&copy; 2009-2017 by <a href="http://www.froxlor.org">the Froxlor Team</a>
&copy; 2009-2018 by <a href="http://www.froxlor.org">the Froxlor Team</a>
</span>
</footer>
</body>