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


PHP SetLocalizedFilesPath函数代码示例

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


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

示例1: __construct

    function __construct($args)
    {
        $this->args = $args;
        $this->site = new MgSiteConnection();
        $this->site->Open(new MgUserInformation($args['SESSION']));

        SetLocalizedFilesPath(GetLocalizationPath());
        if(isset($_REQUEST['LOCALE'])) {
            $locale = $_REQUEST['LOCALE'];
        } else {
            $locale = GetDefaultLocale();
        }

        $equalToLocal = GetLocalizedString('QUERYEQUALTO', $locale );
        $notEqualToLocal = GetLocalizedString('QUERYNOTEQUALTO', $locale );
        $greatThanLocal = GetLocalizedString('QUERYGREATTHAN', $locale );
        $greatThanEqualLocal = GetLocalizedString('QUERYGREATTHANEQUAL', $locale );
        $lessThanLocal = GetLocalizedString('QUERYLESSTHAN', $locale );
        $lessThanEqualLocal = GetLocalizedString('QUERYLESSTHANEQUAL', $locale );
        $beginLocal = GetLocalizedString('QUERYBEGIN', $locale );
        $containsLocal = GetLocalizedString('QUERYCONTAINS', $locale );

        $this->numOperators = array($equalToLocal, $notEqualToLocal, $greatThanLocal, $greatThanEqualLocal, $lessThanLocal, $lessThanEqualLocal);
        $this->numExpressions = array(' = %s', ' != %s', ' > %s', ' >= %s', ' < %s', ' <= %s');

        $this->strOperators = array($beginLocal, $containsLocal, $equalToLocal);
        $this->strExpressions = array(" like '%s%%'", " like '%%%s%%'", " = '%s'");
    }
开发者ID:ranyaof,项目名称:gismaster,代码行数:28,代码来源:query.php

示例2: GetDefaultLocale

//  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';
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);
?>
开发者ID:kanbang,项目名称:Colt,代码行数:31,代码来源:quickplotpreviewinner.php

示例3: 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
//.........这里部分代码省略.........
开发者ID:kanbang,项目名称:Colt,代码行数:101,代码来源:mainframe.php


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