[ Index ]

PHP Cross Reference of MyBB 1.8.27

title

Body

[close]

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

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 880 lines (21 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 19 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()
  is_mobile()
  check_template()
  delete_user_posts()
  print_selection_javascript()
  checkAction()
  array_column()
  output_auto_redirect()

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 $url The URL to redirect to

update_admin_session($name, $value)   X-Ref
Updates an administration session data array.
param: string $name The name of the item in the data session to update
param: mixed $value 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 $message The message to show
param: string $type 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 $page The current page we're on
param: int $per_page The number of items per page
param: int $total_items The total number of items in this collection
param: string $url 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 $fid The forum ID
param: string $navsep Optional separator - defaults to comma for CSV list
return: string The built parent list

save_quick_perms($fid)   X-Ref

param: int $fid

check_admin_permissions($action, $error = true)   X-Ref
Checks if a particular user has the necessary permissions to access a particular page.
param: array $action Array containing module and action to check for
param: bool $error
return: bool

get_admin_permissions($get_uid=0, $get_gid=0)   X-Ref
Fetches the list of administrator permissions for a particular user or group
param: int $get_uid The user ID to fetch permissions for
param: int $get_gid 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 $mysql_encoding 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 $tab The name of the tab that is being affected
param: string $page The name of the page being affected (optional - if not specified, will affect everything under the specified tab)
param: integer $default 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 $uid The uid of the admin to check
param: boolean $return_num 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.

is_mobile($useragent)   X-Ref
Checks whether the administrator is on a mobile device
param: string $useragent The useragent to be checked
return: boolean A true/false depending on if the administrator is on a mobile

check_template($template)   X-Ref
Checks whether there are any 'security' issues in templates via complex syntax
param: string $template 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 $uid The uid of the user
param: int $date A UNIX timestamp to delete posts that are older
return: array An array of threads to delete, threads/forums to recount

print_selection_javascript()   X-Ref
Prints a selection JavaScript code for selectable groups/forums fields.

checkAction(id)   X-Ref
No description

array_column($input, $column_key)   X-Ref
No description

output_auto_redirect($form, $prompt)   X-Ref
Output the auto redirect block.
param: \Form $form An existing form instance to wrap the redirect within.
param: string $prompt The prompt to show.



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref