<commit_before><?php
require("mysql_connect.php");
require('../library/fpdf/fpdf.php');
$clientID = $_REQUEST['clientID'];
$staffID = $_REQUEST['staffID'];
$reportID=1;

class PDF extends FPDF
{
//Page header
function Header()
{
	global $client,$thisQ;
	//Logo
	$this->Image('../images/pdf_header.png',5,5,200);
	$this->Ln(32);
}

//Page footer
function Footer()
{
	//Position at 1.5 cm from bottom
	$this->SetY(-15);
	//Arial italic 8
	// $this->SetFont('Arial','I',8);
	//Page number
	// $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
	// $this->Line(10,$this->GetY(), 190, $this->GetY());
}
function jEntry($k,$data,$in){
	global $thisQ;

	$this->SetFont('Arial','',10);
	$hr = ($data['Hours'] == 1)?"hr":"hrs";
	$this->SetFont('Arial','',10);
	$this->MultiCell(175,5.25,strftime("%D",strtotime($data['Date'])).' - '.$data['Hours'] . $hr . ' - ' .$data['ClientNote']);
	$this->Ln(3);
}
function jEntries($hours,$in){
	foreach($hours as $k=>$h){
		$this->jEntry($k,$h,$in);
		// $this->Ln(-3);
	}
}

function PutLink($URL,$txt)
{
    //Put a hyperlink
    $this->SetTextColor(0,0,255);
    $this->Write(10,$txt,$URL);
    $this->SetTextColor(0);
}
//Report
function Report($client,$filename,$dest='I')
{
	global $userinfo,$thisQ;
	$clientID = $_REQUEST['clientID'];
	$this->AliasNbPages();
	$this->AddPage();
	
	$in = 6;
	
	$this->SetFont('Arial','B',14);
	$this->Cell( 120, 12, $client['name'], 0, 0, 'L' );
	$this->SetFont('Arial','',12);
	$this->Cell( 40, 12, "Q".thisQ()."-".date('Y'), 0, 0, 'L' );
	$this->Cell( 40, 12, date('n/j/Y'), 0, 0, 'L' );
	$this->SetLineWidth(0.8);
	$this->Line( 10, 52 ,190 ,52 );
	$this->Ln(8);
	
	
	
	$this->SetFont('Arial','B',12);
	$this->Cell( 90, 12, '', 0, 0, 'L' );

	$staffnameR = mysql_query("SELECT s.firstname, s.lastname FROM staff s, staff_clients c WHERE s.id = c.StaffID AND c.ClientID = ".$clientID);
	$staffname = mysql_fetch_row($staffnameR);
	$this->Cell( 55, 12, "CBLD Consultant: "$staffname[0]." ".$staffname[1], 0, 0, 'B' );
	
	
	$this->SetFont('Arial','B',12);
	$this->Cell( 55, 12, "Ongoing Support:", 0, 0, 'L' );
	$this->Ln(8);
	$this->Cell($in);
	$this->SetFont('Arial','',12);
	$this->Cell( 55, 12, "Hours Utilized (of ".$client['total_hours'].")", 0, 0, 'L' );
	$this->SetFont('Arial','B',14);
	$this->Cell( 40, 12, $client['hrs']['total'], 0, 0, 'L' );<commit_msg>NEW: client export option IN PROGRESS<commit_after><?php
require("mysql_connect.php");
require('../library/fpdf/fpdf.php');
$clientID = $_REQUEST['clientID'];
$staffID = $_REQUEST['staffID'];
$reportID=1;

class PDF extends FPDF
{
//Page header
function Header()
{
	global $client,$thisQ;
	//Logo
	$this->Image('../images/pdf_header.png',5,5,200);
	$this->Ln(32);
}

//Page footer
function Footer()
{
	//Position at 1.5 cm from bottom
	$this->SetY(-15);
	//Arial italic 8
	// $this->SetFont('Arial','I',8);
	//Page number
	// $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
	// $this->Line(10,$this->GetY(), 190, $this->GetY());
}
function jEntry($k,$data,$in){
	global $thisQ;

	$this->SetFont('Arial','',10);
	$hr = ($data['Hours'] == 1)?"hr":"hrs";
	$this->SetFont('Arial','',10);
	$this->MultiCell(175,5.25,strftime("%D",strtotime($data['Date'])).' - '.$data['Hours'] . $hr . ' - ' .$data['ClientNote']);
	$this->Ln(3);
}
function jEntries($hours,$in){
	foreach($hours as $k=>$h){
		$this->jEntry($k,$h,$in);
		// $this->Ln(-3);
	}
}

function PutLink($URL,$txt)
{
    //Put a hyperlink
    $this->SetTextColor(0,0,255);
    $this->Write(10,$txt,$URL);
    $this->SetTextColor(0);
}
//Report
function Report($client,$filename,$dest='I')
{
	global $userinfo,$thisQ;
	$clientID = $_REQUEST['clientID'];
	$this->AliasNbPages();
	$this->AddPage();
	
	$in = 6;
	
	$this->SetFont('Arial','B',14);
	$this->Cell( 120, 12, $client['name'], 0, 0, 'L' );
	$this->SetFont('Arial','',12);
	$this->Cell( 40, 12, "Q".thisQ()."-".date('Y'), 0, 0, 'L' );
	$this->Cell( 40, 12, date('n/j/Y'), 0, 0, 'L' );
	$this->SetLineWidth(0.8);
	$this->Line( 10, 52 ,190 ,52 );
	$this->Ln(8);
	
	
	
	$this->SetFont('Arial','B',12);
	$this->Cell( 90, 12, '', 0, 0, 'L' );

	$staffnameR = mysql_query("SELECT s.firstname, s.lastname FROM staff s, staff_clients c WHERE s.id = c.StaffID AND c.ClientID = ".$clientID);
	$staffname = mysql_fetch_row($staffnameR);
	$this->Cell( 55, 12, "CBLD Consultant: ".$staffname[0]." ".$staffname[1], 0, 0, 'B' );
	
	
	$this->SetFont('Arial','B',12);
	$this->Cell( 55, 12, "Ongoing Support:", 0, 0, 'L' );
	$this->Ln(8);
	$this->Cell($in);
	$this->SetFont('Arial','',12);
	$this->Cell( 55, 12, "Hours Utilized (of ".$client['total_hours'].")", 0, 0, 'L' );
	$this->SetFont('Arial','B',14);
	$this->Cell( 40, 12, $client['hrs']['total'], 0, 0, 'L' );
{'fraction_non_alphanumeric': 0.2858356338925462, 'fraction_numerical': 0.05181567211722234, 'mean_word_length': 4.736906211936662, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1408954', 'n_tokens_mistral': 2208, 'n_tokens_neox': 2001, 'n_words': 359}