<?php
$servername = "localhost";
$username = "thtechno_educate";
$password = "education123";
$dbname = "thtechno_education";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
//index.php
	
$message = '';

$connect = $conn;

function fetch_customer_data($connect,$jobcards)
{
 ob_start();
//	echo 'echees'.$jobcard_id;

?>
<HTML>
<HEAD>

<STYLE type="text/css" media="all">

  @page_1 
    {
        size:  auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
body {margin-top: 0px;margin-left: 0px;}

#page_1 {position:relative; overflow: hidden;margin: 118px 0px 124px 106px;padding: 0px;border: none;width: 1154px;height: 1540px;}
#page_1 #id1_1 {border:none;margin: 0px 0px 0px 0px;padding: 0px;border:none;width: 1154px;overflow: hidden; page-break-after: always;}
#page_1 #id1_2 {border:none;margin: 38px 0px 0px 4px;padding: 0px;border:none;width: 1150px;overflow: hidden;}
#page_1 #id1_2 #id1_2_1 {float:left;border:none;margin: 0px 0px 0px 0px;padding: 0px;border:none;width: 365px;overflow: hidden;}
#page_1 #id1_2 #id1_2_2 {float:left;border:none;margin: 0px 0px 0px 0px;padding: 0px;border:none;width: 306px;overflow: hidden;}
#page_1 #id1_2 #id1_2_3 {float:left;border:none;margin: 0px 0px 0px 0px;padding: 0px;border:none;width: 215px;overflow: hidden;}
#page_1 #id1_2 #id1_2_4 {float:left;border:none;margin: 0px 0px 0px 0px;padding: 0px;border:none;width: 264px;overflow: hidden;}
#page_1 #id1_3 {border:none;margin: 68px 0px 0px 4px;padding: 0px;border:none;width: 1150px;overflow: hidden;}

#page_1 #p1dimg1 {position:absolute;top:52px;left:0px;z-index:-1;width:996px;height:1488px;}
#page_1 #p1dimg1 #p1img1 {width:996px;height:1488px;}




.ft0{font: 29px 'Calibri';line-height: 34px;}
.ft1{font: bold 15px 'Calibri';line-height: 18px;}
.ft2{font: 15px 'Calibri';color: #000000;line-height: 18px;}
.ft3{font: 15px 'Calibri';line-height: 18px;color: #000000;}
.ft4{font: 15px 'Calibri';color: #000000;line-height: 18px;}
.ft5{font: bold 15px 'Calibri';color: #ffffff;line-height: 18px;}
.ft6{font: 15px 'Calibri';color: #ffffff;line-height: 18px;}
.ft7{font: bold 14px 'Calibri';line-height: 17px;}
.ft8{font: 11px 'Arial';line-height: 14px;}
.ft9{font: 1px 'Arial';line-height: 7px;}
.ft10{font: 10px 'Arial';line-height: 13px;}
.ft11{font: 1px 'Arial';line-height: 4px;}
.ft12{font: 1px 'Arial';line-height: 3px;}
.ft13{font: 12px 'Calibri';line-height: 14px;}
.ft14{font: 11px 'Calibri';line-height: 13px;}
.ft15{font: 1px 'Arial';line-height: 5px;}
.ft16{font: 1px 'Arial';line-height: 6px;}
.ft17{font: 15px 'Calibri';text-decoration: underline;line-height: 18px;}

.p0{text-align: left;padding-left: 310px;margin-top: 0px;margin-bottom: 0px;}
.p1{text-align: left;padding-left: 305px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p2{text-align: right;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p3{text-align: left;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;color: #000000;}
.p4{text-align: left;padding-left: 55px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p5{text-align: left;padding-left: 15px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p6{text-align: left;padding-left: 25px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p7{text-align: left;padding-left: 23px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p8{text-align: left;padding-left: 7px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p9{text-align: left;padding-left: 12px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p10{text-align: left;padding-left: 4px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p11{text-align: left;padding-left: 2px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p12{text-align: right;padding-right: 23px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p13{text-align: right;padding-right: 28px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p14{text-align: right;padding-right: 25px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p15{text-align: center;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p16{text-align: center;padding-left: 1px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p17{text-align: center;padding-left: 2px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p18{text-align: left;padding-left: 1px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p19{text-align: left;padding-left: 63px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p20{text-align: left;padding-left: 79px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p21{text-align: left;padding-left: 70px;margin-top: 0px;margin-bottom: 0px;white-space: nowrap;}
.p22{text-align: left;padding-left: 3px;margin-top: 3px;margin-bottom: 0px;}
.p23{text-align: left;padding-left: 4px;margin-top: 10px;margin-bottom: 0px;}
.p24{text-align: left;padding-left: 4px;padding-right: 193px;margin-top: 0px;margin-bottom: 0px;}
.p25{text-align: left;margin-top: 0px;margin-bottom: 0px;}

.td0{padding: 0px;margin: 0px;width: 415px;vertical-align: bottom;}
.td1{padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;}
.td2{border-left: #000000 1px solid;border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;background: #4f81bd;}
.td3{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;background: #4f81bd;}
.td4{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td5{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td6{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td7{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td8{border-right: #000000 1px solid;border-top: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td9{border-left: #000000 1px solid;border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td10{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 83px;vertical-align: bottom;}
.td11{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;}
.td12{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;}
.td13{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td14{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td15{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;}
.td16{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 142px;vertical-align: bottom;}
.td17{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;}
.td18{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;}
.td19{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 46px;vertical-align: bottom;}
.td20{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 79px;vertical-align: bottom;}
.td21{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 91px;vertical-align: bottom;}
.td22{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 86px;vertical-align: bottom;}
.td23{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td24{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 134px;vertical-align: bottom;}
.td25{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 110px;vertical-align: bottom;}
.td26{padding: 0px;margin: 0px;width: 88px;vertical-align: bottom;}
.td27{padding: 0px;margin: 0px;width: 96px;vertical-align: bottom;}
.td28{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;background: #000000;}
.td29{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td30{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;}
.td31{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;}
.td32{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td33{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td34{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td35{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;}
.td36{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 304px;vertical-align: bottom;}
.td37{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 88px;vertical-align: bottom;}
.td38{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 96px;vertical-align: bottom;}
.td39{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;}
.td40{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;}
.td41{padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;background: #000000;}
.td42{padding: 0px;margin: 0px;width: 225px;vertical-align: bottom;}
.td43{padding: 0px;margin: 0px;width: 79px;vertical-align: bottom;}
.td44{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;}
.td45{padding: 0px;margin: 0px;width: 86px;vertical-align: bottom;}
.td46{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td47{padding: 0px;margin: 0px;width: 134px;vertical-align: bottom;}
.td48{padding: 0px;margin: 0px;width: 110px;vertical-align: bottom;}
.td49{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;}
.td50{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;}
.td51{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td52{padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;}
.td53{padding: 0px;margin: 0px;width: 46px;vertical-align: bottom;}
.td54{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;}
.td55{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;}
.td56{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;}
.td57{padding: 0px;margin: 0px;width: 141px;vertical-align: bottom;}
.td58{padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;}
.td59{padding: 0px;margin: 0px;width: 304px;vertical-align: bottom;}
.td60{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 163px;vertical-align: bottom;}
.td61{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 225px;vertical-align: bottom;}
.td62{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;}
.td63{padding: 0px;margin: 0px;width: 2px;vertical-align: bottom;}
.td64{padding: 0px;margin: 0px;width: 179px;vertical-align: bottom;background: #4f81bd;}
.td65{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;background: #4f81bd;}
.td66{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td67{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 176px;vertical-align: bottom;background: #4f81bd;}
.td68{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td69{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td70{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;background: #4f81bd;}
.td71{border-right: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;background: #4f81bd;}
.td72{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;background: #4f81bd;}
.td73{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td74{padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;background: #4f81bd;}
.td75{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td76{border-right: #4f81bd 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td77{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 140px;vertical-align: bottom;background: #4f81bd;}
.td78{border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 38px;vertical-align: bottom;background: #4f81bd;}
.td79{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 45px;vertical-align: bottom;background: #4f81bd;}
.td80{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 78px;vertical-align: bottom;background: #4f81bd;}
.td81{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 90px;vertical-align: bottom;background: #4f81bd;}
.td82{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 85px;vertical-align: bottom;background: #4f81bd;}
.td83{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 84px;vertical-align: bottom;background: #4f81bd;}
.td84{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 133px;vertical-align: bottom;background: #4f81bd;}
.td85{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 109px;vertical-align: bottom;background: #4f81bd;}
.td86{border-right: #000000 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 87px;vertical-align: bottom;background: #4f81bd;}
.td87{border-right: #4f81bd 1px solid;border-bottom: #000000 1px solid;padding: 0px;margin: 0px;width: 95px;vertical-align: bottom;background: #4f81bd;}

.tr0{height: 19px;}
.tr1{height: 20px;}
.tr2{height: 23px;}
.tr3{height: 18px;}
.tr4{height: 57px;}
.tr5{height: 7px;}
.tr6{height: 15px;}
.tr7{height: 4px;}
.tr8{height: 14px;}
.tr9{height: 3px;}
.tr10{height: 16px;}
.tr11{height: 5px;}
.tr12{height: 37px;}
.tr13{height: 6px;}

.t0{width: 498px;margin-left: 399px;margin-top: 18px;font: 15px 'Calibri';}
.t1{width: 701px;margin-top: 35px;font: 15px 'Calibri';}
.t2{width: 996px;margin-top: 20px;font: 11px 'Arial';}
.t22{margin-top: 0px;font: 15px 'Calibri';}
#img1{position:absolute;width: 498px;margin-left: 20px;margin-top: 18px;}
.container {
  position: relative;
  font-family: Arial;
}

.text-block {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: black;
  color: white;
  padding-left: 20px;
  padding-right: 20px;
}

</STYLE>



    <?php 
    $client_idd=20;
    //echo 'haha'.$value;
    $levell=88;
    //$sqljo = "SELECT  * from jobcards where client_id = '".$client_idd."' limit 10";
//$resultjo = $connect->query($sqljo);
// $mysqli->query('SELECT * FROM bicycles');

//foreach ($resultjo as $rowj){ 
    foreach($jobcards as $rowj){
                   $jobcard_id=$rowj['jid'];
$sql = "SELECT  * from jobcards where jid='".$jobcard_id."'";
$result = $connect->query($sql);
 while($row = $result->fetch_assoc()) {
   $jid=  $row["jid"];
    $client_id=$row["client_id"];
    $jid=$row["jid"];
          	   $job_userid= $row['job_user'];
//$jobuname= $this->db->get_where('admin' , array('admin_id' => $job_userid))->row()->name; 
$sql = "SELECT  * from admin where admin_id='".$job_userid."'";
$result = $connect->query($sql);
 while($rowadmin = $result->fetch_assoc()) {
      $jobuname=$rowadmin['job_user'];
 }


?>



<?php //}
	
?>
<DIV id="id1_1">
<P class="p0 ft0">Jobsheet</P>
<div id="img1">
			    
 <img src="data:image/png;base64, 
		"  />			    	
			    
			</div>
<TABLE cellpadding=0 cellspacing=0 class="t0">
<TR>
	<TD class="tr0 td0"><P class="p1 ft1">NUMBER</P></TD>
	<TD class="tr0 td1"><P class="p2 ft2"><?php echo $jobcard_id;?></P></TD>
</TR>
<TR>
	<TD class="tr0 td0"><P class="p3 ft3">Plot 1266</P></TD>
	<TD class="tr0 td1"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr0 td0"><P class="p3 ft3">Nashua House,  Luthuli Road, Old Industrial</P></TD>
	<TD class="tr0 td1"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr1 td0"><P class="p3 ft3">Gaborone Botswana</P></TD>
	<TD class="tr1 td1"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr0 td0"><P class="p3 ft3">Tel: 3113686</P></TD>
	<TD class="tr0 td1"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr2 td0"><P class="p3 ft3">Email: accounts@altanovabw.com</P></TD>
	<TD class="tr2 td1"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
</TABLE>
<TABLE cellpadding=0 cellspacing=0 class="t1">
<TR>
	<TD class="tr0 td2"><P class="p4 ft5">Client</P></TD>
	<TD class="tr0 td3"><P class="p5 ft5">Engineer</P></TD>
	<TD class="tr0 td4"><P class="p6 ft5">Date</P></TD>
	<TD class="tr0 td5"><P class="p7 ft5">Time In</P></TD>
	<TD class="tr0 td6"><P class="p5 ft5">Time Out</P></TD>
	<TD class="tr0 td7"><P class="p8 ft5">Total Hours</P></TD>
	<TD class="tr0 td8"><P class="p9 ft5">Chargeable Hours</P></TD>
</TR>
	
<TR>
	<TD class="tr3 td9"><P class="p10 ft3">
	    <?php
	    $sql = "SELECT  * from client where client_id='".$client_id."'";
$resultclient = $connect->query($sql);

 while($rowclient = $resultclient->fetch_assoc()) {
 echo $rowclient["client_name"];
 $client_email=$rowclient["client_email"];
 $quote="'";
  $quote2="'";
 $client_email=$quote+$client_email+$quote2;
 }
 
 
 
 
 ?></P></TD>
	<TD class="tr3 td10"><P class="p11 ft3"><?php $jobuname="admin";echo $jobuname;?></P></TD>
	<TD class="tr3 td11"><P class="p12 ft3"><NOBR><?php 
echo	date("d/m/y", strtotime($row['job_date']));
//	echo date("Y-m-d",$row['job_date']);
	?></NOBR></P></TD>
	<TD class="tr3 td12"><P class="p13 ft3"><?php echo $row['job_time_in'];
	?></P></TD>
	<TD class="tr3 td13"><P class="p14 ft3"><?php echo $row['job_time_out'];
	?></P></TD>
	<TD class="tr3 td14"><P class="p15 ft3"><?php echo $row['total_hours'];
	?></P></TD>
	<TD class="tr3 td15"><P class="p16 ft3">2:00</P></TD>
</TR>
<TR>
	<TD class="tr1 td16"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td10"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td11"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td12"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td13"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td14"><P class="p15 ft3">0:00</P></TD>
	<TD class="tr0 td15"><P class="p16 ft3">0:00</P></TD>
</TR>
<TR>
	<TD class="tr0 td16"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td10"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td11"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td12"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td13"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td14"><P class="p15 ft3">0:00</P></TD>
	<TD class="tr3 td15"><P class="p16 ft3">0:00</P></TD>
</TR>
</TABLE>
<TABLE cellpadding=0 cellspacing=0 class="t2">
<TR>
	<TD class="tr3 td17"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td18"><P class="p11 ft1">CHARGE CODE</P></TD>
	<TD class="tr3 td19"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td20"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td23"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td24"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td26"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td27"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr3 td28"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td29"><P class="p11 ft6">Contract</P></TD>
	<TD class="tr3 td30"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td31"><P class="p3 ft3"><?php if($row['contract_type']=="contract"){?>
	   <?php echo 'X';
	    }?></P></TD>
	<TD class="tr3 td32"><P class="p11 ft6">Car Used</P></TD>
	<TD class="tr3 td12"><P class="p3 ft4"><?php echo $row['car_used'];?></P></TD>
	<TD class="tr3 td33"><P class="p11 ft6">Project</P></TD>
	<TD class="tr3 td14"><P class="p3 ft4"><?php echo $row['project'];?></P></TD>
	<TD class="tr3 td34"><P class="p11 ft6">Remote Access</P></TD>
	<TD class="tr3 td35"><P class="p3 ft4"><?php echo $row['remote_access'];?></P></TD>
	<TD class="tr0 td26"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td27"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr3 td28"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td29"><P class="p11 ft6">Non Contract</P></TD>
	<TD class="tr3 td30"><P class="p3 ft4"><?php if($row['contract_type'] == "noncontract"){?>
	   <?php echo 'X';
	    }
	   
	   ?></P></TD>
	<TD class="tr3 td31"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td32"><P class="p11 ft6">Overtime</P></TD>
	<TD class="tr3 td12"><P class="p3 ft4"><?php echo $row['overtime'];?></P></TD>
	<TD class="tr3 td33"><P class="p11 ft6">DRS</P></TD>
	<TD class="tr3 td14"><P class="p3 ft4"><?php echo $row['drs'];?></P></TD>
	<TD class="tr3 td34"><P class="p11 ft6">Travel Charge(Kms)</P></TD>
	<TD class="tr3 td35"><P class="p3 ft4"><?php echo $row['travel_charge'];?></P></TD>
	<TD class="tr0 td26"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td27"><P class="p3 ft4">&nbsp;</P></TD>
</TR>

<TR>
	<TD class="tr4 td17"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr4 td36"><P class="p11 ft1">STANDARD ROUTINE CHECK LIST PROCEDURE</P></TD>
	<TD class="tr4 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td23"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td24"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td37"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr4 td38"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr3 td28"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td18"><P class="p11 ft1">Server Tasks</P></TD>
	<TD class="tr3 td19"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td20"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td14"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td24"><P class="p11 ft1">Details</P></TD>
	<TD class="tr3 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td39"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td40"><P class="p17 ft7">Initial</P></TD>
</TR>
<?php  $sqltasks = "SELECT  * from jobcard_tasks";
$resulttasks = $connect->query($sqltasks);
                 while($rowa = $resulttasks->fetch_assoc()) {
                 $taskid= $rowa['Tasks_id']; 
          $sqldescription = "SELECT  * from jobcard_tasks_details where Tasks_id='".$taskid."' and jid='".$jid."'";
$resultdesc = $connect->query($sqldescription);
                 while($rowad = $resultdesc->fetch_assoc()) {
                     $description= $rowad['Description_one'];
                     $server_drive_one=$rowad['server_drive_one'];
                     $server_drive_two=$rowad['server_drive_two'];
                     $server_drive_three=$rowad['server_drive_three'];
                     $backup_date=$rowad['backup_date'];
                     $backup_restore_date=$rowad['backup_restore_date'];
                     $ups_date=$rowad['ups_date'];
                     $virus_def_date=$rowad['virus_def_date'];
                       $monthly_restore=$rowad['monthly_restore'];
                       	$weekly_restore=$rowad['weekly_restore'];
                 }
  //$description = $this->db->get_where('jobcard_tasks_details' , array('Tasks_id' => $taskid,'jid' =>$jid))->row()->Description_one;            
      
      
       // echo 'hello'.$description;             ?>
      
        
        <?php  if($taskid=="1"){ ?>
<TR>
	<TD class="tr3 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=3 class="tr3 td42"><P class="p18 ft8"><?php echo $rowa['Taskname'];?></P></TD>
	<TD class="tr3 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td45"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr3 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr5 td28"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td51"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td30"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td19"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td20"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td12"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td22"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td14"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td24"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td25"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td39"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td40"><P class="p3 ft9">&nbsp;</P></TD>
</TR><?php }?>
 <?php  if($taskid=="2"){ ?>
<TR>
	<TD class="tr3 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td52"><P class="p18 ft10">Disk Space over 80% needs attention</P></TD>
	<TD class="tr3 td53"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td54"><P class="p11 ft8">Server Drive :</P></TD>
	<TD class="tr3 td46"><P class="p3 ft4">&nbsp;<?php echo $server_drive_one; ?></P></TD>
	<TD class="tr3 td55"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr3 td56"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr5 td28"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td51"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td30"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td19"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td20"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td12"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td13"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td14"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td15"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td35"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td39"><P class="p3 ft9">&nbsp;</P></TD>
	<TD class="tr5 td40"><P class="p3 ft9">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr6 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td57"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td58"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td53"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td54"><P class="p11 ft8">Server Drive :</P></TD>
	<TD class="tr6 td46"><P class="p3 ft4">&nbsp;<?php echo $server_drive_two; ?></P></TD>
	<TD class="tr6 td55"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr6 td56"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td51"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td30"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td19"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td20"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td15"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td35"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr8 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td57"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td58"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td53"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td54"><P class="p11 ft8">Server Drive :</P></TD>
	<TD class="tr8 td46"><P class="p3 ft4">&nbsp;<?php echo $server_drive_three; ?></P></TD>
	<TD class="tr8 td55"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr8 td56"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=4 class="tr7 td36"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td15"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td35"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR>
<?php }

?>
 <?php if($taskid=="3"){
                    ?>
<TR>
	<TD class="tr6 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr6 td59"><P class="p18 ft8">Verify succesfull backup (Fix and report any failures below)</P></TD>
	<TD class="tr6 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td54"><P class="p11 ft8">Date:</P></TD>
	<TD class="tr6 td46"><P class="p3 ft4">&nbsp;<?php echo $backup_date;?></P></TD>
	<TD class="tr6 td55"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr6 td56"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr9 td28"><P class="p3 ft12">&nbsp;</P></TD>
	<TD colspan=2 class="tr9 td18"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td19"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td20"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td12"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td13"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td14"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td15"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td35"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td39"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td40"><P class="p3 ft12">&nbsp;</P></TD>
</TR>
<?php }

?>
 <?php if($taskid=="4"){
                    ?>
<TR>
	<TD class="tr10 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr10 td52"><P class="p18 ft8">Tested Restore of Backups</P></TD>
	<TD class="tr10 td53"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td54"><P class="p11 ft8">Date:</P></TD>
	<TD class="tr10 td46"><P class="p3 ft4">&nbsp;<?php echo $backup_restore_date; ?></P></TD>
	<TD class="tr10 td47"><P class="p18 ft13">Weekly:<?php echo $weekly_restore; ?></P></TD>
	<TD class="tr10 td56"><P class="p19 ft14">Monthly:<?php echo $monthly_restore; ?></P></TD>
	<TD class="tr10 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr9 td28"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td51"><P class="p3 ft12">&nbsp;</P></TD>
	<TD colspan=3 class="tr9 td60"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td12"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td13"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td14"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td24"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td35"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td39"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td40"><P class="p3 ft12">&nbsp;</P></TD>
</TR><?php }

?>
 <?php if($taskid=="5"){
                    ?>
<TR>
	<TD class="tr8 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr8 td59"><P class="p18 ft8">Verify Users and Groups (Add/Delete as Requested)</P></TD>
	<TD class="tr8 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td54"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr8 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=4 class="tr7 td36"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td24"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td25"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR>
<?php }

?>
 <?php if($taskid=="6"){
                    ?>
<TR>
	<TD class="tr8 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr8 td59"><P class="p18 ft8">Review Firewall Logs (Report suspicious activites)</P></TD>
	<TD class="tr8 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td54"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr8 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=4 class="tr7 td36"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td24"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td25"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR>
<?php }

?>
 <?php if($taskid=="7"){
                    ?>
<TR>
	<TD class="tr6 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr6 td59"><P class="p18 ft8">Verify UPS is working optimally (Do test power failure)</P></TD>
	<TD class="tr6 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td54"><P class="p11 ft8">Date:</P></TD>
	<TD class="tr6 td46"><P class="p3 ft4">&nbsp;<?php echo $ups_date;?></P></TD>
	<TD class="tr6 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr6 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr9 td28"><P class="p3 ft12">&nbsp;</P></TD>
	<TD colspan=2 class="tr9 td18"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td19"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td20"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td12"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td13"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td14"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td24"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td25"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td39"><P class="p3 ft12">&nbsp;</P></TD>
	<TD class="tr9 td40"><P class="p3 ft12">&nbsp;</P></TD>
</TR><?php }

?>
 <?php if($taskid=="8"){
                    ?>
<TR>
	<TD class="tr6 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr6 td52"><P class="p18 ft8">Update Antivirus Definition Files</P></TD>
	<TD class="tr6 td53"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td54"><P class="p11 ft8">Def Date:</P></TD>
	<TD class="tr6 td46"><P class="p3 ft4">&nbsp;<?php echo $virus_def_date;?></P></TD>
	<TD class="tr6 td47"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=4 class="tr7 td36"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td24"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td25"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR><?php }

?>
<?php if($taskid=="9"){
                    ?>
<TR>
	<TD class="tr8 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr8 td59"><P class="p18 ft8">General Network operation: Speed, Internet, Email, Antivirus</P></TD>
	<TD class="tr8 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td54"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr8 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=3 class="tr7 td61"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td20"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td24"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td25"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR><?php }

?>
<?php if($taskid=="10"){
                    ?>
<TR>
	<TD class="tr10 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=3 class="tr10 td42"><P class="p18 ft8">Run Necessary Tests after any changes</P></TD>
	<TD class="tr10 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td54"><P class="p11 ft8">`</P></TD>
	<TD class="tr10 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr10 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr10 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr11 td28"><P class="p3 ft15">&nbsp;</P></TD>
	<TD colspan=3 class="tr11 td61"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td20"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td12"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td13"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td14"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td24"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td25"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td39"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td40"><P class="p3 ft15">&nbsp;</P></TD>
</TR><?php }

?>
<?php if($taskid=="11"){
                    ?>
<TR>
	<TD class="tr8 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=3 class="tr8 td42"><P class="p18 ft10">Check users are satisfied an working correctly</P></TD>
	<TD class="tr8 td43"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td54"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr8 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr8 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr7 td28"><P class="p3 ft11">&nbsp;</P></TD>
	<TD colspan=4 class="tr7 td36"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td12"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td13"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td14"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td24"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td25"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td39"><P class="p3 ft11">&nbsp;</P></TD>
	<TD class="tr7 td40"><P class="p3 ft11">&nbsp;</P></TD>
</TR>
<?php }

?>
<?php if($taskid=="12"){
                    ?>
<TR>
	<TD class="tr6 td41"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=4 class="tr6 td59"><P class="p18 ft8">Report Items attended to and items outstanding to contact</P></TD>
	<TD class="tr6 td44"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td54"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td46"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td47"><P class="p3 ft4">&nbsp;<?php echo $description;?></P></TD>
	<TD class="tr6 td48"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td49"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr6 td50"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr11 td28"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td51"><P class="p3 ft15">&nbsp;</P></TD>
	<TD colspan=2 class="tr11 td62"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td20"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td12"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td13"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td14"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td24"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td25"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td39"><P class="p3 ft15">&nbsp;</P></TD>
	<TD class="tr11 td40"><P class="p3 ft15">&nbsp;</P></TD>
</TR><?php }

?>
<?php
}
?>
<TR>
	<TD class="tr12 td17"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=3 class="tr12 td61"><P class="p11 ft1">WORK CARRIED OUT ON SITE</P></TD>
	<TD class="tr12 td20"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td23"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td24"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td37"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr12 td38"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
<TR>
	<TD class="tr3 td63"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td64"><P class="p20 ft5">Username</P></TD>
	<TD class="tr3 td65"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td66"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td67"><P class="p21 ft5">Details</P></TD>
	<TD class="tr3 td68"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td69"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td70"><P class="p3 ft5">Resolution</P></TD>
	<TD class="tr3 td71"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td72"><P class="p16 ft5">User Test and</P></TD>
</TR>
<TR>
	<TD class="tr0 td63"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td73"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td74"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td65"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td66"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td75"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td76"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td68"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td69"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td70"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td71"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr0 td72"><P class="p16 ft5">Sign</P></TD>
</TR>
<TR>
	<TD class="tr13 td17"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td77"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td78"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td79"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td80"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td81"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td82"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td83"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td84"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td85"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td86"><P class="p3 ft16">&nbsp;</P></TD>
	<TD class="tr13 td87"><P class="p3 ft16">&nbsp;</P></TD>
</TR>
<?php 
							
	$sqlwoks= "SELECT  * from works_onsite where jid='".$jid."'";
$resultw = $connect->query($sqlwoks);
 while($onsite = $resultw->fetch_assoc()) {
   $jid=  $onsite["jid"];			
      $userid= $onsite['user_id'];
			    /*$sqlj = "SELECT name from admin where admin_id='$jid";
$resultclientj = $connect->query($sqlj);
 while($rowclientj = $resultclientj->fetch_assoc()) {
     $unamej=$rowclientj["name"];
 }*/
						?>
<TR>
	<TD class="tr3 td17"><P class="p3 ft4">&nbsp;</P></TD>
	<TD colspan=2 class="tr3 td18"><P class="p3 ft4">&nbsp;<?php echo $userid;?></P></TD>
	<TD class="tr3 td31"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td20"><P class="p3 ft4">&nbsp;<?php echo $onsite['details'];?></P></TD>
	<TD class="tr3 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td14"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td24"><P class="p3 ft4">&nbsp;<?php echo $onsite['resolution'];?></P></TD>
	<TD class="tr3 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td39"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td38"><P class="p3 ft4">&nbsp;</P><?php echo $onsite['user_confirm'];?></TD>
</TR>
 <?php }?> 

<TR>
	<TD class="tr3 td17"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td51"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td30"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td31"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td20"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td21"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td22"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td14"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td24"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td25"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td39"><P class="p3 ft4">&nbsp;</P></TD>
	<TD class="tr3 td38"><P class="p3 ft4">&nbsp;</P></TD>
</TR>
</TABLE>
<P class="p23 ft1">EXTRA WORK REQUIRED / RECOMMENDATIONS</P>
<div class="container">
  <textarea rows="8" cols="120">&nbsp;
  
  <?php 
  
  							
	$sqlex= "SELECT  * from jobcards where jid='".$jid."'";
$resultex = $connect->query($sqlex);
 while($onsiteex = $resultex->fetch_assoc()) {
   $extra_work_required=  $onsiteex["extra_work_required"];}
  echo $extra_work_required; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</textarea>
  <div class="text-block">
   
    
  </div>
</div>
<P class="p24 ft3"><SPAN class="ft1">CUSTOMER DECLARATION - </SPAN><SPAN class="ft17">BY APPROVING THIS JOB SHEET YOU ARE AGREEING THAT THE WORK HAS BEEN CARRIED OUT SUCCESSFULLY AND AGREE TO PAY THE AMOUNT CHARGED IN FULL</SPAN></P>
	
<DIV id="id1_3">
<P class="p25 ft1">Customer Comments</P>
<div class="container">
  <textarea rows="4" cols="120">  <?php //echo $this->db->get_where('jobcards' , array('jid' =>$jid))->row()->extra_work_required; ?></textarea>
  <div class="text-block">
    </div>
</div>
</DIV>
</DIV>
<div style="page-break-before:always;"> </div>
  <?php }}?>
  <button onclick="window.print()">Print this page</button>
</BODY>

</HTML>

	<!--<div class="table-responsive">
		<table class="table table-striped table-bordered">
			<tr>
				<th>Name</th>
				<th>Address</th>
				<th>City</th>
				<th>Postal Code</th>
				<th>Country</th>
			</tr>

			<tr>
				<td>eita</td>
				<td>eita</td>
					<td>eita</td>
				<td>eita</td>
				<td>eita</td>
			</tr>

		</table>
	</div>--!>
<?php 
return ob_get_clean();

}


if(isset($_POST["actiondownload"]))
{
	include('pdf.php');
	$abspath=$_SERVER['DOCUMENT_ROOT']; 
           $pdfroot=$abspath.'/education/uploads/document/';
           	//$filenames= 'JOBCARDS REPORT '.''.$start_date.'-'.''.$end_date;
	$file_name = $abspath.'/education/uploads/document/'.$filename. '.pdf'; 
	$html_code = '<link rel="stylesheet" href="jobsheet.css">';

	$html_code .= fetch_customer_data($connect,$jobcards);
	    
            // $pdfroot  = dirname(dirname(__FILE__));
       //$pdfroot .= '/uploads/document';
	$pdf = new Pdf();
	$pdf->set_paper(array(0, 0, 880, 1288), 'portrait');
	$pdf->set_option('defaultMediaType', 'all');
		//$pdf->set_time_limit(300);
	$pdf->load_html($html_code);
	$pdf->render();
	$pdf_string =   $pdf->output();
            file_put_contents($file_name, $pdf_string );
	ob_end_clean();
	     //save the pdf file on the server
            
$pdf->stream($file_name,array("Attachment"=>true));
	//$file = $pdf->output();
//	file_put_contents($file_name, $file);

	
	  //  $pdf->stream($file, array("Attachment"=>0));


}
?>
<!DOCTYPE html>
<html>
	<head>
		<title></title>
		<script src="jquery.min.js"></script>
		<link rel="stylesheet" href="bootstrap.min.css" />
		<script src="bootstrap.min.js"></script>
	</head>
	<body>
		<br />
		<div class="container">
		
			
			<br />
			<form method="post">
				<input type="submit" name="actiondownload" class="btn btn-danger" value="Download All" /><?php echo $message; ?>
			</form>
			<?php

		echo fetch_customer_data($connect,$jobcards);
	?>			
		</div>
		<br />
		<br />
	</body>
</html>





