Update suggest_email
This commit is contained in:
parent
9ca1bcffb1
commit
3a690ace8e
@ -48,10 +48,13 @@ header("Pragma: no-cache");
|
||||
|
||||
// Get the search query composed of the subject and message
|
||||
$address = hesk_REQUEST('e') or die('');
|
||||
$email_field = hesk_REQUEST('ef') or die('');
|
||||
$display_div = hesk_REQUEST('dd') or die('');
|
||||
$pad_div = hesk_REQUEST('pd') ? 1 : 0;
|
||||
$div = 1;
|
||||
|
||||
// Do we allow multiple emails? If yes, check all
|
||||
if ($hesk_settings['multi_eml']) {
|
||||
if ($hesk_settings['multi_eml'] || hesk_REQUEST('am')) {
|
||||
// Make sure the format is correct
|
||||
$address = preg_replace('/\s/', '', $address);
|
||||
$address = str_replace(';', ',', $address);
|
||||
@ -75,9 +78,9 @@ exit();
|
||||
|
||||
function hesk_emailTypoShow($address, $suggest, $div = '')
|
||||
{
|
||||
global $hesk_settings, $hesklang;
|
||||
global $hesk_settings, $hesklang, $email_field, $display_div, $pad_div;
|
||||
?>
|
||||
<div id="emailtypo<?php echo $div; ?>" style="display:block">
|
||||
<div id="emailtypo<?php echo $display_div.$div; ?>" style="display:block">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
<td width="150"> </td>
|
||||
@ -85,10 +88,8 @@ function hesk_emailTypoShow($address, $suggest, $div = '')
|
||||
<div class="alert alert-info">
|
||||
<?php echo sprintf($hesklang['didum'], str_replace('@', '@<b>', $suggest . '</b>')); ?>
|
||||
<br/><br/>
|
||||
<a class="btn btn-default" href="javascript:void();"
|
||||
onclick="javascript:var eml=document.form1.email.value;document.form1.email.value=eml.replace(/<?php echo preg_quote($address, '/'); ?>/gi, '<?php echo addslashes($suggest); ?>' );hesk_toggleLayerDisplay('emailtypo<?php echo $div; ?>');"><?php echo $hesklang['yfix']; ?></a>
|
||||
<a class="btn btn-default" href="javascript:void();"
|
||||
onclick="javascript:hesk_toggleLayerDisplay('emailtypo<?php echo $div; ?>');"><?php echo $hesklang['nole']; ?></a>
|
||||
<a class="btn btn-default" href="javascript:void(0);" onclick="var eml=document.getElementById('<?php echo $email_field; ?>').value;document.getElementById('<?php echo $email_field; ?>').value=eml.replace(/<?php echo preg_quote($address, '/'); ?>/gi, '<?php echo addslashes($suggest); ?>' );document.getElementById('emailtypo<?php echo $display_div.$div; ?>').style.display='none';"><?php echo $hesklang['yfix']; ?></a>
|
||||
<a class="btn btn-default" href="javascript:void(0);" onclick="document.getElementById('emailtypo<?php echo $display_div.$div; ?>').style.display='none';"><?php echo $hesklang['nole']; ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user