/shared/code/tce_functions_authorization.php

Description

Functions for Authorization / LOGIN

  • since: 2001-09-26
  • link: www.tecnick.com
  • copyright: Copyright © 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
  • author: Nicola Asuni
Functions
F_getAuthorizedUsers (line 205)

Returns a comma separated string of ID of the users that belong to the same groups.

  • return: user group ID, 0 in case of error
  • since: 2006-03-11
  • link: www.tecnick.com
  • copyright: Copyright © 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
  • author: Nicola Asuni
int F_getAuthorizedUsers (int $user_id)
  • int $user_id: user ID
F_isAuthorizedUser (line 163)

Returns true if the current user is authorized to update and delete the selected database record.

  • return: true if the user is authorized, false otherwise
  • since: 2006-03-11
  • link: www.tecnick.com
  • copyright: Copyright © 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
  • author: Nicola Asuni
boolean F_isAuthorizedUser (string $table, string $field_id_name, int $value_id, string $field_user_id)
  • string $table: table to be modified
  • string $field_id_name: name of the main ID field of the table
  • int $value_id: value of the ID field of the table
  • string $field_user_id: name of the foreign key to to user_id
F_loginForm (line 50)

Returns XHTML / CSS formatted string for login form.

The CSS classes used are:

  • div.login_form : container for login box
  • div.login_form div.login_row : container for label + input field or button
  • div.login_form div.login_row span.label : container for input label
  • div.login_form div.login_row span.formw : container for input form

  • return: string for login form
XHTML F_loginForm (faction $faction, fid $fid, fmethod $fmethod, fenctype $fenctype, username $username, password $password, [isize $isize = 20])
  • faction $faction: String action attribute
  • fid $fid: String form ID attribute
  • fmethod $fmethod: String method attribute (get/post)
  • fenctype $fenctype: String enctype attribute
  • username $username: String user name
  • password $password: String password
  • isize $isize: int enctype input fields horizontal size
F_login_form (line 93)

Display login page.
NOTE: This function calls exit() after execution.

void F_login_form ()
F_logout_form (line 111)

Display logout form.

  • return: string for logout form.
XHTML F_logout_form ()
F_logout_page (line 140)

Display logout page.
NOTE: This function calls exit() after execution.

void F_logout_page ()

Documentation generated on Fri, 24 Nov 2006 21:16:21 +0100 by phpDocumentor 1.3.0RC3