42 if (!empty($_SERVER[
"HTTP_HOST"])) {
44 $expl=explode(
".",$_SERVER[
"HTTP_HOST"],
$i);
45 if (count($expl)>=2) {
46 list(
$host,$dompart)=$expl;
48 $db->query(
"SELECT * FROM sub_domaines s WHERE s.domaine= ? AND s.type='squirrelmail';",array($dompart));
49 if (
$db->next_record()) {
51 return "http://".$domain[
"sub"].(($domain[
"sub"])?
".":
"").$domain[
"domaine"];
55 }
while (strpos($dompart,
'.')!==
false);
59 $db->query(
"SELECT * FROM sub_domaines s WHERE s.compte=2000 AND s.type='squirrelmail';");
60 if (
$db->next_record()) {
62 return "http://".$domain[
"sub"].(($domain[
"sub"])?
".":
"").$domain[
"domaine"];
75 $fullmail2 = str_replace(
'@',
'_',$fullmail);
82 foreach ( $todel as
$t ) {
83 if (file_exists(
"/var/lib/squirrelmail/data/$t") ) {
84 @unlink(
"/var/lib/squirrelmail/data/$t");
This class handle squirrelmail's webmail hook the main panel page to add a link to the webmail.
hook_admin_webmail()
Hook called by the homepage or the /webmail link to redirect the user to a known webmail url.
hook_mail_delete_for_real($mail_id, $fullmail)
Hook called when an email is REALLY deleted (by the cron, not just in the panel)
foreach($domaines_user as $domaine) $t