ona  18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface).
  Fossies Dox: ona-18.1.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

functions_general.inc.php File Reference

Go to the source code of this file.

Functions

if(6<=$conf['debug']) printmsg ($msg="", $debugLevel=0)
 
 ona_logmsg ($message, $logfile="")
 
 strsize ($string)
 
 truncate ($msg="", $length=0)
 
 fix_input ($string)
 
 cleanText ($text)
 
 microtime_float ()
 
 ip_mangle ($ip="", $format="default")
 
 ip_mangle_no_gmp ($ip="", $format="default")
 
 ip_mangle_gmp ($ip="", $format="default")
 
 ipcalc_info ($ip='', $mask='')
 
 sanitize_security_level ($string="", $default=-1)
 
 sanitize_hostname ($string="")
 
 mac_mangle ($input="", $format="default")
 
 ip_complete ($ip='', $filler=0)
 
 date_mangle ($time=-1)
 
 tzsecs ($tz_offset=0)
 
 gmtime ()
 
 validate_email ($input)
 
 validate_url ($input)
 
 validate_username ($input)
 
 startSession ()
 
 securePage ()
 
 loggedIn ()
 
 auth ($resource, $msg_level=1)
 
 authlvl ($level)
 
 load_module ($name='')
 
 run_module ($module='', $options='', $transaction=1)
 
 parse_options ($options="")
 
 sanitize_YN ($string="", $default="Y")
 
 html_diff ($old, $new, $oldname='', $newname='', $stdout=1)
 
 text_diff ($old, $new)
 
 format_array ($array=array())
 

Function Documentation

◆ auth()

◆ authlvl()

◆ cleanText()

cleanText (   $text)

convert line ending to unix format

See also
formText() for 2crlf conversion
Author
Andreas Gohr andi@.nosp@m.spli.nosp@m.tbrai.nosp@m.n.or.nosp@m.g

Definition at line 252 of file functions_general.inc.php.

References $text.

◆ date_mangle()

date_mangle (   $time = -1)

Definition at line 1105 of file functions_general.inc.php.

Referenced by auth_local\getUserData(), and ws_save().

◆ fix_input()

fix_input (   $string)

Definition at line 230 of file functions_general.inc.php.

◆ format_array()

◆ gmtime()

gmtime ( )

Definition at line 1144 of file functions_general.inc.php.

◆ html_diff()

html_diff (   $old,
  $new,
  $oldname = '',
  $newname = '',
  $stdout = 1 
)

show diff

Author
Andreas Gohr andi@.nosp@m.spli.nosp@m.tbrai.nosp@m.n.or.nosp@m.g Modified by Brandon Zehm, pulled from dokuwiki. Requires DifferenceEngine.php from dokuwiki.

Input: two strings Output: html

Definition at line 1667 of file functions_general.inc.php.

References $conf, $stdout, and EOL.

Referenced by ws_display().

◆ ip_complete()

ip_complete (   $ip = '',
  $filler = 0 
)

Definition at line 1044 of file functions_general.inc.php.

References $ip, $self, and ip_mangle().

Referenced by get_ip_suggestions(), ws_display(), ws_display_list(), and ws_subnet().

◆ ip_mangle()

◆ ip_mangle_gmp()

ip_mangle_gmp (   $ip = "",
  $format = "default" 
)

Definition at line 472 of file functions_general.inc.php.

References $ip, and $self.

Referenced by ip_mangle().

◆ ip_mangle_no_gmp()

ip_mangle_no_gmp (   $ip = "",
  $format = "default" 
)

Definition at line 350 of file functions_general.inc.php.

References $ip, and $self.

Referenced by ip_mangle().

◆ ipcalc_info()

ipcalc_info (   $ip = '',
  $mask = '' 
)

Definition at line 748 of file functions_general.inc.php.

References $conf, $ip, $self, and ip_mangle().

Referenced by ipcalc(), and ws_ipcalcgui_submit().

◆ load_module()

load_module (   $name = '')

Definition at line 1378 of file functions_general.inc.php.

References $conf, $onadb, $self, $status, db_get_record(), and get_module_list().

Referenced by run_module().

◆ loggedIn()

loggedIn ( )

Definition at line 1313 of file functions_general.inc.php.

References $_SESSION.

Referenced by get_html_menu_button_ona(), ws_display_list(), and ws_save().

◆ mac_mangle()

mac_mangle (   $input = "",
  $format = "default" 
)

◆ microtime_float()

microtime_float ( )

Simple function to replicate PHP 5 behaviour of microtime()

Definition at line 267 of file functions_general.inc.php.

Referenced by run_module().

◆ ona_logmsg()

ona_logmsg (   $message,
  $logfile = "" 
)

Definition at line 113 of file functions_general.inc.php.

References $_SESSION, $conf, $message, $self, and $username.

Referenced by printmsg().

◆ parse_options()

parse_options (   $options = "")

◆ printmsg()

if (6<=$conf[ 'debug']) printmsg (   $msg = "",
  $debugLevel = 0 
)

Definition at line 48 of file functions_general.inc.php.

References $_SESSION, $conf, $onadb, $self, $status, $username, db_insert_record(), and ona_logmsg().

Referenced by auth_ldap\_openLDAP(), add_module(), add_permission(), auth(), auth_cryptPassword(), auth_ldap\auth_ldap(), authlvl(), block_add(), block_del(), block_display(), block_modify(), auth_ldap\checkPass(), config_add(), config_chksum(), config_diff(), config_display(), custom_attribute_add(), custom_attribute_del(), custom_attribute_display(), custom_attribute_modify(), custom_attribute_type_display(), db_connect(), db_delete_records(), db_get_record(), db_get_records(), db_insert_record(), db_pconnect(), db_update_record(), dhcp_entry_add(), dhcp_entry_del(), dhcp_entry_display(), dhcp_entry_modify(), dhcp_failover_group_add(), dhcp_failover_group_del(), dhcp_failover_group_display(), dhcp_failover_group_modify(), dhcp_lease_add(), dhcp_pool_add(), dhcp_pool_del(), dhcp_pool_modify(), dhcp_server_add(), dhcp_server_del(), dns_record_add(), dns_record_del(), dns_record_display(), dns_record_modify(), domain_add(), domain_del(), domain_display(), domain_modify(), domain_server_add(), domain_server_del(), get_authentication(), get_module_list(), get_perms(), auth_ldap\getUserData(), host_add(), host_del(), host_display(), host_modify(), interface_add(), interface_del(), interface_display(), interface_modify(), interface_move(), interface_move_host(), interface_share(), interface_share_del(), ip_mangle(), ipcalc(), load_auth_class(), location_add(), location_del(), location_modify(), mangle_ip(), message_add(), mysql_purge_logs(), nat_add(), nat_del(), new_install(), ona_find_custom_attribute(), ona_find_device(), ona_find_device_type(), ona_find_dhcp_option(), ona_find_dns_record(), ona_find_domain(), ona_find_host(), ona_find_interface(), ona_find_location(), ona_find_subnet(), ona_find_subnet_type(), ona_find_vlan(), ona_get_next_id(), ona_sql(), quick_search(), report_run(), rpt_output_text(), run_module(), sess_read(), subnet_add(), subnet_del(), subnet_display(), subnet_modify(), subnet_nextip(), tag_add(), tag_del(), upgrade(), vlan_add(), vlan_campus_add(), vlan_campus_del(), vlan_campus_display(), vlan_campus_modify(), vlan_del(), vlan_modify(), ws_delete(), ws_display(), ws_display_list(), ws_enablerecord(), ws_interface_nat_save(), ws_logingo(), ws_makeprimary(), ws_menu(), ws_menu_control_submit(), ws_process_alerts_submit(), ws_save(), ws_switch_context(), and ws_tooltips_submit().

◆ run_module()

◆ sanitize_hostname()

sanitize_hostname (   $string = "")

Definition at line 900 of file functions_general.inc.php.

References $self.

Referenced by dns_record_add(), dns_record_modify(), domain_add(), host_add(), and ws_save().

◆ sanitize_security_level()

sanitize_security_level (   $string = "",
  $default = -1 
)

Definition at line 860 of file functions_general.inc.php.

References $_SESSION, $conf, and $self.

Referenced by host_add(), and subnet_modify().

◆ sanitize_YN()

◆ securePage()

securePage ( )

Definition at line 1283 of file functions_general.inc.php.

References $_SESSION, $conf, exit, and startSession().

◆ startSession()

startSession ( )

Definition at line 1221 of file functions_general.inc.php.

References $_SESSION, and $conf.

Referenced by securePage().

◆ strsize()

strsize (   $string)

Definition at line 180 of file functions_general.inc.php.

◆ text_diff()

text_diff (   $old,
  $new 
)

show diff

Author
Matt Pascoe matt@.nosp@m.open.nosp@m.netad.nosp@m.min..nosp@m.com Requires DifferenceEngine.php from dokuwiki.

Input: two strings Output: unified text diff

Definition at line 1713 of file functions_general.inc.php.

References $conf, and $text.

◆ truncate()

truncate (   $msg = "",
  $length = 0 
)

Definition at line 209 of file functions_general.inc.php.

References $conf.

Referenced by ws_display_list().

◆ tzsecs()

tzsecs (   $tz_offset = 0)

Definition at line 1129 of file functions_general.inc.php.

◆ validate_email()

validate_email (   $input)

Definition at line 1159 of file functions_general.inc.php.

◆ validate_url()

validate_url (   $input)

Definition at line 1175 of file functions_general.inc.php.

◆ validate_username()

validate_username (   $input)

Definition at line 1192 of file functions_general.inc.php.