1<?php 2/* $Id: contact_func.inc.php,v 1.10 2003/11/11 16:11:16 k-fish Exp $ */ 3 4// helper function to create an email link 5// based on settings 6function linkEmail($email){ 7 if($email!=""){ 8 if(isset($_SESSION["MGW"]->settings["use_webmail"]) and $_SESSION["MGW"]->settings["use_webmail"] == 1) $email="<a href=\"../webmail2/index.php?rightframe=".rawurlencode("sendmail.php?to=".$email)."&".SID."\">".$email."</a>"; 9 else $email = "<a href=\"mailto:".$email."\">".$email."</a>"; 10 } 11 return $email; 12} 13 14// generates two email links for the context menu of contacts 15function linkEmail2($email){ 16 $rs = ''; 17 if($email!=""){ 18 if(isModuleInstalled('webmail2')) 19 $rs="<a href=\"../webmail2/index.php?rightframe=".rawurlencode("sendmail.php?to=".$email)."&".SID."\">".Lang::getLanguageString('email').' ('.Lang::getLanguageString('webmail2').")</a><br />"; 20 $rs .= "<a href=\"mailto:$email\">".Lang::getLanguageString('email')." (mailto:)</a><br />"; 21 } 22 return $rs; 23} 24 25?> 26