[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/ -> page.functions.php (sommaire)

Page related functions.  Generally these are functions not necessarily related to content, but more to the underlying mechanisms of the system.

Poids: 982 lignes (24 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 27 fonctions

  check_login()
  get_userid()
  check_passhash()
  generate_user_object()
  load_all_permissions()
  check_permission()
  check_ownership()
  check_authorship()
  author_pages()
  quick_check_authorship()
  audit()
  load_site_preferences()
  get_site_preference()
  remove_site_preference()
  set_site_preference()
  load_all_preferences()
  get_preference()
  set_preference()
  get_stylesheet()
  get_stylesheet_media_types()
  create_textarea()
  textarea_highlight()
  display_login_form()
  check_access()
  pagination()
  wysiwyg_form_submit()
  cms_db_prefix()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

check_login($no_redirect = false)   X-Ref
Checks to see if the user is logged in.   If not, redirects the browser
to the admin login.

returns: If they're logged in, true.  If not logged in, false.
param: string no_redirect - If true, then don't redirect if not logged in

get_userid($check = true)   X-Ref
Gets the userid of the currently logged in user.

returns: If they're logged in, the user id.  If not logged in, false.

check_passhash($userid, $checksum)   X-Ref
Pas de description

generate_user_object($userid)   X-Ref
Regenerates the user session information from a userid.  This is basically used
so that if the session expires, but the cookie still remains (site is left along
for 20+ minutes with no interaction), the user won't have to relogin to regenerate
the details.


load_all_permissions($userid)   X-Ref
Loads all permissions for a particular user into a global variable so we don't hit the db for every one.


check_permission($userid, $permname)   X-Ref
Checks to see that the given userid has access to
the given permission.

returns: mixed If they have perimission, true.  If they do not, false.

check_ownership($userid, $contentid = '')   X-Ref
Checks that the given userid is the owner of the given contentid.

returns: mixed If they have ownership, true.  If they do not, false.

check_authorship($userid, $contentid = '')   X-Ref
Checks that the given userid has access to modify the given
pageid.  This would mean that they were set as additional
authors/editors by the owner.

returns: mixed If they have authorship, true.  If they do not, false.

author_pages($userid)   X-Ref
Prepares an array with the list of the pages $userid is an author of

returns: an array in whose elements are the IDs of the pages

quick_check_authorship($contentid, $hispages)   X-Ref
Quickly checks that the given userid has access to modify the given
pageid.  This would mean that they were set as additional
authors/editors by the owner.

returns: mixed If they have authorship, true.  If they do not, false.

audit($itemid, $itemname, $action)   X-Ref
Put an event into the audit (admin) log.  This should be
done on most admin events for consistency.


load_site_preferences()   X-Ref
Loads a cache of site preferences so we only have to do it once.


get_site_preference($prefname, $defaultvalue = '')   X-Ref
Gets the given site prefernce


remove_site_preference($prefname,$regexp=false)   X-Ref
Removes the given site preference

param: string Preference name to remove

set_site_preference($prefname, $value)   X-Ref
Sets the given site perference with the given value.


load_all_preferences($userid)   X-Ref
Pas de description

get_preference($userid, $prefname, $default='')   X-Ref
Gets the given preference for the given userid.


set_preference($userid, $prefname, $value)   X-Ref
Sets the given perference for the given userid with the given value.


get_stylesheet($template_id, $media_type = '')   X-Ref
Returns the stylesheet for the given templateid.  Returns a hash with encoding and stylesheet entries.


get_stylesheet_media_types($template_id)   X-Ref
Pas de description

create_textarea($enablewysiwyg, $text, $name, $classname='', $id='', $encoding='', $stylesheet='', $width='80', $height='15',$forcewysiwyg='')   X-Ref
Pas de description

textarea_highlight($use_javasyntax, $text, $name, $class_name="syntaxHighlight", $syntax_type="HTML (Complex)   X-Ref
Pas de description

display_login_form()   X-Ref
Pas de description

check_access($page_id)   X-Ref
Pas de description

pagination($page, $totalrows, $limit)   X-Ref
Creates a string containing links to all the pages.

param: page - the current page to display
param: totalrows - the amount of items being listed
param: limit - the amount of items to list per page
return: a string containing links to all the pages (ex. next 1,2 prev)

wysiwyg_form_submit()   X-Ref
Pas de description

cms_db_prefix()   X-Ref
Returns the currently configured database prefix.




Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7