Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/bkp/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/bkp/edit-books.php

 <?php
require_once('header.php');

require_once('header-left-section.php');

	$flag				=	0;
	$success_flag		=	0;
	$class_error		=	0;
	
	
		$accession_no		= 	"";
		$author				=	"";
		$division			=	"";
		$title				=	"";
		$edition			=	"";
		$year				=	""; 
		$pages				=	"";
		$volume				=	"";
		$book_date			=	"";
		$type				=	"";
		$place_publisher	=	"";
		
		
		if(isset($_GET['edit_id']))
		{
			$edit_id	=	$_GET['edit_id'];
			$_SESSION['current_edit_id'] = $edit_id;
		}
		else if(isset($_SESSION['current_edit_id']))
		{

			$edit_id	= $_SESSION['current_edit_id'];
		}
	
		
		if(isset($_POST['update']))
		{
				
			$accession_no		= 	$_POST['accession_no'];
			$author				=	$_POST['author'];
			$title				=	$_POST['title'];
			$edition			=	$_POST['edition'];
			$place_publisher	=	$_POST['place_publisher'];
			$year				=	$_POST['year']; 
			$pages				=	$_POST['pages'];
			$volume				=	$_POST['volume'];
			$book_date			=	$_POST['book_date'];
			$type				=	$_POST['type'];
			$barcode_no			=	$_POST['barcode_no'];
			
			if($type=="Select Type")
			{
				$class_error	=	1;
				$flag	=	1;
			}

			if($flag==0)
			{	
				
					if($db->update_books_records($accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$barcode_no,$edit_id))
					{
						
						$success_flag	=	1;
						
					}
					else
					{
						$success_flag	=	2;
					}
			}
		}
		
		$data	=	array();

		$data	=	$db->get_all_books_info_by_id($edit_id,$acd_year);

		if(!empty($data))
		{		
			$res_id					=	$data[0];
			$res_accession_no		=	$data[1];
			$res_author				=	$data[2];
			$res_title				=	$data[3];
			$res_edition			=	$data[4];
			$res_place_publisher	=	$data[5];
			$res_year				=	$data[6];
			$res_pages				=	$data[7];
			$res_volume				=	$data[8];
			$res_book_date			=	$data[9];
			$res_type				=	$data[10];
			$res_date				=	$data[11];
			$res_time				=	$data[12];
			$res_barcode_no			=	$data[13];
		}
		
		
?> 
<style>
.form-control
{
	background-color:#FFF !important;
}
h1
{
	text-align:center;
	color:#101566;
	font-weight:bold;
	
}
.content
{
	margin:10px;
}
</style> 
 <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper" style="background-color:#D3D5F5;">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-12">
            <h1>Update Books</h1>
          </div>
          
        </div>
      </div><!-- /.container-fluid -->
    </section>
	
    <!-- Main content -->
<form method="POST" action="<?php echo $_SERVER['PHP_SELF'] ?>" enctype="multipart/form-data" autocomplete="off">

 <section class="content">
    <div class="row">
        <div class="col-md-12">
			<div class="card card-primary">
				<div class="card-body">
					<?php
					if($success_flag==1)
					{
					?>
					<div class="alert alert-success">
					<span class="alert-link">Success ! </span>Book Details Updated Successfully.
					</div>	
					<?php
					}
					if($success_flag==2)
					{
					?>
					<div class="alert alert-danger">
					<span class="alert-link">Failed ! </span> To Add Records of Book
					</div>	
					<?php
					}
					if($class_error==1)
					{
					?>
					<div class="alert alert-danger">
					<span class="alert-link">Failed ! </span>Please Select Type
					</div>	
					<?php
					}
					?>
					
					<div class="row" style="background-color:#E4E4EC;">
						  <div class="form-group col-lg-3">
							<label>Accession No. :</label>
							<input type="text" class="form-control" name="accession_no" placeholder="Enter Accession No." value="<?php echo $res_accession_no; ?>" />
						</div>
						<div class="form-group col-lg-3">
							<label>Author:</label>
							<input type="text" class="form-control" name="author" placeholder="Enter author Details" value="<?php echo $res_author; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label> Title:</label>
							<input type="text" class="form-control" name="title" placeholder="Enter Title of Book" value="<?php echo $res_title; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label>Edition:</label>
							<input type="text" class="form-control" name="edition" placeholder="Enter Edition of Book" value="<?php echo $res_edition; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label> Place & Publisher:</label>
							<input type="text" class="form-control" name="place_publisher" placeholder="Enter Place & Publisher Details" value="<?php echo $res_place_publisher; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label> Year:</label>
							<input type="number" class="form-control" name="year" placeholder="Enter Year" value="<?php echo $res_year; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label> Pages:</label>
							<input type="number" class="form-control" name="pages" placeholder="Enter Pages" value="<?php echo $res_pages; ?>" required  />
						</div>
						<div class="form-group col-lg-3">
							<label> Volume:</label>
							<input type="number" class="form-control" name="volume" placeholder="Enter Volume of Book" value="<?php echo $res_volume; ?>" required />
						</div>
						<div class="form-group col-lg-3">
							<label>Date:</label>
							<input type="text" class="form-control" name="book_date" placeholder="Enter Date" style="resize:none;" id="date_picker" value="<?php echo $res_book_date; ?>" />
						</div>
						
						<div class="form-group col-lg-3">
							<label> Select Type:</label>
							<select class="form-control" name="type">
							<option value="Select Type">Select Type</option>
							<option value="Journal No"<?php if($res_type=="Journal No"){ ?> Selected <?php } ?>>Journal No</option>
							<option value="Magzine" <?php if($res_type=="Magzine"){ ?> Selected <?php } ?>>Magzine</option>
							<option value="Book" <?php if($res_type=="Book"){ ?> Selected <?php } ?> >Book</option>
							<option value="author" <?php if($res_type=="author"){ ?> Selected <?php } ?> >author</option>
						</select>
						</div>
						<div class="form-group col-lg-3">
							<label> Barcode No:</label>
							<input type="number" class="form-control" name="barcode_no" placeholder="Enter Barcode No." value="<?php echo $res_barcode_no; ?>" required  />
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-12">
					 <center>
					  <input type="submit" value="UPDATE BOOKS DETAILS" name="update" class="btn btn-success"></center>
					</div>
				</div>
    </section>
	</form>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  <?php
require_once('footer.php');
?> 
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
 <script> 
 $(document).ready(function() {
 
    $( "#date_picker" ).datepicker({ dateFormat: 'dd-mm-yy' });
	
  } );
 </script>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4