project done before
This commit is contained in:
8
application/views/admin/footer.php
Normal file
8
application/views/admin/footer.php
Normal file
@ -0,0 +1,8 @@
|
||||
<!-- footer content -->
|
||||
<footer>
|
||||
<div class="pull-right">
|
||||
Penelusuran Buku | Perpustakaan Universitas Muhammadiyah Parepare by <a href="http://www.facebook.com/kicap.karan">Kicap Karan</a>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</footer>
|
||||
<!-- /footer content -->
|
||||
32
application/views/admin/head.php
Normal file
32
application/views/admin/head.php
Normal file
@ -0,0 +1,32 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="<?=base_url()?>/assets_admin/images/favicon.ico" type="image/ico" />
|
||||
|
||||
<title>Penelusuran Buku | Perpustakaan Universitas Muhammadiyah Parepare </title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
<!-- NProgress -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/nprogress/nprogress.css" rel="stylesheet">
|
||||
<!-- iCheck -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/iCheck/skins/flat/green.css" rel="stylesheet">
|
||||
|
||||
<!-- bootstrap-progressbar -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet">
|
||||
<!-- JQVMap -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/>
|
||||
<!-- bootstrap-daterangepicker -->
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom Theme Style -->
|
||||
<link href="<?=base_url()?>/assets_admin/build/css/custom.min.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
.swal-modal .swal-text{
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
247
application/views/admin/index.php
Normal file
247
application/views/admin/index.php
Normal file
@ -0,0 +1,247 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php $this->load->view('admin/head'); ?>
|
||||
</head>
|
||||
|
||||
<body class="nav-md">
|
||||
<div class="container body">
|
||||
<div class="main_container">
|
||||
|
||||
<?php $this->load->view('admin/sidebar'); ?>
|
||||
|
||||
<?php $this->load->view('admin/topnavbar'); ?>
|
||||
|
||||
<!-- page content -->
|
||||
<div class="right_col" role="main">
|
||||
|
||||
<?php $this->load->view('admin/menu_atas'); ?>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2 style="font-weight: bold;">Form Map Perpustakaan</h2>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<center>
|
||||
<div class="form-horizontal" style="overflow-x: auto">
|
||||
<div class="form-group fabric-canvas-wrapper">
|
||||
<input type="hidden" id="sini_idnya" >
|
||||
<input type="hidden" id="sini_html" >
|
||||
<canvas id="c" style="border:1px solid #ccc;pointer-events:none;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
<?php $this->load->view('admin/footer'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('admin/script'); ?>
|
||||
<script src="<?=base_url()?>assets/fabric.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function resizeCanvas() {
|
||||
const outerCanvasContainer = $('.fabric-canvas-wrapper')[0];
|
||||
|
||||
const ratio = canvas.getWidth() / canvas.getHeight();
|
||||
const containerWidth = outerCanvasContainer.clientWidth;
|
||||
const containerHeight = outerCanvasContainer.clientHeight;
|
||||
|
||||
const scale = containerWidth / canvas.getWidth();
|
||||
const zoom = canvas.getZoom() * scale;
|
||||
canvas.setDimensions({width: containerWidth, height: containerWidth / ratio});
|
||||
canvas.setViewportTransform([zoom, 0, 0, zoom, 0, 0]);
|
||||
}
|
||||
|
||||
$(window).resize(resizeCanvas);
|
||||
|
||||
var canvas = new fabric.Canvas('c', {
|
||||
width: 1050,
|
||||
height: 950
|
||||
});
|
||||
|
||||
function AddRakBuku(left,top,width,height,id,angle,nama){
|
||||
const rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "rak_buku_"+id,
|
||||
originX: "center",
|
||||
originY: "center",
|
||||
fill: "aqua",
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: "blue",
|
||||
strokeWidth: 4,
|
||||
centeredRotation: false,
|
||||
})
|
||||
|
||||
var t = new fabric.IText(nama, {
|
||||
fill: "#000000",
|
||||
fontSize: 11,
|
||||
textAlign: "center",
|
||||
originX: "center",
|
||||
originY: "center",
|
||||
|
||||
});
|
||||
|
||||
var group = new fabric.Group([ rect, t ], {
|
||||
lockMovementX: true,
|
||||
lockMovementY: true,
|
||||
lockScalingX : true,
|
||||
lockScalingY : true,
|
||||
lockRotation : true,
|
||||
left: left,
|
||||
top: top,
|
||||
// selectable : false
|
||||
|
||||
});
|
||||
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(group);
|
||||
}
|
||||
|
||||
function AddMeja(left,top,width,height,id,angle){
|
||||
var rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "meja_"+id,
|
||||
// left: left,
|
||||
// top: top,
|
||||
fill: 'orange',
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: 'yellow',
|
||||
strokeWidth: 2,
|
||||
centeredRotation: false,
|
||||
cornerSize: 6,
|
||||
originX: "center",
|
||||
originY: "center",
|
||||
});
|
||||
|
||||
var t = new fabric.IText("Meja", {
|
||||
fill: "#000000",
|
||||
fontSize: 14,
|
||||
textAlign: "center",
|
||||
originX: "center",
|
||||
originY: "center",
|
||||
|
||||
});
|
||||
|
||||
var group = new fabric.Group([ rect, t ], {
|
||||
lockMovementX: true,
|
||||
lockMovementY: true,
|
||||
lockScalingX : true,
|
||||
lockScalingY : true,
|
||||
lockRotation : true,
|
||||
left: left,
|
||||
top: top,
|
||||
// selectable : false
|
||||
|
||||
});
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(group);
|
||||
}
|
||||
|
||||
function AddKursi(left,top,width,height,id,angle){
|
||||
var rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "kursi_"+id,
|
||||
// left: left,
|
||||
// top: top,
|
||||
fill: 'lime',
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: 'green',
|
||||
strokeWidth: 1,
|
||||
centeredRotation: false,
|
||||
cornerSize: 3,
|
||||
originX: "center",
|
||||
originY: "center"
|
||||
});
|
||||
|
||||
var t = new fabric.IText("Kursi", {
|
||||
fill: "#000000",
|
||||
fontSize: 10,
|
||||
textAlign: "center",
|
||||
originX: "center",
|
||||
originY: "center",
|
||||
|
||||
});
|
||||
|
||||
var group = new fabric.Group([ rect, t ], {
|
||||
lockMovementX: true,
|
||||
lockMovementY: true,
|
||||
lockScalingX : true,
|
||||
lockScalingY : true,
|
||||
lockRotation : true,
|
||||
left: left,
|
||||
top: top,
|
||||
// selectable : false
|
||||
|
||||
});
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(group);
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "cari_semuanya"},
|
||||
// dataType: 'json',
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
$("#sini_html").html(response);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
resizeCanvas();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
549
application/views/admin/menu/buku.php
Normal file
549
application/views/admin/menu/buku.php
Normal file
@ -0,0 +1,549 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php $this->load->view('admin/head'); ?>
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
|
||||
<!-- <link href="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet"> -->
|
||||
<link rel="stylesheet" href="<?php echo base_url('sweet-alert/bootstrap-validator/css/bootstrapValidator.min.css');?>">
|
||||
<style type="text/css">
|
||||
.has-error .help-block {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="nav-md">
|
||||
<div class="container body">
|
||||
<div class="main_container">
|
||||
|
||||
<?php $this->load->view('admin/sidebar'); ?>
|
||||
|
||||
<?php $this->load->view('admin/topnavbar'); ?>
|
||||
|
||||
<!-- page content -->
|
||||
<div class="modal fade" id="sini_modalnya" aria-hidden="true" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="getCroppedCanvasTitle">Detail Buku</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-xs-12">
|
||||
<div id="sini_input_edit">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div id="sini_footer" style="display: inline;"></div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_col" role="main">
|
||||
|
||||
<?php $this->load->view('admin/menu_atas'); ?>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5 col-sm-5 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>Form Penambahan Buku<!-- <small>different form elements</small> --></h2>
|
||||
<!-- <ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#">Settings 1</a>
|
||||
</li>
|
||||
<li><a href="#">Settings 2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
</ul> -->
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<!-- <br /> -->
|
||||
<form class="form-horizontal form-label-left input_mask" id="sini_form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Judul</label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<!-- <input type="text" class="form-control" placeholder="Judul Buku" data-bv-notempty="true" data-bv-notempty-message="Judul Buku Harus Terisi" name="judul" id="judul"> -->
|
||||
<textarea style="resize: none;" class="form-control" placeholder="Judul Buku" data-bv-notempty="true" data-bv-notempty-message="Judul Buku Harus Terisi" name="judul" id="judul"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Kategori </label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<select class="form-control" data-bv-notempty="true" data-bv-notempty-message="Kategori Harus Terpilih" name="kategori" id="kategori">
|
||||
<option disabled="" selected="">-Pilih Kategori Buku</option>
|
||||
<?php foreach ($list_kategori->result() as $key => $value): ?>
|
||||
<option value="<?=$value->no?>"><?=$value->kategori?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Pengarang </label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<!-- <input class="date-picker form-control col-md-7 col-xs-12" required="required" type="text" data-bv-notempty="true" data-bv-notempty-message="Pengarang Harus Terisi" name="pengarang" id="pengarang"> -->
|
||||
<textarea style="resize: none;" placeholder="Pengarang Buku" class="form-control" required="required" type="text" data-bv-notempty="true" data-bv-notempty-message="Pengarang Harus Terisi" name="pengarang" id="pengarang"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Tahun Terbit </label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<select class="form-control" data-bv-notempty="true" data-bv-notempty-message="Tahun Terbit Harus Terpilih" name="tahun_terbit" id="tahun_terbit">
|
||||
<option disabled="" selected="">-Pilih Tahun Terbit</option>
|
||||
<?php
|
||||
for ($i=1992; $i < date('Y'); $i++) { ?>
|
||||
<option value="<?=$i?>"><?=$i?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Tingkat Ke</label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<input type="hidden" id="sini_html" >
|
||||
<select class="form-control" name="tingkat" id="tingkat">
|
||||
<option selected="" disabled="">-Pilih Tingkat Ke</option>
|
||||
<option value="1">Tingkat 1</option>
|
||||
<option value="2">Tingkat 2</option>
|
||||
<option value="3">Tingkat 3</option>
|
||||
<option value="4">Tingkat 4</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-md-3 col-sm-3 col-xs-12">Peletakan Buku </label>
|
||||
<div class="col-md-9 col-sm-9 col-xs-12">
|
||||
<select class="form-control">
|
||||
<option disabled="" selected="">-Pilih Tempat / Rak Buku</option>
|
||||
<option>Option one</option>
|
||||
<option>Option two</option>
|
||||
<option>Option three</option>
|
||||
<option>Option four</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-3">
|
||||
<button type="reset" class="btn btn-danger">Cancel</button>
|
||||
<!-- <button class="btn btn-warning" type="reset">Reset</button> -->
|
||||
<button type="submit" class="btn btn-success" id="tambah">Tambah Buku</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7 col-sm-7 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>List Buku</h2>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content" style="overflow: auto">
|
||||
<table id="table1" class="table table-striped table-bordered" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th>No</th> -->
|
||||
<th>Judul</th>
|
||||
<th>Kategori</th>
|
||||
<th>Pengarang</th>
|
||||
<th>Tahun Terbit</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
<?php $this->load->view('admin/footer'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('admin/script'); ?>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||
<!-- <script src="<?=base_url()?>/assets_admin/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script> -->
|
||||
<!-- <script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.print.min.js"></script> -->
|
||||
<script src="<?php echo base_url('sweet-alert/bootstrap-validator/js/bootstrapValidator.min.js'); ?>"></script>
|
||||
<script src="<?=base_url()?>sweet-alert/block/jquery.blockUI.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#sini_form').bootstrapValidator({
|
||||
message: 'This value is not valid',
|
||||
feedbackIcons: {
|
||||
// valid: 'fa fa-check',
|
||||
invalid: 'fa fa-close',
|
||||
validating: 'fa fa-circle-o-notch'
|
||||
},
|
||||
excluded: ':disabled'
|
||||
})
|
||||
|
||||
$("#tambah").click(function (){
|
||||
$('#sini_form').submit();
|
||||
var data = $('#sini_form').serializeArray();
|
||||
var error = $('#sini_form').find(".has-error").length;
|
||||
console.log(error)
|
||||
if (error == 0) {
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/buku",
|
||||
type: 'post',
|
||||
data: {data : data, proses : 'tambah'},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$.blockUI({
|
||||
message: "<h3>Pesanan Sedang Diproses</h3>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
} });
|
||||
},
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
window.open('<?=base_url()?>admin/print/'+response, '_blank');
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var table;
|
||||
$(document).ready(function() {
|
||||
|
||||
//datatables
|
||||
table = $('#table1').DataTable({
|
||||
// "searching": false,
|
||||
"ordering": false,
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"order": [],
|
||||
|
||||
"ajax": {
|
||||
"url": "<?php echo base_url('admin/buku/tables')?>",
|
||||
"type": "POST"
|
||||
},
|
||||
|
||||
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 0 ],
|
||||
"orderable": false,
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
$(document).off("click", ".lihat_informasi").on("click", ".lihat_informasi",async function () {
|
||||
var judul = $(this).data('judul');
|
||||
var id = $(this).data('nonya');
|
||||
var kategori = $(this).data('kategori');
|
||||
var tahun_terbit = $(this).data('tahun_terbit');
|
||||
var pengarang = $(this).data('pengarang');
|
||||
var tingkat = $(this).data('tingkat');
|
||||
console.log(id);
|
||||
// console.log(kategori);
|
||||
// console.log(tahun_terbit);
|
||||
// console.log(pengarang);
|
||||
var body = '<div class="form-group"><label class="control-label">Judul Buku</label><textarea class="form-control" style="resize :none" id="judul_edit" disabled="">'+judul+'</textarea><div>';
|
||||
body += '<div class="form-group"><label class="control-label">Kategori</label>';
|
||||
body +='<select class="form-control" name="tingkat" id="kategori_edit" disabled>';
|
||||
body +='<option disabled="">-Pilih Kategori Buku</option>';
|
||||
|
||||
var ini_dia = $.ajax({
|
||||
url: "<?=base_url()?>admin/buku",
|
||||
type: 'post',
|
||||
data: {proses : "cek_kategori"},
|
||||
async : false
|
||||
// dataType: 'json',
|
||||
// success: function (response) {
|
||||
// var response = JSON.parse(response);
|
||||
// // console.log(response);
|
||||
// response.forEach(function(e) {
|
||||
// if (e.no == kategori) {
|
||||
// body +='<option selected="" value="'+e.no+'">'+e.kategori+'</option>';
|
||||
// }else{
|
||||
// body +='<option value="'+e.no+'">'+e.kategori+'</option>';
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// // console.log('gagal');
|
||||
// swal({
|
||||
// // title: "Submit Keperluan ?",
|
||||
// text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
// icon: "warning",
|
||||
// buttons: {
|
||||
// cancel: false,
|
||||
// confirm: true,
|
||||
// },
|
||||
// // dangerMode: true,
|
||||
// })
|
||||
// .then((hehe) =>{
|
||||
// location.reload();
|
||||
// });
|
||||
// }
|
||||
});
|
||||
ini_dia = JSON.parse(ini_dia.responseText);
|
||||
ini_dia.forEach(function(e) {
|
||||
if (e.no == kategori) {
|
||||
body +='<option selected="" value="'+e.no+'">'+e.kategori+'</option>';
|
||||
}else{
|
||||
body +='<option value="'+e.no+'">'+e.kategori+'</option>';
|
||||
}
|
||||
});
|
||||
console.log(ini_dia)
|
||||
// await sleep(200);
|
||||
body += '</select></div>';
|
||||
body += '<div class="form-group"><label class="control-label">Pengarang Buku</label><textarea class="form-control" style="resize :none" id="pengarang_edit" disabled="">'+pengarang+'</textarea><div>';
|
||||
// console.log(body);
|
||||
body += '<div class="form-group"><label class="control-label">Tahun Terbit</label>';
|
||||
body += '<select class="form-control" id="tahun_terbit_edit" disabled="">';
|
||||
body += '<option disabled="">-Pilih Tahun Terbit</option>'
|
||||
for (var i = 1992; i <= new Date().getFullYear(); i++) {
|
||||
if (i == tahun_terbit) {
|
||||
body += '<option selected="" value="'+i+'">'+i+'</option>';
|
||||
}else{
|
||||
body += '<option value="'+i+'">'+i+'</option>';
|
||||
}
|
||||
}
|
||||
body += '</select></div>';
|
||||
body += '<div class="form-group"><label class="control-label">Tingkat</label>';
|
||||
body += '<select class="form-control" id="tingkat_edit" disabled="">';
|
||||
body += '<option disabled="">-Pilih Tingkat Ke</option>'
|
||||
for (var i = 1; i <= 4; i++) {
|
||||
if (i == tingkat) {
|
||||
body += '<option selected="" value="'+i+'">'+i+'</option>';
|
||||
}else{
|
||||
body += '<option value="'+i+'">'+i+'</option>';
|
||||
}
|
||||
}
|
||||
body += '</select></div>';
|
||||
|
||||
// body += '<div class="form-group"><label class="control-label">Peta Kategori</label></div>';
|
||||
$("#sini_input_edit").html(body);
|
||||
var footer = '<button type="button" class="edit_buku_button btn btn-info" onclick="edit_buku('+id+','+"'"+judul+"'"+','+"'"+kategori+"'"+','+"'"+pengarang+"'"+','+tahun_terbit+','+tingkat+')">Edit Kategori</button><button type="button" class="btn btn-danger" onclick="hapus_buku('+id+')">Hapus Kategori</button>';
|
||||
$("#sini_footer").html(footer);
|
||||
|
||||
})
|
||||
|
||||
function edit_buku(id,judul,kategori,pengarang,tahun_terbit,tingkat){
|
||||
console.log(id+ ', '+tingkat)
|
||||
$("#judul_edit").removeAttr('disabled');
|
||||
$("#kategori_edit").removeAttr('disabled');
|
||||
$("#pengarang_edit").removeAttr('disabled');
|
||||
$("#tahun_terbit_edit").removeAttr('disabled');
|
||||
$("#tingkat_edit").removeAttr('disabled');
|
||||
$(".edit_buku_button").attr({
|
||||
'class' : 'edit_buku_button btn btn-primary',
|
||||
'onclick' : 'edit_buku_konfirm('+id+',"'+judul+'","'+kategori+'","'+pengarang+'",'+tahun_terbit+','+tingkat+')'
|
||||
})
|
||||
}
|
||||
|
||||
function edit_buku_konfirm(id,judul,kategori,pengarang,tahun_terbit,tingkat) {
|
||||
|
||||
var judul_edit = $("#judul_edit").val();
|
||||
var kategori_edit = $("#kategori_edit").val();
|
||||
var pengarang_edit = $("#pengarang_edit").val();
|
||||
var tahun_terbit_edit = $("#tahun_terbit_edit").val();
|
||||
var tingkat_edit = $("#tingkat_edit").val();
|
||||
|
||||
if (judul_edit == judul && kategori_edit == kategori && pengarang_edit == pengarang && tahun_terbit_edit == tahun_terbit && tingkat_edit == tingkat) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
toastr.warning("<center><b>Belum Ada Perubahan Data Buku</b></center>");
|
||||
$("#judul_edit").focus();
|
||||
}else{
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/buku",
|
||||
type: 'post',
|
||||
data: {proses : "edit" , id : id, judul : judul_edit , kategori : kategori_edit , pengarang : pengarang_edit , tahun_terbit : tahun_terbit_edit, tingkat : tingkat_edit},
|
||||
// dataType: 'json',\
|
||||
beforeSend: function(res) {
|
||||
$("#sini_modalnya").modal("hide");
|
||||
$.blockUI({
|
||||
message: "<h4>Informasi Buku Sedang Diedit</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function hapus_buku(id){
|
||||
swal({
|
||||
title: "Yakin ingin hapus buku ini?",
|
||||
text: " Buku akan terhapus permanen dari sistem",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((logout) => {
|
||||
if (logout) {
|
||||
// console.log(id)
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/buku",
|
||||
type: 'post',
|
||||
data: {proses : "hapus_datanya", id : id},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$("#sini_modalnya").modal("hide");
|
||||
$.blockUI({
|
||||
message: "<h4>Kategori Sedang Diedit</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
|
||||
console.log(response);
|
||||
|
||||
// $("#sini_html").html(response);
|
||||
//
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
807
application/views/admin/menu/kategori.php
Normal file
807
application/views/admin/menu/kategori.php
Normal file
@ -0,0 +1,807 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php $this->load->view('admin/head'); ?>
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
|
||||
<!-- <link href="<?=base_url()?>assets/datatables/jquery.dataTables.min.css" rel="stylesheet"> -->
|
||||
</head>
|
||||
|
||||
<body class="nav-md">
|
||||
<div class="container body">
|
||||
<div class="main_container">
|
||||
|
||||
<?php $this->load->view('admin/sidebar'); ?>
|
||||
|
||||
<?php $this->load->view('admin/topnavbar'); ?>
|
||||
|
||||
<!-- page content -->
|
||||
<div class="right_col" role="main">
|
||||
|
||||
<?php $this->load->view('admin/menu_atas'); ?>
|
||||
|
||||
<div class="modal fade" id="sini_modalnya" aria-hidden="true" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog" style="width:95%;max-width: 1121px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="getCroppedCanvasTitle">Peta Perpustakaan</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div id="sini_input_edit"></div>
|
||||
<div class="form-group" style="overflow-x: auto">
|
||||
<center>
|
||||
<canvas id="c" width="1050" height="950" style="border:1px solid #ccc;"></canvas>
|
||||
<input type="hidden" id="id_rak_buku_edit" name="rak_buku">
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div id="sini_footer" style="display: inline;"></div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5 col-sm-6 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>Form Penambahan Kategori<!-- <small>different form elements</small> --></h2>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<!-- <br /> -->
|
||||
<form class="form-horizontal form-label-left input_mask" id="sini_form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4 col-sm-4 col-xs-12">Kategori Baru</label>
|
||||
<div class="col-md-8 col-sm-8 col-xs-12">
|
||||
<!-- <input type="hidden" id="sini_html" > -->
|
||||
<input type="text" class="form-control" placeholder="Masukkan Kategori Baru" name="kategori" id="kategori">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4 col-sm-4 col-xs-12">Foto Penempatan </label>
|
||||
<div class="col-md-8 col-sm-8 col-xs-12">
|
||||
<a data-toggle="modal" class="tampilkan_modal" href="#sini_modalnya" ><button style="width: 100%" class="btn btn-primary" id="button_tambah_rak">Pilih Penempatan Kategori</button></a>
|
||||
<input type="hidden" id="id_rak_buku_terpilih" name="rak_buku">
|
||||
<input type="hidden" id="sini_html" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4 col-sm-4 col-xs-12">Foto Rak Buku </label>
|
||||
<div class="col-md-8 col-sm-8 col-xs-12">
|
||||
<input data-bv-notempty="true" data-bv-notempty-message="Foto Minimal 1" type="file" name="files" id="files" class="form-control" onchange="previewImage(0);" >
|
||||
<div id="ubah_sini" style="text-align: center"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ln_solid"></div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 col-md-offset-3">
|
||||
<button type="button" class="btn btn-warning" onclick="reset1()">Reset</button>
|
||||
<button type="button" class="btn btn-success" onclick="tambah()">Tambah Kategori</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7 col-sm-6 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>List Kategori</h2>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content" style="overflow: auto">
|
||||
<table id="table1" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Kategori</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
<?php $this->load->view('admin/footer'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('admin/script'); ?>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||
<!-- <script src="<?=base_url()?>/assets_admin/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js"></script> -->
|
||||
<!-- <script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons/js/buttons.print.min.js"></script> -->
|
||||
<script src="<?=base_url()?>sweet-alert/block/jquery.blockUI.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function reset1(){
|
||||
console.log("sini");
|
||||
$("#kategori").val(null);
|
||||
$("#id_rak_buku_terpilih").val(null);
|
||||
$('#files').val(null);
|
||||
$('#ubah_sini').html("");
|
||||
// $("#tingkat").val(null);
|
||||
// $("#tingkat").val($("#tingkat option:first").val());
|
||||
$("#button_tambah_rak").html("Pilih Penempatan Kategori");
|
||||
$("#button_tambah_rak").removeAttr("disabled");
|
||||
}
|
||||
|
||||
var kategori = $("#kategori");
|
||||
var rak_buku = $("#id_rak_buku_terpilih");
|
||||
// var tingkat = $("#tingkat");
|
||||
// var nama_foto = foto.files[0]['name'];
|
||||
// nama_foto = nama_foto.split('.').pop().trim();
|
||||
// console.log(nama_foto);
|
||||
function tambah(){
|
||||
var data = $('#sini_form').serializeArray();
|
||||
// console.log(kategori.val());
|
||||
// console.log(foto.files[0]['name']);
|
||||
// console.log(foto.files[0]['size']);
|
||||
if (kategori.val() == "" || kategori.val() == null) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
toastr.error("<center><b>Inputan Kategori Tidak Bisa Kosong</b></center>");
|
||||
kategori.focus();
|
||||
}
|
||||
else if (rak_buku.val() == "" || rak_buku.val() == null) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
toastr.error("<center><b>Rak Buku Harus Terpilih</b></center>");
|
||||
$(".tampilkan_modal").click();
|
||||
}
|
||||
|
||||
else{
|
||||
if ($("#files")[0].files.length == 0) {
|
||||
$('#files').val(null);
|
||||
toastnya('files','Maksimal 1 Foto diupload')
|
||||
$('#ubah_sini').html("");
|
||||
}
|
||||
else
|
||||
{
|
||||
// console.log(data)
|
||||
let form_data = new FormData();
|
||||
data = JSON.stringify(data);
|
||||
form_data.append('data', data);
|
||||
form_data.append('proses', 'tambah');
|
||||
form_data.append("files", document.getElementById('files').files[0]);
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: form_data,
|
||||
// data: {proses : "tambah",data : data},
|
||||
contentType: false,
|
||||
processData: false,
|
||||
|
||||
beforeSend: function(res) {
|
||||
$.blockUI({
|
||||
message: "<h4>Kategori Sedang Ditambah</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
location.reload();
|
||||
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var table;
|
||||
$(document).ready(function() {
|
||||
|
||||
//datatables
|
||||
table = $('#table1').DataTable({
|
||||
// "searching": false,
|
||||
// "ordering": false,
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"order": [],
|
||||
|
||||
"ajax": {
|
||||
"url": "<?php echo base_url('admin/kategori/tables')?>",
|
||||
"type": "POST"
|
||||
},
|
||||
|
||||
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 0 ],
|
||||
"orderable": false,
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script src="<?=base_url()?>assets/fabric.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var canvas = this.__canvas = new fabric.Canvas('c');
|
||||
// create a rect object
|
||||
|
||||
|
||||
fabric.Object.prototype.transparentCorners = true;
|
||||
// fabric.Object.prototype.cornerColor = 'blue';
|
||||
fabric.Object.prototype.cornerStyle = 'circle';
|
||||
|
||||
|
||||
|
||||
$(document).off("click", ".tampilkan_modal").on("click", ".tampilkan_modal", function () {
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: {proses : "cari_semuanya"},
|
||||
// dataType: 'json',
|
||||
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
$("#sini_input_edit").html("");
|
||||
$("#sini_footer").html("");
|
||||
$("#sini_html").html(response);
|
||||
//
|
||||
// location.reload();
|
||||
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var edit_foto_num = 0;
|
||||
$(document).off("click", ".lihat_informasi").on("click", ".lihat_informasi", function () {
|
||||
var rak = $(this).data('rak');
|
||||
var id = $(this).data('id');
|
||||
// console.log(id);
|
||||
var kategori = $(this).data('kategori');
|
||||
// var tingkat = $(this).data('tingkat');
|
||||
var body = '<div class="form-group"><label class="control-label">Kategori</label><input type="text" class="form-control" value="'+kategori+'" name="kategori" id="kategori_edit" disabled=""><div><br>';
|
||||
|
||||
body += '<div class="form-group"><label class="control-label">Foto Rak</label><div id="sini_foto_edit"></div><input data-bv-notempty="true" data-bv-notempty-message="Foto Minimal 1" type="file" name="files" id="files_edit" class="form-control" onchange="previewImage(1);" style="display :none"><div id="ubah_sini_edit"></div><br><button type="button" id="button_foto_edit" class="btn btn-warning" onclick="edit_foto()" style="display : none">Upload Foto Baru</button><div><br>';
|
||||
|
||||
body += '<div class="form-group"><label class="control-label">Peta Kategori</label></div>';
|
||||
$("#sini_input_edit").html(body);
|
||||
var footer = '<button type="button" class="edit_kategori_button btn btn-info" onclick="edit_kategori('+id+','+rak+','+"'"+kategori+"'"+')">Edit Kategori</button><button type="button" class="btn btn-danger" onclick="hapus_kategori('+id+')">Hapus Kategori</button>';
|
||||
$("#sini_footer").html(footer);
|
||||
|
||||
let foto = $.ajax({
|
||||
url: "<?=base_url()?>admin/",
|
||||
type: 'post',
|
||||
async : false,
|
||||
data: {id : id, proses : 'cek_foto_detail'},
|
||||
});
|
||||
// console.log(foto.responseText)
|
||||
$("#sini_foto_edit").html(foto.responseText)
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: {proses : "cari_semuanya_id", rak : rak},
|
||||
// dataType: 'json',
|
||||
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
|
||||
$("#sini_html").html(response);
|
||||
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
function edit_kategori(id,rak,kategori){
|
||||
// console.log(id);
|
||||
$("#id_rak_buku_edit").val(rak);
|
||||
$("#kategori_edit").removeAttr('disabled');
|
||||
$("#tingkat_edit").removeAttr('disabled');
|
||||
$(".edit_kategori_button").attr({
|
||||
'class' : 'edit_kategori_button btn btn-primary',
|
||||
'onclick' : 'konfirm_edit_kategori('+id+','+rak+',"'+kategori+'")'
|
||||
})
|
||||
$("#button_foto_edit").attr({
|
||||
'style' : 'display : block',
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: {proses : "cari_semuanya_id_edit", rak : rak},
|
||||
// dataType: 'json',
|
||||
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
|
||||
$("#sini_html").html(response);
|
||||
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#kategori_edit").focus();
|
||||
}
|
||||
|
||||
function edit_foto() {
|
||||
edit_foto_num = 1;
|
||||
$("#files_edit").attr('style','display : block');
|
||||
$("#sini_foto_edit").attr('style','display : none');
|
||||
$("#button_foto_edit").html('Cancel Upload Foto');
|
||||
$("#button_foto_edit").attr({
|
||||
'class' : 'btn btn-danger',
|
||||
'onclick' : 'cancel_foto_edit()',
|
||||
});
|
||||
}
|
||||
|
||||
function cancel_foto_edit() {
|
||||
edit_foto_num = 0;
|
||||
$("#files_edit").attr('style','display : none');
|
||||
$("#files_edit").val(null);
|
||||
$("#sini_foto_edit").attr('style','display : block');
|
||||
$("#button_foto_edit").html('Upload Foto Baru');
|
||||
$("#button_foto_edit").attr({
|
||||
'class' : 'btn btn-warning',
|
||||
'onclick' : 'edit_foto()',
|
||||
});
|
||||
}
|
||||
|
||||
function konfirm_edit_kategori(id,e,f){
|
||||
console.log(edit_foto_num)
|
||||
var id = id;
|
||||
var kategori = $("#kategori_edit").val();
|
||||
// var tingkat = $("#tingkat_edit").val();
|
||||
var rak = $("#id_rak_buku_edit").val();
|
||||
if (e == rak && f == kategori && edit_foto_num == 0 ) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
toastr.warning("<center><b>Belum Ada Data Yang Berubah</b></center>");
|
||||
$("#kategori_edit").focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (edit_foto_num == 0) {
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: {proses : "edit_datanya", id : id, rak : rak, kategori : kategori, foto : 0},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$("#sini_modalnya").modal("hide");
|
||||
$.blockUI({
|
||||
message: "<h4>Kategori Sedang Diedit</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
|
||||
console.log(response);
|
||||
|
||||
// $("#sini_html").html(response);
|
||||
//
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (edit_foto_num == 1)
|
||||
{
|
||||
if ($("#files_edit")[0].files.length == 0) {
|
||||
$('#files_edit').val(null);
|
||||
toastnya('files_edit','Maksimal 1 Foto diupload')
|
||||
$('#ubah_sini_edit').html("");
|
||||
}
|
||||
else
|
||||
{
|
||||
let form_data = new FormData();
|
||||
form_data.append('proses', 'edit_datanya');
|
||||
form_data.append('rak', rak);
|
||||
form_data.append('id', id);
|
||||
form_data.append('kategori', kategori);
|
||||
form_data.append('foto', 1);
|
||||
form_data.append("files", document.getElementById('files_edit').files[0]);
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data : form_data,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
// data: {proses : "edit_datanya", id : id, rak : rak, kategori : kategori},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$("#sini_modalnya").modal("hide");
|
||||
$.blockUI({
|
||||
message: "<h4>Kategori Sedang Diedit</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
|
||||
console.log(response);
|
||||
|
||||
// $("#sini_html").html(response);
|
||||
//
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function hapus_kategori(id){
|
||||
swal({
|
||||
title: "Yakin ingin hapus kategori ini?",
|
||||
text: "Kategori & List Buku yang dimasukkan dalam kategori ini akan terhapus permanen",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((logout) => {
|
||||
if (logout) {
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/kategori",
|
||||
type: 'post',
|
||||
data: {proses : "hapus_datanya", id : id},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$("#sini_modalnya").modal("hide");
|
||||
$.blockUI({
|
||||
message: "<h4>Kategori Sedang Diedit</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
|
||||
console.log(response);
|
||||
|
||||
// $("#sini_html").html(response);
|
||||
//
|
||||
location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function toastnya(id,mesej){
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
|
||||
toastr.error("<center>"+mesej+"</center>");
|
||||
$("#"+id).focus();
|
||||
}
|
||||
|
||||
function previewImage(e) {
|
||||
if (e == 0) {
|
||||
var file = document.getElementById('files');
|
||||
var nama_file = 'files'
|
||||
var ubah = 'ubah_sini'
|
||||
var nomor = 0
|
||||
}
|
||||
else if (e == 1) {
|
||||
var file = document.getElementById('files_edit');
|
||||
var nama_file = 'files_edit'
|
||||
var ubah = 'ubah_sini_edit'
|
||||
var nomor = 1
|
||||
}
|
||||
|
||||
if ($("#"+nama_file)[0].files.length == 0) {
|
||||
$("#"+nama_file).val(null);
|
||||
toastnya(nama_file,'Maksimal 1 Foto diupload')
|
||||
$('#'+ubah).html("");
|
||||
}
|
||||
else if (cek_nama_foto(nomor) == 0) {
|
||||
// console.log('foto salah')
|
||||
$('#'+ubah).html("");
|
||||
$("#"+nama_file).val(null);
|
||||
toastnya(nama_file,'Foto harus berektensi .jpg , .jpeg dan .png')
|
||||
}
|
||||
else if (cek_nama_foto(nomor) == 2) {
|
||||
// console.log('foto salah')
|
||||
$('#'+ubah).html("");
|
||||
$('#'+nama_file).val(null);
|
||||
toastnya(nama_file,'Saiz foto maksimal 1.5 mb')
|
||||
}
|
||||
else{
|
||||
var text = ''
|
||||
ii = 0 ;
|
||||
for (var i = 0; i < file.files.length; i++) {
|
||||
var oFReader = new FileReader();
|
||||
oFReader.readAsDataURL(document.getElementById(nama_file).files[i]);
|
||||
|
||||
oFReader.onload = function(oFREvent) {
|
||||
// document.getElementById("image-preview").src = oFREvent.target.result;
|
||||
// console.log(oFREvent.target.result);
|
||||
|
||||
// text+='<center><img class="example-image" src="'+oFREvent.target.result+'" width="100px" height="100px" alt=""/></center>';
|
||||
if (ii==0) {
|
||||
// text +='<center> <a class="example-image-link" href="'+oFREvent.target.result+'" data-lightbox="example-set" >Klik Untuk Melihat Foto</a></center>';
|
||||
text+='<br><center><img class="example-image" src="'+oFREvent.target.result+'" width="100px" height="100px" alt=""/></center>';
|
||||
console.log(ii);
|
||||
}
|
||||
if (ii > 0) {
|
||||
text+='<center> <a class="example-image-link" href="'+oFREvent.target.result+'" data-lightbox="example-set" ></a></center>';
|
||||
console.log('heeh');
|
||||
}
|
||||
// console.log(ii);
|
||||
$('#'+ubah).html(text);
|
||||
ii += 1;
|
||||
};
|
||||
// console.log(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cek_nama_foto(e){
|
||||
let id;
|
||||
if (e == 0) {
|
||||
id = "#files";
|
||||
}else if (e == 1) {
|
||||
id = "#files_edit";
|
||||
}
|
||||
var kembali = 0
|
||||
for (var i = 0; i < $(id)[0].files.length; i++) {
|
||||
var name = $(id)[0].files[i].name;
|
||||
var size = $(id)[0].files[i].size;
|
||||
name = name.split('.').pop().trim();
|
||||
// console.log(name);
|
||||
if (name !== 'jpg' && name !== 'jpeg' && name !== 'png') {
|
||||
kembali = 0
|
||||
}
|
||||
else if (size > 1000000) {
|
||||
kembali = 2
|
||||
}
|
||||
else{
|
||||
kembali = 1
|
||||
}
|
||||
}
|
||||
return kembali
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
// function sleep(ms) {
|
||||
// return new Promise(resolve => setTimeout(resolve, ms));
|
||||
// }
|
||||
// hehe();
|
||||
// async function hehe (){
|
||||
// await sleep(1000);
|
||||
// $("#sini_htmlnya").html('<script src="<?=base_url()?>assets/dist/js/lightbox-plus-jquery.min.js"></'+'script>');
|
||||
// }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
501
application/views/admin/menu/rak_buku.php
Normal file
501
application/views/admin/menu/rak_buku.php
Normal file
@ -0,0 +1,501 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php $this->load->view('admin/head'); ?>
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
|
||||
<link href="<?=base_url()?>/assets_admin/vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="<?php echo base_url('sweet-alert/bootstrap-validator/css/bootstrapValidator.min.css');?>">
|
||||
<style type="text/css">
|
||||
.has-error .help-block {
|
||||
color: red;
|
||||
}
|
||||
.controls {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="nav-md">
|
||||
<div class="container body">
|
||||
<div class="main_container">
|
||||
|
||||
<?php $this->load->view('admin/sidebar'); ?>
|
||||
|
||||
<?php $this->load->view('admin/topnavbar'); ?>
|
||||
|
||||
<!-- page content -->
|
||||
<div class="right_col" role="main">
|
||||
|
||||
<?php $this->load->view('admin/menu_atas'); ?>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2 style="font-weight: bold;">Form Map Perpustakaan</h2>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<center>
|
||||
<div class="form-horizontal" style="overflow-x: auto">
|
||||
<button id="add" onclick="Add()" class="btn btn-success" style="font-weight: bold;">Tambah Rak Buku</button>
|
||||
<button id="add" onclick="Add_meja()" class="btn btn-success" style="font-weight: bold;">Tambah Meja</button>
|
||||
<button id="add" onclick="Add_kursi()" class="btn btn-success" style="font-weight: bold;">Tambah Kursi</button>
|
||||
<br><br>
|
||||
|
||||
<div class="form-group fabric-canvas-wrapper">
|
||||
<input type="hidden" id="sini_idnya" >
|
||||
<input type="hidden" id="sini_html" >
|
||||
<canvas id="c" width="1050" height="950" style="border:1px solid #ccc;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
<?php $this->load->view('admin/footer'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('admin/script'); ?>
|
||||
|
||||
<script src="<?=base_url()?>sweet-alert/block/jquery.blockUI.js"></script>
|
||||
<script src="<?=base_url()?>assets/fabric.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function resizeCanvas() {
|
||||
const outerCanvasContainer = $('.fabric-canvas-wrapper')[0];
|
||||
|
||||
const ratio = canvas.getWidth() / canvas.getHeight();
|
||||
const containerWidth = outerCanvasContainer.clientWidth;
|
||||
const containerHeight = outerCanvasContainer.clientHeight;
|
||||
|
||||
const scale = containerWidth / canvas.getWidth();
|
||||
const zoom = canvas.getZoom() * scale;
|
||||
canvas.setDimensions({width: containerWidth, height: containerWidth / ratio});
|
||||
canvas.setViewportTransform([zoom, 0, 0, zoom, 0, 0]);
|
||||
}
|
||||
$(window).resize(resizeCanvas);
|
||||
var canvas = this.__canvas = new fabric.Canvas('c');
|
||||
// create a rect object
|
||||
var deleteIcon = "data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3C!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3E%3Csvg version='1.1' id='Ebene_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='595.275px' height='595.275px' viewBox='200 215 230 470' xml:space='preserve'%3E%3Ccircle style='fill:%23F44336;' cx='299.76' cy='439.067' r='218.516'/%3E%3Cg%3E%3Crect x='267.162' y='307.978' transform='matrix(0.7071 -0.7071 0.7071 0.7071 -222.6202 340.6915)' style='fill:white;' width='65.545' height='262.18'/%3E%3Crect x='266.988' y='308.153' transform='matrix(0.7071 0.7071 -0.7071 0.7071 398.3889 -83.3116)' style='fill:white;' width='65.544' height='262.179'/%3E%3C/g%3E%3C/svg%3E";
|
||||
|
||||
var img = document.createElement('img');
|
||||
img.src = deleteIcon;
|
||||
|
||||
fabric.Object.prototype.transparentCorners = false;
|
||||
fabric.Object.prototype.cornerColor = 'blue';
|
||||
fabric.Object.prototype.cornerStyle = 'circle';
|
||||
|
||||
// function sleep(ms) {
|
||||
// return new Promise(resolve => setTimeout(resolve, ms));
|
||||
// }
|
||||
|
||||
function Add() {
|
||||
// console.log('Taking a break...');
|
||||
const aa = $.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "cek_id"},
|
||||
async : false
|
||||
});
|
||||
// await sleep(1000);
|
||||
// console.log(aa.responseText)
|
||||
var rect = new fabric.Rect({
|
||||
id : "rak_buku_" + aa.responseText,
|
||||
angle:0,
|
||||
left: 400,
|
||||
top: 350,
|
||||
fill: 'aqua',
|
||||
width: 150,
|
||||
height: 50,
|
||||
objectCaching: false,
|
||||
stroke: 'blue',
|
||||
strokeWidth: 4,
|
||||
});
|
||||
var datanya = '{"left":"400","top":"350","width":"150","height":"50","angle":"0"}';
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
simpan(datanya,"simpan","rak_buku",null);
|
||||
canvas.setActiveObject(rect);
|
||||
}
|
||||
|
||||
function Add_meja() {
|
||||
// console.log('Taking a break...');
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "cek_id"},
|
||||
// dataType: 'json',
|
||||
// success: function (response) {
|
||||
// $("#sini_idnya").val(response);
|
||||
// // location.reload();
|
||||
// }
|
||||
|
||||
}).then(res => {
|
||||
var rect = new fabric.Rect({
|
||||
id : "meja_" + res,
|
||||
angle:0,
|
||||
left: 400,
|
||||
top: 350,
|
||||
fill: 'orange',
|
||||
width: 75,
|
||||
height: 75,
|
||||
objectCaching: false,
|
||||
stroke: 'yellow',
|
||||
strokeWidth: 2,
|
||||
cornerSize: 6
|
||||
});
|
||||
var datanya = '{"left":"400","top":"350","width":"75","height":"75","angle":"0"}';
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
simpan(datanya,"simpan","meja",null);
|
||||
canvas.setActiveObject(rect);
|
||||
})
|
||||
// await sleep(1000);
|
||||
|
||||
}
|
||||
|
||||
function Add_kursi() {
|
||||
// console.log('Taking a break...');
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "cek_id"},
|
||||
// async: false,
|
||||
// dataType: 'json',
|
||||
// success: function (response) {
|
||||
// $("#sini_idnya").val(response);
|
||||
// // location.reload();
|
||||
// }
|
||||
|
||||
}).then(res =>{
|
||||
// console.log(res)
|
||||
var rect = new fabric.Rect({
|
||||
id : "kursi_" + res,
|
||||
angle:0,
|
||||
left: 400,
|
||||
top: 350,
|
||||
fill: 'lime',
|
||||
width: 25,
|
||||
height: 25,
|
||||
objectCaching: false,
|
||||
stroke: 'green',
|
||||
strokeWidth: 1,
|
||||
cornerSize: 3
|
||||
});
|
||||
var datanya = '{"left":"400","top":"350","width":"25","height":"25","angle":"0"}';
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
simpan(datanya,"simpan","kursi",null);
|
||||
canvas.setActiveObject(rect);
|
||||
})
|
||||
// .catch(err => {
|
||||
// console.log(err);
|
||||
// })
|
||||
// console.log($("#sini_idnya").val())
|
||||
// await sleep(1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function AddRakBuku(left,top,width,height,id,angle){
|
||||
var rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "rak_buku_"+id,
|
||||
left: left,
|
||||
top: top,
|
||||
fill: 'aqua',
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: 'blue',
|
||||
strokeWidth: 4,
|
||||
centeredRotation: false,
|
||||
});
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
}
|
||||
|
||||
function AddMeja(left,top,width,height,id,angle){
|
||||
var rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "meja_"+id,
|
||||
left: left,
|
||||
top: top,
|
||||
fill: 'orange',
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: 'yellow',
|
||||
strokeWidth: 2,
|
||||
centeredRotation: false,
|
||||
cornerSize: 6
|
||||
});
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
}
|
||||
|
||||
function AddKursi(left,top,width,height,id,angle){
|
||||
var rect = new fabric.Rect({
|
||||
angle : angle,
|
||||
id : "kursi_"+id,
|
||||
left: left,
|
||||
top: top,
|
||||
fill: 'lime',
|
||||
width: width,
|
||||
height: height,
|
||||
objectCaching: false,
|
||||
stroke: 'green',
|
||||
strokeWidth: 1,
|
||||
centeredRotation: false,
|
||||
cornerSize: 3
|
||||
});
|
||||
|
||||
// console.log(rect);
|
||||
canvas.add(rect);
|
||||
}
|
||||
|
||||
fabric.Object.prototype.controls.deleteControl = new fabric.Control({
|
||||
x: 0.5,
|
||||
y: -0.5,
|
||||
offsetY: 16,
|
||||
cursorStyle: 'pointer',
|
||||
mouseUpHandler: deleteObject,
|
||||
render: renderIcon,
|
||||
cornerSize: 24
|
||||
});
|
||||
|
||||
// AddRakBuku(600,100,200,100,"sini_1",360);
|
||||
|
||||
function deleteObject(eventData, target) {
|
||||
// console.log(target['id']);
|
||||
var id = target['id'].slice(target['id'].lastIndexOf('_') + 1);
|
||||
// console.log(id);
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "hapus" , id : id},
|
||||
// dataType: 'json',
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
var canvas = target.canvas;
|
||||
canvas.remove(target);
|
||||
canvas.requestRenderAll();
|
||||
}
|
||||
|
||||
function renderIcon(ctx, left, top, styleOverride, fabricObject) {
|
||||
var size = this.cornerSize;
|
||||
ctx.save();
|
||||
ctx.translate(left, top);
|
||||
ctx.rotate(fabric.util.degreesToRadians(fabricObject.angle));
|
||||
ctx.drawImage(img, -size/2, -size/2, size, size);
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
canvas.on('object:moved', function(options) {
|
||||
console.log(options)
|
||||
var obj = canvas.getActiveObject();
|
||||
var datanya;
|
||||
var id = options['target']['id'].slice(options['target']['id'].lastIndexOf('_') + 1);
|
||||
var kategori = options['target']['id'].slice(0,options['target']['id'].lastIndexOf('_') + 1);
|
||||
kategori = kategori.substring(0, kategori.length - 1);
|
||||
// console.log(obj);
|
||||
datanya = '{"left":"'+options['target']['left']+'","top":"'+options['target']['top']+'","width":"'+Math.floor(obj.getScaledWidth())+'","height":"'+Math.floor(obj.getScaledHeight())+'","angle":"'+options['target']['angle']+'"}';
|
||||
simpan(datanya,'update',kategori,id);
|
||||
});
|
||||
|
||||
canvas.on('object:rotated', function(options) {
|
||||
// console.log(options)
|
||||
var obj = canvas.getActiveObject();
|
||||
var datanya;
|
||||
var id = options['target']['id'].slice(options['target']['id'].lastIndexOf('_') + 1);
|
||||
var kategori = options['target']['id'].slice(0,options['target']['id'].lastIndexOf('_') + 1);
|
||||
kategori = kategori.substring(0, kategori.length - 1);
|
||||
datanya = '{"left":"'+options['target']['left']+'","top":"'+options['target']['top']+'","width":"'+Math.floor(obj.getScaledWidth())+'","height":"'+Math.floor(obj.getScaledHeight())+'","angle":"'+options['target']['angle']+'"}';
|
||||
simpan(datanya,'update',kategori,id);
|
||||
});
|
||||
|
||||
canvas.on('object:scaled', function(options) {
|
||||
var obj = canvas.getActiveObject();
|
||||
var datanya;
|
||||
var id = options['target']['id'].slice(options['target']['id'].lastIndexOf('_') + 1);
|
||||
var kategori = options['target']['id'].slice(0,options['target']['id'].lastIndexOf('_') + 1);
|
||||
kategori = kategori.substring(0, kategori.length - 1);
|
||||
datanya = '{"left":"'+options['target']['left']+'","top":"'+options['target']['top']+'","width":"'+Math.floor(obj.getScaledWidth())+'","height":"'+Math.floor(obj.getScaledHeight())+'","angle":"'+options['target']['angle']+'"}';
|
||||
simpan(datanya,'update',kategori,id);
|
||||
|
||||
});
|
||||
|
||||
// canvas.on('mouse:up', function(options) {
|
||||
// console.log(options);
|
||||
// });
|
||||
|
||||
function simpan(datanya,proses,kategori,id){
|
||||
if (proses == "simpan") {
|
||||
// console.log("sini berlaku simpan");
|
||||
// console.log(datanya);
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {data :datanya , proses : "tambah" ,kategori : kategori},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$.blockUI({
|
||||
message: "<h4>Sedang Diproses</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
$.unblockUI();
|
||||
console.log(response);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
else if (proses == "update") {
|
||||
// console.log("sini berlaku update");
|
||||
// console.log(datanya);
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {data :datanya , proses : "update" ,kategori : kategori , id : id},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$.blockUI({
|
||||
message: "<h4>Sedang Diproses</h4>",
|
||||
css: {
|
||||
border: 'none',
|
||||
padding: '15px',
|
||||
backgroundColor: '#000',
|
||||
'-webkit-border-radius': '10px',
|
||||
'-moz-border-radius': '10px',
|
||||
opacity: .5,
|
||||
color: '#fff'
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function (response) {
|
||||
$.unblockUI();
|
||||
// console.log(response);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
$.unblockUI();
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>admin/rak_buku",
|
||||
type: 'post',
|
||||
data: {proses : "cari_semuanya"},
|
||||
// dataType: 'json',
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
$("#sini_html").html(response);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// canvas.on('object:skewing', function(options) {
|
||||
// console.log(options);
|
||||
// });
|
||||
resizeCanvas();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
20
application/views/admin/menu_atas.php
Normal file
20
application/views/admin/menu_atas.php
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- top tiles -->
|
||||
<div class="row tile_count">
|
||||
<div class="col-md-4 col-sm-4 col-xs-4 tile_stats_count">
|
||||
<span class="count_top"><i class="fa fa-biik"></i> Buku</span>
|
||||
<div class="count"><?=count($list_buku->result())?></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-4 col-xs-4 tile_stats_count">
|
||||
<span class="count_top"><i class="fa fa-list"></i> Kategori</span>
|
||||
<div class="count"><?=count($list_kategori->result())?></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-4 col-xs-4 tile_stats_count">
|
||||
<span class="count_top"><i class="fa fa-list-ol"></i> Rak Buku</span>
|
||||
<div class="count"><?=count($list_rak_buku->result())?></div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /top tiles -->
|
||||
59
application/views/admin/script.php
Normal file
59
application/views/admin/script.php
Normal file
@ -0,0 +1,59 @@
|
||||
<!-- jQuery -->
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/jquery/dist/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/fastclick/lib/fastclick.js"></script>
|
||||
<!-- NProgress -->
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/nprogress/nprogress.js"></script>
|
||||
<script src="<?=base_url()?>/assets_admin/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
|
||||
<!-- Custom Theme Scripts -->
|
||||
<script src="<?=base_url()?>/assets_admin/build/js/custom.min.js"></script>
|
||||
<script src="<?=base_url()?>login_assets/js/main.js"></script>
|
||||
<script src="<?=base_url()?>sweet-alert/sweetalert.js"></script>
|
||||
<script src="<?=base_url()?>sweet-alert/toastr/toastr.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>sweet-alert/toastr/toastr.min.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
function logout(){
|
||||
swal({
|
||||
title: "Yakin ingin Logout?",
|
||||
text: "Anda akan keluar dari sistem",
|
||||
icon: "warning",
|
||||
buttons: true,
|
||||
dangerMode: true,
|
||||
})
|
||||
.then((logout) => {
|
||||
if (logout) {
|
||||
|
||||
window.location.href ='<?php echo base_url("admin/logout") ?>';
|
||||
} else {
|
||||
swal("Terima kasih kerana masih di sistem");
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?php if ($this->session->flashdata('success')): ?>
|
||||
<script type="text/javascript">
|
||||
swal({
|
||||
title: "Berhasil",
|
||||
text: "<?=$this->session->flashdata('success')?>",
|
||||
icon: "success",
|
||||
showLoaderOnConfirm: true,
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<?php elseif ($this->session->flashdata('error')): ?>
|
||||
<script type="text/javascript">
|
||||
swal({
|
||||
title: "Gagal",
|
||||
text: "<?=$this->session->flashdata('error')?>",
|
||||
icon: "error",
|
||||
showLoaderOnConfirm: true,
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php endif ?>
|
||||
37
application/views/admin/sidebar.php
Normal file
37
application/views/admin/sidebar.php
Normal file
@ -0,0 +1,37 @@
|
||||
<div class="col-md-3 left_col">
|
||||
<div class="left_col scroll-view">
|
||||
<div class="navbar nav_title" style="border: 0;">
|
||||
<a href="index.html" class="site_title"><!-- <i class="fa fa-paw"></i> --> <span>UM - PAREPARE</span></a>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<!-- menu profile quick info -->
|
||||
<div class="profile clearfix">
|
||||
<div class="profile_pic">
|
||||
<img src="<?=base_url()?>/assets_admin/images/img.jpg" alt="..." class="img-circle profile_img">
|
||||
</div>
|
||||
<div class="profile_info">
|
||||
<span>Selamat Datang,</span>
|
||||
<h2>Admin</h2>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /menu profile quick info -->
|
||||
|
||||
<br />
|
||||
|
||||
<!-- sidebar menu -->
|
||||
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
|
||||
<div class="menu_section">
|
||||
<h3>Halaman</h3>
|
||||
<ul class="nav side-menu">
|
||||
<li><a href="<?=base_url()?>admin"><i class="fa fa-home"></i> Halaman Utama</a></li>
|
||||
<li><a href="<?=base_url()?>admin/buku"><i class="fa fa-book"></i> Daftar Buku</a></li>
|
||||
<li><a href="<?=base_url()?>admin/kategori"><i class="fa fa-list"></i> Daftar Kategori</a></li>
|
||||
<li><a href="<?=base_url()?>admin/rak_buku"><i class="fa fa-archive"></i> Penempatan Rak Buku</a></li>
|
||||
<li><a onclick="logout()"><i class="fa fa-sign-out"></i> Logout </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
11
application/views/admin/topnavbar.php
Normal file
11
application/views/admin/topnavbar.php
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="top_nav">
|
||||
<div class="nav_menu">
|
||||
<nav>
|
||||
<div class="nav toggle">
|
||||
<a id="menu_toggle"><i class="fa fa-bars"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
8
application/views/errors/cli/error_404.php
Normal file
8
application/views/errors/cli/error_404.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
8
application/views/errors/cli/error_db.php
Normal file
8
application/views/errors/cli/error_db.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nDatabase error: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
21
application/views/errors/cli/error_exception.php
Normal file
21
application/views/errors/cli/error_exception.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
|
||||
An uncaught Exception was encountered
|
||||
|
||||
Type: <?php echo get_class($exception), "\n"; ?>
|
||||
Message: <?php echo $message, "\n"; ?>
|
||||
Filename: <?php echo $exception->getFile(), "\n"; ?>
|
||||
Line Number: <?php echo $exception->getLine(); ?>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
Backtrace:
|
||||
<?php foreach ($exception->getTrace() as $error): ?>
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
File: <?php echo $error['file'], "\n"; ?>
|
||||
Line: <?php echo $error['line'], "\n"; ?>
|
||||
Function: <?php echo $error['function'], "\n\n"; ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
8
application/views/errors/cli/error_general.php
Normal file
8
application/views/errors/cli/error_general.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
21
application/views/errors/cli/error_php.php
Normal file
21
application/views/errors/cli/error_php.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
|
||||
|
||||
A PHP Error was encountered
|
||||
|
||||
Severity: <?php echo $severity, "\n"; ?>
|
||||
Message: <?php echo $message, "\n"; ?>
|
||||
Filename: <?php echo $filepath, "\n"; ?>
|
||||
Line Number: <?php echo $line; ?>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
Backtrace:
|
||||
<?php foreach (debug_backtrace() as $error): ?>
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
File: <?php echo $error['file'], "\n"; ?>
|
||||
Line: <?php echo $error['line'], "\n"; ?>
|
||||
Function: <?php echo $error['function'], "\n\n"; ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
11
application/views/errors/cli/index.html
Normal file
11
application/views/errors/cli/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
64
application/views/errors/html/error_404.php
Normal file
64
application/views/errors/html/error_404.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404 Page Not Found</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
64
application/views/errors/html/error_db.php
Normal file
64
application/views/errors/html/error_db.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Database Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
32
application/views/errors/html/error_exception.php
Normal file
32
application/views/errors/html/error_exception.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>An uncaught Exception was encountered</h4>
|
||||
|
||||
<p>Type: <?php echo get_class($exception); ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $exception->getFile(); ?></p>
|
||||
<p>Line Number: <?php echo $exception->getLine(); ?></p>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
<p>Backtrace:</p>
|
||||
<?php foreach ($exception->getTrace() as $error): ?>
|
||||
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
<p style="margin-left:10px">
|
||||
File: <?php echo $error['file']; ?><br />
|
||||
Line: <?php echo $error['line']; ?><br />
|
||||
Function: <?php echo $error['function']; ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
64
application/views/errors/html/error_general.php
Normal file
64
application/views/errors/html/error_general.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Error</title>
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 12px 15px 12px 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<h1><?php echo $heading; ?></h1>
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
33
application/views/errors/html/error_php.php
Normal file
33
application/views/errors/html/error_php.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?>
|
||||
|
||||
<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">
|
||||
|
||||
<h4>A PHP Error was encountered</h4>
|
||||
|
||||
<p>Severity: <?php echo $severity; ?></p>
|
||||
<p>Message: <?php echo $message; ?></p>
|
||||
<p>Filename: <?php echo $filepath; ?></p>
|
||||
<p>Line Number: <?php echo $line; ?></p>
|
||||
|
||||
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?>
|
||||
|
||||
<p>Backtrace:</p>
|
||||
<?php foreach (debug_backtrace() as $error): ?>
|
||||
|
||||
<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?>
|
||||
|
||||
<p style="margin-left:10px">
|
||||
File: <?php echo $error['file'] ?><br />
|
||||
Line: <?php echo $error['line'] ?><br />
|
||||
Function: <?php echo $error['function'] ?>
|
||||
</p>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
11
application/views/errors/html/index.html
Normal file
11
application/views/errors/html/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
application/views/errors/index.html
Normal file
11
application/views/errors/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
43
application/views/home/footer.php
Normal file
43
application/views/home/footer.php
Normal file
@ -0,0 +1,43 @@
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2 class="footer-heading mb-4">Link Cepat</h2>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="<?=base_url()?>">Halaman Utama</a></li>
|
||||
<li><a href="<?=base_url()?>home/login">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2 class="footer-heading mb-4">Situs Lainnya</h2>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="#">Website UMPAR</a></li>
|
||||
<li><a href="#">Logbook</a></li>
|
||||
<li><a href="#">E-Cash</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2 class="footer-heading mb-4">Follow Us</h2>
|
||||
<a href="#" class="pl-0 pr-3"><span class="icon-facebook"></span></a>
|
||||
<a href="#" class="pl-3 pr-3"><span class="icon-twitter"></span></a>
|
||||
<a href="#" class="pl-3 pr-3"><span class="icon-instagram"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row pt-5 mt-5 text-center">
|
||||
<div class="col-md-12">
|
||||
<div class="border-top pt-5">
|
||||
<p>
|
||||
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
|
||||
Copyright ©<script>document.write(new Date().getFullYear());</script> All rights reserved | Universitas Muhamaddiyah Parepare <i class="icon-heart" aria-hidden="true"></i> by <a href="#" >Kicap Karan</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
17
application/views/home/foto.php
Normal file
17
application/views/home/foto.php
Normal file
@ -0,0 +1,17 @@
|
||||
<div class="site-blocks-cover inner-page-cover overlay" style="background-image: url(<?=base_url()?>assets/images/hero_1.jpg);" data-aos="fade" data-stellar-background-ratio="0.5">
|
||||
<div class="container">
|
||||
<div class="row align-items-center justify-content-center text-center">
|
||||
|
||||
<div class="col-md-12" data-aos="fade-up" data-aos-delay="400">
|
||||
|
||||
<div class="row justify-content-center mb-4">
|
||||
<div class="col-md-8 text-center">
|
||||
<h1>Penelusuran Buku Berbasis Online</h1>
|
||||
<p class="lead mb-5">Perpustakaan Universitas Muhammadiyah Parepare</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
60
application/views/home/head.php
Normal file
60
application/views/home/head.php
Normal file
@ -0,0 +1,60 @@
|
||||
<head>
|
||||
<title>Pencarian Buku - UM Parepare</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Quicksand:300,400,500,700,900" rel="stylesheet">
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/fonts/icomoon/style.css">
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/magnific-popup.css">
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/jquery-ui.css">
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/owl.carousel.min.css">
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/owl.theme.default.min.css">
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/bootstrap-datepicker.css">
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/fonts/flaticon/font/flaticon.css">
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/aos.css">
|
||||
|
||||
<link rel="stylesheet" href="<?=base_url()?>assets/css/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/js/datatables/jquery.dataTables.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.topnav {
|
||||
overflow: hidden;
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
.topnav a {
|
||||
float: left;
|
||||
color: #f2f2f2;
|
||||
text-align: center;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.topnav a:hover {
|
||||
background-color: #333;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.topnav a.active {
|
||||
background-color: #111;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style type="text/css">
|
||||
.swal-modal .swal-text{
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
28
application/views/home/header.php
Normal file
28
application/views/home/header.php
Normal file
@ -0,0 +1,28 @@
|
||||
<header class="site-navbar py-4 bg-white" role="banner">
|
||||
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col-11 col-xl-2">
|
||||
<h1 class="mb-0 site-logo"><a href="index.html" class="text-black h2 mb-0">UMPAR</a></h1>
|
||||
</div>
|
||||
<div class="col-12 col-md-10 d-none d-xl-block">
|
||||
<nav class="site-navigation position-relative text-right" role="navigation">
|
||||
|
||||
<ul class="site-menu js-clone-nav mr-auto d-none d-lg-block">
|
||||
<li><a href="<?=base_url()?>">Halaman Utama</a></li>
|
||||
<li><a href="<?=base_url()?>home/kembali">Halaman Pengembalian</a></li>
|
||||
<li><a href="<?=base_url()?>home/login">Login</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-inline-block d-xl-none ml-md-0 mr-auto py-3" style="position: relative; top: 3px;"><a href="#" class="site-menu-toggle js-menu-toggle text-black"><span class="icon-menu h3"></span></a></div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
204
application/views/home/index.php
Normal file
204
application/views/home/index.php
Normal file
@ -0,0 +1,204 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php $this->load->view('home/head'); ?>
|
||||
<body>
|
||||
|
||||
<div class="site-wrap">
|
||||
|
||||
<?php $this->load->view('home/top'); ?>
|
||||
|
||||
<?php $this->load->view('home/header'); ?>
|
||||
|
||||
|
||||
|
||||
<?php $this->load->view('home/foto'); ?>
|
||||
|
||||
|
||||
|
||||
<section class="site-section">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="topnav">
|
||||
<a class="active" href="#" id="semua">Semua</a>
|
||||
<a href="#" id="judul">Judul</a>
|
||||
<a href="#" id="pengarang">Pengarang</a>
|
||||
<a href="#" id="kategori">Kategori</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="row form-group">
|
||||
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6" id="sini_inputan">
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
|
||||
</div>
|
||||
<div class="row form-group" >
|
||||
<div class="col-md-12">
|
||||
<center><button type="button" id="button_cari" class="btn btn-primary btn-md text-white" onclick="cari_buku()">Cari Buku</button></center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row form-group" id="sini_html">
|
||||
<table id="table1" class="table table-striped table-bordered" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Judul</th>
|
||||
<th>Kategori</th>
|
||||
<th>Pengarang</th>
|
||||
<th>Tahun Terbit</th>
|
||||
<th>Peletakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Judulasdas</td>
|
||||
<td>Kategoriasdasd</td>
|
||||
<td>Pengarangasdsa</td>
|
||||
<td>Tahun Terbitasdsa</td>
|
||||
<td>Peletakanasdsd</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- sini nanti tabel buku -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php $this->load->view('home/footer'); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('home/script'); ?>
|
||||
<!-- <script src="<?=base_url()?>sweet-alert/block/jquery.blockUI.js"></script> -->
|
||||
<script src="<?=base_url()?>assets/js/datatables/jquery.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/datatables/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).on("click", "#semua", function () {
|
||||
$("#semua").attr('class','active');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
var html = '<input type="text" id="inputannya" class="form-control" placeholder="Masukkan Judul,Pengarang,Kategori Buku">';
|
||||
$("#sini_inputan").html(html);
|
||||
$("#button_cari").attr('onclick',"cari_buku('semua')");
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(document).on("click", "#judul", function () {
|
||||
$("#judul").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
$("#sini_inputan").html(null);
|
||||
});
|
||||
|
||||
$(document).on("click", "#pengarang", function () {
|
||||
$("#pengarang").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
$("#sini_inputan").html(null);
|
||||
});
|
||||
|
||||
$(document).on("click", "#kategori", function () {
|
||||
$("#kategori").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
$("#sini_inputan").html(null);
|
||||
});
|
||||
|
||||
document.getElementById("semua").click();
|
||||
|
||||
function cari_buku(e){
|
||||
var id,kategori;
|
||||
if (e == 'semua') {
|
||||
id = $("#inputannya").val();
|
||||
kategori = e;
|
||||
// console.log(kategori);
|
||||
cari_datanya(id,kategori);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function cari_datanya(a,b){
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>home/cari",
|
||||
type: 'post',
|
||||
data: {proses : 'cari', id : a, kategori : b},
|
||||
// dataType: 'json',
|
||||
// beforeSend: function(res) {
|
||||
// $.blockUI({
|
||||
// message: "<h3>Pesanan Sedang Diproses</h3>",
|
||||
// css: {
|
||||
// border: 'none',
|
||||
// padding: '15px',
|
||||
// backgroundColor: '#000',
|
||||
// '-webkit-border-radius': '10px',
|
||||
// '-moz-border-radius': '10px',
|
||||
// opacity: .5,
|
||||
// color: '#fff'
|
||||
// } });
|
||||
// },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
// $.noConflict();
|
||||
$("#sini_html").html(response);
|
||||
// location.reload();
|
||||
// jQuery.noConflict();
|
||||
// $.unblockUI();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
//jQuery.noConflict()
|
||||
// $.noConflict();
|
||||
$("#tabel1").DataTable();
|
||||
})
|
||||
</script>
|
||||
<script src="<?=base_url()?>assets/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
314
application/views/home/index2.php
Normal file
314
application/views/home/index2.php
Normal file
@ -0,0 +1,314 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php $this->load->view('home/head'); ?>
|
||||
<body>
|
||||
<div class="modal fade" id="sini_modalnya" aria-hidden="true" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog" style="width:95%;max-width: 1121px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="getCroppedCanvasTitle">Peta Perpustakaan</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div id="sini_input_edit"></div>
|
||||
<div class="form-group" style="overflow-x: scroll; ">
|
||||
<br><p style="display: none;">asdsad</p>
|
||||
<center>
|
||||
<canvas id="c" width="1050" height="950" style="border:1px solid #ccc;pointer-events:none;"></canvas>
|
||||
<br><p style="display: none;">asdsad</p><br>
|
||||
<input type="hidden" id="id_rak_buku_edit" name="rak_buku">
|
||||
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div id="sini_footer" style="display: inline;"></div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-wrap">
|
||||
|
||||
<?php $this->load->view('home/top'); ?>
|
||||
|
||||
<?php $this->load->view('home/header'); ?>
|
||||
|
||||
|
||||
|
||||
<?php $this->load->view('home/foto'); ?>
|
||||
|
||||
<input type="hidden" id="sini_htmlnya" >
|
||||
<section class="site-section">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<div class="topnav">
|
||||
<a class="active" href="#" id="semua">Semua</a>
|
||||
<a href="#" id="judul">Judul</a>
|
||||
<a href="#" id="pengarang">Pengarang</a>
|
||||
<a href="#" id="kategori">Kategori</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="row form-group">
|
||||
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6" id="sini_inputan">
|
||||
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
|
||||
</div>
|
||||
<div class="row form-group" >
|
||||
<div class="col-md-12">
|
||||
<center><button type="button" id="button_cari" class="btn btn-primary btn-md text-white" onclick="cari_buku()">Cari Buku</button></center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 col-lg-12">
|
||||
<div class="card-content" style="overflow-x: auto">
|
||||
<div class="form-horizontal" id="sini_html">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- sini nanti tabel buku -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php $this->load->view('home/footer'); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('home/script'); ?>
|
||||
|
||||
<script src="<?=base_url()?>sweet-alert/toastr/toastr.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>sweet-alert/toastr/toastr.min.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).on("click", "#semua", function () {
|
||||
$("#semua").attr('class','active');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
var html = '<input type="text" id="inputannya" class="form-control" placeholder="Masukkan Judul,Pengarang,Kategori Buku">';
|
||||
$("#sini_inputan").html(html);
|
||||
$("#button_cari").attr('onclick',"cari_buku('semua')");
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(document).on("click", "#judul", function () {
|
||||
$("#judul").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
var html = '<input type="text" id="inputannya" class="form-control" placeholder="Masukkan Judul">';
|
||||
$("#sini_inputan").html(html);
|
||||
$("#button_cari").attr('onclick',"cari_buku('judul')");
|
||||
});
|
||||
|
||||
$(document).on("click", "#pengarang", function () {
|
||||
$("#pengarang").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#kategori").removeAttr('class');
|
||||
var html = '<input type="text" id="inputannya" class="form-control" placeholder="Masukkan Nama Pengarang">';
|
||||
$("#sini_inputan").html(html);
|
||||
$("#button_cari").attr('onclick',"cari_buku('pengarang')");
|
||||
});
|
||||
|
||||
$(document).on("click", "#kategori", function () {
|
||||
$("#kategori").attr('class','active');
|
||||
$("#semua").removeAttr('class');
|
||||
$("#judul").removeAttr('class');
|
||||
$("#pengarang").removeAttr('class');
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>home/cari",
|
||||
type: 'post',
|
||||
data: {proses : 'cari_kategori'},
|
||||
// dataType: 'json',
|
||||
|
||||
success: function (response) {
|
||||
$("#sini_inputan").html(response);
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$("#button_cari").attr('onclick',"cari_buku('kategori')");
|
||||
});
|
||||
|
||||
document.getElementById("semua").click();
|
||||
|
||||
function cari_buku(e){
|
||||
var id,kategori;
|
||||
id = $("#inputannya").val();
|
||||
kategori = e;
|
||||
// console.log(kategori);
|
||||
if (id == '' || id == null) {
|
||||
toastr.options = {
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"timeOut": "5000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut"
|
||||
};
|
||||
if (kategori == 'kategori') {
|
||||
toastr.info("<center>Kategori Harus Terpilih</center>");
|
||||
}else{
|
||||
toastr.info("<center>Inputan Harus Terisi</center>");
|
||||
}
|
||||
$("#inputannya").focus();
|
||||
}else{
|
||||
cari_datanya(id,kategori);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function cari_datanya(a,b){
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>home/cari",
|
||||
type: 'post',
|
||||
data: {proses : 'cari', id : a, kategori : b},
|
||||
// dataType: 'json',
|
||||
beforeSend: function(res) {
|
||||
$("#sini_html").html('<center><h2 class="h4 text-black">Loading Data</h2></center>');
|
||||
$("#button_cari").html("Loading Data");
|
||||
},
|
||||
success: function (response) {
|
||||
$("#sini_html").html(response);
|
||||
$("#button_cari").html("Cari Buku");
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script src="<?=base_url()?>assets/fabric.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var canvas = this.__canvas = new fabric.Canvas('c');
|
||||
// create a rect object
|
||||
|
||||
|
||||
fabric.Object.prototype.transparentCorners = true;
|
||||
// fabric.Object.prototype.cornerColor = 'blue';
|
||||
fabric.Object.prototype.cornerStyle = 'circle';
|
||||
function cari_rak_buku(a,b,c,d,e,f,g){
|
||||
var html = '<div class="form-group"><label class="text-black" for="fname">Judul</label><textarea class="form-control" style="resize: none" disabled="">'+b+'</textarea></div>';
|
||||
|
||||
const aa = $.ajax({
|
||||
url: "<?=base_url()?>",
|
||||
type: 'post',
|
||||
data: {proses : "cek_foto_detail" , id : g},
|
||||
async : false
|
||||
});
|
||||
|
||||
// console.log(aa.responseText)
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Foto Rak Buku</label><br>'+aa.responseText+'</div>';
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Kategori</label><input class="form-control" value="'+c+'" disabled=""></div>';
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Pengarang</label><textarea class="form-control" style="resize: none" disabled="">'+d+'</textarea></div>';
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Tahun Terbit</label><input class="form-control" value="'+e+'" disabled=""></div>';
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Tingkat Ke</label><input class="form-control" value="'+f+'" disabled=""></div>';
|
||||
html += '<div class="form-group"><label class="text-black" for="fname">Peta Buku</label></div>';
|
||||
$("#sini_input_edit").html(html);
|
||||
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>home/cari",
|
||||
type: 'post',
|
||||
data: {proses : "cari_rak_buku", rak : a},
|
||||
// dataType: 'json',
|
||||
// beforeSend: function(res) {
|
||||
// document.getElementById("sini_html").innerHTML = "Paragraph changed!";
|
||||
// $("#sini_html").html(null);
|
||||
// },
|
||||
success: function (response) {
|
||||
// console.log(response);
|
||||
|
||||
$("#sini_htmlnya").html(response);
|
||||
// $("#sini_html").html(null);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="<?=base_url()?>assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
219
application/views/home/kembali.php
Normal file
219
application/views/home/kembali.php
Normal file
@ -0,0 +1,219 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<?php $this->load->view('home/head'); ?>
|
||||
<body>
|
||||
<div class="modal fade" id="sini_modalnya" aria-hidden="true" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog" style="width:95%;max-width: 1121px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="getCroppedCanvasTitle">Peta Perpustakaan</h4>
|
||||
</div>
|
||||
<div class="modal-body row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="x_panel">
|
||||
<div id="sini_input_edit"></div>
|
||||
<div class="form-group" style="overflow-x: auto">
|
||||
<div id="sini_dia_htmlnya"></div>
|
||||
<center>
|
||||
<div>
|
||||
<canvas id="c" width="1050" height="950" style="border:1px solid #ccc;pointer-events:none;"></canvas>
|
||||
<br><br>
|
||||
</div>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div id="sini_footer" style="display: inline;"></div>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-wrap">
|
||||
|
||||
<?php $this->load->view('home/top'); ?>
|
||||
|
||||
<?php $this->load->view('home/header'); ?>
|
||||
|
||||
|
||||
|
||||
<?php $this->load->view('home/foto'); ?>
|
||||
|
||||
<input type="hidden" id="sini_htmlnya" >
|
||||
<section class="site-section">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<center>
|
||||
<h2>Arahkan Qrcode buku ke kamera</h2>
|
||||
<input type="hidden" name="sini_modal_cek" id="modal_berubah" value="1" onchange="cek_modalnya_berubah(value)">
|
||||
<!-- <button type="button" onclick="tukar_modalnya('tutup')" id="tukar_modalnya_button"> sini tukat modal</button> -->
|
||||
<!-- <select style="display: none"></select> -->
|
||||
<canvas id="ini_canvas_kamera" ></canvas>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row form-group">
|
||||
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6">
|
||||
<center><h2>Masukkan Kode Buku</h2>
|
||||
<input type="text" class="form-control" id="kode_bukunya" placeholder="Masukkan Kode Buku" minlength="1" maxlength="3"></center>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
|
||||
</div>
|
||||
<div class="row form-group" >
|
||||
<div class="col-md-12">
|
||||
<center><button type="button" class="btn btn-primary btn-md text-white" onclick="kode_buku()">Cari Rak Buku</button></center>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<?php $this->load->view('home/footer'); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('home/script'); ?>
|
||||
|
||||
<!-- <script type="text/javascript" src="<?=base_url()?>qrcode/js/jquery.js"></script> -->
|
||||
<script type="text/javascript" src="<?=base_url()?>qrcode/js/qrcodelib.js"></script>
|
||||
<script type="text/javascript" src="<?=base_url()?>qrcode/js/webcodecamjquery.js"></script>
|
||||
<!-- <script type="text/javascript">$('#sini_modalnya').modal("show");</script> -->
|
||||
<script type="text/javascript">
|
||||
function setInputFilter(textbox, inputFilter) {
|
||||
["input", "keydown", "keyup", "mousedown", "mouseup", "select", "contextmenu", "drop"].forEach(function(event) {
|
||||
textbox.addEventListener(event, function() {
|
||||
if (inputFilter(this.value)) {
|
||||
this.oldValue = this.value;
|
||||
this.oldSelectionStart = this.selectionStart;
|
||||
this.oldSelectionEnd = this.selectionEnd;
|
||||
} else if (this.hasOwnProperty("oldValue")) {
|
||||
this.value = this.oldValue;
|
||||
this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
|
||||
} else {
|
||||
this.value = "";
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Install input filters.
|
||||
setInputFilter(document.getElementById("kode_bukunya"), function(value) { return /^-?\d*$/.test(value); });
|
||||
|
||||
function kode_buku(){
|
||||
const kode = $("#kode_bukunya").val();
|
||||
// console.log(kode);
|
||||
cari_rak_buku(kode);
|
||||
}
|
||||
var arg = {
|
||||
resultFunction: function(result) {
|
||||
// console.log (result)
|
||||
var kode = result.code;
|
||||
kode = kode.split('/')[1]
|
||||
if ($.isNumeric(kode) == true) {
|
||||
cari_rak_buku(kode);
|
||||
}else{
|
||||
swal({
|
||||
title: "Error",
|
||||
text: "Qrcode yang discan tiada dalam sistem",
|
||||
icon: "error",
|
||||
button : false,
|
||||
timer : 3000
|
||||
})
|
||||
}
|
||||
// cari_rak_buku(kode.split('/')[1]);
|
||||
|
||||
// stopnya_p();
|
||||
}
|
||||
};
|
||||
|
||||
var decoder = $("#ini_canvas_kamera").WebCodeCamJQuery(arg).data().plugin_WebCodeCamJQuery;
|
||||
decoder.play();
|
||||
var source = new EventSource("<?=base_url()?>home/coba");
|
||||
source.onmessage = function(event) {
|
||||
if($("#sini_modalnya").is(":visible")) {
|
||||
decoder.stop()
|
||||
// console.log("matikan")
|
||||
}else{
|
||||
decoder.play()
|
||||
// console.log("jalankan")
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<script src="<?=base_url()?>assets/fabric.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var canvas = this.__canvas = new fabric.Canvas('c');
|
||||
// create a rect object
|
||||
fabric.Object.prototype.selectable = false;
|
||||
// canvas.item(0).selectable = false;
|
||||
canvas.renderAll();
|
||||
|
||||
fabric.Object.prototype.transparentCorners = true;
|
||||
// fabric.Object.prototype.cornerColor = 'blue';
|
||||
fabric.Object.prototype.cornerStyle = 'circle';
|
||||
canvas.off('mouse:down', eventHandler)
|
||||
function cari_rak_buku(e){
|
||||
console.log(e)
|
||||
$.ajax({
|
||||
url: "<?=base_url()?>home/cari",
|
||||
type: 'post',
|
||||
data: {proses : "cari_buku_qr", id : e},
|
||||
// dataType: 'json',
|
||||
// beforeSend: function(res) {
|
||||
// document.getElementById("sini_html").innerHTML = "Paragraph changed!";
|
||||
// $("#sini_html").html(null);
|
||||
// },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
$("#sini_htmlnya").html(response);
|
||||
// $("#sini_html").html(null);
|
||||
// location.reload();
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
// console.log('gagal');
|
||||
swal({
|
||||
// title: "Submit Keperluan ?",
|
||||
text: "Koneksi Internet Anda Mungkin Hilang Atau Terputus, Halaman Akan Terefresh Kembali",
|
||||
icon: "warning",
|
||||
buttons: {
|
||||
cancel: false,
|
||||
confirm: true,
|
||||
},
|
||||
// dangerMode: true,
|
||||
})
|
||||
.then((hehe) =>{
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script src="<?=base_url()?>assets/js/main.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
112
application/views/home/login.php
Normal file
112
application/views/home/login.php
Normal file
@ -0,0 +1,112 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Login Admin | Perpustakaan Universitas Muhammadiyah Parepare</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="icon" type="image/png" href="<?=base_url()?>login_assets/images/icons/favicon.ico"/>
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/bootstrap/css/bootstrap.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/animate/animate.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/css-hamburgers/hamburgers.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/animsition/css/animsition.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/select2/select2.min.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/vendor/daterangepicker/daterangepicker.css">
|
||||
<!--===============================================================================================-->
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/css/util.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?=base_url()?>login_assets/css/main.css">
|
||||
<style type="text/css">
|
||||
.swal-modal .swal-text{
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
<!--===============================================================================================-->
|
||||
</head>
|
||||
<body style="background-color: #666666;">
|
||||
|
||||
<div class="limiter">
|
||||
<div class="container-login100">
|
||||
<div class="wrap-login100">
|
||||
<form class="login100-form validate-form" method="post">
|
||||
<span class="login100-form-title p-b-43">
|
||||
Halaman Login
|
||||
</span>
|
||||
|
||||
|
||||
<div class="wrap-input100 validate-input" data-validate = "Username Tidak Bisa Kosong">
|
||||
<input class="input100" type="text" name="username">
|
||||
<span class="focus-input100"></span>
|
||||
<span class="label-input100">Username</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="wrap-input100 validate-input" data-validate="Password Tidak Bisa Kosong">
|
||||
<input class="input100" type="password" name="password">
|
||||
<span class="focus-input100"></span>
|
||||
<span class="label-input100">Password</span>
|
||||
</div>
|
||||
|
||||
<div class="container-login100-form-btn">
|
||||
<!-- <button type="button" id="button_login" class="login100-form-btn">
|
||||
Login
|
||||
</button> -->
|
||||
<input type="submit" name="button_login" value="Login" class="login100-form-btn">
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="login100-more" style="background-image: url('<?=base_url()?>login_assets/images/bg-01.jpg');">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/jquery/jquery-3.2.1.min.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/animsition/js/animsition.min.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/bootstrap/js/popper.js"></script>
|
||||
<script src="<?=base_url()?>login_assets/vendor/bootstrap/js/bootstrap.min.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/select2/select2.min.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/daterangepicker/moment.min.js"></script>
|
||||
<script src="<?=base_url()?>login_assets/vendor/daterangepicker/daterangepicker.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/vendor/countdowntime/countdowntime.js"></script>
|
||||
<script src="<?=base_url()?>sweet-alert/sweetalert.js"></script>
|
||||
<!--===============================================================================================-->
|
||||
<script src="<?=base_url()?>login_assets/js/main.js"></script>
|
||||
|
||||
<?php if ($this->session->flashdata('error')): ?>
|
||||
<script type="text/javascript">
|
||||
swal({
|
||||
title: "Login Gagal",
|
||||
text: "<?=$this->session->flashdata('error')?>",
|
||||
icon: "error",
|
||||
showLoaderOnConfirm: true,
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<?php endif ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
27
application/views/home/script.php
Normal file
27
application/views/home/script.php
Normal file
@ -0,0 +1,27 @@
|
||||
<script src="<?=base_url()?>assets/js/jquery-3.3.1.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/jquery-migrate-3.0.1.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/jquery-ui.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/popper.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/bootstrap.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/owl.carousel.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/jquery.stellar.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/jquery.countdown.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/jquery.magnific-popup.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="<?=base_url()?>assets/js/aos.js"></script>
|
||||
|
||||
|
||||
|
||||
<script src="<?=base_url()?>sweet-alert/sweetalert.js"></script>
|
||||
<?php if ($this->session->flashdata('success')): ?>
|
||||
<script type="text/javascript">
|
||||
swal({
|
||||
title: "Terima Kasih",
|
||||
text: "<?=$this->session->flashdata('success')?>",
|
||||
icon: "success",
|
||||
showLoaderOnConfirm: true,
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<?php endif ?>
|
||||
29
application/views/home/top.php
Normal file
29
application/views/home/top.php
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="site-mobile-menu">
|
||||
<div class="site-mobile-menu-header">
|
||||
<div class="site-mobile-menu-close mt-3">
|
||||
<span class="icon-close2 js-menu-toggle"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-mobile-menu-body"></div>
|
||||
</div>
|
||||
|
||||
<div class="border-bottom top-bar py-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p class="mb-0">
|
||||
<span class="mr-3"><strong>No Telpon:</strong> <a href="tel://#">+1 292 3293 4238</a></span>
|
||||
<!-- <span><strong>Email:</strong> <a href="#">info@yourdomain.com</a></span> -->
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<ul class="social-media">
|
||||
<li><a href="#" class="p-2"><span class="icon-facebook"></span></a></li>
|
||||
<li><a href="#" class="p-2"><span class="icon-twitter"></span></a></li>
|
||||
<li><a href="#" class="p-2"><span class="icon-instagram"></span></a></li>
|
||||
<!-- <li><a href="#" class="p-2"><span class="icon-linkedin"></span></a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
11
application/views/index.html
Normal file
11
application/views/index.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
89
application/views/welcome_message.php
Normal file
89
application/views/welcome_message.php
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Welcome to CodeIgniter</title>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
::selection { background-color: #E13300; color: white; }
|
||||
::-moz-selection { background-color: #E13300; color: white; }
|
||||
|
||||
body {
|
||||
background-color: #fff;
|
||||
margin: 40px;
|
||||
font: 13px/20px normal Helvetica, Arial, sans-serif;
|
||||
color: #4F5155;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #003399;
|
||||
background-color: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #444;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px solid #D0D0D0;
|
||||
font-size: 19px;
|
||||
font-weight: normal;
|
||||
margin: 0 0 14px 0;
|
||||
padding: 14px 15px 10px 15px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Consolas, Monaco, Courier New, Courier, monospace;
|
||||
font-size: 12px;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #D0D0D0;
|
||||
color: #002166;
|
||||
display: block;
|
||||
margin: 14px 0 14px 0;
|
||||
padding: 12px 10px 12px 10px;
|
||||
}
|
||||
|
||||
#body {
|
||||
margin: 0 15px 0 15px;
|
||||
}
|
||||
|
||||
p.footer {
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
border-top: 1px solid #D0D0D0;
|
||||
line-height: 32px;
|
||||
padding: 0 10px 0 10px;
|
||||
margin: 20px 0 0 0;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 10px;
|
||||
border: 1px solid #D0D0D0;
|
||||
box-shadow: 0 0 8px #D0D0D0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="container">
|
||||
<h1>Welcome to CodeIgniter!</h1>
|
||||
|
||||
<div id="body">
|
||||
<p>The page you are looking at is being generated dynamically by CodeIgniter.</p>
|
||||
|
||||
<p>If you would like to edit this page you'll find it located at:</p>
|
||||
<code>application/views/welcome_message.php</code>
|
||||
|
||||
<p>The corresponding controller for this page is found at:</p>
|
||||
<code>application/controllers/Welcome.php</code>
|
||||
|
||||
<p>If you are exploring CodeIgniter for the very first time, you should start by reading the <a href="user_guide/">User Guide</a>.</p>
|
||||
</div>
|
||||
|
||||
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds. <?php echo (ENVIRONMENT === 'development') ? 'CodeIgniter Version <strong>' . CI_VERSION . '</strong>' : '' ?></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user