403Webshell
Server IP : 167.235.67.158  /  Your IP : 216.73.216.95
Web Server : Apache
System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : upstairsbar.co.uk ( 982)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/esl.the-word.com/reference/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/esl.the-word.com/reference/print.php
<?php
require('fpdf.php');

global $firstGoRound;
global $pageCount;

$firstGoRound = true;
$pageCount = 0;

if(!function_exists('em'))
{
	function em($word) {
		$word = stripslashes($word);
		$word = iconv('UTF-8', 'windows-1252', $word);
		return $word;
	}
}

class PDF extends FPDF
{
	function Header()
	{
		$this->Image('header.jpg',0,0, 211);
	}

	function WriteHTML($html)
	{
		// HTML parser
		$html = str_replace("\n",' ',$html);
		$a = preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
		foreach($a as $i=>$e)
		{
			if($i%2==0)
			{
				// Text
				if($this->HREF)
					$this->PutLink($this->HREF,$e);
				else
					$this->Write(5,$e);
			}
			else
			{
				// Tag
				if($e[0]=='/')
					$this->CloseTag(strtoupper(substr($e,1)));
				else
				{
					// Extract attributes
					$a2 = explode(' ',$e);
					$tag = strtoupper(array_shift($a2));
					$attr = array();
					foreach($a2 as $v)
					{
						if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3))
							$attr[strtoupper($a3[1])] = $a3[2];
					}
					$this->OpenTag($tag,$attr);
				}
			}
		}
	}
	
	function OpenTag($tag, $attr)
	{
		// Opening tag
		if($tag=='B' || $tag=='I' || $tag=='U')
			$this->SetStyle($tag,true);
		if($tag=='A')
			$this->HREF = $attr['HREF'];
		if($tag=='BR')
			$this->Ln(5);
		if($tag=='MBR')
			$this->Ln(8);
	}
	
	function CloseTag($tag)
	{
		// Closing tag
		if($tag=='B' || $tag=='I' || $tag=='U')
			$this->SetStyle($tag,false);
		if($tag=='A')
			$this->HREF = '';
	}
	
	function SetStyle($tag, $enable)
	{
		// Modify style and select corresponding font
		$this->$tag += ($enable ? 1 : -1);
		$style = '';
		foreach(array('B', 'I', 'U') as $s)
		{
			if($this->$s>0)
				$style .= $s;
		}
		$this->SetFont('',$style);
	}
	
	function PutLink($URL, $txt)
	{
		// Put a hyperlink
		$this->SetTextColor(0,0,255);
		$this->SetStyle('U',true);
		$this->Write(5,$txt,$URL);
		$this->SetStyle('U',false);
		$this->SetTextColor(0);
	}
	
	function Footer()
	{
		global $firstGoRound;
		global $pageCount;
		global $info;

		if($firstGoRound)
		{
			$pageCount = $this->PageNo()+1;
		}
		else if($this->PageNo() == $pageCount)
		{
			$y = $this->getY();
			
			$this->setY(-60);
			$this->SetStyle('B',true);
			$this->Write(5, 'Signature: ');
			$this->SetStyle('B',false);
			$this->Write(5, $info[0]);
			$this->Ln();
			$this->SetStyle('B',true);
			$this->Write(5, 'Institution: ');
			$this->SetStyle('B',false);
			$this->Write(5, $info[1]);
			$this->Ln();
			$this->SetStyle('B',true);
			$this->Write(5, 'Position: ');
			$this->SetStyle('B',false);
			$this->Write(5, $info[2]);
			$this->Ln();
			$this->SetStyle('B',true);
			$this->Write(5, 'Date: ');
			$this->SetStyle('B',false);
			$this->Write(5, $info[3]);
		}	
	}
}

function createPDF() {
	global $firstGoRound;
	global $pageCount;
	global $info;
	
	// Instanciation of inherited class
	$pdf = new PDF();
	$pdf->SetTopMargin(50);
	$pdf->AliasNbPages();
	$pdf->AddPage();
	$pdf->SetTopMargin(50);
	$pdf->SetLeftMargin(14);
	
	$pdf->SetFont('Helvetica','',10);
	
	$rel = array();
	for($i = 0; $i <= 4; $i++)
		if($_POST['rel_'.$i])
			$rel[] = $_POST['rel_'.$i];
			
	if(in_array('Other',$rel))
		$rel[array_search('Other',$rel)] .= ': ' . em($_POST['rel_other']);
		
	
	$reason = array();	
	for($i = 0; $i <= 5; $i++)
		if($_POST['reason_'.$i])
			$reason[] = $_POST['reason_'.$i];
			
	if(in_array('Other',$reason))
		$reason[array_search('Other',$reason)] .= ': ' . em($_POST['reason_other']);
	
	$info = array(em($_POST['refname']), em($_POST['institution']), em($_POST['jobTitle']), $_POST['date1'] . '/' . $_POST['date2'] . '/' . $_POST['date3']);
	
	$body = '';
	
	$body .= '<b>Referee Name: </b>' . em($_POST['refname']) . '<br>';
	$body .= '<b>Organisation: </b>' . em($_POST['institution']) . '<br>';
	$body .= '<b>Position: </b>' . em($_POST['jobTitle']) . '<br>';
	$body .= '<b>Address: </b>' . em($_POST['address1']) . (strlen($_POST['address2']) > 0 ? ', ' . em($_POST['address2']) : '') . '<br>';
	$body .= '<b>Postcode: </b>' . $_POST['postcode'] . '<br>';
	$body .= '<b>Date: </b>' . $_POST['date1'] . '/' . $_POST['date2'] . '/' . $_POST['date3'] . '<br><br><br>';
	
	$body .= '<b>Name of Applicant: </b>' . em($_POST['name']) . '<mbr>';
	$body .= '<b>What was your working relationship with the candidate?</b><br>' . implode(', ', $rel) . '<mbr>';
	
	$body .= '<b>In what period did you work with or know the applicant?</b><br>From: ' . $_POST['periodFromMonth'] . '/' . $_POST['periodFromYear'] . ' To: ' . ($_POST['periodToYearCurrent'] ? date('m/Y') : $_POST['periodToMonth'] . '/' . $_POST['periodToYear']) . '<mbr>';
	
	$body .= '<b>Reason for leaving:</b><br>' . implode(', ', $reason) . '<mbr>';
	
	$body .= '<b>In your view would the applicant share and support the ESL safeguarding Commitment?</b><br>' . $_POST['share'] . ($_POST['share'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['sharenoelab'] ? 'I do not wish to elaborate' : em($_POST['shareno']))  : '') . '<mbr>';
	
	$body .= '<b>In your view and based upon the knowledge that you hold, are you completely and
entirely satisfied that the candidate is suitable for work with children and young people?</b><br>' . $_POST['workwithchildren'] . ($_POST['workwithchildren'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['workwithchildrennoelab'] ? 'I do not wish to elaborate' : em($_POST['workwithchildrenno']))  : '') . '<mbr>';

	$body .= '<b>In your view, is the candidate proficient in creating a sound teaching and learning environment?</b><br>' . $_POST['teaching'] . ($_POST['teaching'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['teachingnoelab'] ? 'I do not wish to elaborate' : em($_POST['teachingno']))  : '') . '<mbr>';
	
	$body .= '<b>Your comments would be appreciated on commitment, attendance and time keeping. Additionally could you please comment on whether the applicant has been disciplined as a result of poor attendance due to sickness record.</b><br>' . em($_POST['commitment']) . '<mbr>';
	
	$body .= '<b>Empathy with pupils. Relationships with colleagues and parents.</b><br>' . em($_POST['relationships']) . '<mbr>';
	
	$body .= '<b>Please provide details of any disciplinary procedures, both current and expired, that the candidate has been subject to involving issues relating to the safety and welfare of children or young people.</b><br>' . em($_POST['disciplinary']) . '<mbr>';
	
	$body .= '<b>Would you re-employ the candidate?</b><br>' . $_POST['re-employ'] . ($_POST['re-employ'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['re-employnoelab'] ? 'I do not wish to elaborate' : em($_POST['re-employno']))  : '') . '<mbr>';
	
	$body .= '<b>Would you recommend the candidate for day-to-day supply work?</b><br>' . $_POST['day-to-daysupply'] . ($_POST['day-to-daysupply'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['day-to-daysupplynoelab'] ? 'I do not wish to elaborate' : em($_POST['day-to-daysupplyno']))  : '') . '<mbr>';
	
	$body .= '<b>Would you recommend the candidate for long-term supply work?</b><br>' . $_POST['long-termsupply'] . ($_POST['long-termsupply'] == 'No' ? '<br><em>Reason: </em>' . ($_POST['long-termsupplynoelab'] ? 'I do not wish to elaborate' : em($_POST['long-termsupplyno']))  : '') . '<mbr>';
	
	$body .= '<b>Please do be aware that in line with DfE guidance, you have a responsibility to ensure that this reference is accurate and does not contain any material misstatement or omission. Do you understand that responsibility?</b><br>' . ($_POST['responsibility'] ? 'Yes, I Understand' : '') . '<mbr>';
	
	$body .= '<b>Would you be happy for the above information to be shared with a third party?</b><br>' . $_POST['shared'] . '<mbr>';
	
	$body .= '<b>Would you like to receive further information with regard to the service that ESL offers Schools and Academy\'s?</b><br>' . $_POST['moreinfo'] . '<mbr>';

	$body .= '<b>Would you be happy for the above information to be shared with a third party?</b><br>' . $_POST['thirdparty'] . '<mbr>';

	$pdf->SetAutoPageBreak(true, 62);
	$pdf->WriteHTML($body . $_GET['extra']);
	
	if(!$firstGoRound)
	{
		global $fname;

		if(isset($_GET['save']))
			$pdf->Output('ESL-Reference.pdf','D');
		else if(isset($fname))
			$pdf->Output('saved/ESL-Reference-' . $fname . '.pdf','F');
		else
			$pdf->Output();
	}
}

createPDF();
$firstGoRound = false;
createPDF();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit