profile(true); } $email_type = "directory"; if ($profile) { $email_directory = $profile->email_directory; if ($email_directory) { $page->assign('email_directory', $email_directory); list($alias, $domain) = explode('@', $email_directory); } else { $page->assign('email_directory', ''); $email_type = NULL; $alias = $domain = ''; } $res = XDB::query( "SELECT email FROM profile_job WHERE pid = {?}", $profile->id()); $res = $res->fetchAllAssoc(); $pro = array(); foreach ($res as $res_it) { if ($res_it['email'] != '') { $pro[] = $res_it['email']; if ($email_directory == $res_it['email']) { $email_type = "pro"; } } } $page->assign('list_email_pro', $pro); } if ($user) { $melix = $user->emailAlias(); if ($melix) { list($melix) = explode('@', $melix); $page->assign('melix', $melix); if (($domain == $globals->mail->alias_dom) || ($domain == $globals->mail->alias_dom2)) { $email_type = "melix"; } } $res = XDB::query( "SELECT alias FROM aliases WHERE uid={?} AND (type='a_vie' OR type='alias')", $user->id()); $res = $res->fetchAllAssoc(); $page->assign('list_email_X', $res); if (($domain == $globals->mail->domain) || ($domain == $globals->mail->domain2)) { foreach ($res as $res_it) { if ($alias == $res_it['alias']) { $email_type = "X"; } } } require_once 'emails.inc.php'; $redirect = new Redirect($user); $redir = array(); foreach ($redirect->emails as $redirect_it) { if ($redirect_it instanceof EmailRedirection) { $redir[] = $redirect_it->email; if ($email_directory == $redirect_it->email) { $email_type = "redir"; } } } $page->assign('list_email_redir', $redir); $page->assign('email_type', $email_type); } else { $page->assign('list_email_X', array()); $page->assign('list_email_redir', array()); $page->assign('list_email_pro', array()); } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>