[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

/admin/inc/ -> functions.php (summary)

MyBB 1.6 Copyright 2010 MyBB Group, All Rights Reserved Website: http://mybb.com License: http://mybb.com/about/license

File Size: 749 lines (18 kb)
Included or required: 4 times
Referenced: 1 time
Includes or requires: 0 files

Defines 14 functions

  log_admin_action()
  admin_redirect()
  update_admin_session()
  flash_message()
  draw_admin_pagination()
  make_parent_list()
  save_quick_perms()
  check_admin_permissions()
  get_admin_permissions()
  fetch_iconv_encoding()
  change_admin_permission()
  login_attempt_check_acp()
  check_template()
  delete_user_posts()

Functions
Functions that are not part of a class:

log_admin_action()   X-Ref
Logs an administrator action taking any arguments as log data.


admin_redirect($url)   X-Ref
Redirects the current user to a specified URL.

param: string The URL to redirect to

update_admin_session($name, $value)   X-Ref
Updates an administration session data array.

param: string The name of the item in the data session to update
param: mixed The value

flash_message($message, $type='')   X-Ref
Saves a "flash message" for the current user to be shown on their next page visit.

param: string The message to show
param: string The type of message to be shown (success|error)

draw_admin_pagination($page, $per_page, $total_items, $url)   X-Ref
Draw pagination for pages in the Admin CP.

param: int The current page we're on
param: int The number of items per page
param: int The total number of items in this collection
param: string The URL for pagination of this collection
return: string The built pagination

make_parent_list($fid, $navsep=",")   X-Ref
Builds a CSV parent list for a particular forum.

param: int The forum ID
param: string Optional separator - defaults to comma for CSV list
return: string The built parent list

save_quick_perms($fid)   X-Ref
No description

check_admin_permissions($action, $error = true)   X-Ref
Checks if a particular user has the necessary permissions to access a particular page.

param: array Array containing module and action to check for

get_admin_permissions($get_uid="", $get_gid="")   X-Ref
Fetches the list of administrator permissions for a particular user or group

param: int The user ID to fetch permissions for
param: int The (optional) group ID to fetch permissions for
return: array Array of permissions for specified user or group

fetch_iconv_encoding($mysql_encoding)   X-Ref
Fetch the iconv/mb encoding for a particular MySQL encoding

param: string The MySQL encoding
return: string The iconv/mb encoding

change_admin_permission($tab, $page="", $default=1)   X-Ref
Adds/Updates a Page/Tab to the permissions array in the adminoptions table

param: string The name of the tab that is being affected
param: string The name of the page being affected (optional - if not specified, will affect everything under the specified tab)
param: integer Default permissions for the page (1 for allowed - 0 for disallowed - -1 to remove)

login_attempt_check_acp($uid=0, $return_num=false)   X-Ref
Checks if we have had too many attempts at logging into the ACP

param: integer The uid of the admin to check
param: boolean Return an array of the number of attempts and expiry time? (default false)
return: mixed Return an array if the second parameter is true, boolean otherwise.

check_template($template)   X-Ref
Checks whether there are any 'security' issues in templates via complex syntax

param: string The template to be scanned
return: boolean A true/false depending on if an issue was detected

delete_user_posts($uid, $date)   X-Ref
Provides a function to entirely delete a user's posts, and find the threads attached to them

param: integer The uid of the user
param: int A UNIX timestamp to delete posts that are older
return: array An array of threads to delete, threads/forums to recount



Generated: Tue Oct 8 19:19:50 2013 Cross-referenced by PHPXref 0.7.1