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


PHP system::OLIV_BASE方法代码示例

本文整理汇总了PHP中system::OLIV_BASE方法的典型用法代码示例。如果您正苦于以下问题:PHP system::OLIV_BASE方法的具体用法?PHP system::OLIV_BASE怎么用?PHP system::OLIV_BASE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在system的用法示例。


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

示例1: __construct

 function __construct($header)
 {
     //TODO use https when loggin in
     // use ssh for login
     //		$host = "https://" . OLIV_SSH_HOST . "/" . OLIV_BASE . "index.php";
     $host = "http://" . system::OLIV_SSH_HOST() . "/" . system::OLIV_BASE() . "index.php";
     // load login content xml
     $this->content = OLIVModule::load_content($header);
     // select template for logged of not logged
     if (status::OLIV_USER()) {
         $header->param->template = "logged";
         $this->content->username = OLIVUser::getName(status::OLIV_USER());
         if (status::OLIV_SU()) {
             $this->content->su = status::OLIV_SU();
         } else {
             $this->content->user_groups = OLIVUser::getGroupName(status::OLIV_USER());
         }
     } else {
         // check if wrong login
         if (argv::action() == "login") {
             $header->param->template = "incorrect";
         }
     }
     // load correct template
     $this->template = OLIVModule::load_template($header);
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:26,代码来源:login.php

示例2: header

 public function header()
 {
     $base = system::OLIV_PROTOCOL() . system::OLIV_HOST() . system::OLIV_BASE();
     $o = "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
     // set page to utf-8
     $o .= "<base href='{$base}'>";
     // link base referenz
     $o .= "<title>" . status::oliv_page() . "</title>";
     // page title in browser
     $o .= "<link href='" . OLIVImage::_(system::OLIV_ICON()) . "' type='image/x-icon' rel='shortcut icon'>";
     // icon in browser
     return $o;
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:13,代码来源:html.php

示例3: explode

//DEBUG
//echoall($_SERVER[HTTPS]);
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// set document root path
$pathArray = explode("/", $_SERVER['SCRIPT_FILENAME']);
system::set('OLIV_SCRIPT_NAME', array_pop($pathArray));
system::set('OLIV_DOCUMENT_ROOT', implode("/", $pathArray) . "/");
$pathArray = explode("/", $_SERVER['SCRIPT_NAME']);
array_pop($pathArray);
if (!$pathArray[0]) {
    array_shift($pathArray);
}
system::set('OLIV_BASE', implode("/", $pathArray) . "/");
// clear / if base is root directory
if (system::OLIV_BASE() == "/") {
    system::set('OLIV_BASE', "");
}
system::set('OLIV_HOST', $_SERVER['HTTP_HOST'] . "/");
//------------------------------------------------------------------------------
// set http / https protocol
if (isset($_SERVER['HTTPS'])) {
    system::set('OLIV_PROTOCOL', "https://");
} else {
    system::set('OLIV_PROTOCOL', "http://");
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// load system definitions
if (file_exists(system::OLIV_CORE_PATH() . "system.xml")) {
    $coreXml = simplexml_load_file(system::OLIV_CORE_PATH() . "system.xml");
开发者ID:nibble-arts,项目名称:oliv,代码行数:31,代码来源:init.php

示例4: makeUrl

 public static function makeUrl($lang, $url)
 {
     $valArray = array();
     if ($url) {
         $routeArray = array(system::OLIV_PROTOCOL() . system::OLIV_HOST() . system::OLIV_BASE() . system::OLIV_SCRIPT_NAME());
         if ($lang) {
             array_push($routeArray, $lang);
         } else {
             $lang = status::lang();
         }
         // use friendly name for url
         $path = OLIVRoute::makePath($url);
         // tranlsate and combine path
         foreach ($path as $entry) {
             array_push($valArray, OLIVRoute::translateFriendlyName($lang, $entry));
         }
         $val = implode("/", $valArray);
         if ($val) {
             array_push($routeArray, $val);
         }
         return implode("/", $routeArray);
     }
 }
开发者ID:nibble-arts,项目名称:oliv,代码行数:23,代码来源:route.php


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