Skip to content

Commit

Permalink
For devices not supporting unicode characters
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrosis committed Oct 5, 2015
1 parent b45f503 commit a1ae920
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions htdocs/asterisk/cidlookup.php
Expand Up @@ -30,7 +30,7 @@
include '../master.inc.php';

$phone = GETPOST('phone');
$notfound = $langs->trans("Unknown");
$notfound = $phone;

// Security check
if (empty($conf->clicktodial->enabled))
Expand Down Expand Up @@ -73,5 +73,9 @@
dol_print_error($db,'Error');
$found = 'Error';
}
//Greek to Latin
$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ');

echo $found;
$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I');

print str_replace($greek, $latin, $found);

0 comments on commit a1ae920

Please sign in to comment.