files-admin-code-tce-functions-user-select

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

tce_functions_user_select.php

Tags
file

Functions to display and select registered user.

author

Nicola Asuni

since
2001-09-13

Table of Contents

Functions

F_select_user()  : true
Display user selection for using F_show_select_user function.
F_show_select_user()  : false
Display user selection XHTML table.
F_show_select_user_popup()  : false
Display user selection XHTML table (popup mode).
F_isTestOnGroup()  : bool
Return true if the selected test is active for the selected group
F_isUserOnGroup()  : bool
Return true if the selected user belongs to the selected group
F_isAuthorizedEditorForGroup()  : bool
Return true if the current user is an administrator or belongs to the group, false otherwise
F_isAuthorizedEditorForUser()  : bool
Return true if the current user is authorized to edit the specified user
F_user_group_select_sql()  : sql
Return the SQL selection query for user groups
F_user_group_select()  : table
Display select box for user groups
F_get_user_groups()  : array<string|int, mixed>
Returns an array containing groups IDs to which the specified user belongs
F_getUIDfromRegnum()  : int
Return the user ID from registration number.

Functions

F_select_user()

Display user selection for using F_show_select_user function.

F_select_user( $order_field,  $orderdir,  $firstrow,  $rowsperpage[,  $group_id = 0 ][,  $andwhere = '' ][,  $searchterms = '' ]) : true
Parameters
$order_field :

(string) order by column name

$orderdir :

(string) oreder direction

$firstrow :

(string) number of first row to display

$rowsperpage :

(string) number of rows per page

$group_id : = 0

(int) id of the group (default = 0 = no specific group selected)

$andwhere : = ''

(string) additional SQL WHERE query conditions

$searchterms : = ''

(string) search terms

Tags
author

Nicola Asuni

since
2001-09-13
Return values
true

F_show_select_user()

Display user selection XHTML table.

F_show_select_user( $order_field,  $orderdir,  $firstrow,  $rowsperpage[,  $group_id = 0 ][,  $andwhere = '' ][,  $searchterms = '' ]) : false
Parameters
$order_field :

(string) Order by column name.

$orderdir :

(int) Order direction.

$firstrow :

(int) Number of first row to display.

$rowsperpage :

(int) Number of rows per page.

$group_id : = 0

(int) ID of the group (default = 0 = no specific group selected).

$andwhere : = ''

(string) Additional SQL WHERE query conditions.

$searchterms : = ''

(string) Search terms.

Tags
author

Nicola Asuni

since
2001-09-13
Return values
false

in case of empty database, true otherwise

F_show_select_user_popup()

Display user selection XHTML table (popup mode).

F_show_select_user_popup( $order_field,  $orderdir,  $firstrow,  $rowsperpage[,  $group_id = 0 ][,  $andwhere = '' ][,  $searchterms = '' ][, string $cid = 0 ]) : false
Parameters
$order_field :

(string) Order by column name.

$orderdir :

(int) Order direction.

$firstrow :

(int) Number of first row to display.

$rowsperpage :

(int) Number of rows per page.

$group_id : = 0

(int) ID of the group (default = 0 = no specific group selected).

$andwhere : = ''

(string) Additional SQL WHERE query conditions.

$searchterms : = ''

(string) Search terms.

$cid : string = 0

ID of the calling form field.

Tags
author

Nicola Asuni

since
2012-04-14
Return values
false

in case of empty database, true otherwise

F_isTestOnGroup()

Return true if the selected test is active for the selected group

F_isTestOnGroup( $test_id,  $group_id) : bool
Parameters
$test_id :

(int) test ID

$group_id :

(int) group ID

Tags
since
11.1.003

(2010-10-05)

Return values
bool

true/false

F_isUserOnGroup()

Return true if the selected user belongs to the selected group

F_isUserOnGroup( $user_id,  $group_id) : bool
Parameters
$user_id :

(int) user ID

$group_id :

(int) group ID

Tags
since
11.1.003

(2010-10-05)

Return values
bool

true/false

F_isAuthorizedEditorForGroup()

Return true if the current user is an administrator or belongs to the group, false otherwise

F_isAuthorizedEditorForGroup( $group_id) : bool
Parameters
$group_id :

(int) group ID

Tags
since
11.1.003

(2010-10-05)

Return values
bool

true/false

F_isAuthorizedEditorForUser()

Return true if the current user is authorized to edit the specified user

F_isAuthorizedEditorForUser( $user_id) : bool
Parameters
$user_id :

(int) user ID

Tags
since
11.1.003

(2010-10-05)

Return values
bool

true/false

F_user_group_select_sql()

Return the SQL selection query for user groups

F_user_group_select_sql([ $where = '' ]) : sql
Parameters
$where : = ''

(string) filters to add on WHERE clause

Tags
since
11.1.003

(2010-10-05)

Return values
sql

selection string

F_user_group_select()

Display select box for user groups

F_user_group_select([ $name = 'group_id' ]) : table
Parameters
$name : = 'group_id'

(string) name of the select field

Return values
table

header element string

F_get_user_groups()

Returns an array containing groups IDs to which the specified user belongs

F_get_user_groups( $user_id) : array<string|int, mixed>
Parameters
$user_id :

(int) user ID

Return values
array<string|int, mixed>

containing user's groups IDs

F_getUIDfromRegnum()

Return the user ID from registration number.

F_getUIDfromRegnum(mixed $regnum) : int
Parameters
$regnum : mixed
Tags
since
11.3.005

(2012-07-31)

Return values
int

User ID or 0 in case of error.

On this page
 

© 2004-2024 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy