| Current Path : /var/www/html/venkat/repo2017sept/ |
| Current File : /var/www/html/venkat/repo2017sept/pdf.php |
<?php
include("db.php");
include("sessions.php");
//require('fpdf/fpdf.php');
require('fpdf/html2pdf.php');
//$s = $_GET['s'];
class PDF extends PDF_HTML {
function Header() {}
function Footer() {
$this->SetY( -15 );
//set font to Arial, Bold, size 10
//$this->SetFont( 'Arial', 'B', 10 );
//set font color to blue
//$this->SetTextColor( 52, 98, 185 );
//$this->Cell( 0, 10, 'Footer Text', 0, 0, 'L' );
//set font color to gray
//$this->SetTextColor( 150, 150, 150 );
//write Page No
$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
//$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );
}
}
$vspace = 7;
$pdf = new PDF('P','mm','A4');
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetMargins(10, 10);
$pdf->SetAutoPageBreak(true, 12);
$pdf->SetFont('Times','IBU',15);
$text = "Your Complete Information As per Requirement";
$pdf->SetXY(50,15);
$pdf->MultiCell(150,5,$text);
$pdf->Ln(15);
$pdf->SetFont('Times','',12);
$quer2="select * from personalinfo where username = ? order by date DESC";
$quer3="select name from faculty where id = ?";
$sth = $link->prepare($quer2);
$sth1 = $link->prepare($quer3);
$photo = "photo/".$s;
$sth->execute(array($s));
$sth1->execute(array($s));
if ($row = $sth1->fetch()) {
$facultyname = $row['name'];
}
if ($row = $sth->fetch()) {
$designation = $row['designation'];
$teaching = $row['teaching'];
$industry = $row['industry'];
$impactfactor = $row['impactfactor'];
$total = $teaching + $industry;
$pdf->Cell(25,2,"Name : ");
$pdf->Cell(30,2,$facultyname);
$photo = "photo/".$s.".png";
$pdf->Image($photo,165,26,30);
$pdf->Ln(10);
$pdf->Cell(25,2,"Designation : ");
$pdf->Cell(25,2,$designation);
$pdf->Ln(10);
$pdf->Cell(25,2,"Experience : ");
$pdf->Cell(25,2,"Teaching : ");
$pdf->Cell(5,2,$teaching);
$pdf->Ln(5);
$pdf->SetX(35);
$pdf->Cell(25,2,"Industry : ");
$pdf->Cell(0,2,$industry);
$pdf->Ln(5);
$pdf->SetX(35);
$pdf->Cell(25,2,"Total : ");
$years = $total." Years";
$pdf->Cell(5,2,$years);
$pdf->Ln(10);
$pdf->Cell(57,2,"Impact Factor of Publications : ");
$pdf->Cell(30,2,$impactfactor);
$pdf->Ln(10);
}
$pdf->SetFont('Times','IB',12);
//$pdf->Ln(5);
$pdf->Cell(50,2,"Books and Book-Chapters Published");
$pdf->Ln(5);
$pdf->SetFont('Times','',12);
$quer2="select * from publication where user = ? and type = 'Book' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
//$pdf->SetXY(151,$current_y);
/*$pdf->MultiCell(30,4,"Pages (in case chapter)");
$pdf->SetXY(181,$current_y);
$pdf->MultiCell(30,4,"Year");*/
foreach ($sth->fetchAll() as $row) {
$count++;
$author = $row['author'];
$cauthor = $row['cauthor'];
$title = $row['title'];
$name = $row['name'];
$publisher = $row['publisher'];
$place = $row['volume'];
$page = $row['page_no'];
$year = $row['year1'];
$id = $row['count'];
$dept = $row['dept'];
$print = $author.", '".$title."', ".$publisher.", ".$place.", pp.".$page.", ".$year;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Research paper published in Journals");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from publication where user = ? and type = 'Journal' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$author = $row['author'];
$cauthor = $row['cauthor'];
$title = $row['title'];
$name = $row['name'];
$publisher = $row['publisher'];
$volume = $row['volume'];
$page = $row['page_no'];
$year = $row['year1'];
$id = $row['count'];
$dept = $row['dept'];
$print = $author.", '".$title."', ".$name.", Vol.".$volume.", pp.".$page.", ".$year." ----- Corresponding Author : ".$cauthor;
$current = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Research paper published in Conference Proceedings (as a full paper)");
$pdf->Ln(5);
$pdf->SetFont('Times','',12);
$quer2="select * from publication where user = ? and type = 'Conference' and full = 'Yes' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$author = $row['author'];
$cauthor = $row['cauthor'];
$title = $row['title'];
$name = $row['name'];
$publisher = $row['publisher'];
$volume = $row['volume'];
$page = $row['page_no'];
$year = $row['year1'];
$id = $row['count'];
$paper = $row['paper_no'];
$print = $author.", '".$title."', ".$name.", paper no.".$paper.", pp.".$page.", ".$year." ----- Corresponding Author : ".$cauthor;
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
//$pdf->SetXY(15, $current - 5);
//$pdf->WriteHTML($print);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Major Jounral in Which Publications Made");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from publication where user = ? and type = 'Journal' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$author = $row['author'];
$cauthor = $row['cauthor'];
$title = $row['title'];
$name = $row['name'];
$publisher = $row['publisher'];
$volume = $row['volume'];
$page = $row['page_no'];
$year = $row['year1'];
$id = $row['count'];
$dept = $row['dept'];
$print = $name;
$current = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Seminars and Invited talks presented");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from talk where user = ? and participate = 'talk' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$title = $row['title'];
$date = $row['date1'];
$organizer = $row['organizer'];
$print = $title.", ".$organizer.", ".$date;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Conferences attended outside IIIT-Allahabad");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from talk where user = ? and institute = 'outside' and type = 'conference' order by year,level,dept";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$organizer = $row['organizer'];
$period = $row['period'];
$event = $row['event'];
$participate = $row['participate'];
$print = $event.", ".$organizer.", ".$period.", ".$participate;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Workdone in Project undertaken in the Institute");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from project where user = ? and status = 'Ongoing'";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$title = $row['title'];
$sponsor = $row['sponsor'];
$status = $row['status'];
$print = $title.", ".$sponsor.", ".$status;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Training Program Organized");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from organize where user = ? and type = 'workshop'";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$organizer = $row['organizer'];
$sponsor = $row['sponsor'];
$event = $row['event'];
$level = $row['level'];
$period = $row['period'];
$print = $organizer.", ".$event.", ".$level.", ".$sponsor.", ".$period;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Name of the Technology Developed");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from technology where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$print = $name;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Name of the Software Developed");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from software where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$print = $name;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"New Courses Developed");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from course where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$code = $row['code'];
$print = $code." ".$name;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Industry visited and visits to other Institutes for research");
$pdf->Ln(5);
$quer2="select * from industry where user = ?";
$pdf->SetFont('Times','',12);
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$purpose = $row['purpose'];
$start_from = $row['start_from'];
$end = $row['end'];
$print = $name.", ".$purpose.", ".$start_from.", ".$end;
$current = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current-5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Patents");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from patent where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$title = $row['title'];
$patent = $row['patent'];
$granting = $row['granting'];
$print = $title.", ".$patent.", ".$granting;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Awards/Honors");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from award where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$award = $row['award'];
$issuer = $row['issuer'];
$print = $award.", ".$issuer;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Continuing Education Activities");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from continuing where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$type = $row['purpose'];
$start_from = $row['start_from'];
$end = $row['end'];
$place = $row['place'];
$profile = $row['profile'];
$print = $name.", ".$type.", ".$place.", ".$profile.", ".$start_from.", ".$end;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Participation in the High Level Industry Academia Interaction Program during summer");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from participation where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['name'];
$start_from = $row['start_from'];
$end = $row['end'];
$print = $name.", ".$start_from.", ".$end;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->SetFont('Times','IB',12);
$pdf->Cell(50,2,"Any other important activity not specified");
$pdf->SetFont('Times','',12);
$pdf->Ln(5);
$quer2="select * from any where user = ?";
$sth = $link->prepare($quer2);
$sth->execute(array($s));
$count = 0;
foreach ($sth->fetchAll() as $row) {
$count++;
$name = $row['any'];
$print = $any;
$current_y = $pdf->GetY();
$pdf->MultiCell(5,5,$count);
$current = $pdf->GetY();
$pdf->SetXY(15,$current - 5);
$pdf->MultiCell(180,5,$print);
}
$pdf->Ln($vspace);
$pdf->Ln($vspace);
$print = "(".$facultyname.")";
$pdf->MultiCell(180,5,$print,'','R');
$pdf->Output();
?>