phpDocumentor XH
[ class tree: XH ] [ index: XH ] [ all elements ]

Procedural File: cms.php

Source Location: /cmsimple/cms.php

Page Details

The main file of CMSimple_XH.

PHP versions 4 and 5

Author:  The CMSimple_XH developers <devs@cmsimple-xh.org>
Author:  Peter Harteg <peter@harteg.dk>
Version:  SVN: $Id: cms.php 1693 2016-12-14 23:14:04Z cmb69 $
Copyright:  1999-2009 Peter Harteg
Copyright:  2009-2016 The CMSimple_XH developers <http://cmsimple-xh.org/?The_Team>
Link:  http://cmsimple-xh.org/
License:  GNU GPLv3
Includes
include ($pth['file']['plugin_admin']) [line 1164]
[ Top ]

include ($pth['file']['template']) [line 1381]
[ Top ]

include ($pth['file']['plugin_index']) [line 1153]
[ Top ]

include_once ($pth['file']['plugin_classes']) [line 887]
[ Top ]

include_once ($pth['folder']['cmsimple'].'userfuncs.php') [line 1038]
[ Top ]

include_once ($pth['folder']['classes'].'LinkChecker.php') [line 1292]
[ Top ]

include_once ($pth['folder']['cmsimple'].'adminfuncs.php') [line 923]
[ Top ]

require_once ($pth['folder']['classes'].'PluginMenu.php') [line 278]
[ Top ]

require_once ($pth['folder']['cmsimple'].'tplfuncs.php') [line 271]
[ Top ]

require_once (UTF8.'/ucfirst.php') [line 280]
[ Top ]

require_once ($pth['folder']['cmsimple'].'functions.php') [line 270]
[ Top ]

require_once ($pth['folder']['classes'].'PasswordHash.php') [line 274]
[ Top ]

require_once ($pth['folder']['classes'].'PageDataView.php') [line 277]
[ Top ]

require_once ($pth['folder']['classes'].'PageDataModel.php') [line 276]
[ Top ]

require_once ($pth['folder']['classes'].'PageDataRouter.php') [line 275]
[ Top ]

require_once (UTF8.'/utils/validation.php') [line 281]
[ Top ]

require_once ($pth['folder']['classes'].'Controller.php') [line 272]
[ Top ]

require_once ($pth['folder']['plugins'].'utf8/utf8.php') [line 279]
[ Top ]

require_once ($pth['folder']['classes'].'CSRFProtection.php') [line 273]
[ Top ]


Constants
CMSIMPLE_BASE  [line 768]

CMSIMPLE_BASE = $pth['folder']['base']

The relative path of the root folder.


[ Top ]

CMSIMPLE_ROOT  [line 763]

CMSIMPLE_ROOT = XH_getRootFolder()

The absolute path of the root folder.


[ Top ]

CMSIMPLE_URL  [line 777]

CMSIMPLE_URL = 'http'.(!empty($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!='off'?'s':'').'://'.$_SERVER['HTTP_HOST'].$sn

The fully qualified absolute URL of the installation (main or current language).

API Tags:
See:  $sn

Information Tags:
Since:  1.6

[ Top ]

CMSIMPLE_XH_BUILD  [line 214]

CMSIMPLE_XH_BUILD = '@CMSIMPLE_XH_BUILD@'

The build number as integer: YYYYMMDDBB


[ Top ]

CMSIMPLE_XH_DATE  [line 218]

CMSIMPLE_XH_DATE = '@CMSIMPLE_XH_DATE@'

The release date in ISO 8601 format: YYYY-MM-DD


[ Top ]

CMSIMPLE_XH_VERSION  [line 210]

CMSIMPLE_XH_VERSION = '@CMSIMPLE_XH_VERSION@'

The version in textual representation, e.g. CMSimple_XH 1.6


[ Top ]

PLUGINLOADER  [line 1051]

PLUGINLOADER = true

For compatibility with plugins.


[ Top ]

PLUGINLOADER_VERSION  [line 1056]

PLUGINLOADER_VERSION = 2.111

For compatibility with plugins.


[ Top ]

XH_ADM  [line 920]

XH_ADM = $adm

Whether admin mode is active.

API Tags:
See:  $adm

Information Tags:
Link:  http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#xh_adm
Since:  1.5.4

[ Top ]

XH_FORM_NAMESPACE  [line 1063]

XH_FORM_NAMESPACE = 'PL3bbeec384_'

A unique prefix for autogenerated forms.

Information Tags:
Link:  http://forum.cmsimple-xh.dk/?f=12&t=4956#p25550

[ Top ]

XH_URICHAR_SEPARATOR  [line 89]

XH_URICHAR_SEPARATOR = '|'

The separator for urichar_org/new.

Information Tags:
Since:  1.6

[ Top ]


Globals
string   $action [line 485]

The requested action.

This read-only variable is initialized from an action GET/POST parameter, and is usually used in combination with $admin to request some functionality of a plugin back-end.

Default value:  null
API Tags:
Access:  public


[ Top ]

bool   $adm [line 837]

Whether admin mode is active.

This variable is strictly read-only.

Default value:  0
API Tags:
See:  XH_ADM
Access:  public


[ Top ]

string   $admin [line 472]

The requested plugin administration part.

This read-only variable is initialized from an admin GET/POST parameter, and is usually used in combination with $action to request some functionality of a plugin back-end.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $bjs [line 160]

(X)HTML that will be inserted right before the </body> tag.

This read-write variable can be used to add script elements to the end of the body element. Usually you will only append to this variable.

Default value:  ''
API Tags:
See:  $hjs
Access:  public

Information Tags:
Link:  http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#bjs
Since:  1.5.4

[ Top ]

array   $c [line 992]

The content of the pages.

Treat as read-only when in edit mode.

Default value:  null
API Tags:
Access:  public


[ Top ]

array   $cf [line 303]

The configuration of the core.

Should be treated as read-only.

Default value:  XH_readConfiguration()
API Tags:
See:  $plugin_cf
Access:  public


[ Top ]

bool   $cgi [line 443]

Whether PHP is executed as (F)CGI.

Should be treated as read-only.

Default value:  (php_sapi_name() == 'cgi' || php_sapi_name() == 'cgi-fcgi')
API Tags:
Access:  public


[ Top ]

int   $cl [line 944]

The number of pages.

Treat as read-only.

Default value:  0
API Tags:
Access:  public


[ Top ]

string   $download [line 560]

The filename requested for download.

This variable is initialized from a download GET/POST parameter.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $downloads [line 573]

Whether the file browser is requested to show the download folder.

This variable is initialized from a downloads GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $e [line 128]

The (X)HTML for the <li>s holding error messages.

This read-write variable can be used to add error messages above the content. Usually you will only append to this variable.

Default value:  ''
API Tags:
See:  e()
Access:  public


[ Top ]

string   $edit [line 627]

Whether edit mode is requested.

This read-only variable is initialized from a edit GET/POST parameter or the mode cookie. If you want to switch to edit or view mode, you should set the edit GET parameter.

Default value:  null
API Tags:
See:  $normal
Access:  public


[ Top ]

array   $errors [line 332]

Debug output generated by PHP according to debug mode.

Default value:  array()
API Tags:
Access:  private


[ Top ]

string   $f [line 850]

The requested function.

This read-write variable is initialized from different GET/POST parameters. Usually you will want to treat it as read-only or even as private.

Default value:  ''
API Tags:
Access:  public


[ Top ]

string   $file [line 665]

The name of a special file to be handled in the back-end.

This variable is initialized from a file GET/POST parameter.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $function [line 498]

The requested function.

This variable is set from a function GET/POST parameter, which denotes some special functionality. If set from your extension treat it as read-write; otherwise ignore it.

Default value:  null
API Tags:
Access:  public


[ Top ]

array   $h [line 1005]

The headings of the pages.

Treat as read-only.

Default value:  null
API Tags:
See:  h()
Access:  public


[ Top ]

array   $hc [line 1199]

The page indexes of the visible menu items.

This read-only variable can be used to build a menu with li().

Default value:  array()
API Tags:
Access:  public


[ Top ]

string   $hjs [line 142]

(X)HTML that will be inserted to the <head> section.

This read-write variable can be used to add script, style, meta and link elements etc. to the head element. Usually you will only append to this variable.

Default value:  ''
API Tags:
See:  $bjs
Access:  public


[ Top ]

int   $hl [line 1208]

The length of $hc.

Default value:  -1
API Tags:
Access:  private


[ Top ]

mixed   $i [line 194]

A temporary (loop) value.

This read-write variable can be used to avoid polluting the global scope.

Default value:  null
API Tags:
Access:  public


[ Top ]

bool   $iis [line 432]

Whether the webserver is IIS.

Should be treated as read-only.

Default value:  strpos(sv('SERVER_SOFTWARE'), "IIS")
API Tags:
Access:  public


[ Top ]

string   $images [line 586]

Whether the file browser is requested to show the image folder.

This variable is initialized from a images GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

Default value:  null
API Tags:
Access:  public


[ Top ]

mixed   $j [line 205]

A temporary (loop) value.

This read-write variable can be used to avoid polluting the global scope.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $keycut [line 525]

The admin password.

This variable is initialized from a keycut GET/POST parameter.

This variable has been renamed from $passwd since CMSimple_XH 1.6 to avoid trouble with mod_security.

Default value:  null
API Tags:
Access:  private


[ Top ]

array   $l [line 1031]

The menu levels of the pages.

Treat as read-only.

Default value:  null
API Tags:
See:  l()
Access:  public


[ Top ]

string   $login [line 511]

Whether login is requested.

This variable is initialized from a login GET/POST parameter. If the login has been successful, $f == 'login'; otherwise $f == 'xh_login_failed'.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $logout [line 537]

Whether logout is requested.

This variable is initialized from a logout GET/POST parameter. On logout $f == 'xh_loggedout'.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $mailform [line 549]

Whether the mailform is requested.

This variable is initialized from a mailform GET/POST parameter. If the mailform has been requested $f == 'mailform'.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $media [line 599]

Whether the file browser is requested to show the media folder.

This variable is initialized from a media GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $normal [line 642]

Whether normal mode is requested.

This read-only variable is initialized from a normal GET/POST parameter or the mode cookie. If you want to switch to edit or view mode, you should set the normal GET parameter.

Default value:  null
API Tags:
See:  $edit
Access:  public


[ Top ]

string   $o [line 114]

The (X)HTML for the contents area.

This read-write variable is used to buffer the output, which is prepended to the contents of the current page (if any). Usually you will only append to this variable.

Default value:  ''
API Tags:
Access:  public


[ Top ]

string   $onload [line 172]

JavaScript for the onload attribute of the body element.

This read-write variable can be used to register window onload event handlers. Usually you will only append to this variable.

Default value:  ''
API Tags:
Access:  public


[ Top ]

string   $output [line 1331]

The output to be manipulated by CMSimple scripting.

Default value:  null
API Tags:
Access:  public


[ Top ]

array   $pd_current [line 1100]

The infos about the current page.

Treat as read-only.

Default value:  $pd_router->find_page($pd_s)
API Tags:
Access:  public


[ Top ]

XH_PageDataRouter   $pd_router [line 955]

The page data router.

Treat as read-only.

Default value:  null
API Tags:
Access:  public


[ Top ]

int   $pd_s [line 1089]

The index of the currently requested page.

Treat as read-only. Note that the index of the currently requested page is available in $s after the plugins have been loaded. During plugin loading you may use $pd_s, but this is not guaranteed to be correct, as it may be set to 0, even if $s might later be -1.

Default value:  ($s == -1 && !$f && $o == '' && $su == '') ? $_XH_firstPublishedPage : $s
API Tags:
See:  $s
Access:  public


[ Top ]

string   $plugin [line 879]

The currently loaded plugin.

Should be treated as read-only.

Default value:  null
API Tags:
Access:  public


[ Top ]

array   $plugin_cf [line 1113]

The configuration of the plugins.

Treat as read-only.

Default value:  array()
API Tags:
See:  $cf
Access:  public


[ Top ]

array   $plugin_tx [line 1126]

The localization of the plugins.

Treat as read-only.

Default value:  array()
API Tags:
See:  $tx
Access:  public


[ Top ]

string   $print [line 654]

Whether print mode is requested.

This read-only variable is initialized from a print GET/POST parameter.

Default value:  null
API Tags:
Access:  public


[ Top ]

array   $pth [line 256]

A two dimensional array that holds the paths of important files and folders.

Should be treated as read-only.

Default value:  array()
API Tags:
Access:  public

Information Tags:
Link:  http://www.cmsimple-xh.org/wiki/doku.php/core_variables#pth

[ Top ]

int   $s [line 981]

The index of the currently requested page.

Treat as read-only. Note that $s is not properly set for the start page until all plugins are loaded. If you need the know the index of the currently requested page during plugin loading, consider to use $pd_s.

Default value:  -1
API Tags:
Access:  public


[ Top ]

string   $search [line 677]

The current search string.

This read-only variable is initialized from a search GET/POST parameter.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $selected [line 689]

The URL of the requested page.

This variable is initialized from a selected GET/POST parameter. If present $su is set accordingly.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $settings [line 700]

Whether the settings page is requested.

This variable is initialized from a settings GET/POST parameter.

Default value:  null
API Tags:
Access:  private


[ Top ]

int   $si [line 1217]

The index of the current page in $hc.

Default value:  -1
API Tags:
Access:  private


[ Top ]

string   $sitemap [line 712]

Whether the sitemap is requested.

This variable is initialized from a sitemap GET/POST parameter. If the sitemap is requested $f == 'sitemap'.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $sl [line 357]

The current language.

This read-only variable contains an ISO 639-1 language code.

Default value:  $temp
API Tags:
Access:  public


[ Top ]

string   $sn [line 456]

The relative path of the root folder, i.e. the script name.

Should be treated as read-only.

Default value:  preg_replace(
    '/([^\?]*)\?.*/', '$1',
    sv(($iis ? 'SCRIPT_NAME' : 'REQUEST_URI'))
)

API Tags:
See:  CMSIMPLE_URL
Access:  public


[ Top ]

string   $su [line 796]

The current page's URL (selected URL).

Should be treated as read-only.

Default value:  ''
API Tags:
See:  $u
See:  $selected
Access:  public


[ Top ]

mixed   $temp [line 183]

A temporary value.

This read-write variable can be used to avoid polluting the global scope.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $text [line 723]

The text of the editor on save.

This variable is initialized from a text GET/POST parameter.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $title [line 101]

The title of the current page.

This read-write variable can be used to set the page title in the plugin administration and for special extension pages.

Default value:  ''
API Tags:
Access:  public


[ Top ]

array   $tx [line 385]

The localization of the core.

Should be treated as read-only.

Default value:  XH_readConfiguration(false, true)
API Tags:
See:  $plugin_tx
Access:  public


[ Top ]

array   $txc [line 410]

The language configuration.

Default value:  array('template' => $tx['template'])
API Tags:
Deprecated:  since 1.6 (use $cf resp. $tx instead).
Access:  public


[ Top ]

array   $u [line 1018]

The URLs of the pages.

Treat as read-only.

Default value:  null
API Tags:
See:  $su
Access:  public


[ Top ]

string   $userfiles [line 612]

Whether the file browser is requested to show the userfiles folder.

This variable is initialized from a userfiles GET/POST parameter, and should only be used by file browsers and similar extensions, which may treat it as read-write.

Default value:  null
API Tags:
Access:  public


[ Top ]

string   $validate [line 734]

Whether the link check is requested.

This variable is initialized from a validate GET/POST parameter.

Default value:  null
API Tags:
Access:  private


[ Top ]

string   $xhpages [line 749]

Whether the page manager is requested.

This variable is initialized from a xhpages GET/POST parameter, and should only be used by page managers, which may treat it as read-write.

Default value:  null
API Tags:
Access:  public

Information Tags:
Link:  http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#page_managers

[ Top ]

object   $xh_hasher [line 859]

The password hasher.

Default value:  new PasswordHash(8, true)
API Tags:
Access:  private


[ Top ]

XH_CSRFProtection   $_XH_csrfProtection [line 902]

The CRSF protection object.

Should be treated as read-only.

Default value:  null
API Tags:
Access:  public

Information Tags:
Tutorial:  CSRF Protection

[ Top ]

int   $_XH_firstPublishedPage [line 968]

The index of the first published page.

Treat as read-only.

Default value:  -1
API Tags:
Access:  public

Information Tags:
Since:  1.6.3

[ Top ]

XH_ClassicPluginMenu   $_XH_pluginMenu [line 868]

The plugin menu builder.

Default value:  new XH_ClassicPluginMenu()
API Tags:
Access:  private


[ Top ]



Documentation generated on Thu, 15 Dec 2016 01:18:55 +0100 by phpDocumentor 1.4.4