| Server IP : 172.67.187.206 / Your IP : 162.159.115.42 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/edu2018/print/ |
Upload File : |
<?php
ob_start();
//$id = $_GET['group'];
$class= $_REQUEST['room'];
$code= $_REQUEST['stucode'];
?>
<style type="text/css">
@page {
size: A4;
margin-left: 20px;
margin-right: 20px;
margin-top: 0px;
margin-bottom: 0px;
content: none !important;
}
@charset "utf-8";
body {
/*background: rgb(204,204,204);*/
background: white;
margin: 0px;
padding: 0px;
}
page[size="A4"] {
/*position:relative;
background: white;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);*/
display:block;
width: 21cm;
height: 29.7cm;
margin: 0 auto;
margin-top:0.5cm;
}
.numpage {
position:relative;
padding-top:0.5cm;
padding-right:0.5cm;
text-align:right;
}
#containner {
/*position: absolute;*/
margin:0 auto;
margin-top:0.5cm;
padding:0cm;
}
#main{
position:relative;
width:17.2cm;
height:5.4cm;
padding:0;
clear:both;
margin-bottom:0.2cm;
text-align:left;
font-family:Tahoma;
font-size:9px;
border:0px;
}
#front {
position:absolute;
width:8.6cm;
height:5.4cm;
border:0px;
/*border:solid 1px #0000FF;*/
}
#back {
position:absolute;
left:8.6cm;
width:8.6cm;
height:5.4cm;
border:0px;
/*border:solid 1px #0000FF;*/
}
div.pic-resize img {
width: 2.1cm;
height: 3.1cm;
}
div.pic-resize {
position: absolute;
width: 2.1cm;
height: 3.1cm;
overflow: hidden;
text-align: center;
margin:15.5mm 0mm 0mm 1.5mm;
}
div.card-resize img {
width: 8.6cm;
height: 5.4cm;
}
div.card-resize {
position: relative;
border:solid 1px #666666;
width: 8.6cm;
height: 5.4cm;
overflow: hidden;
text-align: center;
}
div.barcode-resize img {
width: 4cm;
height: 0.7cm;
}
div.barcode-resize {
position: relative;
overflow: hidden;
padding-top:0.3cm;
}
.CardtxtData {
position: absolute;
width:6cm;
height:2.5cm;
margin:15mm 0mm 0mm 24mm;
padding:0;
text-align:left;
}
.CardtxtData .styDiv {
position: relative;
clear:both;
margin:5px 0px 0px 0px;
padding:0;
}
.CardtxtData .styDiv2 {
position: relative;
clear:both;
margin:2px 0px 0px 0px;
padding-left:5px;
}
.CardtxtData .styDiv3 {
position: relative;
clear:both;
margin:45px 0px 0px 0px;
padding-left:5px;
}
.CardtxtData .barcode {
position: relative;
clear:both;
margin:5px 0px 0px 0px;
padding:5px;
background-color:#FFFFFF;
}
text1 {
font-size:10px;
font-weight:bold;
}
text2 {
font-size:9px;
font-weight:bold;
}
text3 {
font-size:14px;
font-weight:bold;
}
text4 {
font-size:12px;
font-weight:bold;
}
b{
margin-right:3px;
margin-left: 5px;
}
.CardtxtDate {
position:absolute;
margin:46.5mm 0mm 0mm 2mm;
font-size:9px;
padding-left:7px;
}
.CardtxtBack {
position:absolute;
font-size:14px;
width:8.4cm;
height:5cm;
padding:0;
left: 3px;
top: 7px;
}
.CardtxtBack .styDiv2 {
position: relative;
clear:both;
margin:2px 0px 0px 0px;
padding-left:10px;
text-align:left;
}
.CardtxtBack .styDiv3 {
position: relative;
clear:both;
margin:2px 0px 0px 0px;
text-align: center;
}
.CardtxtBack .styDiv4 {
position: relative;
clear:both;
margin:5px 0px 0px 0px;
padding-left:5px;
}
#opa img {
filter:alpha(opacity=30);
opacity:0.3;
border:solid 1px #0099FF;
}
#opa img:hover{
filter:alpha(opacity=100);
opacity:1;
border:solid 1px #0099FF;
}
/*
@media print {
body, page[size="A4"] {
margin: 0;
box-shadow: 0;
page-break-after: always;
}
}
/* css ส่วนสำหรับการแบ่งหน้าข้อมูลสำหรับการพิมพ์ */
@media all
{
.page-break { display:none; }
.page-break-no{ display:none; }
}
@media print
{
body, page[size="A4"] {margin: 0;box-shadow: 0;}
.page-break { display:block;height:1px; page-break-before:always; margin:0; padding:0; }
.page-break-no{ display:block;height:1px; page-break-after:avoid; }
.no-print{ display:none;}
.no-print2{ display:none;}
}
</style>
<body onload=" window.print(); document.title='student';">
<?php
// ไฟล์สำหรับกำหนดรายละเอียด pdf
require_once('../config.php');
//$SQLs = $mysqli->query("SELECT * FROM am WHERE am_user ='admin'");
//$Rows = mysqli_fetch_array($SQLs);
?>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css">
<script src="../bootstrap/js/bootstrap.min.js"></script>
<script src="../bootstrap/css/bootstrap.css"></script>
<div class="bs-example">
<br>
<page size="A4">
<?php
if($code==""){
$SQL = $mysqli->query("SELECT * FROM student where class='$class' AND active='yes'");
}else{
$SQL = $mysqli->query("SELECT * FROM student where code='$code' AND active='yes'");
}
$i=0;
while($Row=mysqli_fetch_array($SQL)) {
$i++
?>
<?php if ($i=="6" OR $i=="11" OR $i=="16" OR $i=="21" OR $i=="26" OR $i=="31" OR $i=="36" OR $i=="41" OR $i=="46" OR $i=="51" OR $i=="56" OR $i=="61" OR $i=="66" OR $i=="71"
OR $i=="76" OR $i=="81" OR $i=="86" OR $i=="91" OR $i=="96" OR $i=="101" OR $i=="106" OR $i=="111" OR $i=="116" OR $i=="121" OR $i=="126" OR $i=="131" OR $i=="136" OR $i=="141"
OR $i=="156" OR $i=="161" OR $i=="166" OR $i=="171" OR $i=="176" OR $i=="181" OR $i=="186" OR $i=="191" OR $i=="196" OR $i=="201" OR $i=="206" OR $i=="211" OR $i=="2216")
{ echo "<br><br><br>";}
?>
<div id="containner" align="center">
<div id="main"><!-- start main-->
<div class="pic-resize">
<?=$i;?>
</div>
<div id="front" class="card-resize"><!-- start front-->
<div class="CardtxtData">
<div class="styDiv" align="center"><text1>บัตรประจำตัวนักเรียน</text1></div>
<div class="styDiv2"><text2><? echo "รหัสนักเรียน";?><b><?=$Row['code'];?></b></text2></div>
<div class="styDiv2"><text2><? echo "รหัสบัตรประชาชน";?><b></b></text2></div>
<div class="styDiv2"><text2><? echo "ชื่อ-นามสกุล";?><b></b></text2></div>
<div class="styDiv3" align="center"><text2><? echo "( นาย.................... )";?></text2></div>
<div class="styDiv2" align="center"><text2><? echo "ผู้อำนวยการวิทยาลัยเทคนิคโพธาราม";?></text2></div>
</div><img src="../template/card12.png" />>
</div><!-- end front-->
<div id="back" class="card-resize"><!-- start back-->
<div class="CardtxtBack" align="center">
<div class="styDiv3" align="center"><text2>วิทยาลัยเทคนิคโพธาราม</text2></div>
<div class="styDiv3" align="center"><text2>TECHNICPHOTHARAM</text2></div>
<div class="styDiv3"><text2>54/2 หมู่ 3 ตำบลบ้านเลือก อำเภอโพธาราม จังหวัดราชบุรี 70120</text2></div>
<div class="styDiv3"><text2>โทรศัพท์: 032-231-313</text2></div>
<div class="styDiv2"><text2>1. บัตรนี้ใช้เฉพาะผู้เป็นเจ้าของบัตรเท่านั้น</text2></div>
<div class="styDiv2"><text2>2. ให้พกบัตรประจำตัวนี้ตลอดเวลา</text2></div>
<div class="styDiv2"><text2>3. ใช้แสดงตัวตนทุกครั้งเมื่อมีผู้เรียกตรวจ</text2></div>
<div class="styDiv2"><text2>4. สิทธิการใช้บัตรสิ้นสุดลงเมื่อพ้นสภาพการเป็นนักเรียน</text2></div>
<div class="styDiv2"><text2>5. ผู้ใดเก็บบัตรนี้ได้ โปรดนำส่งคืนวิทยาลัยเทคนิคโพธาราม</text2></div>
<div class="styDiv4"><text2></text2></div>
<div class="styDiv4"></div>
</div>
<img src="../template/back.png" /></div><!-- end back-->
</div><!-- end main-->
</div>
<?php }?>
<div style='page-break-after: always'></div>
</page>
</div>
</body>