当前位置: 首页>>代码示例>>PHP>>正文


PHP GetClientOS函数代码示例

本文整理汇总了PHP中GetClientOS函数的典型用法代码示例。如果您正苦于以下问题:PHP GetClientOS函数的具体用法?PHP GetClientOS怎么用?PHP GetClientOS使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetClientOS函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetRequestParameters

//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
include 'common.php';
$locale = "";
GetRequestParameters();
SetLocalizedFilesPath(GetLocalizationPath());
//This detection assumed 2 browsers, IE and Mozilla.
//Because Mozilla cannot render properly the border within the cell, we show this border only on IE
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (strpos($user_agent, "msie")) {
    $borderColor = "#c0c0c0";
} else {
    $borderColor = "#dfdfdf";
}
// Load the HTML template, format it and returns it to the client
//
print Localize(file_get_contents("../viewerfiles/statusbar.templ"), $locale, GetClientOS());
function GetParameters($params)
{
    global $locale;
    $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
}
function GetRequestParameters()
{
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        GetParameters($_POST);
    } else {
        GetParameters($_GET);
    }
}
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:statusbar.php

示例2: GetDefaultLocale

//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
include 'common.php';
include 'constants.php';
$locale = GetDefaultLocale();
$scaleDenominator;
$annotations;
$args = GetRequestMethod();
GetParameters($args);
$templ = file_get_contents("../viewerfiles/quickplotpreviewinner.templ");
SetLocalizedFilesPath(GetLocalizationPath());
// Localize the page
$templ = Localize($templ, $locale, GetClientOS());
// Set some annotation labels in the page by replacing the placeholders in the html code
$templ = str_replace(array_keys($annotations), array_values($annotations), $templ);
// Set the date annotation according to its format mask
$pattern = "/\\{date:.*\\[php=(.+?)\\].+?\\}/";
$matches = array();
if (preg_match($pattern, $templ, $matches)) {
    $mask = $matches[1];
    $date = date($mask);
    $templ = preg_replace($pattern, $date, $templ);
}
$jsPath = "../viewerfiles/";
print sprintf($templ, $jsPath);
?>

<?php 
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:quickplotpreviewinner.php

示例3: OnError

function OnError($title, $msg)
{
    global $target;
    $templ = Localize(file_get_contents("../viewerfiles/errorpage.templ"), $locale, GetClientOS());
    print sprintf($templ, "0", $title, $msg);
}
开发者ID:kanbang,项目名称:Colt,代码行数:6,代码来源:taskframe.php

示例4: BuildViewer


//.........这里部分代码省略.........
                            if ($action == MgWebActions::PrintMap) {
                                // declare the print layouts
                                $layouts = "var layouts" . $printCmdIndex . " = new Array();\n";
                                for ($j = 0; $j < $cmd->GetPrintLayoutCount(); $j++) {
                                    $layout = "";
                                    $layout = sprintf("layouts%d[%d] = \"%s\";\n", $printCmdIndex, $j, $cmd->GetPrintLayoutAt($j));
                                    $layouts = $layouts . $layout;
                                }
                                $cmdObjects = $cmdObjects . $layouts;
                                // declare a new print command object
                                $cmdObject = sprintf("commands[%d] = new PrintCommand(\"%s\", %d, \"%s\", \"%s\", \"%s\", \"%s\", layouts%d);\n", $i, StrEscape($name), $cmd->GetAction(), $cmd->GetIconUrl(), $cmd->GetDisabledIconUrl(), StrEscape($cmd->GetTooltip()), StrEscape($cmd->GetDescription()), $printCmdIndex);
                                $printCmdIndex++;
                            } else {
                                if ($action == MgWebActions::InvokeScript) {
                                    // declare a new basic command object
                                    $cmdObject = sprintf("commands[%d] = new InvokeScriptCommand(\"%s\", %d, \"%s\", \"%s\", \"%s\", \"%s\", %d);\n", $i, StrEscape($name), $cmd->GetAction(), $cmd->GetIconUrl(), $cmd->GetDisabledIconUrl(), StrEscape($cmd->GetTooltip()), StrEscape($cmd->GetDescription()), $scriptCmdIndex);
                                    $userCode = $userCode . "\nfunction UserFunc" . $scriptCmdIndex . "()\n{\n" . $cmd->GetScriptCode() . "\n}\n";
                                    $userCodeCalls = $userCodeCalls . sprintf("case %d: UserFunc%d(); break;\n", $scriptCmdIndex, $scriptCmdIndex);
                                    $scriptCmdIndex++;
                                } else {
                                    // declare a new basic command object
                                    $cmdObject = sprintf("commands[%d] = new BasicCommand(\"%s\", %d, \"%s\", \"%s\", \"%s\", \"%s\");\n", $i, $name, $cmd->GetAction(), $cmd->GetIconUrl(), $cmd->GetDisabledIconUrl(), StrEscape($cmd->GetTooltip()), StrEscape($cmd->GetDescription()));
                                }
                            }
                        }
                    }
                }
            }
            $cmdObjects = $cmdObjects . $cmdObject;
            $cmds[$name] = $i;
        }
        $userCodeCalls = $userCodeCalls . "\n}\n";
        //Declare toolbar items
        //
        $toolbarDef = DeclareUiItems($toolBar->GetWidgets(), "toolbarItems");
        //Declare task items
        $taskListDef = DeclareUiItems($taskBar->GetTaskList(), "taskItems");
        //Declare context menu items
        $ctxMenu = $webLayout->GetContextMenu();
        if ($ctxMenu->IsVisible()) {
            $ctxMenuDef = DeclareUiItems($ctxMenu, "ctxMenuItems");
        } else {
            $ctxMenuDef = "";
        }
        //task items texts
        //
        $taskItemTexts = "";
        $taskButtons = $taskBar->GetTaskButtons();
        for ($i = 0; $i < 4; $i++) {
            $btn = $taskButtons->GetWidget($i);
            if ($i > 0) {
                $taskItemTexts = $taskItemTexts . ",";
            }
            $taskItemTexts = $taskItemTexts . '"' . StrEscape($btn->GetName()) . '",' . '"' . StrEscape($btn->GetTooltip()) . '",' . '"' . StrEscape($btn->GetDescription()) . '",' . '"' . StrEscape($btn->GetIconUrl()) . '",' . '"' . StrEscape($btn->GetDisabledIconUrl()) . '"';
        }
        //transmit the session to the map pane if one was specified to this request
        if ($orgSessionId != "") {
            $sessionParam = "&SESSION=" . $orgSessionId;
        } else {
            $sessionParam = "";
        }
        //load the frameset template and format it
        $frameset = "";
        $viewerType = $forDwf ? "DWF" : "HTML";
        if ($showTaskBar) {
            $frameSetTempl = file_get_contents("../viewerfiles/framesettaskbar.templ");
            $frameset = sprintf($frameSetTempl, $statusbarHeight, $taskWidth, $toolbarHeight, $srcToolbar, $vpath . "mapframe.php", $mapDefinitionUrl, $viewerType, $showLegend ? 1 : 0, $showProperties ? 1 : 0, $infoWidth, $locale, $webLayout->GetHyperlinkTarget(), $webLayout->GetHyperlinkTargetFrame(), $webLayout->IsZoomControlVisible() ? 1 : 0, $selectionColor, $mapImgFormat, $selImgFormat, $pointBuffer, $sessionParam, $vpath . "formframe.php", $taskbarHeight + 1, $srcTaskBar, $srcTaskFrame, $srcStatusbar);
        } else {
            $frameSetTempl = file_get_contents("../viewerfiles/framesetnotaskbar.templ");
            $frameset = sprintf($frameSetTempl, $toolbarHeight, $statusbarHeight, $srcToolbar, $taskWidth, $vpath . "mapframe.php", $mapDefinitionUrl, $viewerType, $showLegend ? 1 : 0, $showProperties ? 1 : 0, $infoWidth, $locale, $webLayout->GetHyperlinkTarget(), $webLayout->GetHyperlinkTargetFrame(), $webLayout->IsZoomControlVisible() ? 1 : 0, $selectionColor, $mapImgFormat, $selImgFormat, $pointBuffer, $sessionParam, $srcTaskFrame, $vpath . "formframe.php", $srcStatusbar);
        }
        $homePageUrl = urldecode($taskPaneUrl);
        if (strlen($homePageUrl) < 8 || strncasecmp($homePageUrl, "http://", 7) != 0) {
            $homePageUrl = $vpath . $homePageUrl;
        }
        //load the HTML template and format it
        //
        $templ = Localize(file_get_contents("../viewerfiles/mainframe.templ"), $locale, GetClientOS());
        print sprintf($templ, $title, GetRootVirtualFolder() . "/mapagent/mapagent.fcgi", $enablePingServer ? 1 : 0, $site->GetSite()->GetSessionTimeout(), $locale, $showToolbar ? 1 : 0, $showStatusbar ? 1 : 0, $showTaskPane ? 1 : 0, $showTaskPane ? 0 : ($showTaskBar ? 1 : 0), $homePageUrl, $defHome ? "1" : "0", $webLayoutDefinition, $mapDef, $taskWidth, $center, $webLayout->GetScale(), StrEscape($title), $forDwf ? "1" : "0", $cmdObjects, $toolbarDef, $taskListDef, $ctxMenuDef, $userCode, $taskItemTexts, $selAwareCmds, $startupScriptCode, $vpath . "quickplotpanel.php", $vpath . "measureui.php", $vpath . "searchprompt.php", $vpath . "bufferui.php", $vpath . "selectwithinui.php", $userCodeCalls, $vpath . "viewoptions.php", $frameset);
    } catch (MgUserNotFoundException $e) {
        requestAuthentication();
    } catch (MgAuthenticationFailedException $e) {
        requestAuthentication();
    } catch (MgException $e) {
        // This should be a 500 error of some sort, but
        // in order to give a nice custom error message, it looks as
        // if we shortcut things by using a 200 status.
        $shortError = $e->GetExceptionMessage();
        $longErrorMsg = EscapeForHtml($e->GetDetails());
        header("HTTP/1.1 200 ");
        header('Content-Type: text/html; charset=utf-8');
        header("Status: 200 {$shortError}");
        echo "<html>\n<body>\n";
        echo $longErrorMsg;
        echo "</body>\n</html>\n";
    } catch (Exception $ne) {
        $errorMsg = EscapeForHtml($ne->GetMessage());
        echo $errorMsg;
    }
}
开发者ID:kanbang,项目名称:Colt,代码行数:101,代码来源:mainframe.php

示例5: GetRequestParameters

//  This library is free software; you can redistribute it and/or
//  modify it under the terms of version 2.1 of the GNU Lesser
//  General Public License as published by the Free Software Foundation.
//
//  This library is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
include 'common.php';
$locale = "";
GetRequestParameters();
SetLocalizedFilesPath(GetLocalizationPath());
print Localize(file_get_contents("../viewerfiles/tasklist.templ"), $locale, GetClientOS());
function GetParameters($params)
{
    global $locale;
    $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
}
function GetRequestParameters()
{
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        GetParameters($_POST);
    } else {
        GetParameters($_GET);
    }
}
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:tasklist.php

示例6: substr

            $bgColor = '#' . substr($bgColor, 2);
        } else {
            $bgColor = "white";
        }
        $scaleCreationCode = "";
        $scales = array();
        for ($i = 0; $i < $map->GetFiniteDisplayScaleCount(); $i++) {
            $scales[$i] = $map->GetFiniteDisplayScaleAt($i);
        }
        sort($scales);
        for ($i = 0; $i < count($scales); $i++) {
            $scaleCreationCode = $scaleCreationCode . "scales[" . $i . "]=" . str_replace(",", ".", $scales[$i]) . "; ";
        }
        $mapStateId = new MgResourceIdentifier("Session:" . $sessionId . "//" . $mapName . "." . MgResourceType::Map);
        $map->Save($resourceSrvc, $mapStateId);
        $templ = Localize(file_get_contents("../viewerfiles/ajaxmappane.templ"), $locale, GetClientOS());
        $vpath = GetSurroundVirtualPath();
        printf($templ, $tileSizeX, $tileSizeY, GetRootVirtualFolder() . "/mapagent/mapagent.fcgi", $mapName, $mapDefinition, $infoWidth, $showLegend ? "true" : "false", $showProperties ? "true" : "false", $sessionId, $llExtent->GetX(), $llExtent->GetY(), $urExtent->GetX(), $urExtent->GetY(), $metersPerUnit, $unitsType, $bgColor, $hlTgt, $hlTgtName, $vpath . "setselection.php", $showSlider ? "true" : "false", $locale, $scaleCreationCode, $selectionColor, $mapImgFormat, $selImgFormat, $pointBufferSize, $vpath . "ajaxviewerabout.php", $vpath . "legendctrl.php", urlencode($mapName), $sessionId, $locale, $vpath . "propertyctrl.php", $locale);
    } catch (MgException $e) {
        $errorMsg = EscapeForHtml($e->GetDetails());
        echo $errorMsg;
    }
}
//load ajax template code and format it
function GetParameters($params)
{
    global $mapDefinition, $type;
    global $infoWidth, $showLegend, $showProperties, $sessionId;
    global $locale, $hlTgt, $hlTgtName, $showSlider;
    global $selectionColor, $mapImgFormat, $selImgFormat, $pointBufferSize;
    $sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:mapframe.php

示例7: OnError

function OnError($title, $msg)
{
    global $target, $popup;
    $templ = Localize(file_get_contents("./ErrorPage.templ"), $locale, GetClientOS());
    print sprintf($templ, $popup, $mapName, $title, $msg);
}
开发者ID:alonso,项目名称:fusion,代码行数:6,代码来源:Buffer.php

示例8: GetRequestParameters

//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
//  Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public
//  License along with this library; if not, write to the Free Software
//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//
include 'common.php';
$tgt = 0;
$popup = 0;
$dwf = 0;
$locale = "";
GetRequestParameters();
SetLocalizedFilesPath(GetLocalizationPath());
$templ = Localize(file_get_contents("../viewerfiles/viewoptions.templ"), $locale, GetClientOS());
print sprintf($templ, $tgt, $popup, $dwf);
function GetParameters($params)
{
    global $tgt, $popup, $dwf, $locale;
    $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
    $tgt = GetIntParameter($params, 'TGT');
    $popup = GetIntParameter($params, 'POPUP');
    $dwf = GetIntParameter($params, 'DWF');
}
function GetRequestParameters()
{
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        GetParameters($_POST);
    } else {
        GetParameters($_GET);
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:viewoptions.php

示例9: GetRequestParameters

//
include 'common.php';
$locale = "";
GetRequestParameters();
SetLocalizedFilesPath(GetLocalizationPath());
// pass diferent button height depending on the browser
// to achieve a similar rendering, as there is no cross-browser conditional CSS
//
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if (strpos($user_agent, "msie")) {
    $btnHeight = 25;
} else {
    $btnHeight = 23;
}
// return the HTML template
//
$templ = Localize(file_get_contents("../viewerfiles/taskbar.templ"), $locale, GetClientOS());
printf($templ, $btnHeight);
function GetParameters($params)
{
    global $locale;
    $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
}
function GetRequestParameters()
{
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
        GetParameters($_POST);
    } else {
        GetParameters($_GET);
    }
}
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:taskbar.php


注:本文中的GetClientOS函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。