Ejemplo n.º 1
0
foreach ($accounts as $acct) {
    echo "<account id=\"" . $acct->id . "\" name=\"" . $acct->name . "\" currContactCount=\"" . $acct->currContactCount . "\" " . "maxContactCount=\"" . $acct->maxContactCount . "\" monthEmailCount=\"" . $acct->monthEmailCount . "\" " . "currHostingSize=\"" . $acct->currHostingSize . "\" maxHostingSize=\"" . $acct->maxHostingSize . "\">\n";
    // Now login to the subaccount using the agency account, but specifying the subaccount ID in the login.
    $login_result = bronto_agency_login($acct->id);
    if (!$login_result) {
        echo "<error text=\"INVALID ACCOUNT\"/>\n";
    } else {
        $binding = $login_result['binding'];
        if ($disp_lists) {
            display_lists($binding);
        }
        if ($disp_fields) {
            display_fields($binding);
        }
        if ($disp_contacts) {
            display_contacts($binding, $disp_contact_fields);
        }
        if ($disp_messages) {
            display_messages($binding);
        }
        if ($disp_deliveries) {
            display_deliveries($binding);
        }
    }
    echo "</account>\n";
    $acct_num++;
    if ($max_accounts > 0 && $acct_num >= $max_accounts) {
        break;
    }
}
echo "</accounts>\n";
Ejemplo n.º 2
0
/**
 * This function writes out the compose view by calling several more functions.
 *
 * @param int $courseid This is the course ID.
 * @return int The draft ID for the compose file picker.
 *
 */
function display_compose_view($courseid)
{
    global $CFG, $USER;
    echo '<div id="composeview" style="display:none">';
    display_contacts($courseid);
    display_subject();
    display_send();
    $composedraftid = display_add_attachment($courseid, 'compose');
    display_body($courseid, 'compose');
    echo '</div>';
    return $composedraftid;
}