A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 239

A PHP Error was encountered

Severity: Warning

Message: include(C:/xampp/htdocs/acthub/trunk/templates/assets/php/fpdf.php): failed to open stream: No such file or directory

Filename: libraries/Functions.php(659) : eval()'d code

Line Number: 43

A PHP Error was encountered

Severity: Warning

Message: include(): Failed opening 'C:/xampp/htdocs/acthub/trunk/templates/assets/php/fpdf.php' for inclusion (include_path='.:/usr/share/php')

Filename: libraries/Functions.php(659) : eval()'d code

Line Number: 43


( ! ) Fatal error: Class 'FPDF' not found in /var/www/html/frameworks/expressionengine/libraries/Functions.php(659) : eval()'d code on line 221
Call Stack
#TimeMemoryFunctionLocation
10.0000230424{main}( ).../index.php:0
20.0001233472require_once( '/var/www/html/frameworks/codeigniter/system/core/CodeIgniter.php' ).../index.php:188
30.01441265688call_user_func_array:{/var/www/html/frameworks/codeigniter/system/core/CodeIgniter.php:311} ( ).../CodeIgniter.php:311
40.01441266024EE->index( ).../CodeIgniter.php:311
50.01441266976EE_Core->generate_page( ).../ee.php:68
60.01451308352EE_Template->run_template_engine( ).../Core.php:632
70.01461309984EE_Template->fetch_and_parse( ).../Template.php:179
80.01721386552EE_Template->parse( ).../Template.php:231
90.01761406200EE_Template->parse_template_php( ).../Template.php:434
100.01761422776EE_Functions->evaluate( ).../Template.php:1579
110.01851592448eval( '?>EE =& get_instance(); $urltitle = $this->EE->uri->segment(3,''); $current_member_id = $this->EE->session->userdata('member_id'); /* ------- */ /* Library */ /* ------- */ if ($live) { include($_SERVER['DOCUMENT_ROOT'] . "/templates/assets/php/fpdf.php"); } else { if ($matt==true) {include("C:/xampp/htdocs/acthub/trunk/templates/assets/php/fpdf.php");} if ($matt==false) {include("C:/wamp/www/acthub/trunk/templates/assets/php/fpdf.php");} } /* -------- */ /* Database */ /* -------- */ $fieldname_list = array(); $fieldid_list = array(); $pdftitle = "Qualification"; $fillr=126; $fillg=1; $fillb=6; $fillr2=204; $fillg2=162; $fillb2=165; $channel_name = "qualifications"; array_push($fieldid_list,0); array_push($fieldname_list,"who_is_qualification_for"); // 0 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_sector"); // 1 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_provider"); // 2 array_push($fieldid_list,0); array_push($fieldname_list,"duration"); // 3 array_push($fieldid_list,0); array_push($fieldname_list,"qual_duration_unit"); // 4 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_venue"); // 5 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_hide_cost"); // 6 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_cost_pp"); // 7 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_level"); // 8 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_funding"); // 9 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_funding_text"); // 10 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_assessment"); // 11 array_push($fieldid_list,0); array_push($fieldname_list,"on_site"); // 12 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_outline"); // 13 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_attachments"); // 14 array_push($fieldid_list,0); array_push($fieldname_list,"qualification_how_to_book"); // 15 $number_of_fields = count($fieldname_list); /* List of field IDs */ $query = "SELECT field_id,field_name FROM exp_channel_fields WHERE"; for ($i=0; $i<$number_of_fields; $i++) { if ($i>0) { $query .= " OR"; } $query .= " field_name='" . $fieldname_list[$i] . "'"; } $results = $this->EE->db->query($query); foreach($results->result_array() as $row) { for ($i2=0; $i2<$number_of_fields; $i2++) { if ($row['field_name']==$fieldname_list[$i2]) {$fieldid_list[$i2]=$row['field_id'];} } } /* Channel ID */ $query = "SELECT channel_id FROM exp_channels WHERE channel_name='" . $channel_name . "'"; $results = $this->EE->db->query($query); $channel_id = $results->row('channel_id'); /* The data */ $query = "SELECT exp_channel_titles.title AS title"; $query .= ", exp_channel_titles.author_id AS author_id"; $query .= ", exp_channel_titles.status AS status"; $query .= ", field_id_" . $fieldid_list[0] . " AS who_is_the_qualification_for"; $query .= ", field_id_" . $fieldid_list[1] . " AS qualification_sector"; $query .= ", field_id_" . $fieldid_list[2] . " AS qualification_provider"; $query .= ", field_id_" . $fieldid_list[3] . " AS duration"; $query .= ", field_id_" . $fieldid_list[4] . " AS duration_unit"; $query .= ", field_id_" . $fieldid_list[5] . " AS address"; $query .= ", field_id_" . $fieldid_list[6] . " AS hide_cost"; $query .= ", field_id_" . $fieldid_list[7] . " AS cost"; $query .= ", field_id_" . $fieldid_list[8] . " AS level"; $query .= ", field_id_" . $fieldid_list[9] . " AS qualification_funding"; $query .= ", field_id_" . $fieldid_list[10] . " AS qualification_funding_text"; $query .= ", field_id_" . $fieldid_list[11] . " AS assessment"; $query .= ", field_id_" . $fieldid_list[12] . " AS on_site"; $query .= ", field_id_" . $fieldid_list[13] . " AS qualification_outline"; $query .= ", field_id_" . $fieldid_list[14] . " AS qualification_attachments"; $query .= ", field_id_" . $fieldid_list[15] . " AS qualification_how_to_book"; $query .= " FROM exp_channel_titles, exp_channel_data"; $query .= " WHERE exp_channel_titles.url_title='" . $urltitle . "'"; $query .= " AND exp_channel_data.entry_id = exp_channel_titles.entry_id"; $results = $this->EE->db->query($query); $ok = true; if ($results->num_rows()==0) { $ok = false; } else { if ($results->row('status')=='closed') {$ok=false;} } if ($ok==false) {exit();} /* Provider details */ $p1 = ""; $p2 = ""; $p3 = ""; $p4 = ""; $provider = $results->row('qualification_provider'); if ($provider!="") { $query2 = "SELECT * FROM exp_members WHERE member_id=" . $provider; $results2 = $this->EE->db->query($query2); if ($results2->num_rows()==1) { $p1 = $results2->row('screen_name'); $p2 = $results2->row('email'); } /* -- */ $query2 = "SELECT m_field_id FROM exp_member_fields WHERE m_field_name='contact_number'"; $results2 = $this->EE->db->query($query2); $fid = $results2->row('m_field_id'); $query2 = "SELECT IFNULL(m_field_id_" . $fid . ",'') AS tel FROM exp_member_data WHERE member_id=" . $provider; $results2 = $this->EE->db->query($query2); $p3 = $results2->row('tel'); /* -- */ $filename = strval($provider); $full_filename = ''; if ($live) { $default_filename = $_SERVER["DOCUMENT_ROOT"].'/images/avatars/uploads/default.jpg'; } else { $default_filename = $_SERVER["DOCUMENT_ROOT"].'/acthub/trunk/images/avatars/uploads/default.jpg'; } $exts = array(".gif", ".png", ".jpeg", ".jpg"); foreach ($exts as $ext) { if ($live) { $img = $_SERVER["DOCUMENT_ROOT"].'/images/avatars/uploads/'.$filename.$ext; } else { $img = $_SERVER["DOCUMENT_ROOT"].'/acthub/trunk/images/avatars/uploads/'.$filename.$ext; } if (file_exists($img)) { $full_filename = $img; break; } else { $full_filename = $default_filename; } } $p4 = $full_filename; } /* --------- */ /* PDF Class */ /* --------- */ class PDF extends FPDF { public $live; public $myleftmargin; public $mywidth; public $boxwidths2; public $boxwidths4; public $fillr, $fillg, $fillb; public $fillr2, $fillg2, $fillb2; function Header() { $this->SetXY(0,0); if ($this->live) { $this->Image($_SERVER['DOCUMENT_ROOT'] . '/images/interface/ACT_HUB_PDF_BACK_Portrait.jpg',0,0,595); } else {$this->Image($_SERVER["DOCUMENT_ROOT"].'/acthub/trunk/images/interface/ACT_HUB_PDF_BACK_Portrait.jpg',0,0,595);} $this->SetXY(0,110); } function Footer() { } function Strip2($s0,$s1) { $myfontsize = 10; $mytopmargin = 5; $this->cMargin = $myfontsize; $maxlines = 1; if ($s0!="") { $this->SetFont('Arial','B',$myfontsize); $nbl = $this->NbLines($this->boxwidths2[0],$s0); if ($nbl>$maxlines) {$maxlines=$nbl;} $leftheight = ($maxlines * $myfontsize) + $mytopmargin + $mytopmargin; } $this->SetFont('Arial','',$myfontsize); $nbl = $this->NbLines($this->boxwidths2[1],$s1); if ($nbl>$maxlines) {$maxlines=$nbl;} $nheight = ($maxlines * $myfontsize) + $mytopmargin + $mytopmargin; if($this->GetY()+$nheight>$this->PageBreakTrigger-70) {$this->AddPage($this->CurOrientation);} $currenty = $this->GetY(); $lx = $this->myleftmargin; //-- $this->SetDrawColor($this->fillr2,$this->fillg2,$this->fillb2); //-- if ($s0!="") { $this->SetFillColor($this->fillr2,$this->fillg2,$this->fillb2); $this->Rect($this->myleftmargin,$currenty,$this->boxwidths2[0]-1,$leftheight,"F"); $this->SetFont('Arial','B',$myfontsize); $this->SetTextColor($this->fillr,$this->fillg,$this->fillb); $this->SetXY($lx,$currenty+$mytopmargin); $this->cMargin = $myfontsize; $this->MultiCell($this->boxwidths2[0],$myfontsize,$s0,0,'L',false); $this->Rect($lx,$currenty,$this->boxwidths2[0],$leftheight); } $lx = $lx + $this->boxwidths2[0]; //-- $this->SetFont('Arial','',$myfontsize); $this->SetTextColor(0,0,0); $this->SetXY($lx,$currenty+$mytopmargin); $this->cMargin = $myfontsize; $this->MultiCell($this->boxwidths2[1],$myfontsize,$s1,0,'L',false); $this->Rect($lx,$currenty,$this->boxwidths2[1],$nheight); $lx = $lx + $this->boxwidths2[0]; //-- $this->SetY($currenty+$nheight+5); } function Divider() { if($this->GetY()+15>$this->PageBreakTrigger-70) {$this->AddPage($this->CurOrientation);} else { $currenty = $this->GetY(); //$lx = $this->myleftmargin; //$this->Line($lx,$currenty+5,$lx+$this->mywidth,$currenty+5); $this->SetY($currenty+15); } } function StripL($s0) { $filedetails = getimagesize($s0); $fw = $filedetails[0]; $fh = $filedetails[1]; if ($fw>($this->boxwidths2[1]-10)) { $scale = ($this->boxwidths2[1]-150) / $fw; $fw = $this->boxwidths2[1]-150; $fh = $fh * $scale; } $nheight = $fh+10; if($this->GetY()+$nheight>$this->PageBreakTrigger-70) {$this->AddPage($this->CurOrientation);} //-- $currenty = $this->GetY(); $lx = $this->myleftmargin + $this->boxwidths2[0]; $this->SetDrawColor($this->fillr2,$this->fillg2,$this->fillb2); $this->Rect($lx,$currenty,$this->boxwidths2[1],$nheight); $lx = $lx + floor(($this->boxwidths2[1]-$fw)/2); $this->Image($s0,$lx,$currenty+5,$fw,$fh); //-- $this->SetY($currenty+$nheight); } } /* --------------------------------------------- */ /* Construct PDF class - Portrait, pt units, A4. */ /* A4 is 8.3" x 11.7" = 595.28pt x 841.89pt */ /* --------------------------------------------- */ $pdf = new PDF('P','pt','A4'); $pdf->SetAuthor("The ACT Hub"); $pdf->SetTitle($pdftitle); $pdf->SetSubject(""); $pdf->SetDisplayMode("fullpage"); $pdf->SetMargins(0, 0, 0); // Clear all margins (I will code them as required) $pdf->SetAutoPageBreak(true, 10); /// Set bottom 'margin' (for page breaks) to 10pf (leaves space for a footer set to -9) $pdf->live = $live; $pdf->myleftmargin = $myleftmargin; $pdf->mywidth = $mywidth; $pdf->boxwidths2 = $boxwidths2; $pdf->boxwidths4 = $boxwidths4; $pdf->fillr = $fillr; $pdf->fillg = $fillg; $pdf->fillb = $fillb; $pdf->fillr2 = $fillr2; $pdf->fillg2 = $fillg2; $pdf->fillb2 = $fillb2; $pdf->SetLineWidth(1); $pdf->AddPage(); $pdf->Strip2("Qualification", $results->row('title')); $pdf->Divider(); $pdf->Strip2("Provider", $p1); if ($p2!="") { $pdf->Strip2("Email", $p2); } if ($p3!="") { $pdf->Strip2("Telephone", $p3); } if ($p4!="") {$pdf->StripL($p4);} $pdf->Divider(); $tmp = para($results->row('who_is_the_qualification_for')); $pdf->Strip2("Who is the qualification for?", $tmp); $tmp = para($results->row('qualification_how_to_book')); if ($tmp=="") { $tmp="Please use Provider Contact Details."; } $pdf->Strip2("How To Book", $tmp); $pdf->Divider(); if (($results->row('hide_cost') == "Hide Cost") || ($results->row('hide_cost') == "1")) { $tmp = "Contact For Cost"; } else { if ($results->row('cost')==0) { $tmp = "Free"; } else { $tmp = iconv("UTF-8", "ISO-8859-1", "£").number_format($results->row('cost'),2); } } $pdf->Strip2("Cost (pp)", $tmp); $tmp = $results->row('duration') . " " . $results->row('duration_unit'); $pdf->Strip2("Duration", $tmp); $pdf->Divider(); if ($results->row('address')!="") { $ad = unserialize($results->row('address')); $pdf->Strip2("Venue", $ad['street']); if ($ad['street_2']!="") { $pdf->Strip2("", $ad['street_2']); } if ($ad['city']!="") { $pdf->Strip2("", $ad['city']); } if ($ad['region']!="") { $pdf->Strip2("", $ad['region']); } if ($ad['postal_code']!="") { $pdf->Strip2("", $ad['postal_code']); } $pdf->Divider(); } $ad = explode("\n",$results->row('qualification_sector')); $nonblank = 0; if (count($ad)>0) { for ($i=0; $iStrip2($stitle, $sectors[$ad[$i]-1]); } } if ($nonblank>0) {$pdf->Divider();} } $tmp = $results->row('level'); $pdf->Strip2("Level", $tmp); $tmp = $results->row('assessment'); $pdf->Strip2("Assessment?", $tmp); $tmp = $results->row('qualification_funding'); if ($tmp=="Yes") { $tmp = para($results->row('qualification_funding_text')); $pdf->Strip2("Funding?", $tmp); } else { $tmp = $results->row('qualification_funding_text'); $pdf->Strip2("Funding?", "No"); } $tmp = para($results->row('on_site')); $pdf->Strip2("On-Site?", $tmp); $tmp = para($results->row('qualification_outline')); $pdf->Strip2("Qualification Outline", $tmp); /* NB: Attachments not listed */ /* ------ */ /* Output */ /* ------ */ $pdf->Output(); exit(); function para($s) { $a = str_replace('
',"\n",$s); $b = str_replace('
',"\n",$a); return $b; } ?> )
.../Functions.php:659