Şuanki Dizin: /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/spmsolapur.org/mis_software/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']; $subject = $_POST['subject']; $department = $_POST['department']; if($type=="Select Type") { $class_error = 1; $flag = 1; } if($type=="Select Class") { $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,$subject,$department,$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]; $res_subject = $data[14]; $res_department = $data[15]; $class_data = $db->get_class_title_master_details($res_department); $class_name = $class_data[1]; } ?> <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>Purchase 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="Text Book" <?php if($res_type=="Text Book"){ ?> Selected <?php } ?> >Text Book</option> <option value="Reference" <?php if($res_type=="Reference"){ ?> Selected <?php } ?> >Reference</option> <option value="Journal"<?php if($res_type=="Journal "){ ?> Selected <?php } ?>>Journal </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="Other" <?php if($res_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 $res_barcode_no; ?>" readonly /> </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 $res_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($res_department!="") { $class_data = $db->get_class_title_master_details($res_department); $res_class = $class_data[1]; ?> <option value="<?php echo $res_department; ?>"><?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="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>
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