本文整理汇总了PHP中GetRequestParameters函数的典型用法代码示例。如果您正苦于以下问题:PHP GetRequestParameters函数的具体用法?PHP GetRequestParameters怎么用?PHP GetRequestParameters使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetRequestParameters函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DisplayInitializationErrorHTML
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
$fusionMGpath = '../../../layers/MapGuide/php/';
include $fusionMGpath . 'Common.php';
if (InitializationErrorOccurred()) {
DisplayInitializationErrorHTML();
exit;
}
$locale = GetDefaultLocale();
$clr = "000000";
$allowTransparency = 0;
$transparent = 0;
GetRequestParameters();
$templ = file_get_contents("./ColorPicker.templ");
SetLocalizedFilesPath(GetLocalizationPath());
$templ = Localize($templ, $locale, GetClientOS());
print sprintf($templ, $clr, $allowTransparency ? "true" : "false", $transparent ? "true" : "false");
function GetParameters($params)
{
global $clr, $allowTransparency, $transparent, $locale;
if (isset($params['LOCALE'])) {
$locale = $params['LOCALE'];
}
$clr = $params['CLR'];
$allowTransparency = $params['ALLOWTRANS'];
$transparent = $params['TRANS'];
}
function GetRequestParameters()
示例2: BuildViewer
function BuildViewer($forDwf = true)
{
global $debug, $webLayoutDefinition, $cmds, $locale;
global $sessionId, $username, $password, $orgSessionId;
global $mapName;
global $product;
SetLocalizedFilesPath(GetLocalizationPath());
try {
// Initialize web tier with the site configuration file.
InitializeWebTier();
//fetch the parameters for this request
//
GetRequestParameters();
//Open a connection with the server
//
$createSession = true;
$cred = new MgUserInformation();
if ($sessionId != '') {
$cred->SetMgSessionId($sessionId);
$createSession = false;
} else {
if ($username != '') {
$cred->SetMgUsernamePassword($username, $password);
} else {
requestAuthentication();
return;
}
}
$site = new MgSiteConnection();
$cred->SetLocale($locale);
$cred->SetClientIp(GetClientIp());
$cred->SetClientAgent(GetClientAgent());
$site->Open($cred);
if ($createSession) {
$site1 = $site->GetSite();
$sessionId = $site1->CreateSession();
if ($forDwf == false) {
$orgSessionId = $sessionId;
}
}
//Get a MgWebLayout object initialized with the specified web layout definition
//
$webLayout = null;
try {
$resourceSrvc = $site->CreateService(MgServiceType::ResourceService);
$webLayoutId = new MgResourceIdentifier($webLayoutDefinition);
$webLayout = new MgWebLayout($resourceSrvc, $webLayoutId);
} catch (MgUnauthorizedAccessException $e) {
requestAuthentication();
return;
} catch (MgException $e) {
$shortError = $e->GetExceptionMessage();
$longErrorMsg = EscapeForHtml($e->GetDetails());
header("HTTP/1.1 559 ");
header('Content-Type: text/html; charset=utf-8');
header("Status: 559 {$shortError}");
echo "<html>\n<body>\n";
echo $longErrorMsg;
echo "</body>\n</html>\n";
return;
}
//calculate the size of the variable elements of the viewer
//
$toolBar = $webLayout->GetToolBar();
$statusBar = $webLayout->GetStatusBar();
$taskPane = $webLayout->GetTaskPane();
$infoPane = $webLayout->GetInformationPane();
$taskBar = $taskPane->GetTaskBar();
$mapDef = $webLayout->GetMapDefinition();
$startupScriptCode = $webLayout->GetStartupScript();
$selectionColor = $webLayout->GetSelectionColor();
$mapImgFormat = $webLayout->GetMapImageFormat();
$selImgFormat = $webLayout->GetSelectionImageFormat();
$pointBuffer = $webLayout->GetPointSelectionBuffer();
$showTaskPane = $taskPane->IsVisible();
$showTaskBar = $taskBar->IsVisible();
$showStatusbar = $statusBar->IsVisible();
$showToolbar = $toolBar->IsVisible();
$taskPaneWidth = $taskPane->GetWidth();
$toolbarHeight = 30;
$taskbarHeight = 30;
$statusbarHeight = 26;
$taskWidth = $showTaskPane ? $taskPaneWidth : 0;
$toolbarHeight = $showToolbar ? $toolbarHeight : 0;
$taskbarHeight = $showTaskBar ? $taskbarHeight : 0;
$statusbarHeight = $showStatusbar ? $statusbarHeight : 0;
//Encode the initial url so that it does not trip any sub-frames (especially if this url has parameters)
$taskPaneUrl = urlencode($taskPane->GetInitialTaskUrl());
$vpath = GetSurroundVirtualPath();
$defHome = false;
if ($taskPaneUrl == "") {
$taskPaneUrl = "gettingstarted.php";
$defHome = true;
}
$mapDefinitionUrl = urlencode($mapDef);
// NOTE:
//
// We don't open a MgMap because it is being created by mapframe.php that is also probably running
// as this script is running. However the naming convention is fixed enough that we can figure out
// what to pass to the Task Pane
//.........这里部分代码省略.........