Namespaces | Enumerations | Variables

index.php File Reference

Go to the source code of this file.

Namespaces

namespace  pragyan
 

Widget Framework for Pragyan CMS (c) 2010 Pragyan Team http://www.gnu.org/licenses/ GNU Public License For more details, see README Add support for File Upload/Download via the widget's configurations Reload Widgets ,Get Widget Instances. see bottom.


Enumerations

enum  __PRAGYAN_CMS
 

Very important variable for detecting direct script access to any other .php file.

More...
enum  CMS_TITLE
 

Some of the previously defined global settings variables are converted into constants.

More...
enum  DEF_TEMPLATE
 

Default template name.

More...
enum  UPLOAD_SIZE_LIMIT
 

Upload size limit for the CMS. All the modules use this constant as the upload limit.

More...
enum  SEND_MAIL_ON_REGISTRATION
 

Whether to send a mail when a new user registers.

More...
enum  CMS_EMAIL
 

Email address to be used by CMS when sending mails to users.

More...
enum  ACTIVATE_USER_ON_REG
 

Whether to activate the user on registration.

More...
enum  TEMPLATE
 

Gets the page-specific template for that requested page.

More...

Variables

 $cmsFolder = "cms"
 Folder containing all library files.
 $moduleFolder = "modules"
 Folder containing all the modules.
 $templateFolder = "templates"
 Folder containing all the modules.
 $uploadFolder = "uploads"
 Folder containing the upload files, temporary files and session files.
 $widgetFolder = "widgets"
 Folder containing all the widgets.
 $debugSet = "off"
 Initial value of debug enabler, will get overridden by the config value.
 $sourceFolder = "/".$cmsFolder
 Complete location of the source folder.
 $PAGELASTUPDATED = ""
 Can be used to update the last updated time.
 $ERRORSTRING = ""
 Defined here. Will get appended by displayerror() in common.lib.php.
 $INFOSTRING = ""
 Defined here. Will get appended by displayinfo() in common.lib.php.
 $WARNINGSTRING = ""
 Defined here. Will get appended by displaywarning() in common.lib.php.
 $STARTSCRIPTS = ""
 Will contain a string containing all that has to be executed on window load.
 $urlRequestRoot = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/'))
 Root of the request - that path to cms base.
 $TEMPLATEBROWSERPATH = ""
 Full path to template folder as seen from the browser (defined in template.lib.php).
 $TEMPLATECODEPATH = ""
 Full path to template folder as seen by httpd while parsing (defined in template.lib.php).
 $SITEDESCRIPTION = ""
 Site description to be used in the HTML <meta> tag.
 $SITEKEYWORDS = ""
 Site keywords to be used in the HTML <meta> tag.
 $LOGINFORM = ""
 Login form to be used in template.
 $DEBUGINFO = ""
 Debugging information.
 $cookieSupported = false
 is cookie supported by the client's browser ?
 $ICONS = ""
 Stores all the icons locations along with.
 $ICONS_SRC = ""
 Stores all the icons locations without the.
 $WIDGETS = array()
 Variables for storing widgets.
 $onlineSiteUrl = "home"
 For example, if hosted on pragyan.org/10, $onlineSiteUrl = http://pragyan.org/10/home.
 if (!defined("ADMIN_USERID"))
 If config.inc.php doesn't exists, assume CMS hasn't been installed.
 $dbase
 Defined here to set its access as global to the project.
 $userId = firstTimeGetUserId()
else $pageFullPath = "home"
else $action = "view"
 $globals = getGlobalSettings()
 Get all the global settings from the database and convert into variables.
if($openid_enabled=='true') $rewriteEngineEnabled = $url_rewrite
 Check the status of URL rewriting taken from database.
 $FOOTER = $cms_footer
 $pageId = parseUrlReal($pageFullPath, $pageIdArray)
 Include all the required libraries.
if(URLSecurityCheck($_GET)) if(isset($_GET['fileget'])) $permission = getPermissions($userId, $pageId, $action)
 The URL may contain some harmful GET variables, so filter and block such URLs.
else $TITLE = CMS_TITLE
 $CONTENT = getContent($pageId, $action, $userId, $permission)
 Gets the content according to the user's permissions.
 $INHERITEDINFO = inheritedinfo($pageIdArray)
 Gets the inherited code (if any) from the parent page.
 $BREADCRUMB = breadcrumbs($pageIdArray,"&nbsp;»&nbsp;")
 Gets the breadcrumb.
 $MENUBAR = getMenu($userId, $pageIdArray)
 Gets the menubar consisting of the child pages from the current location upto a certain depth.
 $ACTIONBARMODULE = getActionbarModule($userId, $pageId)
 Gets the list of allowed actions for the current module on the page.

Enumeration Type Documentation

Very important variable for detecting direct script access to any other .php file.

Definition at line 29 of file index.php.

Whether to activate the user on registration.

Definition at line 174 of file index.php.

enum CMS_EMAIL

Email address to be used by CMS when sending mails to users.

Definition at line 171 of file index.php.

enum CMS_TITLE

Some of the previously defined global settings variables are converted into constants.

Title of the Website

Definition at line 159 of file index.php.

Default template name.

Definition at line 162 of file index.php.

Whether to send a mail when a new user registers.

Definition at line 168 of file index.php.

enum TEMPLATE

Gets the page-specific template for that requested page.

Definition at line 242 of file index.php.

Upload size limit for the CMS. All the modules use this constant as the upload limit.

Definition at line 165 of file index.php.


Variable Documentation

else $action = "view"

Definition at line 137 of file index.php.

$ACTIONBARMODULE = getActionbarModule($userId, $pageId)

Gets the list of allowed actions for the current module on the page.

Definition at line 275 of file index.php.

$BREADCRUMB = breadcrumbs($pageIdArray,"&nbsp;»&nbsp;")

Gets the breadcrumb.

Definition at line 257 of file index.php.

$cmsFolder = "cms"

Folder containing all library files.

Definition at line 32 of file index.php.

$CONTENT = getContent($pageId, $action, $userId, $permission)

Gets the content according to the user's permissions.

Definition at line 251 of file index.php.

$cookieSupported = false

is cookie supported by the client's browser ?

Authentication process begins here.

Definition at line 89 of file index.php.

$dbase

Defined here to set its access as global to the project.

Definition at line 117 of file index.php.

$DEBUGINFO = ""

Debugging information.

Definition at line 86 of file index.php.

$debugSet = "off"

Initial value of debug enabler, will get overridden by the config value.

Definition at line 47 of file index.php.

$ERRORSTRING = ""

Defined here. Will get appended by displayerror() in common.lib.php.

Definition at line 56 of file index.php.

$FOOTER = $cms_footer

Definition at line 178 of file index.php.

$globals = getGlobalSettings()

Get all the global settings from the database and convert into variables.

Definition at line 144 of file index.php.

$ICONS = ""

Stores all the icons locations along with.

tag, indexed by the icon name

Definition at line 92 of file index.php.

$ICONS_SRC = ""

Stores all the icons locations without the.

tag, indexed by the icon name

Definition at line 95 of file index.php.

$INFOSTRING = ""

Defined here. Will get appended by displayinfo() in common.lib.php.

Definition at line 59 of file index.php.

$INHERITEDINFO = inheritedinfo($pageIdArray)

Gets the inherited code (if any) from the parent page.

Definition at line 254 of file index.php.

$LOGINFORM = ""

Login form to be used in template.

Definition at line 83 of file index.php.

$MENUBAR = getMenu($userId, $pageIdArray)

Gets the menubar consisting of the child pages from the current location upto a certain depth.

Definition at line 260 of file index.php.

$moduleFolder = "modules"

Folder containing all the modules.

Definition at line 35 of file index.php.

$onlineSiteUrl = "home"

For example, if hosted on pragyan.org/10, $onlineSiteUrl = http://pragyan.org/10/home.

Definition at line 101 of file index.php.

else $pageFullPath = "home"

Definition at line 132 of file index.php.

$pageId = parseUrlReal($pageFullPath, $pageIdArray)

Include all the required libraries.

Parse the URL and retrieve the PageID of the request page if its valid

Definition at line 198 of file index.php.

$PAGELASTUPDATED = ""

Can be used to update the last updated time.

Definition at line 53 of file index.php.

if (URLSecurityCheck($_GET)) if (isset($_GET['fileget'])) $permission = getPermissions($userId, $pageId, $action)

The URL may contain some harmful GET variables, so filter and block such URLs.

The URL points to a file. Download permissions for the file are handled inside the download() function in download.lib.php Check whether the user has the permission to use that action on the requested page.

Definition at line 239 of file index.php.

if ($openid_enabled=='true') $rewriteEngineEnabled = $url_rewrite

Check the status of URL rewriting taken from database.

Definition at line 154 of file index.php.

$SITEDESCRIPTION = ""

Site description to be used in the HTML <meta> tag.

Definition at line 77 of file index.php.

$SITEKEYWORDS = ""

Site keywords to be used in the HTML <meta> tag.

Definition at line 80 of file index.php.

$sourceFolder = "/".$cmsFolder

Complete location of the source folder.

Definition at line 50 of file index.php.

$STARTSCRIPTS = ""

Will contain a string containing all that has to be executed on window load.

Definition at line 65 of file index.php.

$TEMPLATEBROWSERPATH = ""

Full path to template folder as seen from the browser (defined in template.lib.php).

Definition at line 71 of file index.php.

$TEMPLATECODEPATH = ""

Full path to template folder as seen by httpd while parsing (defined in template.lib.php).

Definition at line 74 of file index.php.

$templateFolder = "templates"

Folder containing all the modules.

Definition at line 38 of file index.php.

else $TITLE = CMS_TITLE

Definition at line 248 of file index.php.

$uploadFolder = "uploads"

Folder containing the upload files, temporary files and session files.

Definition at line 41 of file index.php.

$urlRequestRoot = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/'))

Root of the request - that path to cms base.

Definition at line 68 of file index.php.

$userId = firstTimeGetUserId()

Definition at line 129 of file index.php.

$WARNINGSTRING = ""

Defined here. Will get appended by displaywarning() in common.lib.php.

Definition at line 62 of file index.php.

$widgetFolder = "widgets"

Folder containing all the widgets.

Definition at line 44 of file index.php.

$WIDGETS = array()

Variables for storing widgets.

Definition at line 98 of file index.php.

if(!defined("ADMIN_USERID"))

If config.inc.php doesn't exists, assume CMS hasn't been installed.

If config.inc.php doesn't exists, ADMIN_USERID won't be defined, so assume CMS is not installed. Contains functions which are common to many tasks and very frequently used.

Definition at line 107 of file index.php.