$_functions_mail = true; Function getEmailFromUid ( $uid, $resolveToCadmin=false ) { $db = new DB_GAP; $query = "SELECT feedback_email FROM gap_hp WHERE uid='$uid'"; $db->query($query); if ($db->next_record()&&isEmail($db->f('feedback_email'))) return $db->f('feedback_email'); $query = "SELECT username FROM auth_user WHERE uid='$uid'"; $db->query($query); if ($db->next_record()&&isEmail($db->f('username'))) return $db->f('username'); $query = "SELECT fax FROM person WHERE uid='$uid'"; $db->query( $query ); if ($db->next_record()&&!empty($db->Record['fax'])) return resolveDealerFax( $uid ); if ( $resolveToCadmin ) return resolveDealerToCadminEmail( $uid ); return ""; } Function resolveDealerToCadminEmail( $uid ) { return ""; } Function resolveDealerFax ( $uid ) { return ""; } Function isEmail( $email ) { if (preg_match( "/[0-9a-zA-Z_-][0-9a-zA-Z_-]+@[0-9a-zA-Z_-][0-9a-zA-Z_-]+\\.[0-9a-zA-Z_-][0-9a-zA-Z_-]+/", $email ) ) return true; return false; } function mail_encode_header($input, $charset = 'UTF-8') { $orig = $input; $input = preg_replace_callback('/([?\x80-\xFF])/', function ($Match) { return "=" . strtoupper(dechex(ord($Match[1]))); } , $input); if ($orig != $input) { $input = '=?' . $charset . '?Q?' . $input . '?='; } return $input; } ?>
Mächler Elektroanlagen
Steingraben 12
07749 Jena
Tel.: 0 36 41 / 44 39 10
Fax: 0 36 41 / 82 91 05
E-mail: Elektro.Maechler@t-online.de