<?php  
$id = $_GET["val"];
include 'connection.php';

$result = mysqli_query($sql_con, "SELECT * FROM inquiry WHERE Sno='$id'");
while($row = mysqli_fetch_array($result))
{
    $name = $row["Name"];
    $email = $row["E_mail"];
    $phone = $row["PhoneNo"];
    $course = $row["course"];
    $branch = $row["Branch"];
    $address = $row["Address"];
    $date = $row["RegistrationDate"];
    $pincode = $row["Pincode"];
    $image = $row["Image"];
    $birth = $row["DateOfBirth"];
    $gender = $row["Gender"];
    $categories = $row["Categories"];
    $father = $row["FatherName"];
    $mother = $row["MotherName"];
    $occupation = $row["Occupation"];
    $occadd = $row["OccupationAddress"];
    $qualify = $row["QualifyExam"];
    $university = $row["University"];
    $year = $row["Year"];
    $subject = $row["Subject"];
    $marks = $row["Marks"];
    $total = $row["Total"];
    $percentage = $row["Percentage"];
    $orgination = $row["Organisation"];
    $from = $row["From"];
    $to = $row["DateTo"];
    $designation = $row["Designation"];
    $inter = $row["InterBoard"];
    $interpass = $row["InterPass"];
    $stream = $row["Stream"];
    $numberobtain = $row["NumberObtain"];
    $totalnumber = $row["TotalNumber"];
    $per = $row["Per"];
    $highboard = $row["HighBoard"];
    $highpass = $row["HighPass"];
    $highmarks = $row["HighMarks"];
    $hightotal = $row["HighTotal"];
    $highpercentage = $row["HighPercentage"];
}

$result = mysqli_query($sql_con, "SELECT * FROM `create_certificate`");
while($row = mysqli_fetch_array($result))
{
  
  $img = $row["Sign"];
  $center = $row["Center"];
  $director = $row["Director"];
}
?>

<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"></head>

<style type="text/css">
@media print {
    #printbtn {
        display :  none;
    }
}


</style>

</head>
<body style="width:100%; font-family: arial;" >
    <button onClick="window.print()" class="btn btn-primary" id="printbtn"><i class="fas fa-print"></i> Print
</button>
<div class="container" style="border:solid; border-color:black; border-width: 4px; border-radius: 20px; width:800px; overflow:hidden;"><br>
    <div class="row justify-content-end text-center" >
        <div class="col-md-7" style="padding:10px 10px 0px 10px; font-size: 14px; font-weight: bolder;"><img src="logo.png" width="90%" height="100px" />
       <br /> (A UNIT OF MODI TRAINING INSTITUTE PVT. LTD)<br />
       AN ISO 9001-2008 CERTIFIED INSTITUTE<br/>
       16/1B, Govindpuri New Delhi - 110019<br />
       ph.: 26229129, Mob.: 9871569129<br />    
       Branch - 48, Hari Nagar, Ashram New Delhi - 110014
         </div>
        <div class="col-md-5" style="padding:0px 0px 20px 5px; font-size: 18px; font-weight: bolder;">Franchies/Branches<br />
             <center><div class="body-center"  style="border:solid; border-color:black; width:290px; height:100px; font-weight: bolder; font-size: 22px; padding-top: 20px;"><?php echo $branch; ?>
            </div> </center>
        </div>
    </div>
<br />
    <div class="row justify-content-end">
     
    <div class="col-md-4">
        <div class="row justify-content-end">
            <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Date:</b></div>
            <div class="col-md-8">
              <p style="position: absolute;"><?php echo $date; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
     <div class="col-md-4">
        
    </div>
     <div class="col-md-4">
        <div class="row justify-content-end">
            <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Course:</b></div>
            <div class="col-md-8">
              <p style="position: absolute;"><?php echo $course; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
    </div><br />

    <div class="row justify-content-end">
        <div class="col-md-9" style=" padding:0px 0px 0px 10px; font-size: 18px;"><b>PERSONAL DETAILS :</b>
            <div class="row justify-content-end">
                <div class="col-md-12">
                    <br /><div class="row justify-content-end">
                        <div class="col-md-2" style="font-size: 18px; text-transform: uppercase;"><b>Name : </b></div>
                        <div class="col-md-10">
                            <p style="position: absolute; padding-left: 10px;"><?php echo $name; ?></p> <img src="images/simple.jpg" width="100%" height="30px">
                        </div>
                    </div>
                </div>
            </div>
            <br /><div class="row justify-content-end">
                <div class="col-md-12">
                    <div class="row justify-content-end">
                        <div class="col-md-2" style="font-size: 18px; text-transform: uppercase;"><b>Address:</b></div>
                        <div class="col-md-10">
                          <p style="position: absolute; padding-left: 10px;"><?php echo $address; ?></p> <img src="images/simple.jpg" width="100%" height="30px">
                        </div>
                    </div>
                </div>
            </div>
 
           <br /> <div class="row justify-content-end">
                <div class="col-md-12">
                    <div class="row justify-content-end">
                        <div class="col-md-2" style="font-size: 18px; text-transform: uppercase; "><b>Email :</b></div>
                        <div class="col-md-10">
                           <p style="position: absolute; padding-left: 10px;"><?php echo $email; ?></p> 
                           <img src="images/simple.jpg" width="100%" height="30px">
                        </div>
                    </div>
                </div>
            </div>

            <br />
        
    </div>
        <div class="col-md-3" style="text-align: center; padding:0px 10px 0px 25px; font-size: 18px;"><b></b>
            
            <div class="row justify-content-end"  style="padding:0px 15px 0px 0px;">
            <div class="col-md-11" style="border:solid; border-color:black; padding:20px 20px 40px 20px; font-size: 18px; 
            width:200px; height: 200px; margin-top:10px;"><center><img src="images/<?php echo $image; ?>" style="height: 150px; width: 120px;"></center></div>
            </div>
        </div>
    </div>
<br>
<div class="row justify-content-end">   
    <div class="col-md-6">
        <div class="row justify-content-end">
            <div class="col-md-6" style="font-size: 18px; text-transform: uppercase;"><b>Pin Code:</b></div>
            <div class="col-md-6">
              <p style="position: absolute;"><?php echo $pincode; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
     
     <div class="col-md-6">
        <div class="row justify-content-end">
            <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Phone No:</b></div>
            <div class="col-md-8">
              <p style="position: absolute;"><?php echo $phone; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
    <div class="col-md-1">
        
    </div>
    </div><br>
    <div class="row justify-content-end">   
    <div class="col-md-6">
        <div class="row justify-content-end">
            <div class="col-md-6" style="font-size: 18px; text-transform: uppercase;"><b>Date Of Birth:</b></div>
            <div class="col-md-6">
              <p style="position: absolute;"><?php echo $birth; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
     
     <div class="col-md-6">
        <div class="row justify-content-end">
            <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Gender:</b></div>
            <div class="col-md-8">
              <p style="position: absolute;"><?php echo $gender; ?></p>
              <img src="images/simple.jpg" width="100%" height="30px">
            </div>
        </div>
    </div>
    <div class="col-md-1">
        
    </div>
    </div><br>
    <div class="row justify-content-end">
        <div class="col-md-12">
            <div class="row ">
                <div class="col-md-4" style="font-size: 18px; text-align: left; text-transform: uppercase;"><b>Categories: </b></div>
                <div class="col-md-7">
                   <p style="position: absolute; padding-left: 10px;"><?php echo $categories; ?></p> 
                   <img src="images/simple.jpg" width="100%" height="30px" style="padding-left: 0px;">
                </div>
            </div>
        </div>
    </div>
    <br /><div class="row justify-content-end">
        <div class="col-md-12">
            <div class="row ">
                <div class="col-md-4" style="font-size: 18px; text-align: left; text-transform: uppercase;"><b>Father's /Husband Name: </b></div>
                <div class="col-md-7">
                   <p style="position: absolute; padding-left: 10px;"><?php echo $father; ?></p> 
                   <img src="images/simple.jpg" width="100%" height="30px" style="padding-left: 0px;">
                </div>
            </div>
        </div>
    </div>
    <br /><div class="row">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Mother's Name: </b></div>
                <div class="col-md-7">
                    <p style="position: absolute; padding-left: 10px;"><?php echo $mother; ?></p> 
                    <img src="images/simple.jpg" width="100%" height="30px">
                </div>
            </div>
        </div>
    </div>
    <br /><div class="row justify-content-end">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Occupation : </b></div>
                <div class="col-md-7">
                  <p style="position: absolute; padding-left: 10px;"><?php echo $occupation; ?></p> 
                  <img src="images/simple.jpg" width="100%" height="30px">
                </div>
            </div>
        </div>
    </div>
    <br /><div class="row justify-content-end">
        <div class="col-md-12">
            <div class="row">
                <div class="col-md-4" style="font-size: 18px; text-transform: uppercase;"><b>Occupation Address: </b></div>
                <div class="col-md-7">
                   <p style="position: absolute; padding-left: 10px;"><?php echo $occadd; ?></p> 
                   <img src="images/simple.jpg" width="100%" height="30px">
                </div>
            </div>
        </div>
    </div><br />
    
    <br /><div class="row justify-content-end">
        <div class="col-md-12" style="font-size: 18px; "><b><font style="text-transform: uppercase;">Examination Passed:</font></b> <font style="font-size: 15px;">(Please start from Last Qualification, AlsoGive details of Computer Course done if any)</font></div>
    </div>
    
    <br /><table class="table table-bordered text-center" border="2" >
        <tr>
            <th>Name of Qualify Exam.</th>
            <th>Name of the University Board</th>
            <th>Year of Passing</th>
            <th>Subject</th>
            <th>Marks Obtd.</th>
            <th>Total Marks</th>
            <th>% of marks</th>
        </tr>
        <tr>
            <td><?php echo $qualify; ?></td>
            <td><?php echo $university; ?></td>
            <td><?php echo $year; ?></td>
            <td><?php echo $subject; ?></td>
            <td><?php echo $marks; ?></td>
            <td><?php echo $total; ?></td>
            <td><?php echo $percentage; ?></td>
        </tr>
        <tr>
            <td>12</td>
            <td><?php echo $inter; ?></td>
            <td><?php echo $interpass; ?></td>
            <td><?php echo $stream; ?></td>
            <td><?php echo $numberobtain; ?></td>
            <td><?php echo $totalnumber; ?></td>
            <td><?php echo $per; ?></td>
        </tr>
        <tr>
            <td>10</td>
            <td><?php echo $highboard; ?></td>
            <td><?php echo $highpass; ?></td>
            <td></td>
            <td><?php echo $highmarks; ?></td>
            <td><?php echo $hightotal; ?></td>
            <td><?php echo $highpercentage; ?></td>
        </tr>
       
        </table>

        <div class="row justify-content-end">
            <div class="col-md-12" style="font-weight: bold; font-size: 18px;">WORK EXPERIENCE : Last Job Only</div>
        </div>

        <table class="table table-bordered text-center" border="2">
            <tr>
                <th>Organisation Name</th>
                <th>From</th>
                <th>To</th>
                <th>Designation Nature of Work</th>
            </tr>
            <tr>
                <td><?php echo  $orgination; ?></td>
                <td><?php echo $from; ?></td>
                <td><?php echo $to; ?></td>
                <td><?php echo $designation; ?></td>
            </tr>
            </table>    

<br><br>
            <div class="row justify-content-end">
              <div class="col-md-4 text-center"><b><img src="images/<?php echo $img; ?>" style="height: 30px; width: 70px;"><br>Training Incharge</b></div> 
              <div class="col-md-4 text-center"><b><img src="images/<?php echo $center; ?>" style="height: 30px; width: 70px;"><br>
              Centre Incharge</b></div> 
              <div class="col-md-4 text-center"><b><img src="images/<?php echo $director; ?>" style="height: 30px; width: 70px;">
                <br>Hony Director</b></div> 
            </div>
            <br><br>
</div>    
</body>
</html>