replace in /var/www/ispcp/engine/messager/ispcp-arpl-msgr
Code:
if ($pt == 1) {
$sql = "
SELECT
t1.`mail_auto_respond_text`
FROM
`mail_users` as t1
LEFT JOIN (`domain` as t2) ON (t1.`domain_id`=t2.`domain_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
t2.`domain_name` = '$edmn'
AND
t1.`sub_id`=0
COLLATE utf-8
";
} elsif ($pt == 2) {
$sql = "
SELECT
`mail_auto_respond_text`
FROM
`mail_users` as t1
LEFT JOIN (`domain_aliasses` as t2) ON (t1.`sub_id`=t2.`alias_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
t2.`alias_name` = '$edmn'
COLLATE utf-8
";
} elsif ($pt == 3) {
$sql = "
SELECT
`mail_auto_respond_text`
FROM
`mail_users` as t1
LEFT JOIN (`subdomain` as t2) ON t1.`sub_id`=t2.`subdomain_id`
LEFT JOIN (`domain` as t3) ON t2.`domain_id`=t3.`domain_id`
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
(CONCAT(t2.`subdomain_name`,'.',t3.`domain_name`) = '$edmn')
COLLATE utf-8
";
} elsif ($pt == 4) {
$sql = "
SELECT
t1.`mail_auto_respond_text`
FROM
`mail_users` AS t1
LEFT JOIN (`subdomain_alias` AS t2) ON (t1.`sub_id`=t2.`subdomain_alias_id`)
LEFT JOIN (`domain_aliasses` AS t3) ON (t2.`alias_id`=t3.`alias_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
(CONCAT(t2.`subdomain_alias_name`,'.',t3.`alias_name`) = '$edmn')
COLLATE utf-8
";
}
with
Code:
if ($pt == 1) {
$sql = "
SELECT
CONVERT(t1.`mail_auto_respond_text` using utf8)
FROM
`mail_users` as t1
LEFT JOIN (`domain` as t2) ON (t1.`domain_id`=t2.`domain_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
t2.`domain_name` = '$edmn'
AND
t1.`sub_id`=0
";
} elsif ($pt == 2) {
$sql = "
SELECT
CONVERT(t1.`mail_auto_respond_text` using utf8)
FROM
`mail_users` as t1
LEFT JOIN (`domain_aliasses` as t2) ON (t1.`sub_id`=t2.`alias_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
t2.`alias_name` = '$edmn'
";
} elsif ($pt == 3) {
$sql = "
SELECT
CONVERT(t1.`mail_auto_respond_text` using utf8)
FROM
`mail_users` as t1
LEFT JOIN (`subdomain` as t2) ON t1.`sub_id`=t2.`subdomain_id`
LEFT JOIN (`domain` as t3) ON t2.`domain_id`=t3.`domain_id`
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
(CONCAT(t2.`subdomain_name`,'.',t3.`domain_name`) = '$edmn')
";
} elsif ($pt == 4) {
$sql = "
SELECT
CONVERT(t1.`mail_auto_respond_text` using utf8)
FROM
`mail_users` AS t1
LEFT JOIN (`subdomain_alias` AS t2) ON (t1.`sub_id`=t2.`subdomain_alias_id`)
LEFT JOIN (`domain_aliasses` AS t3) ON (t2.`alias_id`=t3.`alias_id`)
WHERE
t1.`mail_acc` = '$user'
AND
t1.`mail_auto_respond`=1
AND
(CONCAT(t2.`subdomain_alias_name`,'.',t3.`alias_name`) = '$edmn')
";
}