'; ?> updateWMS
getGuisByOwner($_SESSION["mb_user_id"],true); $permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true); $wms_id_own = $admin->getWmsByOwnGuis($ownguis); if (count($wms_id_own)>0 AND count($ownguis)>0 AND count($permguis)>0){ $v = array(); $t = array(); $c = 1; $sql = "SELECT wms_id, wms_title, wms_getcapabilities, wms_upload_url FROM wms "; $sql .= "WHERE wms_id IN("; for($i=0; $i0){ $sql .= ",";} $sql .= "$".$c; array_push($v,$wms_id_own[$i]); array_push($t,'i'); $c++; } } $sql .= ")"; $sql .= " ORDER BY wms_title"; $res = db_prep_query($sql,$v,$t); $cnt = 0; echo "

"; echo "Link to the last uploaded Online Resource URL:

"; echo "
"; echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:
"; echo "(Triple click to select and copy)
"; echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1
"; echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0
"; echo "REQUEST=capabilities&WMTVER=1.0.0

"; echo "Link to new WMS Capabilities URL:

"; echo " "; echo "
"; /**/ if(isset($myURL) && $myURL != ''){ $mywms = new wms(); $mywms->createObjFromXML($myURL); $mywms->optimizeWMS(); echo "
"; $mywms->updateObjInDB($myWMS); $mywms->displayWMS(); // start (owners of the updated wms will be notified by email) if ($use_php_mailing) { $owner_ids = $admin->getOwnerByWms($myWMS); if ($owner_ids && count($owner_ids)>0) { $owner_mail_addresses = array(); $j=0; for ($i=0; $igetEmailByUserId($owner_ids[$i]); if (!in_array($adr_tmp, $owner_mail_addresses) && $adr_tmp) { $owner_mail_addresses[$j] = $adr_tmp; $j++; } } $replyto = $admin->getEmailByUserId($_SESSION["mb_user_id"]); $from = $replyto; $pathArray = explode("http/php/", $_SERVER["PATH_TRANSLATED"]); $path = $pathArray[0]; $body = "WMS '" . $admin->getWmsTitleByWmsId($myWMS) . "' has been updated. \n\nServer name: " . $_SERVER["SERVER_NAME"] . "\nInstallation Path: " . $path . "\n\nYou may want to check the changes as you are an owner of this WMS."; $error_msg = ""; for ($i=0; $isendEmail($replyto, $from, $owner_mail_addresses[$i], $owner_mail_addresses[$i], "[Mapbender] A user has updated one of your WMS", $body, $error)) { if ($error){ $error_msg .= $error . " "; } } } if (!$error_msg) { echo ""; } else { echo ""; } } } // end (owners of the updated wms will be notified by email) } echo ""; echo ""; }else{ echo "There are no wms available for this user.
"; } ?>