// Show Abstract of Chosen WMS
 $sql = "SELECT wms_abstract FROM wms WHERE wms_id = \$1";
 $v = array($wmsList);
 $t = array('i');
 $res = db_prep_query($sql, $v, $t);
 echo "<br><br><b>Abstract</b><br><br>";
 $cnt = 0;
 while ($row = db_fetch_array($res)) {
     echo $row["wms_abstract"] . "<br>";
     $cnt++;
 }
 echo "<br><br><b>Owner:</b><br><br>";
 $owner = $admin->getOwnerByWms($wmsList);
 if ($owner && count($owner) > 0) {
     for ($i = 0; $i < count($owner); $i++) {
         echo "- " . $admin->getUserNameByUserId($owner[$i]) . "<br>";
     }
 } else {
     echo "<i>- none -</i>";
 }
 echo "</p>";
 //previously, a WMS could only be deleted if it was owned by a single owner
 //if(count($owner)==1 && $owner[0] == Mapbender::session()->get("mb_user_name")){
 //now, any owner can delete, any non-owner can suggest deletions
 //if a wms has no owner, anyone can delete
 if ($owner && in_array(Mapbender::session()->get("mb_user_id"), $owner) && count($owner) == 1) {
     echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
 } elseif ($owner && in_array(Mapbender::session()->get("mb_user_id"), $owner) && count($owner) > 1) {
     // delete suggestion button only appears when mailing is enabled in mapbender.conf
     if ($use_php_mailing) {
         // prepare email-addresses and usernames of all owners
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ob_start();
include_once dirname(__FILE__) . "/../../conf/mapbender.conf";
include dirname(__FILE__) . "/../classes/class_administration.php";
$adm = new administration();
$con = db_connect(DBSERVER, OWNER, PW);
db_select_db(DB, $con);
$id = $_GET['id'];
$sql = "SELECT * FROM mb_meetingpoint WHERE mb_meetingpoint_id = \$1";
$v = array($id);
$t = array('s');
$res = db_prep_query($sql, $v, $t);
if ($row = db_fetch_array($res)) {
    $user = $adm->getUserNameByUserId($row['fkey_mb_user_id']);
    $password = $row['mb_user_password'];
    $gui_id = $row['fkey_gui_id'];
} else {
    exit;
}
$url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']) . "/login.php?";
$url .= "name=" . $user . "&password="******"&mb_user_myGui=" . $gui_id . "&kml_id=" . $id;
header("Location: " . $url);
ob_end_flush();
?>
</body>
</html>
            $status_comment = "Monitoring process timed out.";
            $status = '-1';
            array_push($problemOWS, $wms_id_own[$k]);
            array_push($commentProblemOWS, $status_comment);
        }
        $v = array('0', intval($status), intval($image), $status_comment, (string) intval($timestamp_end), $map_url, (string) intval($timestamp_begin), $cap_diff, (string) $time, $wms_id_own[$k]);
        $t = array('s', 'i', 'i', 's', 's', 's', 's', 's', 's', 's');
        $res = db_prep_query($sql, $v, $t);
    }
    $body = "";
    echo "\nmonitoring info in db for user: "******"\n";
    //loop for single monitor requests that has problems
    for ($i = 0; $i < count($problemOWS); $i++) {
        $body .= $br . $admin->getWmsTitleByWmsId($problemOWS[$i]) . " (" . $problemOWS[$i] . "): " . $commentProblemOWS[$i] . $br;
    }
    unset($problemOWS);
    unset($commentProblemOWS);
    //end of loop for single monitor requests
    // Send an email to the user if body string exists
    if ($body) {
        $error_msg = "";
        if ($admin->getEmailByUserId($userid)) {
            $admin->sendEmail(MAILADMIN, MAILADMINNAME, $admin->getEmailByUserId($userid), $user, "Mapbender monitoring report " . date("F j, Y, G:i:s", $time), utf8_decode($body), &$error_msg);
        } else {
            $error_msg = "Email address of user '" . $admin->getUserNameByUserId($userid) . "' unknown!\n";
        }
        if ($error_msg) {
            echo "\n ERROR: " . $error_msg;
        }
    }
}