ok

Mini Shell

Direktori : /home/ngwcolle/public_html/LIBRARY-NGWC/admin/
Upload File :
Current File : //home/ngwcolle/public_html/LIBRARY-NGWC/admin/libcard-single1.php

<?php session_start();
//DB conncetion
include_once('includes/config.php');
error_reporting(0);
//validating Session
if (strlen($_SESSION['aid']==0)) {
  header('location:logout.php');
  } else{

//Code for record deletion
if($_GET['requestid']){
$stid=$_GET['requestid'];
// mysqli_query($con,"delete from tblteams where id ='$tid'");
// echo "<script>alert('Data Deleted');</script>";
// echo "<script>window.location.href='manage-teams.php'</script>";
          }
?>
<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Library Card</title>
    <link rel="icon" type="image/x-icon" href="../assets/favicon.ico" /> 
    <!-- Custom fonts for this template -->
    <!-- <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> -->
    

    <!-- Custom styles for this template -->
   

    <!-- Custom styles for this page -->
   
    <script type="text/javascript">
       function PrintDiv() {
         
         var printContents = document.getElementById("dvContents").innerHTML;
  var originalContents = document.body.innerHTML;

  document.body.innerHTML = printContents;

  window.print();

  document.body.innerHTML = originalContents;
     }
    </script>
    <style type="text/css" media="print">
    @page 
    {
        size: auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }
    @media print{@page {size: landscape}}
    </style>
    <style>
    .tablel{
    border-collapse:collapse;
		border-spacing:0px;
        border: 1px solid black;
		/* padding:1px;   border-spacing:0; */
}
td,th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
  overflow:hidden;padding:7px 3px;}
.buttom{
    border-bottom: 1px solid black;
    border-collapse: collapse;
}
* {
  box-sizing: border-box;
}

/* Create two equal columns that floats next to each other */
.column {
  float: left;
  width: 40%;
  padding: 10px;
  height: 300px; /* Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}
#content {
  float: right ;
  width: 70% ;
}
#navbar {
  float: right;
  width: 30%;
}
.square {
  position: relative;
  width: 100px;
  border: 1px solid #32557f;
  padding-top:5px;
  height: 120px;
  text-align:center;
  margin:auto;
}
/* @media print{@page {size: landscape}} */
.square:after {
  content: "";
  display: block;
  padding-bottom: 70%;
}
</style>
</head>

<body id="page-top">

<!-- test div side by session_decode -->
<div id="container">
<div style="width:100%;margin:auto; padding-top:5px;"><center><button type="button" onclick="PrintDiv();" style="font-size:20px;">&#128438; Print</button></center></div>    
<div id="dvContents">
<div style="float:left;diplay:inline;margin:auto;"><img src="img/MDCD.png" alt="" height="90" width="90"></div>
    <div style="text-align:center;padding-buttom:0;"><h4>NIRANJAN GOVT. WOMENS COLLEGE,ASKA</h4>
    <?php $query=mysqli_query($con,"select * from tbl_students where rollno='$stid'");
while($row3=mysqli_fetch_array($query)){
?> 
<h4 style="padding-top:-10px"><?php	echo "<img src = 'includes/barcode.php?codetype=Code39&size=30&text=".$row3['libcardno']."&print=true' />";?></h4>

<?php }?>
</div>
  <div id="content">
  <table class="tablel" id="dataTablexx" width="100%" cellspacing="0">
    <tr>
        <th colspan="8">TRANSACTION DETAILS</th>
    </tr>
   
                                    <tr>
                                        <td>Acc.No</td>
                                        <td>Book Title</td>
                                        <td>Author</td>
                                        <td>Issue Date</td>
                                        <td>Due Date</td>
                                        <td>Return Date</td>
                                        <td>Penalty</td>
                                        <td>Lib Sign</td>
                                    </tr>
                                    <?php 
                                    $query2=mysqli_query($con,"select borrow_book.*,tbl_book.* from borrow_book inner join tbl_book on borrow_book.book_id=tbl_book.barcode where borrow_book.user_id='$stid'");
                                    if (mysqli_num_rows($query2) > 0) {
                                    $cnt=1;
while($row2=mysqli_fetch_array($query2)){
?>
<tr>
                                        <td><?php echo $row2['book_id'];?></td>
                                        <td><?php echo $row2['booktitle'];?></td>
                                        <td><?php echo $row2['author1'];?></td>
                                        <td><?php echo date("d-m-Y",strtotime($row2['date_borrowed']));?></td>
                                        <td><?php echo date("d-m-Y",strtotime($row2['due_date']));?></td>
                                        <td><?php  
                                        if($row2['date_returned']=0)
                                        {
                                        echo "\t";
                                        }
                                        else
                                        {
                                        date("d-m-Y",strtotime($row2['date_returned']));
                                        }?></td>
                                        <td><?php echo $row2['book_penalty'];?></td>
                                        <td></td>
                                    </tr>
                                    <?php }
}
else
{
  for ($row=1; $row <= 3; $row++) { 
		echo "<tr class=\ht1\>\n";
		for ($col=1; $col <= 8; $col++) { 
		   
		   echo "<td class=\"allb ht1\">&nbsp</td> \n";
		   	}
	  	    echo "</tr>";
		}
}
?>
                                    <?php
  for ($row=1; $row <= 14; $row++) { 
		echo "<tr class=\ht1\>\n";
		for ($col=1; $col <= 8; $col++) { 
		   
		   echo "<td class=\"allb ht1\">&nbsp</td> \n";
		   	}
	  	    echo "</tr>";
		}
    ?>
                                   
                        </table>
  </div>
  <div id="navbar">
  <table class="tablel" id="dataTablexx" width="100%" cellspacing="0">
                                <?php $query=mysqli_query($con,"select tbl_students.*,tbl_department.name as dname from tbl_students inner join tbl_department on tbl_students.department=tbl_department.id where tbl_students.rollno='$stid'");
while($row=mysqli_fetch_array($query)){
?>  
<tr>
    <th colspan="2">STUDENT BASIC DETAILS</th>
</tr>
                                <tr>
                                        <th>Name of the Student</th>
                                        <td><?php echo $row['stname'];?></td>
                                        
                                    </tr>
                                    <tr>
                                        <th>College Roll No.</th>
                                        <td><?php echo $row['rollno'];?></td>
                                    </tr>
                                    <tr>
                                        <th>Department</th>
                                        <td><?php echo $row['dname'];?></td>
                                    </tr>
                                    <tr>
                                        <th>Academic Session</th>
                                        <td><?php echo $row['academicyear'];?></td>
                                    </tr>
                                    <tr>
                                        <th>Contact No.</th>
                                        <td><?php echo $row['mobile'];?></td>
                                    </tr>
                                    <tr valign="center">
                                        <td colspan="2" >
                                        <div class="square"> <div class="content">
    Paste your photograph here!
  </div>
                                        </td>
                                    </tr>
                               <?php 
                           } ?>
                                   
                                </table>
                        </br>
                                <table class="tablel" width="100%">
                                    <tr>
                                        <th colspan="3">Renewal Details</th>
                                    </tr>
                                    <tr>
                                        <th>Year-1</th>
                                        <th>Year-2</th>
                                        <th>Year-3</th>
                                    </tr>
                                    <tr>
                                    <?php $query1=mysqli_query($con,"select * from tbl_libcard where rollno='$stid'");
while($row1=mysqli_fetch_array($query1)){
?>  
                                        <th><?php 
                                            echo $row1['renewal1'];
                                        ?>
                                        </th>
                                        <th>
                                            <?php if($row1['renewal2']=='0000-00-00')
                                        {
                                          echo "\t";
                                        }
                                        else
                                        {
                                            echo $row1['renewal2'];
                                        }?></th>
                                        <th><?php if($row1['renewal3']=='0000-00-00')
                                        {
                                          echo "\t";
                                        }
                                        else
                                        {
                                            echo $row1['renewal3'];
                                        }?></th>
                                    </tr>
                                    <?php }?>
                                </table>
</br>
                                <table class="tablel" width="100%">
                                    <tr>
                                        <td>Libraian Signature</td>
                                        <td>Date of Issue</td>
                                    </tr>
                                    <tr style="height:100px">
                                        <td></td>
                                        <td>
                                            <?php date_default_timezone_set('Asia/Kolkata');
$date = date('d-m-Y h:i:s A');
echo $date;?></td>
                                    </tr>
                                </table>
  
  </div>
</div>
                                    </div>
<!-- end sideby side -->
    <!-- Page Wrapper -->
  
    <!-- End of Page Wrapper -->

    <!-- Scroll to Top Button-->
    

    <!-- Bootstrap core JavaScript-->
    <script src="vendor/jquery/jquery.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="vendor/jquery-easing/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="js/sb-admin-2.min.js"></script>

    <!-- Page level plugins -->
    <script src="vendor/datatables/jquery.dataTables.min.js"></script>
    <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>

    <!-- Page level custom scripts -->
    <script src="js/demo/datatables-demo.js"></script>
</body>
</html>
<?php } ?>

Zerion Mini Shell 1.0