| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/usa_sites/governmentgrants.us/vx/reports/devices/ |
Upload File : |
<?
/**
* This framework has been created for a multitude of grant research websites.
*
* @copyright 2016-2021 Synergy Pro Marketing
* @author Aaron Campbell <aaron@synergymentoring.com>
* @license None, All Rights Reserved
* @package Business
*/
include_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/inc.php");
$key = $_REQUEST['key'];
if(!valid_key($key, $db, true))
{
return false;
exit;
}
else
{
$siteLogins = $db->query("
SELECT
*
FROM $userDB.lc_logins
WHERE
resellerID = '$resellerID'
AND
browser IS NOT NULL
ORDER BY signindate ASC
");
$phoneList = array();
$tabletList = array();
$desktopList = array();
$dtW = array();
$dtH = array();
$tbW = array();
$tbH = array();
$pnW = array();
$pnH = array();
$orderPage = array();
$loginPage = array();
$emailLogin = array();
$bodyLogin = array();
for($i=0; $i<count($siteLogins); $i++)
{
if($siteLogins[$i]['device'] == "iphone" || $siteLogins[$i]['device'] == "android")
{
$phoneList[] = $siteLogins[$i];
$pnW[] = $siteLogins[$i]['screen_width'];
$pnH[] = $siteLogins[$i]['screen_height'];
}
if($siteLogins[$i]['device'] == "ipad")
{
$tabletList[] = $siteLogins[$i];
$tbW[] = $siteLogins[$i]['screen_width'];
$tbH[] = $siteLogins[$i]['screen_height'];
}
if($siteLogins[$i]['device'] == "desktop")
{
$desktopList[] = $siteLogins[$i];
$dtW[] = $siteLogins[$i]['screen_width'];
$dtH[] = $siteLogins[$i]['screen_height'];
}
if($siteLogins[$i]['login_source'] == "login_page" || empty($siteLogins[$i]['login_source']))
{
$loginPage[] = $siteLogins[$i];
}
if($siteLogins[$i]['login_source'] == "confirmation_email")
{
$emailLogin[] = $siteLogins[$i];
}
if($siteLogins[$i]['login_source'] == "vx_body")
{
$bodyLogin[] = $siteLogins[$i];
}
if($siteLogins[$i]['login_source'] == "order_page")
{
$orderPage[] = $siteLogins[$i];
}
}
$totalPNWidth = 0;
for($i=0; $i<count($pnW); $i++)
{
$totalPNWidth += $pnW[$i];
}
$averagePNWidth = round($totalPNWidth / count($pnW));
$totalPNHeight = 0;
for($i=0; $i<count($pnH); $i++)
{
$totalPNHeight += $pnH[$i];
}
$averagePNHeight = round($totalPNHeight / count($pnH));
$totalTBWidth = 0;
for($i=0; $i<count($tbW); $i++)
{
$totalTBWidth += $tbW[$i];
}
$averageTBWidth = round($totalTBWidth / count($tbW));
$totalTBHeight = 0;
for($i=0; $i<count($tbH); $i++)
{
$totalTBHeight += $tbH[$i];
}
$averageTBHeight = round($totalTBHeight / count($tbH));
$totalDTWidth = 0;
for($i=0; $i<count($dtW); $i++)
{
$totalDTWidth += $dtW[$i];
}
$averageDTWidth = round($totalDTWidth / count($dtW));
$totalDTHeight = 0;
for($i=0; $i<count($dtH); $i++)
{
$totalDTHeight += $dtH[$i];
}
$averageDTHeight = round($totalDTHeight / count($dtH));
$phonePercent = (100/count($siteLogins)) * count($phoneList);
$tabletPercent = (100/count($siteLogins)) * count($tabletList);
$desktopPercent = (100/count($siteLogins)) * count($desktopList);
echo '<div class="p20">';
echo '<h1>'.count($phoneList).' Phone Logins : '.round($phonePercent).'%</h1>';
echo '<h2>'.$averagePNWidth.' x '.$averagePNHeight.' Average Screen Size</h2>';
echo '<h1>'.count($tabletList).' Tablet Logins : '.round($tabletPercent).'%</h1>';
echo '<h2>'.$averageTBWidth.' x '.$averageTBHeight.' Average Screen Size</h2>';
echo '<h1>'.count($desktopList).' Desktop Logins : '.round($desktopPercent).'%</h1>';
echo '<h2>'.$averageDTWidth.' x '.$averageDTHeight.' Average Screen Size</h2>';
echo '<h3>'.count($loginPage).' From Login Pages</h3>';
echo '<h3>'.count($emailLogin).' From Confirmation Email</h3>';
echo '<h3>'.count($bodyLogin).' From Body Login</h3>';
echo '<h3>'.count($orderPage).' From Order Page</h3>';
echo '</div>';
include_once($_SERVER['DOCUMENT_ROOT']."/vx/layout/body.php");
}
?>