Пример #1
0
 CheckForLogout();
 // Are we cancelling?  If so, there is nothing to do.
 CheckForCancel('performanceReport.php');
 // Define Local values
 $menuCategory = PERFORMANCE_REPORT_MENU_ITEM;
 $pageTitle = PERFORMANCE_REPORT_MENU_ITEM;
 $helpPage = 'HelpDocs/performance_report.htm';
 $pageName = 'PerformanceReportPage';
 $formName = 'PerformanceReportForm';
 $homePage = NULL;
 $confirmationMsg = "";
 $errorMsg = "";
 $mapProfileResult = new MapProfileResult();
 $mapResources;
 $displayManager = new DisplayProfileResultManager();
 $recentSettings = new RecentSettings();
 //this user-defined sort function is according to the design
 function CompareMapName($a, $b)
 {
     $strA = $a["ShortNames"];
     $strB = $b["ShortNames"];
     $strALength = strlen($strA);
     $strBLength = strlen($strB);
     $length = 0;
     if ($strALength >= $strBLength) {
         $length = $strBLength;
     } else {
         $length = $strALength;
     }
     if (0 == $strALength) {
         return 0;
Пример #2
0
        $newXmlFileName = "profilingmapxml/" . $newXmlFileId . ".xml";
        $fp = fopen($newXmlFileName, "w");
        fwrite($fp, $profilingResourceContent);
        fclose($fp);
        //put the file name in the session
        $_SESSION["ProfilingResultFile"] = $newXmlFileName;
        //read the result into the DOM
        $resultSource = new DOMDocument();
        $resultSource->load($newXmlFileName);
        $mapProfileResult->ReadFromXML($resultSource);
        $mapProfileResult->GetBaseLayerCount();
    }
    CheckMapExist();
    GetProfilingResults();
    $displayManager->mapProfileResult = $mapProfileResult;
    $recentSettings = new RecentSettings();
    $recentSettings->SaveRecentSettings($mapResourceId, $centerPoint, $scale);
    //set cookie
    //save the recent setting in the cookie, so next time the user open
    //the page will restore the last time setting
    //it will expire in 1 month
    setcookie("c_mapResourceId", $mapResourceId, time() + 60 * 60 * 24 * 30);
    setcookie("c_centerPoint", $centerPoint, time() + 60 * 60 * 24 * 30);
    setcookie("c_scale", $scale, time() + 60 * 60 * 24 * 30);
} catch (MgException $e) {
    CheckForFatalMgException($e);
    $errorMsg = $e->GetExceptionMessage();
} catch (Exception $e) {
    $errorMsg = $e->getMessage();
}
?>