foreach ($ac as $propertyname => $propertyvalue) {
    // Check if the property is equal to email login or https check boxes.
    // These are the only values allowed to be empty.
    $isnotemaillogin = strcmp($propertyname, 'emaillogin');
    $isnothttps = strcmp($propertyname, 'https');
    $checkifempty = $isnotemaillogin && $isnothttps;
    // If this property is empty.
    if ($checkifempty and empty($propertyvalue)) {
        print_error('error2', 'adobeconnect', '', $propertyname);
        die;
    }
}
$strtitle = get_string('connectiontesttitle', 'adobeconnect');
$systemcontext = context_system::instance();
$PAGE->set_context($systemcontext);
$PAGE->set_title($strtitle);
echo $OUTPUT->header();
echo $OUTPUT->box_start('center');
$param = new stdClass();
$param->url = 'http://docs.moodle.org/en/Remote_learner_adobe_connect_pro';
print_string('conntestintro', 'adobeconnect', $param);
if (!empty($ac->https)) {
    $https = true;
} else {
    $https = false;
}
adobe_connection_test($ac->host, $ac->port, $ac->login, $ac->pass, $ac->httpauth, $ac->emaillogin, $ac->https);
echo '<center>' . "\n";
echo '<input type="button" onclick="self.close();" value="' . get_string('closewindow') . '" />';
echo '</center>';
echo $OUTPUT->box_end();
<?php

// $Id: conntest.php,v 1.1.2.5 2010/04/14 15:25:58 adelamarre Exp $
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_once dirname(__FILE__) . '/locallib.php';
require_login(SITEID, false);
if (!isadmin()) {
    redirect($CFG->wwwroot);
}
if (!($site = get_site())) {
    redirect($CFG->wwwroot);
}
$serverhost = required_param('serverURL', PARAM_NOTAGS);
$port = optional_param('port', 80, PARAM_INT);
$username = required_param('authUsername', PARAM_NOTAGS);
$password = required_param('authPassword', PARAM_NOTAGS);
$httpheader = required_param('authHTTPheader', PARAM_NOTAGS);
$emaillogin = required_param('authEmaillogin', PARAM_INT);
$strtitle = get_string('connectiontesttitle', 'adobeconnect');
print_header_simple(format_string($strtitle));
print_simple_box_start('center', '100%');
print_string('conntestintro', 'adobeconnect');
adobe_connection_test($serverhost, $port, $username, $password, $httpheader, $emaillogin);
echo '<center>' . "\n";
echo '<input type="button" onclick="self.close();" value="' . get_string('closewindow') . '" />';
echo '</center>';
print_simple_box_end();
print_footer('none');