Avancon logo
hand shake
$length) { $string = wordwrap($string, $length); $string = $mb? mb_substr($string, 0, mb_strpos($string, "\n")) : substr($string, 0, strpos($string, "\n")); } return $string; } function clip_string($string, $pos, $length, $total) { global $mb; if($length) { $m = $mb ? mb_substr($string, $pos, $length) : substr($string, $pos, $length); $before = $mb ? mb_substr($string, 0, $pos) : substr($string, 0, $pos); $after = $mb ? mb_substr($string, $pos + $length, mb_strlen($string) - ($pos + $length)) : substr($string, $pos + $length, strlen($string) - ($pos + $length)); $before = rev_string($before); if($total < strlen($string)) { $half = intval(($total - $length) / 2); } else { $half = $total; } $hlPre = ''; $hlPost = ''; $out = htmlentities(rev_string(word_trunc($before, $half))) . $hlPre . htmlentities($m) . $hlPost . htmlentities(word_trunc($after, $half)); return $out; } else { return htmlentities(word_trunc($string, $total)); } } if(count($searchResults) == 0) { $result = '

{title}

{text}

'; $result = str_replace('{title}', htmlentities('Nessun risultato'), $result); $result = str_replace('{text}', '', $result); echo $result; } else { echo ''; foreach($searchResults as $searchResult) { $result = '

{title}

{text}

'; $result = str_replace('{title}', '' . $searchResult['title'] . '', $result); $text = ""; foreach($searchResult['snippets'] as $s) { $pos = $s['pos']; $m = $s['matchlen']; $snippet = clip_string($s['text'], $pos, $m, $s['snip']); if(strlen($text)) $text .= " … "; $text .= " " . $snippet; } $result = str_replace('{text}', $text, $result); echo $result; } } ?>

Contact us

Message:

Your name:

Your e-mail:

Your  

company:

AVANCON SA

Via Campagna 27

CH-6595 Riazzino /Switzerland
+41 (0)91 222 10 10  - relations@avancon.com

© 2024 All Rights Reserved | AVANCON SA

This site uses cookies, including third parties, necessary for its operation. If you click "ACCEPT" you consent to the use of third party cookies affected by the GDPR legislation. If you want to keep them deactivated click “NOT ACCEPTED”. If you disable them some functions of the site will be blocked. 


MORE INFORMATION ABOUT PRIVACY POLICY

NOT ACCEPTED

ACCEPTED