AnonSec Shell
Server IP : 149.202.105.228  /  Your IP : 216.73.216.18
Web Server : Apache
System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : atfycaf ( 116275)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/atfycaf/www/pdf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/atfycaf/www/pdf/fixturesPrintPDF.php
<?php
include "../globalVars.php";

if (isset($_GET["leagueURL"])) {
	$groupURL		= $_GET["groupURL"];
	$leagueURL		= $_GET["leagueURL"];

	$leagueTypeIDQuery = mysqli_query($conn, "SELECT id FROM leagueGroups WHERE pageURL = '$groupURL'");
	while ($lTQ = mysqli_fetch_array($leagueTypeIDQuery)) {
		$leagueTypeID	= $lTQ["id"];
	}

	$leagueQuery = mysqli_query($conn, "SELECT id, hasPlayoff FROM leagueConfig WHERE pageURL = '$leagueURL' AND (leagueType = '$leagueTypeID')");
	while ($lQ = mysqli_fetch_array($leagueQuery)) {
		$leagueID		= $lQ["id"];
		$hasPlayoffs	= $lQ["hasPlayoff"];
	}

	$fixturesURL	= $url . "pdf/league-fixtures-". $leagueID .".html";
	if ($hasPlayoffs > 0) {
		$miniLeaguesArray	= array();
		$miniLeagueQuery = mysqli_query($conn, "SELECT * FROM leagueMiniLeagues WHERE leagueID = '$leagueID' ORDER BY id ASC");
		while ($mLQ = mysqli_fetch_array($miniLeagueQuery)) {
			$miniLeaguesArray[]	= $mLQ["id"];
		}
		$playoffsCreatedQuery = mysqli_query($conn, "SELECT id FROM leagueResults WHERE miniLeagueID IN ('". implode("', '", $miniLeaguesArray) ."') AND weekID > '1000'");
		if (mysqli_num_rows($playoffsCreatedQuery) > 0) {
			$fixturesPURL	= $url . "pdf/league-fixtures-playoffs-". $leagueID .".html";
		} else {
			$fixturesPURL	= "";
		}
	} else {
		$fixturesPURL	= "";
	}
	$fixturesDURL	= $url . "pdf/league-fixtures-details-". $leagueID .".html";
	$localPDF		= $_SERVER['DOCUMENT_ROOT'] . "/pdf/league-fixtures.pdf";
	$PDFurl			= "https://www.modsnetwebsitedesign.com/fab/fixturesCreate.php";

	$ch			= curl_init();
	curl_setopt($ch, CURLOPT_URL, $PDFurl);
	curl_setopt($ch, CURLOPT_TIMEOUT, 90);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type:multipart/form-data" ));
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, array( 
												'method' => "create",
												'fixturesDURL' => $fixturesDURL,
												'fixturesPURL' => $fixturesPURL,
												'fixturesURL' => $fixturesURL
											));
	curl_setopt($ch, CURLINFO_HEADER_OUT, true);
	$pdfResponse	= curl_exec($ch);
	curl_close($ch);

	if($pdfResponse === false) {
		echo 'Curl error: ' . curl_error($ch);
	} else {
		$displayResponse	= json_decode($pdfResponse, true);
		$fixturesPDFURL		= $displayResponse["fixturesPDFURL"];

		$getPDF		= curl_init($fixturesPDFURL);
		$fp 		= fopen("$localPDF", "w");
		curl_setopt($getPDF, CURLOPT_FILE, $fp);
		curl_setopt($getPDF, CURLOPT_HEADER, 0);
		curl_setopt($getPDF, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") );
		curl_exec($getPDF);
		curl_close($getPDF);
		fclose($fp);

		if (file_exists($localPDF)) {
			$ch			= curl_init();
			curl_setopt($ch, CURLOPT_URL, $PDFurl);
			curl_setopt($ch, CURLOPT_TIMEOUT, 90);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
			curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type:multipart/form-data" ));
			curl_setopt($ch, CURLOPT_POST, 1);
			curl_setopt($ch, CURLOPT_POSTFIELDS, array( 
														'method' => "destroy"
													));
			curl_setopt($ch, CURLINFO_HEADER_OUT, true);
			$pdfResponse	= curl_exec($ch);
			curl_close($ch);
		}
	}

	$pdfFile	= file_get_contents($localPDF);

	header('Content-type: application/pdf');
	header('Content-Disposition: inline;');

	echo $pdfFile;	
}
?>

Anon7 - 2022
AnonSec Team