class-wms7-core.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Description: Used to records data about visiting the site.
Author
Oleg Klenitskiy  
Category
Wms7_Core  
Copyright
2018 Oleg Klenitskiy  
License
GPLv2 or later  
Package
WatchMan-Site7  
Version
3.0.0  

\Wms7_Core

Package: WatchMan-Site7
Description: Used to records data about visiting the site.
Author
Oleg Klenitskiy  
Category
Class  
Copyright
2018 Oleg Klenitskiy  
License
GPLv2 or later  
Version
3.0.0  

Properties

>VPropertyprivatestring $login_result
Type of site visit. (Logged, Unlogged, Success, Failed, Robot)
Details
Type
string

Methods

methodpublic__construct() : void

Constructor.

methodpublicwms7_admin_menu() : void

Add menu page for admin panel.

methodpublicwms7_authenticate_user(string $user) : object

It works when authenticate user.

Parameters
NameTypeDescription
$userstring

Authenticate user.

Returns
TypeDescription
object$user.
methodpublicwms7_black_list() : void

Creates Black list page of plugin.

methodprivatewms7_black_list_info() : \array.

Generates data for the InfoPanel, Section4 - black list.

Returns
TypeDescription
\array.
methodpublicwms7_black_list_visitor() : void

Creates custom fields on the Black list page.

methodpublicwms7_ctrl_htaccess() : void

Insert/delete - Deny from IP.

methodprivatewms7_ctrl_htaccess_add() : void

Insert/delete - RewriteCond %{HTTP_USER_AGENT} name robot.

methodprivatewms7_file_editor(string $str_head) : void

Create modal window for files editor (index.php robots.txt .htaccess wp-config.php).

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

methodprivatewms7_format_bytes(string $size, integer $precision = 2) : integer

Calculates the size of the attached file to the letter.

Parameters
NameTypeDescription
$sizestring

File size in bytes.

$precisioninteger

Accuracy of calculation.

Returns
TypeDescription
integerReturns the rounded size of the attached file.
methodprivatewms7_geo_ip() : array

Returns data of geolocation provider of visitor for popup winndow Map.

Returns
TypeDescription
arrayReturns data of geolocation provider of visitor.
methodprivatewms7_geo_wifi() : array

Returns data of geolocation visitor of site for popup winndow Map.

Returns
TypeDescription
arrayReturns data of geolocation of visitor.
methodprivatewms7_geolocation_visitor() : void

For access to google api maps.

methodprivatewms7_get_user_ip() : string

Forms IP data from global variables.

Returns
TypeDescription
stringdata of IP visitor.
methodprivatewms7_goto_draft() : void

Go to the draft folder of mailbox.

methodprivatewms7_goto_sent() : void

Go to the sent folder of mailbox.

methodprivatewms7_history_list(string $whois_service) : \string.

Generates data for the InfoPanel, Section2 - whois service.

Parameters
NameTypeDescription
$whois_servicestring

Property to get.

Returns
TypeDescription
\string.
methodprivatewms7_imap_list() : \string.

Forms a table of all mailbox folders for Settins page.

Returns
TypeDescription
\string.
methodprivatewms7_info_panel() : void

Generates data for the InfoPanel.

methodpublicwms7_init_visit_actions() : void

It works at the beginning of any visit to the site.

methodprivatewms7_ip_enabled() : string

Enable or Disable button 'locate IP' into popup window Map.

Returns
TypeDescription
stringReturns 'disabled' or '' for button in HTML code.
methodprivatewms7_ip_excluded(string $user_ip) : boolean

Does not register a visit with this IP.

Parameters
NameTypeDescription
$user_ipstring

IP of visitor.

Returns
TypeDescription
booleantrue or false.
methodprivatewms7_ip_info() : string

Provides additional information about the ip visitor from the database.

Returns
TypeDescription
stringReturn info of the IP adress of visitor from the database.
methodpublicwms7_lat_lon_save() : void

It works when receiving geolocation data in $_POST.

methodpublicwms7_load_locale() : void

It works at the beginning load locale.

methodprivatewms7_login_action() : void

Forms data of visit to site.

methodpublicwms7_login_failed() : void

It works when add_action( 'wp_login_failed') starts.

methodprivatewms7_login_ip_filter() : void

Filter data about visits by ip or login.

methodpublicwms7_login_success() : void

It works when add_action( 'wp_login') starts.

methodprivatewms7_login_unbaned(string $id) : void

It works when login unbaned.

Parameters
NameTypeDescription
$idstring

Record id of visit.

methodprivatewms7_mail(string $str_head) : void

Create modal window for control mailboxes.

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

methodprivatewms7_mail_new(string $str_head, string $draft) : void

Create modal window for create mail new.

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

$draftstring

Letter - answer or draft.

methodprivatewms7_mail_save_to_draft() : void

Used for mail save to folder Draft.

methodprivatewms7_mail_save_to_sent() : void

Used for mail save to folder Sent.

methodprivatewms7_mail_view(string $str_head) : void

Create modal window for mail view.

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

methodpublicwms7_main_setting_field1() : void

Filling option1 (Duration log entries) on page Settings.

methodpublicwms7_main_setting_field10() : void

Filling option10 (E-mail box select) on page Settings.

methodpublicwms7_main_setting_field11() : void

Filling option11 (E-mail folder tmp) on page Settings.

methodpublicwms7_main_setting_field12() : void

Filling option12 (SSE sound) on page Settings.

methodpublicwms7_main_setting_field2() : void

Filling option2 (Do not register visits for) on page Settings.

methodpublicwms7_main_setting_field3() : void

Filling option3 (WHO-IS service) on page Settings.

methodpublicwms7_main_setting_field4() : void

Filling option4 (Robots) on page Settings.

methodpublicwms7_main_setting_field5() : void

Filling option5 (Visits of robots) on page Settings.

methodpublicwms7_main_setting_field6() : void

Filling option6 (Robots banned) on page Settings.

methodpublicwms7_main_setting_field7() : void

Filling option7 (Google Maps API key) on page Settings.

methodpublicwms7_main_setting_field8() : void

Filling option8 (Exporting Table Fields) on page Settings.

methodpublicwms7_main_setting_field9() : void

Filling option9 (E-mail boxes) on page Settings.

methodpublicwms7_main_settings() : void

Add fields to page Settings.

methodpublicwms7_make_where_query() : string

Forms the string where for the main SQL query to get data in the prepare_items().

Returns
TypeDescription
stringwhere.
methodprivatewms7_map() : void

Create modal window for map of geolocation of visitor.

methodprivatewms7_robot_visit_info() : \string.

Generates data for the InfoPanel, Section3 - robots.

Returns
TypeDescription
\string.
methodprivatewms7_robots(string $_http_user_agent) : string

Identifies the visitor as a robot or false.

Parameters
NameTypeDescription
$_http_user_agentstring

Contains the name of the robot.

Returns
TypeDescription
stringname of the robot or false.
methodprivatewms7_role_time_country_filter() : void

Filter data about visits by role or time or country.

methodprivatewms7_save_data(string $values, string $format, string $excluded) : void

Saves site visits.

Parameters
NameTypeDescription
$valuesstring

Data of visit.

$formatstring

Format data of visit.

$excludedstring

Excluded or not.

methodprivatewms7_save_geolocation(string $lat_wifi, string $lon_wifi, string $acc_wifi, string $err_code, string $err_msg) : void

Save data of geolocation of visitor.

Parameters
NameTypeDescription
$lat_wifistring

Latitude.

$lon_wifistring

Longitude.

$acc_wifistring

Accuracy.

$err_codestring

Error code.

$err_msgstring

Error message.

methodpublicwms7_screen_options() : object

Add help tabs of plugin.

Returns
TypeDescription
objectmanage_options.
methodpublicwms7_screen_settings_add(string $status, string $args) : void

Add custom screen settings of plugin.

Parameters
NameTypeDescription
$statusstring

status.

$argsstring

option.

methodpublicwms7_screen_settings_save(string $status, string $option, integer $value) : void

Create and save screen settings of plugin.

Parameters
NameTypeDescription
$statusstring

status.

$optionstring

option.

$valueinteger

value.

methodpublicwms7_settings() : void

Create and control page Settings.

methodprivatewms7_stat(string $str_head) : void

Create modal window for control statistic of visits.

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

methodpublicwms7_truncate_log() : void

It works when the deadline for deleting records is.

methodpublicwms7_visit_get_data(string $orderby = false, string $order = false, string $limit = 0, string $offset = 0) : array

Get data in the prepare_items().

Parameters
NameTypeDescription
$orderbystring

Order by.

$orderstring

Order.

$limitstring

Limit of records.

$offsetstring

Offset.

Returns
TypeDescription
arraydata.
methodpublicwms7_visit_manager() : void

Create main page of plugin.

methodpublicwms7_visit_site() : void

It works when a visitor visits the site with or without a login.

methodprivatewms7_wifi_enabled() : string

Enable or Disable button 'locate wi-fi' into popup window Map.

Returns
TypeDescription
stringReturns 'disabled' or '' for button in HTML code.
methodprivatewms7_win_popup() : void

Enable popup window for role administrator only.

methodprivatewms7_wp_cron(string $str_head) : void

Create modal window for control of cron events.

Parameters
NameTypeDescription
$str_headstring

Head of modal window.

Documentation was generated by phpDocumentor 2.8.5.