Esempio n. 1
0
        include($file);
        $atmail->end();
    }
}
*/
$var = array();
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false) {
    $var['browser'] = "ie";
} else {
    $var['browser'] = "ns";
}
$atmail = new AtmailGlobal();
$var['func'] = $_REQUEST['func'];
$var['version'] = $pref['version'];
if (!$atmail->Language) {
    $atmail->Language = $atmail->param('Language');
}
// If the user if logging off, print a cookie header with
// a blank SessionID. Delete the Session for the DB too
if ($var['func'] == "logout") {
    require_once 'Session.php';
    session_start();
    $auth =& $atmail->getAuthObj();
    // Find the users current settings, if to delete the trash on logout
    //$atmail->cookie_read($auth);
    //$auth->getuser();
    $atmail->username = $auth->username;
    $atmail->pop3host = $auth->pop3host;
    $atmail->SessionID = $auth->SessionID;
    //$atmail->cookie_header_delete();
    if (!$pref['opensource']) {
Esempio n. 2
0
    //fix this
    foreach (array_keys(multi_ksort($h, $var['sort'])) as $k) {
        $i++;
        // Skip if the entry is a group name
        if ($grp[$k]) {
            continue;
        }
        // Skip if the address does not contain a FullName ( sort by Fullname, otherwise email )
        if ($h[$k]['UserFullName'] != ' ') {
            continue;
        }
        $var['rows'] .= sort_entry($abook, $h[$k]['id'], $h);
    }
    // Loop through the fields
    foreach (array('emailto', 'emailcc', 'emailbcc') as $name) {
        $val = $atmail->param($name);
        // Split entrys by a ,
        $emails = explode(',', $val);
        foreach ($emails as $e) {
            // Skip entrys that do not contain an @
            if (strpos($e, '@') === false) {
                continue;
            }
            // Build the select box
            $var[$name] .= "<option value='{$e}'>{$e}</option>";
        }
    }
    // Print the result for the compose screen
    print $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/composebook.html", $var);
} elseif ($var['func'] == 'editgroupxp') {
    $db = $abook->listpersonalgroup($_REQUEST['edit']);