', "\n"; echo '', "\n"; echo '', "\n"; echo '', "\n"; echo '', "\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; } function GetHiddenVar( $varID ) { if ( array_key_exists( $varID, $_POST ) ) return $_POST[ $varID ]; else return ""; } function CheckForSaveData() { if ( GetHiddenVar( SAVE_DATA_ID ) != "" ) return true; else return false; } function CheckForCancel( $redirection ) { global $confirmationMsg; global $errorMsg; if ( GetHiddenVar( CANCEL_PAGE_ID ) != "" ) { // Redirect to specified page. $confirmationMsg = ""; $errorMsg = ""; SaveSessionVars(); $headerStr = 'Location: '.$redirection; if ( strpos( $redirection, '?' ) === false ) $headerStr = $headerStr.'?'; else $headerStr = $headerStr.'&'; $headerStr = $headerStr.strip_tags(SID); header( $headerStr ); exit(); } } function SavePopup( $popupName ) { global $popups; if ( !empty( $popupName ) && !in_array( $popupName, $popups ) ) $popups[] = $popupName; } function CheckForPopupRegistration() { SavePopup( GetHiddenVar( POPUP_NAME_ID ) ); } function FirstTimeHere( $pageName ) { if ( $pageName == GetHiddenVar( PAGE_NAME_ID ) ) return false; else return true; } function CheckForLogout() { if ( GetHiddenVar( LOGOUT_ID ) != "" ) { header( 'Location: login.php' ); exit(); } } function CheckForPageSwitch() { $nextPage = GetHiddenVar( NEXT_PAGE_ID ); if ( $nextPage != "" ) SwitchToPage( $nextPage ); } function SwitchToPage( $destPage ) { global $confirmationMsg; global $selectedUser; global $selectedGroup; if ( $destPage != "" ) { $confirmationMsg = ""; SaveSessionVars(); $nextHeader = 'Location: '.$destPage; if ( strpos( $destPage, '?' ) === false ) $nextHeader = $nextHeader.'?'; else $nextHeader = $nextHeader.'&'; $nextHeader = $nextHeader.strip_tags(SID); header( $nextHeader ); exit(); } } function CheckForRefresh() { if ( GetHiddenVar( REFRESH_PAGE_ID ) != "" ) return true; else return false; } function CheckForDeleteSelection() { if ( GetHiddenVar( DELETE_SELECTION_ID ) == "true" ) return true; else return false; } function GetSortDirection( $sortdir ) { return $sortdir === ASCENDING_SORT_DIRECTION ? DESCENDING_SORT_DIRECTION : ASCENDING_SORT_DIRECTION; } function GetSortIcon( $sortDir ) { if ( $sortDir === ASCENDING_SORT_DIRECTION ) return 'images/sort_ascending.gif'; else return 'images/sort_descending.gif'; } ////// Display Page Components/Controls ////// function OutputHeader( $pageTitle ) { echo '',"\n"; echo ' ',APP_TITLE,' - ',$pageTitle,'', "\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ', "\n"; echo ' ', "\n"; echo ' ', "\n"; echo '',"\n"; } function DisplaySiteNameAndLogo() { $bannerTitle2 = BANNER_TITLE2; $bannerTitle = empty( $bannerTitle2 ) ? BANNER_TITLE1 : BANNER_TITLE1.'
'.BANNER_TITLE2; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; $appLogo = APP_LOGO; if ( !empty( $appLogo) ) { echo ' ',"\n"; } echo ' ',"\n"; echo ' ',"\n"; } function DisplayHorizontalNavigationBar( $bLogout, $formName, $homePage ) { echo ' ', "\n"; echo ' ', "\n"; echo ' ', "\n"; echo ' ', "\n"; echo '
', "\n"; if ( $homePage != NULL ) { echo ' Home',"\n"; echo '   |  ', "\n"; } echo ' About', "\n"; if ( $bLogout ) { echo '   |  ', "\n"; echo ' Logout', "\n"; } echo '
', "\n"; } function DisplayBanner() { $bannerTitle = APP_TITLE; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
'.$bannerTitle.'
',"\n"; } function DisplaySiteHeader( $bNameAndLogo, $bBanner, $bHorizontalNavBar, $bLogout, $formName, $homePage ) { echo ' ',"\n"; if ( $bNameAndLogo ) DisplaySiteNameAndLogo(); if ( $bBanner ) DisplayBanner(); if ( $bHorizontalNavBar ) DisplayHorizontalNavigationBar( $bLogout, $formName, $homePage ); echo ' ',"\n"; } function DisplayMenuGroup( $currMenuItem, $topItem, $menuGroup ) { $indent = ""; $class = "navLinkHeading"; foreach( $menuGroup as $menuItem => $href ) { if ( $currMenuItem != $menuItem && ($menuItem == EDIT_GROUP_MENU_ITEM || $menuItem == EDIT_USER_MENU_ITEM || $menuItem == EDIT_UNMANAGEDDATA_MENU_ITEM ) ) continue; echo ' ',"\n"; if ( $currMenuItem == $menuItem ) echo ' '.$indent.$menuItem.''."\n"; else echo ' '.$indent.''.$menuItem.''."\n"; echo ' ',"\n"; $indent = "   "; $class = "navLinkBold"; } } function DisplayLefthandSash( $currMenuItem ) { global $serversMenuGroup; global $groupsMenuGroup; global $usersMenuGroup; global $rolesMenuGroup; global $packagesMenuGroup; global $wmsMenuGroup; global $wfsMenuGroup; global $unmanagedDataMenuGroup; echo '',"\n"; echo ' ',"\n"; DisplayMenuGroup( $currMenuItem, SERVER_MANAGEMENT_MENU_ITEM, $serversMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, GROUP_MANAGEMENT_MENU_ITEM, $groupsMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, USER_MANAGEMENT_MENU_ITEM, $usersMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, ASSIGN_ROLES_MENU_ITEM, $rolesMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, PACKAGE_MANAGEMENT_MENU_ITEM, $packagesMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, CONFIGURE_WMS_MENU_ITEM, $wmsMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, CONFIGURE_WFS_MENU_ITEM, $wfsMenuGroup ); echo "\n"; DisplayMenuGroup( $currMenuItem, UNMANAGEDDATA_MANAGEMENT_MENU_ITEM, $unmanagedDataMenuGroup ); echo "\n"; echo '








',"\n"; echo '',"\n"; } function BeginContentArea( $formName ) { echo ' ',"\n"; echo '
',"\n"; } function EndContentArea( $saveSessionVars, $formName, $initialFocus ) { global $confirmationMsg; global $errorMsg; global $packageLoadErrorMsg; if ( $saveSessionVars ) { $confirmationMsg = ""; $errorMsg = ""; $packageLoadErrorMsg = ""; SaveSessionVars(); } if ( $formName != NULL ) { echo '
',"\n"; if ( $initialFocus != NULL ) echo ' ',"\n"; } echo ' ',"\n"; } function DisplayTitleBar( $title, $helpPage ) { $hrColspan = $helpPage == NULL ? '1' : '2'; echo '',"\n"; echo ' ',"\n"; echo ' ',"\n"; DisplayHelpButton( $helpPage ); echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
'.$title.'

',"\n"; } function DisplayConfirmationMsg( $msg ) { if ( !empty( $msg ) ) { echo '
',"\n"; echo $msg; echo '
',"\n"; echo '
',"\n"; } } function DisplayErrorMsg( $msg ) { if ( !empty( $msg ) ) { echo '
',"\n"; echo $msg; echo '
',"\n"; echo '
',"\n"; } } function DisplaySiteServerSelector( $selectedSiteServerID ) { global $site; echo '', "\n"; } function GetSiteServerSelection( $selectedSiteServerID ) { global $site; global $_POST; global $_GET; global $errNotFound; $selectedSite = NULL; $selectedSiteServerName = ""; if ( array_key_exists( $selectedSiteServerID.NO_PERSISTENCE_FLAG, $_POST ) ) { $selectedSiteServerName = $_POST[ $selectedSiteServerID.NO_PERSISTENCE_FLAG ]; } else { if ( array_key_exists( $selectedSiteServerID, $_GET ) ) $selectedSiteServerName = $_GET[ $selectedSiteServerID ]; } if($site != NULL && $selectedSiteServerName != "") { for($i = 0; $i < $site->GetSiteServerCount(); $i++) { $siteInfo = $site->GetSiteServerInfo($i); if($siteInfo != NULL) { $target = $siteInfo->GetTarget(); $port = $siteInfo->GetPort(MgSiteInfo_Admin); $id = $target.":".strval($port); if($id == $selectedSiteServerName) { $selectedSite = $siteInfo; } } } } return $selectedSite; } class ToolbarButtonRecord { var $id; var $label; var $icon; var $action; var $disabled; var $submitForm; function ToolbarButtonRecord() { $this->id = ""; $this->label = ""; $this->icon = ""; $this->action = ""; $this->disabled = false; $this->submitForm = true; } } function DisplayStandaloneToolbar( $buttons, $formName, $class ) { CreateToolbar( $buttons, $formName, $class ); } function DisplayToolbar( $buttons, $formName ) { CreateToolbar( $buttons, $formName, "toolbar" ); } function CreateToolbar( $buttons, $formName, $class ) { if ( $buttons == null || empty( $buttons ) ) return; echo '',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',"\n"; foreach ( $buttons as $button ) { if ( !$button->disabled ) { echo ' id ) ) echo ' name="', $button->id, '"', "\n"; $haveAction = !empty( $button->action ); $haveForm = !empty( $formName ); if ( $haveAction || $haveForm ) { echo ' onClick="'; if ( $haveAction ) echo $button->action; if ( $haveAction && $haveForm ) echo ";"; if ( $haveForm && $button->submitForm ) echo "SubmitForm('",$formName,"');"; echo '"'; } echo " >\n"; } if ( !empty( $button->icon ) ) echo ' ', "\n"; if ( !empty( $button->label ) ) echo ' ', $button->label, "\n"; if ( !$button->disabled ) echo '',"\n"; else echo "\n"; echo '   ', "\n"; } echo '
',"\n"; } function CreateJavaScriptArrayStr( $arrayName, $values ) { $arrayStr = ' var '.$arrayName.' = '; if ( $values != null ) { $arrayStr = $arrayStr.'new Array('; $separator = ' '; foreach ( $values as $value ) { $arrayStr = $arrayStr.$separator."'".$value."'"; $separator = ', '; } $arrayStr = $arrayStr.' );'; } else $arrayStr = $arrayStr.'null;'; return $arrayStr; } define( 'NO_PERSISTENCE_FLAG', "_DO_NOT_PERSIST" ); function DisplaySaveCancelBar() { echo " 
"; echo "\n"; echo '',"\n"; echo ' ', "\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',"\n"; echo ' ',"\n"; echo '  ',"\n"; echo ' ',"\n"; echo '
',"\n"; echo " 
"; } define( 'ADD_BUTTON_ID', "AddButton" ); define( 'REMOVE_BUTTON_ID', "RemoveButton" ); class AddRemoveControlRecord { var $enabled; var $size; var $leadInStr; var $col1Name; var $col3Name; var $col1Heading; var $col3Heading; var $col1List; var $col3List; var $col1OnChange; var $col3OnChange; var $col1Vals; var $col3Vals; function AddRemoveControlRecord() { $this->enabled = false; $this->size = 10; $this->leadInStr = ""; $this->col1Name = ""; $this->col3Name = ""; $this->col1Heading = ""; $this->col3Heading = ""; $this->col1List = array(); $this->col3List = array(); $this->col1OnChange = ""; $this->col3OnChange = ""; $this->col1Vals = array(); $this->col3Vals = array(); } } function DisplayAddRemoveControl( $control ) { // Display Lead In, if specified if ( !empty( $control->leadInStr ) ) { echo ' ',"\n"; echo '
',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',$control->leadInStr,'
',"\n"; echo ' ',"\n"; echo '
',"\n"; } // Is the control enabled? if ( $control->enabled ) $enabledStr = ""; else $enabledStr = " disabled"; // Display control echo '',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',$control->col1Heading,'',$control->col3Heading,'
',"\n"; $onChangeStr = !empty( $control->col1OnChange ) ? ' onChange="'.$control->col1OnChange.'" ' : ''; echo ' ',"\n"; echo ' ',"\n"; echo ' col1Name,"', '",$control->col3Name,"'",')">',"\n"; echo '

',"\n"; echo ' col3Name,"', '",$control->col1Name,"'",')">',"\n"; echo '
',"\n"; $onChangeStr = !empty( $control->col3OnChange ) ? ' onChange="'.$control->col3OnChange.'" ' : ''; echo ' ',"\n"; echo '
',"\n"; } function DisplayServerSelector( $selectedServerID, $selectedServer, $formName ) { $serverTable = GetServerData(); echo '', "\n"; } function GetServerSelection( $selectedServerID, &$selectedServer ) { global $site; global $_POST; global $_GET; global $errNotFound; $serverTable = GetServerData(); if ( array_key_exists( $selectedServerID.NO_PERSISTENCE_FLAG, $_POST ) ) { $selectedServerName = $_POST[ $selectedServerID.NO_PERSISTENCE_FLAG ]; foreach ( $serverTable as $serverKey => $serverRec ) { if ( $serverRec->name == $selectedServerName ) { $selectedServer = $serverKey; break; } } } else { if ( array_key_exists( $selectedServerID, $_GET ) ) $selectedServer = $_GET[ $selectedServerID ]; } if ( !array_key_exists( $selectedServer, $serverTable ) ) throw new Exception( sprintf( $errNotFound, $selectedServer ) ); } class ServiceSelectorRecord { var $serverAddress; var $drawingOnID; var $drawingOn; var $featureOnID; var $featureOn; var $mappingOnID; var $mappingOn; var $renderingOnID; var $renderingOn; var $tileOnID; var $tileOn; var $enabled; function ServiceSelectorRecord() { $this->serverAddress = ""; $this->drawingOnID = "drawingServiceOn"; $this->drawingOn = true; $this->featureOnID = "featureServiceOn"; $this->featureOn = true; $this->mappingOnID = "mappingServiceOn"; $this->mappingOn = true; $this->renderingOnID = "renderingServiceOn"; $this->renderingOn = false; $this->tileOnID = "tileServiceOn"; $this->tileOn = true; $this->enabled = true; } } function DisplayServiceSelector( $serviceSelector ) { global $site; if ( $serviceSelector == NULL ) return; $siteServerAddress = $site->GetCurrentSiteAddress(); if ( $serviceSelector->serverAddress == $siteServerAddress ) { echo 'Site
', "\n"; echo 'Resource
', "\n"; } if ( $serviceSelector->enabled ) $enabledStr = ""; else $enabledStr = "disabled "; echo 'drawingOn ) echo ' checked '; echo '>Drawing
', "\n"; echo 'featureOn ) echo ' checked '; echo '>Feature
', "\n"; echo 'mappingOn ) echo 'checked '; echo '>Mapping
', "\n"; echo 'renderingOn ) echo 'checked '; echo '>Rendering
', "\n"; echo 'tileOn ) echo 'checked '; echo '>Tile
', "\n"; } class OnlineSelectorRecord { var $onlineID; var $onlineVal; var $enabled; function OnlineSelectorRecord() { $this->onlineID = ""; $this->onlineVal = false; $this->enabled = true; } } function DisplayOnlineSelector( $onlineSelector ) { if ( $onlineSelector == NULL ) return; if ( $onlineSelector->onlineVal ) { $onlineChecked = " checked "; $offlineChecked = ""; } else { $onlineChecked = ""; $offlineChecked = " checked "; } if ( $onlineSelector->enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo 'Online
', "\n"; echo 'Offline', "\n"; } function DisplayLogSelector( $selectedLogID, $selectedLog, $pageLink ) { global $logLabels; foreach ( $logLabels as $key =>$label ) { echo ' '; echo $label; } else { echo 'deselectedLogTab">'; echo ''; echo $label; echo ''; } echo '',"\n"; } echo ' ', "\n"; } function DisplayLogSelectorWithActiveTab( $selectedLogID, $selectedLog, $pageLink ) { global $logLabelsWithActiveLabel; CreateLogSelector( $logLabelsWithActiveLabel, $selectedLogID, $selectedLog, $pageLink ); } function CreateLogSelector( $requiredLabels, $selectedLogID, $selectedLog, $pageLink ) { foreach ( $requiredLabels as $key => $label ) { echo ' '; echo $label; } else { echo 'DeselectedLogTab">'; echo ''; echo $label; echo ''; } echo '',"\n"; } echo ' ', "\n"; } function GetLogSelection( $selectedLogID, &$selectedLog ) { global $_GET; global $_POST; if ( array_key_exists( $selectedLogID, $_GET ) ) $selectedLog = $_GET[ $selectedLogID ]; else if ( array_key_exists( $selectedLogID, $_POST ) ) $selectedLog = $_POST[ $selectedLogID ]; } function DisplayEnabledBar( $label, $name, $checked, $enabled, $enableFields ) { // Set checked String if ( $checked ) $checkedStr = "checked"; else $checkedStr = ""; // Set Enabled String if ( $enabled ) $enabledStr = ""; else $enabledStr = "disabled"; // Set OnClick string if ( $enableFields != null && !empty( $enableFields ) ) { $onClickStr = ' onClick = "'; $arrayStr = CreateJavaScriptArrayStr( 'fields', $enableFields ); $onClickStr = $onClickStr.$arrayStr; $onClickStr = $onClickStr.' ChangeEnable( fields );"'; } else $onClickStr = ""; echo "\n"; echo "

\n"; echo '',"\n"; echo ' ', "\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',"\n"; echo ' ',$label, "\n"; echo ' ',"\n"; echo ' Enabled',"\n"; echo '
',"\n"; echo " 
\n"; } define ( 'TABLE_PAGE_ID', "TablePageID" ); function GetPageNumber( $items, $currItem, $pageSize ) { global $_GET; global $_POST; $page = 1; if ( array_key_exists( TABLE_PAGE_ID, $_GET ) ) $page = $_GET[ TABLE_PAGE_ID ]; else if ( array_key_exists( TABLE_PAGE_ID, $_POST ) ) $page = $_POST[ TABLE_PAGE_ID ]; else if ( !empty( $currItem ) ) { $itemIndex = array_search( $currItem, $items ); if ( $itemIndex != NULL ) $page = floor( $itemIndex / $pageSize ) + 1; } $numItems = sizeof( $items ); $numPages = ceil( $numItems / $pageSize ); if ( $page > $numPages ) $page = 1; return $page; } define( 'SORT_DIRECTION_ID', "Sort" ); define( 'SORT_COLUMN_ID', "SortColumn" ); function DisplayPaginationControl( $currPage, $numItems, $pageSize, $pageLink, $sortColumn=NULL, $sortDirection=NULL ) { if ( $numItems <= $pageSize ) return; $pageCount = ceil( $numItems / $pageSize ); echo '',"\n"; $currGroup = floor( ($currPage-1) / 10 ); $first = ( $currGroup * 10 ) + 1; $last = ( $currGroup + 1 ) * 10; if ( $last > $pageCount ) $last = $pageCount; $sortDirectionStr = ( $sortDirection == NULL ) ? "" : "&".SORT_DIRECTION_ID.'='.$sortDirection; $sortColumnStr = ( $sortColumn == NULL ) ? "" : "&".SORT_COLUMN_ID.'='.$sortColumn; echo '
',"\n"; if ( $currPage > 1 ) echo ' <<Prev',"\n"; for ( $i = $first; $i <= $last; $i++ ) { if ( $i == $currPage ) echo '   ',$i, "\n"; else echo '   ',$i,'',"\n"; } if ( $currPage < $pageCount ) echo '   Next>>',"\n"; echo '
',"\n"; } function GetPageRange( $currPage, $numItems, $pageSize, &$firstIndex, &$lastIndex ) { if ( $pageSize == 0 ) { $firstIndex = 0; $lastIndex = $numItems - 1; } else { $firstIndex = ( $currPage - 1 ) * $pageSize; $lastIndex = $firstIndex + $pageSize - 1; if ( $lastIndex > ($numItems - 1) ) $lastIndex = $numItems - 1; } } define( 'DISPLAY_NAME_ID', "serverDisplayName" ); define( 'LOCALE_ID', "serverLocale" ); define( 'DEFAULT_MESSAGE_LOCALE_ID', "serverDefaultMessageLocale" ); define( 'LOCALIZATION_RESOURCES_PATH_ID', "serverLocalizationResourcesPath" ); define( 'TCP_IP_MTU_ID', "serverTcpIpMtu" ); define( 'TEMP_PATH_ID', "serverTempPath" ); define( 'FDO_PATH_ID', "serverFdoPath" ); define( 'EMAIL_ID', "serverEmail" ); define( 'CONNECTION_TIMEOUT_ID', "connectionTimeOut" ); define( 'CONNECTION_TIMER_INT_ID', "connectionTimerInt" ); function GetServerGeneralPropVals( $post, $props ) { if ( array_key_exists( DISPLAY_NAME_ID, $post ) ) { $props->displayName = $post[ DISPLAY_NAME_ID ]; CleanUpMagicQuotes( $props->displayName ); } if ( array_key_exists( LOCALE_ID, $post ) ) $props->locale = $post[ LOCALE_ID ]; if ( array_key_exists( DEFAULT_MESSAGE_LOCALE_ID, $post ) ) $props->defaultMessageLocale = $post[ DEFAULT_MESSAGE_LOCALE_ID ]; if ( array_key_exists( LOCALIZATION_RESOURCES_PATH_ID, $post ) ) { $props->localizationResourcesPath = $post[ LOCALIZATION_RESOURCES_PATH_ID ]; CleanUpMagicQuotes( $props->localizationResourcesPath ); } if ( array_key_exists( TCP_IP_MTU_ID, $post ) ) $props->tcpIpMtu = $post[ TCP_IP_MTU_ID ]; if ( array_key_exists( TEMP_PATH_ID, $post ) ) { $props->tempPath = $post[ TEMP_PATH_ID ]; CleanUpMagicQuotes( $props->tempPath ); } if ( array_key_exists( FDO_PATH_ID, $post ) ) { $props->fdoPath = $post[ FDO_PATH_ID ]; CleanUpMagicQuotes( $props->fdoPath ); } if ( array_key_exists( EMAIL_ID, $post ) ) $props->email = $post[ EMAIL_ID ]; if ( array_key_exists( CONNECTION_TIMEOUT_ID, $post ) ) $props->connectionTimeOut = $post[ CONNECTION_TIMEOUT_ID ]; if ( array_key_exists( CONNECTION_TIMER_INT_ID, $post ) ) $props->connectionTimerInt = $post[ CONNECTION_TIMER_INT_ID ]; } function DisplayServerGeneralPropVals( $enabled, $props ) { if ( $enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
General Properties

Display name:
Locale:
Default message locale:
Localization resources path:
TCP/IP maximum transmission unit:
Temporary file path:
FDO file path:
Administrator',"'",'s email address:
Connection timeout (seconds):
Connection timer interval (seconds):
',"\n"; } define( 'MAX_CONNS_ID', "MaxConns" ); define( 'PORT_ID', "Port" ); define( 'QUEUE_SIZE_ID', "QueueSize" ); define( 'THREAD_POOL_SIZE_ID', "ThreadPoolSize" ); function GetServerConnectionPropVals( $post, $props, $connStr ) { if ( array_key_exists( $connStr.MAX_CONNS_ID, $post ) ) $props->maxConns = $post[ $connStr.MAX_CONNS_ID ]; if ( array_key_exists( $connStr.PORT_ID, $post ) ) $props->port = $post[ $connStr.PORT_ID ]; if ( array_key_exists( $connStr.QUEUE_SIZE_ID, $post ) ) $props->queueSize = $post[ $connStr.QUEUE_SIZE_ID ]; if ( array_key_exists( $connStr.THREAD_POOL_SIZE_ID, $post ) ) $props->threadPoolSize = $post[ $connStr.THREAD_POOL_SIZE_ID ]; } function DisplayServerConnectionPropVals( $enabled, $props, $connStr, $title ) { if ( $enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
',$title,'

Maximum connections:
Port:
Maximum queued operations:
Maximum threads in pool:
',"\n"; } define( 'LOG_ENABLED_ID', "Enabled" ); define( 'LOG_FILENAME_ID', "Filename" ); define( 'LOG_PARMS_SELECTED_ID', "ParmsSelected" ); define( 'LOG_PARMS_NOT_SELECTED_ID', "ParmsNotSelected" ); function GetLogPropVals( $post, $props, $logStr ) { if ( array_key_exists( $logStr.LOG_ENABLED_ID, $post ) ) $props->enabled = true; else $props->enabled = false; if ( array_key_exists( $logStr.LOG_FILENAME_ID, $post ) ) { $props->filename = $post[ $logStr.LOG_FILENAME_ID ]; CleanUpMagicQuotes( $props->filename ); } if ( array_key_exists( $logStr.LOG_PARMS_SELECTED_ID, $post ) ) $props->parmsSelected = $post[ $logStr.LOG_PARMS_SELECTED_ID ]; if ( array_key_exists( $logStr.LOG_PARMS_NOT_SELECTED_ID, $post) ) $props->parmsNotSelected = $post[ $logStr.LOG_PARMS_NOT_SELECTED_ID ]; } define( 'FEATURE_SERVICE_ENABLED_ID', "featureServiceEnabled" ); define( 'FEATURE_SERVICE_CONN_POOL_SIZE_ID', "featureDataConnPoolSize" ); define( 'FEATURE_SERVICE_CONN_POOL_SIZE_CUSTOM_ID', "featureDataConnPoolSizeCustom" ); define( 'FEATURE_SERVICE_CONN_TIMEOUT_ID', "featureDataConnTimeOut" ); define( 'FEATURE_SERVICE_CONN_TIMER_INT_ID', "featureConnectionTimerInteval" ); define( 'FEATURE_SERVICE_DATA_CACHE_SIZE_ID', "featureDataCacheSize" ); function GetFeatureServicePropVals( $post, $props ) { if ( array_key_exists( FEATURE_SERVICE_ENABLED_ID, $post ) ) $props->enabled = '1'; else $props->enabled = '0'; if ( array_key_exists( FEATURE_SERVICE_CONN_POOL_SIZE_ID, $post ) ) $props->dataConnPoolSize = $post[ FEATURE_SERVICE_CONN_POOL_SIZE_ID ]; if ( array_key_exists( FEATURE_SERVICE_CONN_POOL_SIZE_CUSTOM_ID, $post ) ) $props->dataConnPoolSizeCustom = $post[ FEATURE_SERVICE_CONN_POOL_SIZE_CUSTOM_ID ]; if ( array_key_exists( FEATURE_SERVICE_CONN_TIMEOUT_ID, $post ) ) $props->dataConnTimeOut = $post[ FEATURE_SERVICE_CONN_TIMEOUT_ID ]; if ( array_key_exists( FEATURE_SERVICE_CONN_TIMER_INT_ID, $post ) ) $props->dataConnTimerInt = $post[ FEATURE_SERVICE_CONN_TIMER_INT_ID ]; if ( array_key_exists( FEATURE_SERVICE_DATA_CACHE_SIZE_ID, $post ) ) $props->dataCacheSize = $post[ FEATURE_SERVICE_DATA_CACHE_SIZE_ID ]; } function DisplayFeatureServicePropVals( $enabled, $props ) { $sectionFields = array( FEATURE_SERVICE_CONN_POOL_SIZE_ID, FEATURE_SERVICE_CONN_POOL_SIZE_CUSTOM_ID, FEATURE_SERVICE_CONN_TIMEOUT_ID, FEATURE_SERVICE_CONN_TIMER_INT_ID, FEATURE_SERVICE_DATA_CACHE_SIZE_ID ); DisplayEnabledBar( "Feature Service", FEATURE_SERVICE_ENABLED_ID, $props->enabled, false, $sectionFields ); if ( $enabled && $props->enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Maximum connections pooled per provider (default):
Maximum connections pooled per provider (custom):
Data connection timeout (seconds):
Data connection timer interval (seconds):
Maximum features cached:
',"\n"; } define( 'RESOURCE_SERVICE_DATA_FILE_TRASH_FOLDER_ID', "resourceDataFileTrashFolder" ); define( 'RESOURCE_SERVICE_LIBRARY_DATA_FILE_FOLDER_ID', "resourceLibraryDataFileFolder" ); define( 'RESOURCE_SERVICE_LIBRARY_REPOSITORY_FOLDER_ID', "resourceLibraryRepositoryFolder" ); define( 'RESOURCE_SERVICE_SESSION_DATA_FILE_FOLDER_ID', "resourceSessionDataFileFolder" ); define( 'RESOURCE_SERVICE_SESSION_REPOSITORY_FOLDER_ID', "resourceSessionRepositoryFolder" ); define( 'RESOURCE_SERVICE_SITE_REPOSITORY_FOLDER_ID', "resourceSiteRepositoryFolder" ); define( 'RESOURCE_SERVICE_RESOURCE_SCHEMA_FOLDER_ID', "resourceResourceSchemaFolder" ); define( 'RESOURCE_SERVICE_REPOSITORY_CHECKPOINTS_TIMER_INTERVAL_ID', "resourceResourceRepositoryCheckpointsTimerInterval" ); define( 'RESOURCE_SERVICE_PACKAGES_PATH_ID', "resourceResourcePackagesPath" ); function GetResourceServicePropVals( $post, $props ) { $props->enabled = true; if ( array_key_exists( RESOURCE_SERVICE_DATA_FILE_TRASH_FOLDER_ID, $post ) ) { $props->dataFileTrashFolder = $post[ RESOURCE_SERVICE_DATA_FILE_TRASH_FOLDER_ID ]; CleanUpMagicQuotes( $props->dataFileTrashFolder ); } if ( array_key_exists( RESOURCE_SERVICE_LIBRARY_DATA_FILE_FOLDER_ID, $post ) ) { $props->libraryDataFileFolder = $post[ RESOURCE_SERVICE_LIBRARY_DATA_FILE_FOLDER_ID ]; CleanUpMagicQuotes( $props->libraryDataFileFolder ); } if ( array_key_exists( RESOURCE_SERVICE_LIBRARY_REPOSITORY_FOLDER_ID, $post ) ) { $props->libraryRepositoryFolder = $post[ RESOURCE_SERVICE_LIBRARY_REPOSITORY_FOLDER_ID ]; CleanUpMagicQuotes( $props->libraryRepositoryFolder ); } if ( array_key_exists( RESOURCE_SERVICE_SESSION_DATA_FILE_FOLDER_ID, $post ) ) { $props->sessionDataFileFolder = $post[ RESOURCE_SERVICE_SESSION_DATA_FILE_FOLDER_ID ]; CleanUpMagicQuotes( $props->sessionDataFileFolder ); } if ( array_key_exists( RESOURCE_SERVICE_SESSION_REPOSITORY_FOLDER_ID, $post ) ) { $props->sessionRepositoryFolder = $post[ RESOURCE_SERVICE_SESSION_REPOSITORY_FOLDER_ID ]; CleanUpMagicQuotes( $props->sessionRepositoryFolder ); } if ( array_key_exists( RESOURCE_SERVICE_SITE_REPOSITORY_FOLDER_ID, $post ) ) { $props->siteRepositoryFolder = $post[ RESOURCE_SERVICE_SITE_REPOSITORY_FOLDER_ID ]; CleanUpMagicQuotes( $props->siteRepositoryFolder ); } if ( array_key_exists( RESOURCE_SERVICE_RESOURCE_SCHEMA_FOLDER_ID, $post ) ) { $props->resourceSchemaFolder = $post[ RESOURCE_SERVICE_RESOURCE_SCHEMA_FOLDER_ID ]; CleanUpMagicQuotes( $props->resourceSchemaFolder ); } if ( array_key_exists( RESOURCE_SERVICE_REPOSITORY_CHECKPOINTS_TIMER_INTERVAL_ID, $post ) ) { $props->repositoryCheckpointsTimerInterval = $post[ RESOURCE_SERVICE_REPOSITORY_CHECKPOINTS_TIMER_INTERVAL_ID ]; } if ( array_key_exists( RESOURCE_SERVICE_PACKAGES_PATH_ID, $post ) ) { $props->packagesPath = $post[ RESOURCE_SERVICE_PACKAGES_PATH_ID ]; CleanUpMagicQuotes( $props->packagesPath ); } } function DisplayResourceServicePropVals( $enabled, $props ) { DisplayEnabledBar( "Resource Service", "ResourceServiceEnabled", true, false, NULL ); if ( $enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Data file trash folder:
Library data file folder:
Library repository folder:
Session data file folder:
Session repository folder:
Site repository folder:
Resource schema folder:
Repository checkpoints timer interval (seconds):
Packages folder:
',"\n"; } define( 'TILE_SERVICE_ENABLED_ID', "tileServiceEnabled" ); define( 'TILE_SERVICE_TILE_CACHE_PATH_ID', "tileTileCachePath" ); function GetTileServicePropVals( $post, $props ) { if ( array_key_exists( TILE_SERVICE_ENABLED_ID, $post ) ) $props->enabled = true; else $props->enabled = false; if ( array_key_exists( TILE_SERVICE_TILE_CACHE_PATH_ID, $post ) ) { $props->tileCachePath = $post[ TILE_SERVICE_TILE_CACHE_PATH_ID ]; CleanUpMagicQuotes( $props->tileCachePath ); } } function DisplayTileServicePropVals( $enabled, $props ) { $sectionFields = array( TILE_SERVICE_TILE_CACHE_PATH_ID ); DisplayEnabledBar( "Tile Service", TILE_SERVICE_ENABLED_ID, $props->enabled, false, $sectionFields ); if ( $enabled && $props->enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Tile cache path:
',"\n"; } define( 'SITE_SERVICE_SESSION_TIMEOUT_ID', "sessionTimeout" ); define( 'SITE_SERVICE_SESSION_TIMER_INT_ID', "sessionTimerInt" ); function GetSiteServicePropVals( $post, $props ) { $props->enabled = true; if ( array_key_exists( SITE_SERVICE_SESSION_TIMEOUT_ID, $post ) ) $props->sessionTimeout = $post[ SITE_SERVICE_SESSION_TIMEOUT_ID ]; if ( array_key_exists( SITE_SERVICE_SESSION_TIMER_INT_ID, $post ) ) $props->sessionTimerInt = $post[ SITE_SERVICE_SESSION_TIMER_INT_ID ]; } function DisplaySiteServicePropVals( $enabled, $props ) { DisplayEnabledBar( "Site Service", "SiteServiceEnabled", true, false, NULL ); if ( $enabled ) $enabledStr = ""; else $enabledStr = " disabled "; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Session timeout (seconds):
Session timer interval (seconds):
',"\n"; } define( 'WMS_SERVICE_NAME_ID', "wmsName" ); define( 'WMS_SERVICE_TITLE_ID', "wmsTitle" ); define( 'WMS_SERVICE_ABSTRACT_ID', "wmsAbstract" ); define( 'WMS_SERVICE_FEES_ID', "wmsFees" ); define( 'WMS_SERVICE_ACCESS_CONSTRAINTS_ID', "wmsAccessConstraints" ); define( 'WMS_SERVICE_KEYWORDS_ID', "wmsKeywords" ); define( 'WMS_SERVICE_SERVER_NAME_ID', "wmsServerName" ); define( 'WMS_SERVICE_SCRIPT_NAME_ID', "wmsScriptName" ); function GetWmsServicePropVals( $post, $props ) { if ( array_key_exists( WMS_SERVICE_NAME_ID, $post ) ) { $props->serviceMetadata[ WMS_NAME_ITEM ] = $post[ WMS_SERVICE_NAME_ID ]; } if ( array_key_exists( WMS_SERVICE_TITLE_ID, $post ) ) { $props->serviceMetadata[ WMS_TITLE_ITEM ] = $post[ WMS_SERVICE_TITLE_ID ]; } if ( array_key_exists( WMS_SERVICE_ABSTRACT_ID, $post ) ) { $props->serviceMetadata[ WMS_ABSTRACT_ITEM ] = $post[ WMS_SERVICE_ABSTRACT_ID ]; } if ( array_key_exists( WMS_SERVICE_FEES_ID, $post ) ) { $props->serviceMetadata[ WMS_FEES_ITEM ] = $post[ WMS_SERVICE_FEES_ID ]; } if ( array_key_exists( WMS_SERVICE_ACCESS_CONSTRAINTS_ID, $post ) ) { $props->serviceMetadata[ WMS_ACCESS_CONSTRAINTS_ITEM ] = $post[ WMS_SERVICE_ACCESS_CONSTRAINTS_ID ]; } if ( array_key_exists( WMS_SERVICE_KEYWORDS_ID, $post ) ) { $keywordsStr = $post[ WMS_SERVICE_KEYWORDS_ID ]; $keyword = strtok( $keywordsStr, "," ); while ( $keyword !== false ) { $keyword = trim( $keyword ); if ( !empty( $keyword ) ) $props->keywords[] = $keyword; $keyword = strtok(","); } } if ( array_key_exists( WMS_SERVICE_SERVER_NAME_ID, $post ) ) { $props->serviceMetadata[ WMS_SERVER_NAME_ITEM ] = $post[ WMS_SERVICE_SERVER_NAME_ID ]; CleanUpMagicQuotes( $props->serviceMetadata[ WMS_SERVER_NAME_ITEM ] ); } if ( array_key_exists( WMS_SERVICE_SCRIPT_NAME_ID, $post ) ) { $props->serviceMetadata[ WMS_SCRIPT_NAME_ITEM ] = $post[ WMS_SERVICE_SCRIPT_NAME_ID ]; CleanUpMagicQuotes( $props->serviceMetadata[ WMS_SCRIPT_NAME_ITEM ] ); } } function DisplayWmsServicePropVals( $props ) { $keywordsStr = ''; foreach ( $props->keywords as $keyword ) $keywordsStr = empty( $keywordsStr ) ? $keyword : $keywordsStr.", ".$keyword; echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
General Properties

Name:
Title:
Abstract:',"\n"; echo '
Fees:
Access constraints:
Keywords:
Server name:
Script name:
',"\n"; } define( 'WMS_SERVICE_CONTACT_NAME_ID', "wmsContactName" ); define( 'WMS_SERVICE_CONTACT_ORGANIZATION_ID', "wmsContactOrganization" ); define( 'WMS_SERVICE_CONTACT_POSITION_ID', "wmsContactPosition" ); define( 'WMS_SERVICE_CONTACT_ADDRESS_TYPE_ID', "wmsContactAddressType" ); define( 'WMS_SERVICE_CONTACT_STREET_ID', "wmsContactStreet" ); define( 'WMS_SERVICE_CONTACT_CITY_ID', "wmsContactCity" ); define( 'WMS_SERVICE_CONTACT_STATE_PROV_ID', "wmsContactStateProv" ); define( 'WMS_SERVICE_CONTACT_POST_CODE_ID', "wmsContactPostCode" ); define( 'WMS_SERVICE_CONTACT_COUNTRY_ID', "wmsContactCountry" ); define( 'WMS_SERVICE_CONTACT_PHONE_ID', "wmsContactPhone" ); define( 'WMS_SERVICE_CONTACT_FAX_ID', "wmsContactFax" ); define( 'WMS_SERVICE_CONTACT_EMAIL_ID', "wmsContactEmail" ); function GetWmsServiceContactPropVals( $post, $props ) { if ( array_key_exists( WMS_SERVICE_CONTACT_NAME_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_NAME_ITEM ] = $post[ WMS_SERVICE_CONTACT_NAME_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_ORGANIZATION_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ORGANIZATION_ITEM ] = $post[ WMS_SERVICE_CONTACT_ORGANIZATION_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_POSITION_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_POSITION_ITEM ] = $post[ WMS_SERVICE_CONTACT_POSITION_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_ADDRESS_TYPE_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_TYPE_ITEM ] = $post[ WMS_SERVICE_CONTACT_ADDRESS_TYPE_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_STREET_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_STREET_ITEM ] = $post[ WMS_SERVICE_CONTACT_STREET_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_CITY_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_CITY_ITEM ] = $post[ WMS_SERVICE_CONTACT_CITY_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_STATE_PROV_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_STATE_PROV_ITEM ] = $post[ WMS_SERVICE_CONTACT_STATE_PROV_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_POST_CODE_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_POST_CODE_ITEM ] = $post[ WMS_SERVICE_CONTACT_POST_CODE_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_COUNTRY_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_ADDRESS_COUNTRY_ITEM ] = $post[ WMS_SERVICE_CONTACT_COUNTRY_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_PHONE_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_PHONE_ITEM ] = $post[ WMS_SERVICE_CONTACT_PHONE_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_FAX_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_FAX_ITEM ] = $post[ WMS_SERVICE_CONTACT_FAX_ID ]; } if ( array_key_exists( WMS_SERVICE_CONTACT_EMAIL_ID, $post ) ) { $props->serviceMetadata[ WMS_CONTACT_EMAIL_ITEM ] = $post[ WMS_SERVICE_CONTACT_EMAIL_ID ]; } } function DisplayWmsServiceContactPropVals( $props ) { echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Contact Properties

Name:
Organization:
Position:
 
Address type:
Street:
City:
State/Province:
Post code:
Country:
 
Phone:
Fax:
Email:
',"\n"; } define( 'WFS_SERVICE_NAME_ID', "wfsName" ); define( 'WFS_SERVICE_TITLE_ID', "wfsTitle" ); define( 'WFS_SERVICE_ABSTRACT_ID', "wfsAbstract" ); define( 'WFS_SERVICE_FEES_ID', "wfsFees" ); define( 'WFS_SERVICE_ACCESS_CONSTRAINTS_ID', "wfsAccessConstraints" ); define( 'WFS_SERVICE_KEYWORDS_ID', "wfsKeywords" ); define( 'WFS_SERVICE_SERVER_NAME_ID', "wfsServerName" ); define( 'WFS_SERVICE_SCRIPT_NAME_ID', "wfsScriptName" ); function GetWfsServicePropVals( $post, $props ) { if ( array_key_exists( WFS_SERVICE_NAME_ID, $post ) ) { $props->serviceMetadata[ WFS_NAME_ITEM ] = $post[ WFS_SERVICE_NAME_ID ]; } if ( array_key_exists( WFS_SERVICE_TITLE_ID, $post ) ) { $props->serviceMetadata[ WFS_TITLE_ITEM ] = $post[ WFS_SERVICE_TITLE_ID ]; } if ( array_key_exists( WFS_SERVICE_ABSTRACT_ID, $post ) ) { $props->serviceMetadata[ WFS_ABSTRACT_ITEM ] = $post[ WFS_SERVICE_ABSTRACT_ID ]; } if ( array_key_exists( WFS_SERVICE_FEES_ID, $post ) ) { $props->serviceMetadata[ WFS_FEES_ITEM ] = $post[ WFS_SERVICE_FEES_ID ]; } if ( array_key_exists( WFS_SERVICE_ACCESS_CONSTRAINTS_ID, $post ) ) { $props->serviceMetadata[ WFS_ACCESS_CONSTRAINTS_ITEM ] = $post[ WFS_SERVICE_ACCESS_CONSTRAINTS_ID ]; } if ( array_key_exists( WFS_SERVICE_KEYWORDS_ID, $post ) ) { $keywordsStr = $post[ WFS_SERVICE_KEYWORDS_ID ]; $keyword = strtok( $keywordsStr, "," ); while ( $keyword !== false ) { $keyword = trim( $keyword ); if ( !empty( $keyword ) ) $props->keywords[] = $keyword; $keyword = strtok(","); } } if ( array_key_exists( WFS_SERVICE_SERVER_NAME_ID, $post ) ) { $props->serviceMetadata[ WFS_SERVER_NAME_ITEM ] = $post[ WFS_SERVICE_SERVER_NAME_ID ]; CleanUpMagicQuotes( $props->serviceMetadata[ WFS_SERVER_NAME_ITEM ] ); } if ( array_key_exists( WFS_SERVICE_SCRIPT_NAME_ID, $post ) ) { $props->serviceMetadata[ WFS_SCRIPT_NAME_ITEM ] = $post[ WFS_SERVICE_SCRIPT_NAME_ID ]; CleanUpMagicQuotes( $props->serviceMetadata[ WFS_SCRIPT_NAME_ITEM ] ); } } function DisplayWfsServicePropVals( $props ) { $keywordsStr = ''; foreach ( $props->keywords as $keyword ) $keywordsStr = empty( $keywordsStr ) ? $keyword : $keywordsStr.", ".$keyword; echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
General Properties

Name:
Title:
Abstract:',"\n"; echo '
Fees:
Access constraints:
Keywords:
Server name:
Script name:
',"\n"; } define( 'WFS_SERVICE_CONTACT_NAME_ID', "wfsContactName" ); define( 'WFS_SERVICE_CONTACT_ORGANIZATION_ID', "wfsContactOrganization" ); define( 'WFS_SERVICE_CONTACT_POSITION_ID', "wfsContactPosition" ); define( 'WFS_SERVICE_CONTACT_ADDRESS_TYPE_ID', "wfsContactAddressType" ); define( 'WFS_SERVICE_CONTACT_STREET_ID', "wfsContactStreet" ); define( 'WFS_SERVICE_CONTACT_CITY_ID', "wfsContactCity" ); define( 'WFS_SERVICE_CONTACT_STATE_PROV_ID', "wfsContactStateProv" ); define( 'WFS_SERVICE_CONTACT_POST_CODE_ID', "wfsContactPostCode" ); define( 'WFS_SERVICE_CONTACT_COUNTRY_ID', "wfsContactCountry" ); define( 'WFS_SERVICE_CONTACT_PHONE_ID', "wfsContactPhone" ); define( 'WFS_SERVICE_CONTACT_FAX_ID', "wfsContactFax" ); define( 'WFS_SERVICE_CONTACT_EMAIL_ID', "wfsContactEmail" ); function GetWfsServiceContactPropVals( $post, $props ) { if ( array_key_exists( WFS_SERVICE_CONTACT_NAME_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_NAME_ITEM ] = $post[ WFS_SERVICE_CONTACT_NAME_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_ORGANIZATION_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ORGANIZATION_ITEM ] = $post[ WFS_SERVICE_CONTACT_ORGANIZATION_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_POSITION_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_POSITION_ITEM ] = $post[ WFS_SERVICE_CONTACT_POSITION_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_ADDRESS_TYPE_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_TYPE_ITEM ] = $post[ WFS_SERVICE_CONTACT_ADDRESS_TYPE_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_STREET_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_STREET_ITEM ] = $post[ WFS_SERVICE_CONTACT_STREET_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_CITY_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_CITY_ITEM ] = $post[ WFS_SERVICE_CONTACT_CITY_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_STATE_PROV_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_STATE_PROV_ITEM ] = $post[ WFS_SERVICE_CONTACT_STATE_PROV_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_POST_CODE_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_POST_CODE_ITEM ] = $post[ WFS_SERVICE_CONTACT_POST_CODE_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_COUNTRY_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_ADDRESS_COUNTRY_ITEM ] = $post[ WFS_SERVICE_CONTACT_COUNTRY_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_PHONE_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_PHONE_ITEM ] = $post[ WFS_SERVICE_CONTACT_PHONE_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_FAX_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_FAX_ITEM ] = $post[ WFS_SERVICE_CONTACT_FAX_ID ]; } if ( array_key_exists( WFS_SERVICE_CONTACT_EMAIL_ID, $post ) ) { $props->serviceMetadata[ WFS_CONTACT_EMAIL_ITEM ] = $post[ WFS_SERVICE_CONTACT_EMAIL_ID ]; } } function DisplayWfsServiceContactPropVals( $props ) { echo '

',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo ' ',"\n"; echo '
Contact Properties

Name:
Organization:
Position:
 
Address type:
Street:
City:
State/Province:
Post code:
Country:
 
Phone:
Fax:
Email:
',"\n"; } ////// Utility Functions ////// function CreateListOfItemsForTable( $items, &$numItems, &$itemListStr ) { $numItems = sizeof( $items ); $itemListStr = ""; if ( $numItems > 0 ) $itemListStr = $itemListStr." (".$items[0]; if ( $numItems > 1 ) $itemListStr = $itemListStr.', '.$items[1]; if ( $numItems > 2 ) $itemListStr = $itemListStr.", ..."; if ( $numItems > 0 ) $itemListStr = $itemListStr.")"; } function CreateListOfRoleHyperlinksForTable( $item, &$itemListStr, $bUserTable, $currSelection ) { $adminOn = $item->adminOn || ( $bUserTable && sizeof( $item->adminFromGroups ) > 0 ); $authorOn = $item->authorOn || ( $bUserTable && sizeof( $item->authorFromGroups ) > 0 ); $rolesStr = ""; if ( $adminOn ) $rolesStr = $rolesStr.'Administrator'; if ( $adminOn && $authorOn ) $rolesStr = $rolesStr.', '; if ( $authorOn ) $rolesStr = $rolesStr.'Author'; $itemListStr = ""; if ( !empty( $rolesStr ) ) { if ( $bUserTable ) $itemListStr = ''; else $itemListStr = ''; $itemListStr = $itemListStr.$rolesStr.''; } } function CreateListOfUserHyperlinksForTable( $items, &$numItems, &$itemListStr ) { $numItems = sizeof( $items ); $itemListStr = ""; // show maximum ten users $maxItems = $numItems; if ( $maxItems > 10 ) $maxItems = 10; if ( $maxItems > 0 ) { $itemListStr = $itemListStr.' ('.$items[0].''; for ( $i = 1; $i < $maxItems; $i++ ) { $itemListStr = $itemListStr.', '.$items[$i].''; } // show ellipses if there are more than ten users if ( $numItems > 10 ) $itemListStr = $itemListStr.", ..."; $itemListStr = $itemListStr.")"; } } function CreateListOfGroupHyperlinksForTable( $items, &$numItems, &$itemListStr ) { $numItems = sizeof( $items ); $itemListStr = ""; if ( $numItems > 0 ) { $itemListStr = $itemListStr.' ('; for ( $i = 0; $i < $numItems; $i++ ) { if ( $i > 0 ) $itemListStr = $itemListStr.', '; if ( $items[$i] == MgGroup::Everyone ) $itemListStr = $itemListStr.$items[$i]; else $itemListStr = $itemListStr.''.$items[$i].''; } $itemListStr = $itemListStr.")"; } } function CheckForFatalMgException( $exception ) { if ( $exception instanceof MgAuthenticationFailedException || $exception instanceof MgConnectionFailedException || $exception instanceof MgConnectionNotOpenException || $exception instanceof MgDuplicateSessionException || $exception instanceof MgLicenseException || $exception instanceof MgLicenseExpiredException || $exception instanceof MgSessionExpiredException ) { LogoutWithFatalException(); } } function LogoutWithFatalException() { global $site; global $errFatalError; $site->Close(); header( "Location: login.php?".ERROR_MSG_ID."=".$errFatalError ); exit(); } function RegisterPopup( $pageName, $registerSelf, $valuesToPersist ) { $popupForm = 'popupRegistrationForm'; $popupName = $registerSelf ? 'window.name' : 'parent.name'; echo ''."\n"; BeginContentArea( $popupForm ); DeclareHiddenVars( $pageName ); if ( $valuesToPersist != NULL ) foreach ( $valuesToPersist as $id => $val ) echo '',"\n"; EndContentArea( true, $popupForm, NULL ); echo ''."\n"; exit(); } define( 'HELP_PAGE_ID', "HelpPage" ); function DisplayHelpButton( $helpPage ) { if ( $helpPage == NULL ) return; $onClickStr = "window.open( 'help.php?".HELP_PAGE_ID."=".$helpPage."', 'HelpWindow', 'width=800, height=600, scrollbars, resizable, menubar=yes, toolbar=yes' ); return false;"; echo ' ',"\n"; echo ' ',"\n"; echo '  Help',"\n"; echo ' ',"\n"; echo ' ',"\n"; } ?>