[ Index ]
 

Code source de dotProject 2.1 RC1

Accédez au Source d'autres logiciels libres | Soutenez Angelica Josefina !

title

Body

[fermer]

/classes/ -> ui.class.php (summary)

(pas de description)

License: http://opensource.org/licenses/gpl-license.php GPL License Version 2
Poids: 1214 lignes (36 kb)
Inclus ou requis: 6 fois
Référencé: 0 fois
Nécessite: 3 fichiers
 classes/permissions.class.php
 includes/version.php
 classes/authenticator.class.php

Définit 3 classes

CAppUI:: (41 méthodes):
  CAppUI()
  getSystemClass()
  getLibraryClass()
  getModuleClass()
  getVersion()
  checkStyle()
  readDirs()
  readFiles()
  checkFileName()
  makeFileNameSafe()
  setUserLocale()
  findLanguage()
  loadLanguages()
  _()
  __()
  setWarning()
  savePlace()
  resetPlace()
  getPlace()
  redirect()
  setMsg()
  getMsg()
  setState()
  getState()
  checkPrefState()
  login()
  registerLogin()
  registerLogout()
  updateLastAction()
  logout()
  doLogin()
  getPref()
  setPref()
  loadPrefs()
  getInstalledModules()
  getActiveModules()
  getMenuModules()
  isActiveModule()
  acl()
  loadJS()
  getModuleJS()

CTabBox_core:: (7 méthodes):
  CTabBox_core()
  getTabName()
  add()
  isTabbed()
  show()
  loadExtras()
  findTabModule()

CTitleBlock_core:: (6 méthodes):
  CTitleBlock_core()
  addCell()
  addCrumb()
  addCrumbRight()
  addCrumbDelete()
  show()


Classe: CAppUI  - X-Ref

The Application User Interface Class.

CAppUI()   X-Ref
CAppUI Constructor


getSystemClass( $name=null )   X-Ref
Used to load a php class file from the system classes directory

param: string $name The class root file name (excluding .class.php)
return: string The path to the include file

getLibraryClass( $name=null )   X-Ref
Used to load a php class file from the lib directory

param: string $name The class root file name (excluding .class.php)
return: string The path to the include file

getModuleClass( $name=null )   X-Ref
Used to load a php class file from the module directory

param: string $name The class root file name (excluding .class.php)
return: string The path to the include file

getVersion()   X-Ref
Determines the version.

return: String value indicating the current dotproject version

checkStyle()   X-Ref
Checks that the current user preferred style is valid/exists.


readDirs( $path )   X-Ref
Utility function to read the 'directories' under 'path'

This function is used to read the modules or locales installed on the file system.
param: string The path to read.
return: array A named array of the directories (the key and value are identical).

readFiles( $path, $filter='.' )   X-Ref
Utility function to read the 'files' under 'path'

param: string The path to read.
param: string A regular expression to filter by.
return: array A named array of the files (the key and value are identical).

checkFileName( $file )   X-Ref
Utility function to check whether a file name is 'safe'

Prevents from access to relative directories (eg ../../dealyfile.php);
param: string The file name.
return: array A named array of the files (the key and value are identical).

makeFileNameSafe( $file )   X-Ref
Utility function to make a file name 'safe'

Strips out mallicious insertion of relative directories (eg ../../dealyfile.php);
param: string The file name.
return: array A named array of the files (the key and value are identical).

setUserLocale( $loc='', $set = true )   X-Ref
Sets the user locale.

Looks in the user preferences first.  If this value has not been set by the user it uses the system default set in config.php.
param: string Locale abbreviation corresponding to the sub-directory name in the locales directory (usually the abbreviated language code).

findLanguage($language, $country = false)   X-Ref
Pas de description

loadLanguages()   X-Ref
Load the known language codes for loaded locales


_( $str, $flags= 0 )   X-Ref
Translate string to the local language [same form as the gettext abbreviation]

This is the order of precedence:
<ul>
<li>If the key exists in the lang array, return the value of the key
<li>If no key exists and the base lang is the same as the local lang, just return the string
<li>If this is not the base lang, then return string with a red star appended to show
that a translation is required.
</ul>
param: string The string to translate
param: int Option flags, can be case handling or'd with output styles
return: string

__( $str, $flags = 0)   X-Ref
Pas de description

setWarning( $state=true )   X-Ref
Set the display of warning for untranslated strings

param: string

savePlace( $query='' )   X-Ref
Save the url query string

Also saves one level of history.  This is useful for returning from a delete
operation where the record more not now exist.  Returning to a view page
would be a nonsense in this case.
param: string If not set then the current url query string is used

resetPlace()   X-Ref
Resets the internal variable


getPlace()   X-Ref
Get the saved place (usually one that could contain an edit button)

return: string

redirect( $params='', $hist='' )   X-Ref
Redirects the browser to a new page.

Mostly used in conjunction with the savePlace method. It is generally used
to prevent nasties from doing a browser refresh after a db update.  The
method deliberately does not use javascript to effect the redirect.

param: string The URL query string to append to the URL
param: string A marker for a historic 'place, only -1 or an empty string is valid.

setMsg( $msg, $msgNo=0, $append=false )   X-Ref
Set the page message.

The page message is displayed above the title block and then again
at the end of the page.

IMPORTANT: Please note that append should not be used, since for some
languagues atomic-wise translation doesn't work. Append should be
deprecated.

param: mixed The (untranslated) message
param: int The type of message
param: boolean If true, $msg is appended to the current string otherwise

getMsg( $reset=true )   X-Ref
Display the formatted message and icon

param: boolean If true the current message state is cleared.

setState( $label, $value = null)   X-Ref
Set the value of a temporary state variable.

The state is only held for the duration of a session.  It is not stored in the database.
Also do not set the value if it is unset.
param: string The label or key of the state variable
param: mixed Value to assign to the label/key

getState( $label, $default_value = null )   X-Ref
Get the value of a temporary state variable.
If a default value is supplied and no value is found, set the default.

return: mixed

checkPrefState($label, $value, $prefname, $default_value = null)   X-Ref
Pas de description

login( $username, $password )   X-Ref
Login function

A number of things are done in this method to prevent illegal entry:
<ul>
<li>The username and password are trimmed and escaped to prevent malicious
SQL being executed
</ul>
The schema previously used the MySQL PASSWORD function for encryption.  This
Method has been deprecated in favour of PHP's MD5() function for database independance.
The check_legacy_password option is no longer valid

Upon a successful username and password match, several fields from the user
table are loaded in this object for convenient reference.  The style, localces
and preferences are also loaded at this time.

param: string The user login name
param: string The user password
return: boolean True if successful, false if not

registerLogin()   X-Ref
Pas de description

registerLogout($user_id)   X-Ref


updateLastAction($last_insert_id)   X-Ref


logout()   X-Ref
Pas de description

doLogin()   X-Ref
Checks whether there is any user logged in.


getPref( $name )   X-Ref
Gets the value of the specified user preference

param: string Name of the preference

setPref( $name, $val )   X-Ref
Sets the value of a user preference specified by name

param: string Name of the preference
param: mixed The value of the preference

loadPrefs( $uid=0 )   X-Ref
Loads the stored user preferences from the database into the internal
preferences variable.

param: int User id number

getInstalledModules()   X-Ref
Gets a list of the installed modules

return: array Named array list in the form 'module directory'=>'module name'

getActiveModules()   X-Ref
Gets a list of the active modules

return: array Named array list in the form 'module directory'=>'module name'

getMenuModules()   X-Ref
Gets a list of the modules that should appear in the menu

return: array Named array list in the form

isActiveModule($module)   X-Ref
Pas de description

acl()   X-Ref
Returns the global dpACL class or creates it as neccessary.

return: object dPacl

loadJS()   X-Ref
Find and add to output the file tags required to load module-specific
javascript.


getModuleJS($module, $file=null, $load_all = false)   X-Ref
Pas de description

Classe: CTabBox_core  - X-Ref

Tabbed box abstract class

CTabBox_core( $baseHRef='', $baseInc='', $active=0, $javascript = null )   X-Ref
Constructor

param: string The base URL query string to prefix tab links
param: string The base path to prefix the include file
param: int The active tab
param: string Optional javascript method to be used to execute tabs.

getTabName( $idx )   X-Ref
Gets the name of a tab

return: string

add( $file, $title, $translated = false, $key= NULL )   X-Ref
Adds a tab to the object

param: string File to include
param: The display title/name of the tab

isTabbed()   X-Ref
Pas de description

show( $extra='', $js_tabs = false )   X-Ref
Displays the tabbed box

This function may be overridden

param: string Can't remember whether this was useful

loadExtras($module, $file = null)   X-Ref
Pas de description

findTabModule($tab)   X-Ref
Pas de description

Classe: CTitleBlock_core  - X-Ref

Title box abstract class

CTitleBlock_core( $title, $icon='', $module='', $helpref='' )   X-Ref
The constructor

Assigns the title, icon, module and help reference.  If the user does not
have permission to view the help module, then the context help icon is
not displayed.

addCell( $data='', $attribs='', $prefix='', $suffix='' )   X-Ref
Adds a table 'cell' beside the Title string

Cells are added from left to right.

addCrumb( $link, $label, $icon='' )   X-Ref
Adds a table 'cell' to left-aligned bread-crumbs

Cells are added from left to right.

addCrumbRight( $data='', $attribs='', $prefix='', $suffix='' )   X-Ref
Adds a table 'cell' to the right-aligned bread-crumbs

Cells are added from left to right.

addCrumbDelete( $title, $canDelete='', $msg='' )   X-Ref
Creates a standarised, right-aligned delete bread-crumb and icon.


show()   X-Ref
The drawing function




Généré le : Sun Feb 18 19:46:52 2007 par Balluche grâce à PHPXref 0.7