YaWK
24.1
Yet another WebKit
|
Statistics - get and set user and page stats. More...
Public Member Functions | |
calculateStatsFromArray ($db, $data) | |
Calculate some basic stats (almost outdated) More... | |
construct () | |
countBrowsers ($db, $data) | |
Count and return browsers. More... | |
countDaytime ($db, $data, $lang) | |
Count and set the number of hits for each daytime. More... | |
countDeviceTypes ($db, $data) | |
Count device types (desktop, phone or tablet) More... | |
countLogins ($db) | |
Count system logins. More... | |
countMessages ($db) | |
Count all messages that are stored in the database. More... | |
countOS ($db, $data) | |
Count operating systems. More... | |
countOSVersions ($db, $data) | |
Count operating systems versions. More... | |
countWeekdays ($db, $data, $lang, $limit) | |
Count and set the number of hits for each weekday. More... | |
deleteOutdatedSessions ($db) | |
Check and delete outdated sessions if they are expired. More... | |
drawOverviewBox ($lang) | |
Draw default box containing overview statistics. More... | |
drawPagesBox ($data, $lang) | |
Draw default box containing pages statistics. More... | |
drawUserStats ($db, $lang) | |
Draw a default box containing user statistics. More... | |
getBrowserColors ($browser) | |
Set and return the legend textcolor for each browser. More... | |
getDaysOfMonthBox ($lang) | |
Draw default box containing days of month statistics. More... | |
getDaytimeColors ($daytime, $lang) | |
Set and return the legend textcolor for each daytime. More... | |
getDayTimesPercent ($lang) | |
Calculate hits per daytime and return data in percent. More... | |
getDeviceTypeColors ($deviceType) | |
Set and return the legend textcolor for each device type. More... | |
getJsonBrowsers ($db, $browsers) | |
Output JS: PIE CHART browser data. More... | |
getJsonDaytimeBarChart ($db, $daytimes, $lang) | |
Output JS: BAR CHART daytime data. More... | |
getJsonDaytimeLineChart ($db, $daytimes, $lang) | |
Output JS: LINE CHART daytime data. More... | |
getJsonDaytimePieChart ($db, $daytimes, $lang) | |
Output JS: PIE CHART daytime data. More... | |
getJsonDeviceTypes ($db, $deviceTypes, $lang) | |
Output JS: BAR CHART device types. More... | |
getJsonLogins ($db, $logins, $lang) | |
Output JS: PIE CHART login data. More... | |
getJsonOS ($db, $oss) | |
Output JS: PIE CHART OS data. More... | |
getJsonOSVersions ($db, $osVersions) | |
Output JS: BAR CHART OS versions. More... | |
getJsonWeekdayBarChart ($lang) | |
Output JS: WEEKDAY BAR CHART. More... | |
getLoginColors ($login) | |
Set and return the legend textcolor for logins (failed | success) More... | |
getOnlineUsers ($db) | |
Return the number of all currently online users. More... | |
getOsColors ($os) | |
Set and return the legend textcolor for each operating system. More... | |
getOsVersionsColors ($osVersions) | |
Set and return the legend textcolor for each OS Version. More... | |
getStatsArray ($db, $interval, $period) | |
Returns an array with all stats, ordered by date_created. More... | |
getUserStats ($db) | |
Count and set user stats like, how many users are registered, currently online or blocked. More... | |
getWeekdaysPercent ($lang) | |
Calculate hits in percent for each weekday. More... | |
insertData ($db) | |
Insert data into database. More... | |
prepareData () | |
Prepare data: get and collect, detect OS and device type. More... | |
setOnlineUsers ($db) | |
Set users online in database (stores and check sessions and timestamps) More... | |
setStats ($db) | |
Insert statistics data into database. More... | |
YAWK\stats::calculateStatsFromArray | ( | $db, | |
$data | |||
) |
Calculate some basic stats (almost outdated)
object | $db | Database Object |
array | $data | Stats Data Array |
Definition at line 2097 of file stats.php.
References $data, $db, YAWK\stats\$i_hits, $item, $value, and YAWK\stats\getStatsArray().
Referenced by YAWK\stats\getStatsArray().
YAWK\stats::countBrowsers | ( | $db, | |
$data | |||
) |
Count and return browsers.
object | $db | the database object |
string | $data | array containing all the stats data |
string | $limit | contains i number for sql limitation |
Definition at line 1573 of file stats.php.
References YAWK\stats\$browser, $data, $db, $item, $res, and $total.
Referenced by YAWK\stats\getJsonBrowsers().
YAWK\stats::countDaytime | ( | $db, | |
$data, | |||
$lang | |||
) |
Count and set the number of hits for each daytime.
object | $db | the database object |
string | $data | array containing all the stats data |
string | $limit | contains i number for sql limitation |
Definition at line 1430 of file stats.php.
References $data, $date, $db, YAWK\stats\$i_night, $res, $total, and $value.
Referenced by YAWK\stats\getJsonDaytimeBarChart(), YAWK\stats\getJsonDaytimeLineChart(), and YAWK\stats\getJsonDaytimePieChart().
YAWK\stats::countDeviceTypes | ( | $db, | |
$data | |||
) |
Count device types (desktop, phone or tablet)
object | $db | the database object |
string | $data | array containing all the stats data |
string | $limit | contains i number for sql limitation |
Definition at line 1673 of file stats.php.
References $data, $db, YAWK\stats\$deviceType, YAWK\stats\$i_desktop, YAWK\stats\$i_phone, YAWK\stats\$i_tablet, $res, $total, and $value.
Referenced by YAWK\stats\getJsonDeviceTypes().
YAWK\stats::countLogins | ( | $db | ) |
Count system logins.
object | $db | Database Object |
int | $limit | Contains an i number to limit the sql request |
Definition at line 575 of file stats.php.
References $db, YAWK\stats\$i_loginFailed, YAWK\stats\$i_loginSuccessful, YAWK\stats\$i_totalLogins, $res, $total, and YAWK\alert\draw().
Referenced by YAWK\stats\getJsonLogins().
YAWK\stats::countMessages | ( | $db | ) |
YAWK\stats::countOS | ( | $db, | |
$data | |||
) |
Count operating systems.
object | $db | the database object |
string | $data | array containing all the stats data |
string | $limit | contains i number for sql limitation |
Definition at line 1759 of file stats.php.
References $data, $db, YAWK\stats\$i_osUnknown, YAWK\stats\$os, $res, $total, and $value.
Referenced by YAWK\stats\getJsonOS().
YAWK\stats::countOSVersions | ( | $db, | |
$data | |||
) |
Count operating systems versions.
object | $db | the database object |
string | $data | array containing all the stats data |
Definition at line 1842 of file stats.php.
References $data, $db, YAWK\stats\$i_others, $item, YAWK\stats\$osVersion, $res, and $total.
Referenced by YAWK\stats\getJsonOSVersions().
YAWK\stats::countWeekdays | ( | $db, | |
$data, | |||
$lang, | |||
$limit | |||
) |
Count and set the number of hits for each weekday.
object | $db | the database object |
string | $data | array containing all the stats data |
string | $limit | contains i number for sql limitation |
object | $lang | language array |
Definition at line 1279 of file stats.php.
References $data, $date, $db, YAWK\stats\$i_sunday, $lang, $res, $value, and YAWK\sys\getWeekday().
YAWK\stats::deleteOutdatedSessions | ( | $db | ) |
Check and delete outdated sessions if they are expired.
object | $db | Database Object |
int | $expireAfter | Time in seconds after a session will be deleted |
Definition at line 262 of file stats.php.
References $db.
Referenced by YAWK\stats\getOnlineUsers().
YAWK\stats::drawOverviewBox | ( | $lang | ) |
Draw default box containing overview statistics.
array | $lang | language array |
YAWK\stats::drawPagesBox | ( | $data, | |
$lang | |||
) |
Draw default box containing pages statistics.
array | $data | stats data array |
array | $lang | language array |
Definition at line 3277 of file stats.php.
References $data, YAWK\stats\$page, $res, and $value.
YAWK\stats::drawUserStats | ( | $db, | |
$lang | |||
) |
YAWK\stats::getBrowserColors | ( | $browser | ) |
Set and return the legend textcolor for each browser.
object | $db | Database Object |
string | $browser | contains the browser as string |
Definition at line 1032 of file stats.php.
References YAWK\stats\$browser.
YAWK\stats::getDaysOfMonthBox | ( | $lang | ) |
YAWK\stats::getDaytimeColors | ( | $daytime, | |
$lang | |||
) |
YAWK\stats::getDayTimesPercent | ( | $lang | ) |
Calculate hits per daytime and return data in percent.
object | $db | the database object |
Definition at line 1534 of file stats.php.
References YAWK\stats\$i_night, and $total.
YAWK\stats::getDeviceTypeColors | ( | $deviceType | ) |
Set and return the legend textcolor for each device type.
string | $deviceType | contains the type (desktop, phone, tablet) as string |
Definition at line 1110 of file stats.php.
References YAWK\stats\$deviceType.
YAWK\stats::getJsonBrowsers | ( | $db, | |
$browsers | |||
) |
Output JS: PIE CHART browser data.
object | $db | Database Object |
array | $browsers | data array |
Definition at line 848 of file stats.php.
References YAWK\stats\$browser, $db, $value, and YAWK\stats\countBrowsers().
YAWK\stats::getJsonDaytimeBarChart | ( | $db, | |
$daytimes, | |||
$lang | |||
) |
Output JS: BAR CHART daytime data.
object | $db | Database Object |
array | $daytimes | data array |
Definition at line 794 of file stats.php.
References $db, $lang, and YAWK\stats\countDaytime().
YAWK\stats::getJsonDaytimeLineChart | ( | $db, | |
$daytimes, | |||
$lang | |||
) |
Output JS: LINE CHART daytime data.
object | $db | Database Object |
array | $daytimes | data array |
array | $lang | language array |
Definition at line 763 of file stats.php.
References $db, $lang, and YAWK\stats\countDaytime().
YAWK\stats::getJsonDaytimePieChart | ( | $db, | |
$daytimes, | |||
$lang | |||
) |
YAWK\stats::getJsonDeviceTypes | ( | $db, | |
$deviceTypes, | |||
$lang | |||
) |
Output JS: BAR CHART device types.
object | $db | Database Object |
object | $lang | language |
array | $deviceTypes | data array |
Definition at line 1001 of file stats.php.
References $db, and YAWK\stats\countDeviceTypes().
YAWK\stats::getJsonLogins | ( | $db, | |
$logins, | |||
$lang | |||
) |
Output JS: PIE CHART login data.
object | $db | Database Object |
object | $lang | language |
array | $logins | data array |
Definition at line 674 of file stats.php.
References $db, $value, and YAWK\stats\countLogins().
YAWK\stats::getJsonOS | ( | $db, | |
$oss | |||
) |
Output JS: PIE CHART OS data.
object | $db | Database Object |
array | $oss | data array |
Definition at line 895 of file stats.php.
References $db, YAWK\stats\$os, $value, and YAWK\stats\countOS().
YAWK\stats::getJsonOSVersions | ( | $db, | |
$osVersions | |||
) |
Output JS: BAR CHART OS versions.
object | $db | Database Object |
array | $osVersions | data array |
Definition at line 939 of file stats.php.
References $db, YAWK\stats\$osVersion, $value, and YAWK\stats\countOSVersions().
YAWK\stats::getJsonWeekdayBarChart | ( | $lang | ) |
Output JS: WEEKDAY BAR CHART.
YAWK\stats::getLoginColors | ( | $login | ) |
YAWK\stats::getOnlineUsers | ( | $db | ) |
Return the number of all currently online users.
object | $db | Database Object |
Definition at line 234 of file stats.php.
References $db, $i, $res, and YAWK\stats\deleteOutdatedSessions().
Referenced by YAWK\stats\getStatsArray().
YAWK\stats::getOsColors | ( | $os | ) |
Set and return the legend textcolor for each operating system.
string | $os | contains the operating system as string |
Definition at line 1080 of file stats.php.
References YAWK\stats\$os.
YAWK\stats::getOsVersionsColors | ( | $osVersions | ) |
YAWK\stats::getStatsArray | ( | $db, | |
$interval, | |||
$period | |||
) |
Returns an array with all stats, ordered by date_created.
object | $db | Database Object |
string | $interval | The interval to get data |
string | $period | The time period (YEAR, MONTH, DAY, HOUR, MINUTE or SECOND) |
Definition at line 2025 of file stats.php.
References $db, $res, YAWK\stats\calculateStatsFromArray(), YAWK\alert\draw(), and YAWK\stats\getOnlineUsers().
Referenced by YAWK\stats\calculateStatsFromArray().
YAWK\stats::getUserStats | ( | $db | ) |
YAWK\stats::getWeekdaysPercent | ( | $lang | ) |
Calculate hits in percent for each weekday.
Definition at line 1389 of file stats.php.
References YAWK\stats\$i_totalDays.
YAWK\stats::insertData | ( | $db | ) |
Insert data into database.
object | $db | Database Object |
Definition at line 2148 of file stats.php.
References $db.
Referenced by YAWK\stats\setStats().
YAWK\stats::prepareData | ( | ) |
Prepare data: get and collect, detect OS and device type.
Definition at line 390 of file stats.php.
References $_GET, YAWK\stats\$browser, browser, YAWK\sys\getBrowser(), YAWK\sys\getOS(), gid, and YAWK\sys\now().
Referenced by YAWK\stats\setStats().
YAWK\stats::setOnlineUsers | ( | $db | ) |
Set users online in database (stores and check sessions and timestamps)
object | $db | Database Object |
Definition at line 284 of file stats.php.
Referenced by YAWK\stats\setStats().
YAWK\stats::setStats | ( | $db | ) |
Insert statistics data into database.
object | $db | Database Object |
Definition at line 368 of file stats.php.
References $db, YAWK\settings\getSetting(), YAWK\stats\insertData(), YAWK\stats\prepareData(), and YAWK\stats\setOnlineUsers().
YAWK\stats::$acceptLanguage |
YAWK\stats::$activeSessions |
YAWK\stats::$browser |
string | detected users browser |
Definition at line 40 of file stats.php.
Referenced by YAWK\stats\countBrowsers(), YAWK\stats\getBrowserColors(), YAWK\stats\getJsonBrowsers(), and YAWK\stats\prepareData().
YAWK\stats::$browserVersion |
YAWK\stats::$currentOnline = 0 |
YAWK\stats::$currentTimeStamp |
YAWK\stats::$date_created |
YAWK\stats::$device |
YAWK\stats::$deviceType |
string | detected device type (desktop, phone, tablet) |
Definition at line 34 of file stats.php.
Referenced by YAWK\stats\countDeviceTypes(), and YAWK\stats\getDeviceTypeColors().
YAWK\stats::$gid = 0 |
YAWK\stats::$i_afternoon = 0 |
YAWK\stats::$i_afternoonPercent = 0 |
YAWK\stats::$i_android = 0 |
YAWK\stats::$i_blackberry = 0 |
YAWK\stats::$i_blockedUsers = 0 |
YAWK\stats::$i_desktop = 0 |
int | how many users came with desktop systems? |
Definition at line 136 of file stats.php.
Referenced by YAWK\stats\countDeviceTypes().
YAWK\stats::$i_desktopPercent = 0 |
YAWK\stats::$i_evening = 0 |
YAWK\stats::$i_eveningPercent = 0 |
YAWK\stats::$i_friday = 0 |
YAWK\stats::$i_fridayPercent = 0 |
YAWK\stats::$i_hits = 0 |
int | total hits overall |
Definition at line 54 of file stats.php.
Referenced by YAWK\stats\calculateStatsFromArray().
YAWK\stats::$i_iOS = 0 |
YAWK\stats::$i_iPad = 0 |
YAWK\stats::$i_iPhone = 0 |
YAWK\stats::$i_iPod = 0 |
YAWK\stats::$i_linux = 0 |
YAWK\stats::$i_loggedInUsers = 0 |
YAWK\stats::$i_loggedUsers = 0 |
YAWK\stats::$i_loggedUsersPercentage = 0 |
YAWK\stats::$i_loginBackend = 0 |
YAWK\stats::$i_loginBackendFailed = 0 |
YAWK\stats::$i_loginBackendSuccess = 0 |
YAWK\stats::$i_loginFailed = 0 |
int | how many logins failed? |
Definition at line 154 of file stats.php.
Referenced by YAWK\stats\countLogins().
YAWK\stats::$i_loginFailedPercentage = 0 |
YAWK\stats::$i_loginFrontend = 0 |
YAWK\stats::$i_loginFrontendFailed = 0 |
YAWK\stats::$i_loginFrontendSuccess = 0 |
YAWK\stats::$i_loginSuccessful = 0 |
int | how many logins were successful? |
Definition at line 152 of file stats.php.
Referenced by YAWK\stats\countLogins().
YAWK\stats::$i_loginSuccessPercentage = 0 |
YAWK\stats::$i_macos9 = 0 |
YAWK\stats::$i_macosX = 0 |
YAWK\stats::$i_mobile = 0 |
YAWK\stats::$i_monday = 0 |
YAWK\stats::$i_mondayPercent = 0 |
YAWK\stats::$i_morning = 0 |
YAWK\stats::$i_morningPercent = 0 |
YAWK\stats::$i_night = 0 |
int | number of hits in the night |
Definition at line 180 of file stats.php.
Referenced by YAWK\stats\countDaytime(), and YAWK\stats\getDayTimesPercent().
YAWK\stats::$i_nightPercent = 0 |
YAWK\stats::$i_osAndroid = 0 |
YAWK\stats::$i_osLinux = 0 |
YAWK\stats::$i_osMac = 0 |
YAWK\stats::$i_osUnknown = 0 |
int | how many operating systems were unable to detect? |
Definition at line 84 of file stats.php.
Referenced by YAWK\stats\countOS().
YAWK\stats::$i_osWindows = 0 |
YAWK\stats::$i_others = 0 |
int | how many users came with other systems? |
Definition at line 132 of file stats.php.
Referenced by YAWK\stats\countOSVersions().
YAWK\stats::$i_phone = 0 |
int | how many users came with mobile devices? |
Definition at line 144 of file stats.php.
Referenced by YAWK\stats\countDeviceTypes().
YAWK\stats::$i_phonePercent = 0 |
YAWK\stats::$i_publicUsers = 0 |
YAWK\stats::$i_publicUsersPercentage = 0 |
YAWK\stats::$i_saturday = 0 |
YAWK\stats::$i_saturdayPercent = 0 |
YAWK\stats::$i_sunday = 0 |
int | number of hits on sunday |
Definition at line 204 of file stats.php.
Referenced by YAWK\stats\countWeekdays().
YAWK\stats::$i_sundayPercent = 0 |
YAWK\stats::$i_tablet = 0 |
int | how many users came with tablet devices? |
Definition at line 140 of file stats.php.
Referenced by YAWK\stats\countDeviceTypes().
YAWK\stats::$i_tabletPercent = 0 |
YAWK\stats::$i_thursday = 0 |
YAWK\stats::$i_thursdayPercent = 0 |
YAWK\stats::$i_totalDays = 0 |
int | number of hits on all days (sum) |
Definition at line 206 of file stats.php.
Referenced by YAWK\stats\getWeekdaysPercent().
YAWK\stats::$i_totalLogins = 0 |
int | how logins were totally made? |
Definition at line 150 of file stats.php.
Referenced by YAWK\stats\countLogins().
YAWK\stats::$i_tuesday = 0 |
YAWK\stats::$i_tuesdayPercent = 0 |
YAWK\stats::$i_ubuntu = 0 |
YAWK\stats::$i_users = 0 |
YAWK\stats::$i_wednesday = 0 |
YAWK\stats::$i_wednesdayPercent = 0 |
YAWK\stats::$i_windows10 = 0 |
YAWK\stats::$i_windows11 = 0 |
YAWK\stats::$i_windows2000 = 0 |
YAWK\stats::$i_windows311 = 0 |
YAWK\stats::$i_windows7 = 0 |
YAWK\stats::$i_windows8 = 0 |
YAWK\stats::$i_windows95 = 0 |
YAWK\stats::$i_windows98 = 0 |
YAWK\stats::$i_windowsME = 0 |
YAWK\stats::$i_windowsServer = 0 |
YAWK\stats::$i_windowsVista = 0 |
YAWK\stats::$i_windowsXP = 0 |
YAWK\stats::$logged_in = 0 |
YAWK\stats::$os |
string | detected users operating system |
Definition at line 36 of file stats.php.
Referenced by YAWK\stats\countOS(), YAWK\stats\getJsonOS(), and YAWK\stats\getOsColors().
YAWK\stats::$osVersion |
string | detected users operating system version |
Definition at line 38 of file stats.php.
Referenced by YAWK\stats\countOSVersions(), and YAWK\stats\getJsonOSVersions().
YAWK\stats::$page |
string | page that the user requested |
Definition at line 48 of file stats.php.
Referenced by YAWK\stats\drawPagesBox().
YAWK\stats::$phpSessionID |
YAWK\stats::$referer |
YAWK\stats::$remoteAddr |
YAWK\stats::$uid = 0 |
YAWK\stats::$userAgent |