0byt3m1n1
Path:
C:
/
BACKUPS
/
IDCARD-backup
/
id Code
/
[
Home
]
File: print.php
<?php session_start(); include("db_connect.php"); require "vendor/autoload.php"; include 'vendor/phpqrcode/qrlib.php'; // if(!isset($_COOKIE['adminid'])&&$_COOKIE['adminemail']){ header('location:index.php'); // exit;} $serial="0001"; //$Bar = new Picqer\Barcode\BarcodeGeneratorHTML(); $code = "222";//$Bar->getBarcode($serial, $Bar::TYPE_CODE_128); $idx = $_GET['id']; $sqlmember ="SELECT * FROM employees WHERE id=$idx"; $retrieve = mysqli_query($db,$sqlmember); while($found = mysqli_fetch_array($retrieve)) { $first_name=$found['first_name']; $last_name=$found['last_name']; $full_name=$first_name." ".$last_name; $designation=$found['designation']; $division=$found['division']; $id=$found['id']; $project_code=$found['project_code']; $principal_investigator=$found['principal_investigator']; $mail_id=$found['mail_id']; $address=$found['address']; $blood_group=$found['blood_group']; $phone=$found['phone']; $mobile=$found['mobile']; $dob=$found['dob']; $validfrom=$found['valid_from']; $validto=$found['valid_to']; $photo=$found['photo']; $status=$found['status']; } //QRCODE $qrText = "Name: $full_name\nDesignation: $designation\nBlood Group: $blood_group\nMobile: $mobile\nValid From: $validfrom\nValid To: $validto"; $path = 'qrcode/'; $file = $path.uniqid().".png"; $ecc = 'L'; $pixel_Size = 0; $frame_Size = 0; QRcode::png($qrText, $file, $ecc, $pixel_Size, $frame_Size); //Changing print status// $query = "Update employees SET status='PRINTED' WHERE id=$idx"; $db->query($query) or die('Error, Error while updating print status'); ?> <!doctype html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="css/card/card-style.css"> <title>ID CARD <?php echo $full_name ." ". $division; ?> </title> </head> <body onload="window.print(); /*window.close();*/"> <div class="id-card-holder"> <div class="header"> <div> <img class="header-logo" src="images/cwdrm-logo.png"> <p class="header-logo-text"><i>KSCSTE-CWRDM</i></p> <h6 class="header1">KSCSTE-Centre for Water Resources </h6> <h6 class="header2"> Development and Management</h6> <p class="header3">(An Institution of KSCSTE, Govt of Kerala)</p> <h6 class="header4">IDENTITY CARD</h6> </div> </div> <div class="photo"> <?php if($photo!=""){ echo"<img class='card-pic' src='$photo'>"; /* echo"<img class='card-pic' src='images/avatar-round.png'>";*/ } else { echo"<img class='card-pic' src='images/avatar-round.png'>"; } ?> <!-- <img class="card-pic round-img" src='media/$profile'> <img class="card-pic" src="images/avatar-round.png"> --> </div> <div class="employee-data"> <h2>ID : <?php echo $id;?></h2> <h2><?php echo $full_name;?></h2> <h2><?php echo $designation;?></h2> <h2><div style="line-height: normal"><?php echo $division;?></div></h2> </div> <div class="footer footer-text"> <p class="footer1">Kunnamangalam, Kozhikode - 673 571</p> <p class="footer2">Ph: 0495 2351800 | www.cwrdm.org</p> </div> </div> <div class="id-card-holder-back"> <div class="header-back"> </div> <div class="employee-details"> <table class="table-back"> <tbody> <tr> <td class="fixed-width">E-mail ID<span class="two-dot">:</span></td> <td class="table-data"><?php echo $mail_id;?></td> </tr> <tr> <td class="fixed-width">Date of Birth<span class="two-dot">:</span></td> <td class="table-data"><?php $date= new DateTime($dob); echo $date->format('d-m-Y');?></td> </tr> <tr> <td class="fixed-width">Project Code<span class="two-dot">:</span></td> <td class="table-data"><?php echo $project_code;?></td> </tr> <tr> <td class="fixed-width">Principal Investigator<span class="two-dot-pi">:</span></td> <td class="table-data"><?php echo $principal_investigator;?></td> </tr> <tr> <td class="fixed-width">Blood Group<span class="two-dot">:</span></td> <td class="table-data"><?php echo $blood_group;?></td> </tr> <tr> <td class="fixed-width">Mobile No.<span class="two-dot">:</span></td> <td class="table-data"><?php echo $mobile;?></td> </tr> <tr> <td class="fixed-width">Phone No. (H)<span class="two-dot">:</span></td> <td class="table-data"><?php echo $phone;?></td> </tr> <tr> <td class="fixed-width">Valid from<span class="two-dot">:</span></td> <td class="table-data"><?php $date= new DateTime($validfrom); echo $date->format('d-m-Y');?> </td> </tr> <tr> <td class="fixed-width">Valid to<span class="two-dot">:</span></td> <td class="table-data"><?php $date= new DateTime($validto); echo $date->format('d-m-Y');?></td> </tr> <tr> <td class="fixed-width">Address<span class="two-dot">:</span></td> <td class="table-address-data"><?php echo $address;?></td> </tr> </tbody> <tfoot class="table-footer"> <tr> <td class="td1"> <img class="qr-code" src="<?php echo $file; ?>"> </td> <td class="td2">Registrar</td> <td class="td3"><img src="images\reg_seal.JPG" alt="seal" style="width: 100%;">Seal</td> </tr> </tfoot> </table> </div> <div class="footer-back"> </div> </div> </body> </html>