MMCT TEAM
Server IP : 103.191.208.50  /  Your IP : 216.73.216.53
Web Server : LiteSpeed
System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64
User : celkcksm ( 1031)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, popen, exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/celkcksm/websites/vtti.e-campus.co.in/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/celkcksm/websites/vtti.e-campus.co.in/view_book.php
<?php
include ("include/makeSession.php"); 

$installment_id=mysqli_query($con,"select * from admin where id='".$_SESSION["ecomid"]."'");
	  $installment_id=mysqli_fetch_array($installment_id); 
$installment_id=$installment_id['menuper'];
	  $menuper=explode(',',$installment_id);
	   
	   if(in_array('Manage Library',$menuper)){
		  
	   }else{
		 
	header("location:index.php");
		   
		}
$_SESSION['page_name']="Library";
include('include/function.php');
include("include/header.php");
include("include/sidebar.php");
?>
<div class="content-wrapper">
  <section class="content-header">
    <h1> View Book</h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
      <li><a href="#">View Book</a></li>
    </ol>
  </section>
  <!-- Main content -->
  <section class="content">
    <div class="row">
      <div class="col-xs-12">
        <div class="box">
          <div class="box-header">
            <h3 class="box-title">View Book :</h3>
          </div><!-- /.box-header -->
          <div class="box-body table-responsive" >
		  		
            <table id="example1" class="table table-bordered table-striped">
			  <?php if(!empty($_SESSION['msg'])){
			  $msg=$_SESSION["msg"];
           echo '<div class="col-md-8">
			<div class="alert alert-success alert-dismissible">
  <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
  '.$msg.'
		  </div>'; $_SESSION["msg"]='';} ?>
              <thead>
                <tr>
                    <th>#ID</th>
                    <th>Distributed To</th>
                    <th scope="col">Book Name</th>
                    <th scope="col">Accession Code</th>
                    <th scope="col">Class Type</th>
                    <th scope="col">Course Name</th>
                    <th scope="col">Isbn</th>
                    <th scope="col">Author</th>
                    <th scope="col">Publisher</th>
                    <th scope="col">Year of Publication</th>
                    <th scope="col">Rack Number</th>
                    <th scope="col">Edition</th>
                    <th scope="col">Book Code</th>
                    <th scope="col">Cost</th>
                    <th scope="col">Number of Copies</th>
                    <th scope="col">Available Copies</th>
                    <th scope="col">Date of Entry</th>
                      
    				    <?php if(!empty($_SESSION["ecomid"]) && $_SESSION["ecomid"]==1 ){ ?>
    				<th scope="col">Action</th>
    				    <?php } ?>
                    <th scope="col">Entry User</th>
                </tr>
              </thead>
              <tbody>
              <?php $Query=mysqli_query($con,"select * from book");
			  		$i = 1;	
	  				  while($Row=mysqli_fetch_array($Query)){ ?>
                    <tr>
                        <td><?=$i;?></td>
                        <td><a href="view_book_distribution.php?upid=<?=$Row['id'];?>"><button type="button">Distribution Details</button></a></td>
                        <td><span id=""><?=$Row['book_name'];?></span></td>
                        <td><span id=""><?=$Row['accession_code'];?></span></td>
                        <td><span id=""><?=$Row['class_type'];?></span></td>
                        <td><span id=""><?=mysqli_fetch_array(mysqli_query($con,"select c_name from course where id='".$Row['course_id']."'"))['c_name'];?></span></td>
                        <td><span id=""><?=$Row['isbn'];?></span></td>
                        <td><span id=""><?=$Row['author'];?></span></td>
                        <td><span id=""><?=$Row['publisher'];?></span></td>
                        <td><span id=""><?=$Row['publication_year'];?></span></td>
                        <td><span id=""><?=$Row['rack_no'];?></span></td>
                        <td><span id=""><?=$Row['edition'];?></span></td>
                        <td><span id=""><?=$Row['book_code'];?></span></td>
                        <td><span id=""><?=$Row['cost'];?></span></td>
                        <td><span id=""><?=$Row['copies_number'];?></span></td>
                        <td><span id=""><?=$Row['copies_available'];?></span></td>
                        <td><span id=""><?=$Row['entry_date'];?></span></td>
					  <td><a href="./book.php?upid=<?php echo $Row["id"]; ?>"><i class="fa fa-pencil text-yellow"></i></a>&nbsp;&nbsp; 
					  <!--<a href="./book.php?did=<?php //echo $Row["id"]; ?>" onclick="return confirm_click();"><i class="fa fa-remove text-red"></i></a></td>
                        -->
                        <?php $userR=mysqli_fetch_array(mysqli_query($con,"select * from admin where id='".$Row['user_id']."'"));?>
                        <td><span id=""><?=$userR['username'];?></span></td>
                    </tr>                
                <?php $i++;} ?>                    
              </tbody>
            </table>
          </div><!-- /.box-body -->
        </div><!-- /.box -->
      </div><!-- /.col -->
    </div><!-- /.row -->
  </section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- footer start -->
<?php
include('include/footer.php');
?>
<!-- footer end -->
<script src="plugins/datatables/jquery.dataTables.min.js"  type="text/javascript"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/dataTables.buttons.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/jszip.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/pdfmake.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/vfs_fonts.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.html5.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.print.min.js"  type="text/javascript"></script>

<script src="bootstrap/js/buttons.colVis.min.js"  type="text/javascript"></script>
<script src="bootstrap/js/buttons.flash.min.js"  type="text/javascript"></script>

<script  type="text/javascript">
$(document).ready(function() {
    $('#example1').DataTable( {
        dom: 'Bfrtip',
        columnDefs: [
            {
                targets: 1,
                className: 'noVis'
            }
        ],
        buttons: [
            {
                extend: 'colvis',
                columns: ':not(.noVis)'
            }
        ],
		 buttons: [
		  { extend: 'colvis', text: 'COLOUMNS' },
		 { extend: 'csv', text: 'Export to CSV' },
		 { extend: 'excel', text: 'Export to Excel' },
           { extend: 'pdfHtml5', text: 'Create PDF', orientation: 'landscape', exportOptions: { columns: ':visible' } },
{ extend: 'print', text: 'Print', exportOptions:{columns: ':visible',autoPrint: true}}
        ],
		
    } );
} );
	//$(function () {
	//$("#example1").DataTable();
	
	//});
</script>

MMCT - 2023