Custom PHPRUNNER Print ID CARD SYSTEM



Custom PHPRUNNER Print ID CARD SYSTEM


<?php
ini_set("display_errors","0");

set_magic_quotes_runtime(0);

header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
header("Pragma: no-cache");
header("Cache-Control: no-cache");



include("include/dbcommon.php");
if(!@$_SESSION["UserID"])
{
        header("Location: login.php");
        return;
}
?>

<!DOCTYPE html>
<html lang='en' class=''>
<head>

<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style class="cp-pen-styles">
.card {
box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
display: grid;
font-family: 'Trebuchet MS', sans-serif;
height: 223px;
margin: 0.0px auto;
width: 350px;
}
.front {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.front .blue {
  background-color: #4cc9c8;
  grid-column: 8 / span 5;
  grid-row: 1 / span 4;
}
.front .yellow {
  background-color: #f1ef1c;
  grid-column: 1 / span 7;
  grid-row: 1 / span 4;
 
 
 
 
}
.front .pink {
  background-color: transparent;
  -webkit-clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
          clip-path: polygon(0% 0%, 100% 0%, 0% 100%);
  grid-row: 1 / span 3;
  grid-column: 1 / span 11;
  position: relative;
  z-index: 2;
}
front .dots {
    background: radial-gradient(#fa001a00 20%, transparent 19%), radial-gradient(#fa001a00 20%, transparent 19%), transparent;
    background-size: 6px 6px;
    background-position: 0 0, 3px 3px;
    grid-column: 1 / span 12;
    grid-row: 3 / span 2;
    margin: 0 0 15px 20px;
    z-index: 1;
}
.front .back-background {
color: white;
display: flex;
flex-direction: column;
grid-column: 1 / span 12;
grid-row: 1 / span 6;
justify-content: center;
text-align: center;
z-index: 3;

    background-repeat: no-repeat;
    height: 100%;
    background: url(../lundscape/depan.jpg);
    background-size: cover;
}
.front .personal-intro p {
  letter-spacing: 1px;
  text-transform: uppercase;
}
.front .personal-intro p:first-of-type {
  font-size: 18px;
}
.front .personal-intro p:last-of-type {
  font-size: 8px;
  margin-top: 5px;
}
.back {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
}
.back .front {
    background-color: #fff4f400;
    grid-column: 1 / span 12;
    grid-row: 1 / span 13;

    background-repeat: no-repeat;
    height: 100%;
    background: url(../lundscape/ff.jpg);
    background-size: cover;
}
.back .top.dots {

    background-position: 0 0, 3px 0px;
    grid-column: 10 / span 3;
    grid-row: 4 / span 6;
    background-color: #fff4f400;
    margin: 2px;
    margin-right: 7px;
    margin-bottom: 1px;
    margin-top: 7px;
    margin-left: -4px;
}
.back .personal-info {
     grid-column: 4 / span 7;
    grid-row: 3 / span 7;
    margin: 6px;
    padding-left: 2px;
}

.top{
    grid-column: 3 / span 8;
    grid-row: 1 / span 2;
    margin: 1px;
    padding-left: 23px;
    text-align: center;
font-family: initial;
}
.sign{
    grid-column: 3 / span 9;
    grid-row: 11 / span 2;
    padding-left: 191px;
    text-align: center;
}

.down{
    grid-column: 9 / span 4;
    grid-row: 10 / span 2;
    padding-left: 20px;
    text-align: center;
    FONT-SIZE: 10PX;
}
.GolDarah{
    grid-column: 5 / span 4;
    grid-row: 6 / span 2;
    padding-left: 63px;
    text-align: left;
    FONT-SIZE: 10PX;
    margin-top: -8px;
    font-weight: 900;


}
.Comp{
grid-column: 5 / span 8;
    grid-row: 8 / span 2;
    padding-left: 35px;
    text-align: left;
    FONT-SIZE: 12PX;
    margin-top: 1px;
    font-weight: 900;

}
.Exp{
grid-column: 5 / span 8;
    grid-row: 10 / span 2;
    padding-left: 35px;
    text-align: left;
    FONT-SIZE: 13PX;
    margin-top: 1px;
    font-weight: 900;
}
.Issue{
grid-column: 5 / span 8;
    grid-row: 9 / span 2;
    padding-left: 35px;
    text-align: left;
    FONT-SIZE: 13PX;
    margin-top: 0px;
    font-weight: 900;

}
.Prof{
 grid-column: 6 / span 4;
    grid-row: 8 / span 2;
    padding-left: 4px;
    text-align: left;
    FONT-SIZE: 13PX;
    margin-top: -18px;
    font-weight: 900;
}
.Name{
    grid-column: 4 / span 8;
    grid-row: 6 / span 2;
    padding-left: 63px;
    text-align: left;
    FONT-SIZE: 15PX;
    margin-top: -1px;
    font-weight: 900;
}
.back .personal-info p {
  font-size: 10px;
      margin: 1px;
}





.back .personal-info p:first-of-type {
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 0px;
    text-transform: uppercase;
    font-family: OCRAEXT_5;
}
.back .personal-info p:nth-of-type(2) {
    font-size: 11px;
    margin-bottom: 2px;
}
.back .bottom.dots {

  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
  grid-column: 1 / span 8;
  grid-row: 11 / span 2;
  z-index: 2;
}
.back .pink {
  background-color: #fa001a00;
  grid-column: 8 / span 5;
  grid-row: 10 / span 3;
}
</style>
<style>
 @media print {

   .dontPrint {
       display:none;
    }

    }
.style1 {
color: #FF0000;
    font-size: larger;
    font-weight: bolder;
}
</style>

<style type="text/css" media="screen, print">
    @font-face {
      font-family: "OCRAEXT";
      src: url("OCRAEXT_2.TTF");
    }
   
    body { font-family: "OCRAEXT", serif }

.back .personal-info p:first-of-type {
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 0px;
    text-transform: uppercase;
    font-family: OCRAEXT;

  .sign1 {    grid-column: 3 / span 9;
    grid-row: 11 / span 2;
    padding-left: 191px;
    text-align: center;
}
</style>
</head>
<script type="text/javascript">
        function zoom() {
            document.body.style.zoom = "140%"
        }
</script>




             <SCRIPT>
    function print_window(){
    window.print();
    setTimeout(function () {
    window.open('', '_self', '');
    window.close();
    }, 100);
    }
</SCRIPT>

  <BODY class style="background-color:white;" onLoad="print_window();">








<?php
   $idb = $_REQUEST['idb'];
 
 
   $sql = "SELECT * FROM badge WHERE idb='".$idb."'";


$results = CustomQuery($sql);
$data = db_fetch_array($results);


$Name = $data['Person Name'];
$Prof = $data['Profession'];
   $Comp = $data['Comp name'];
$Issue = $data['Issuing Date'];
$Exp = $data['ExpDate'];
$Photo = $data['Photo'];
$PhotoCam = $data['PhotoCam'];

//$newViews =  $data['views']+1;
// CustomQuery("update url_redirects set views = ".$newViews." where short='".$short."'");

// echo file_get_contents($url);
 // CustomQuery("update url_redirects set views = ".$newViews." where short='".$short."'");



  ///  if(!empty($data)) {
  //    header("Location: ".$data['url']."");
  //  } else {
 //    $html = "Error: cannot find short URL";
  //  }
 
?>
 



<DIV class="dontPrint">

  <h1 align="center">Developed By ASRO</h1>

</DIV>









<div class="card back">
  <div class="front"><img src="././images/f.jpg" width="100%" height="100%"></div>
 
 

 <?php if($data['Photo'] != ""): ?>
  <div class="top dots">
     

     <img src="https://sample.com/<?php $test = json_decode($Photo, true);  echo $test[0]["name"]; ?>" width="80" height="93" style="left: 100px;margin-left: -496px;margin-top: 31px;border: 1px solid transparent;padding: 0px;border-color: black;border-radius: 1px;"></DIV>
   <?php else: ?>
     <div class="top dots">
 
   <img src="././<?php echo $PhotoCam;?>" width="80" height="93" style="left: 100px;margin-left: -496px;margin-top: 31px;border: 1px solid transparent;padding: 0px;border-color: black;border-radius: 1px;"></DIV>
    <?php endif; ?>
 
 
 
 



     <div class="Name">
  <p><?php echo $Name;?></p>
 </div>


     <div class="Prof">
  <p><?php echo $Prof;?></p>
 </div>



       <div class="Comp">
  <p><?php echo $Comp;?></p>
 </div>

       <div class="Issue">
  <p><?php echo $Issue = date("d-m-Y", strtotime($Issue));?> </p>
 </div>


       <div class="Exp">
  <p><?php echo $Issue = date("d-m-Y", strtotime($Exp));?></p>
 </div>




<?php ; ?>



  <div class="bottom dots"></div>
  <div class="pink"></div>
</div>




<div class="card front">
  <div class="blue"></div>
  <div class="yellow"></div>
  <div class="pink"></div>
  <div class="dots"></div>
  <div class="back-background">
    <img src="././images/b.jpg" width="100%" height="100%">
 
  </div>
</div>


<DIV class="dontPrint">

  <h1 align="center">Developed By ASRO</h1>


</DIV>








<script type="text/javascript">
    function mousehandler(e) {
        var myevent = (isNS) ? e : event;
        var eventbutton = (isNS) ? myevent.which : myevent.button;
        if ((eventbutton == 2) || (eventbutton == 3)) return false;
    }
    document.oncontextmenu = mischandler;
    document.onmousedown = mousehandler;
    document.onmouseup = mousehandler;
    function disableCtrlKeyCombination(e) {
        var forbiddenKeys = new Array("a", "s", "c", "x","u");
        var key;
        var isCtrl;
        if (window.event) {
            key = window.event.keyCode;
            //IE
            if (window.event.ctrlKey)
                isCtrl = true;
            else
                isCtrl = false;
        }
        else {
            key = e.which;
            //firefox
            if (e.ctrlKey)
                isCtrl = true;
            else
                isCtrl = false;
        }
        if (isCtrl) {
            for (i = 0; i < forbiddenKeys.length; i++) {
                //case-insensitive comparation
                if (forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase()) {
                    return false;
                }
            }
        }
        return true;
    }
</script>


<body +++++oncontextmenu="return false;">

</body></html>

Comments