當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。