Commit 6bb83945 authored by Oky Rahmanto's avatar Oky Rahmanto

Merge branch 'feature/payment_parking' into 'development'

add feature payment parking

See merge request !38
parents e498bf27 07f87997
Pipeline #25806 passed with stage
in 30 seconds
......@@ -11,6 +11,7 @@ class Cashier extends CI_Controller {
private $url_slot = '';
private $url_parking = '';
private $url_stop_park = '';
private $url_search_park = '';
function __construct(){
......@@ -159,7 +160,30 @@ class Cashier extends CI_Controller {
<b>$message !</b>
function park_pay($licensePlat){
//create a new cURL resource
$ch = curl_init($this->url_search_park."/".$licensePlat);
//set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
//return response instead of outputting
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//execute the POST request
$result = curl_exec($ch);
//close cURL resource
// echo 'HTTP code: ' . $httpcode;
$data = array(
'result' => json_decode($result),
\ No newline at end of file
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php $this->load->view('main/header.php')?>
<!-- Left side column. contains the logo and sidebar -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
Parking Pay Set
<?php $this->view('main/viewdate.php')
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-lg-12">
<!-- Default box -->
<div class="col-lg-6">
<div class="box box-success">
<!-- Callout -->
<div class="callout callout">
<h2>PLAT NOMOR <strong><?php echo $result->licensePlate;?></strong>
<div class="col-lg-6">
<div class="box box-warning">
<!-- Callout -->
<div class="callout callout">
<h2>TOTAL BAYAR <strong><?php echo $result->total;?></strong>
<div class="col-lg-12 box">
<div class="box-header">
<!-- Flash Notifikasi -->
<?php echo $this->session->flashdata('notifikasi');?>
<div class="box-body">
<div style="max-width: auto; overflow-x: auto;">
<table id="example1" class="table table-bordered table-striped small">
<th>SLOT NAME</th>
<th>START TIME</th>
<th>STOP TIME</th>
<td><?php echo $result->slot->name;?></td>
<td><?php echo $result->licensePlate;?></td>
<td><?php echo $result->startTime;?></td>
<td><?php echo $result->stopTime;?></td>
<td><?php echo "day ".$result->duration->days." / hour ".$result->duration->hours.":".$result->duration->minutes.":".$result->duration->seconds;?></td>
<!-- /.box-body -->
<!-- /.box-footer-->
<!-- /.box -->
<!-- /.content -->
<!-- MODAL SLOT -->
<div class="modal fade" id="modal_slot" role="dialog" aria-labelledby="largeModal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 class="modal-title" id="myModalLabel">Stop Park</h3>
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<form id="form_slot" enctype="multipart/form-data" method="POST">
<div class="form-group col-md-12" id="labelId">
<label>License Plate</label>
<input type="text" class="form-control" name="licensePlate" id="licensePlate">
<input type="hidden" class="form-control" name="inputedById" id="inputedById" value="128e64bf-884b-4507-81c0-b18e8dde81b9">
<div class="form-group col-md-12">
<button type="submit" id="btn_simpan_arsip" name="btn_simpan_arsip" class="btn btn-sm btn-danger"><i class="fa fa-car"></i> Stop</button>
<!-- -->
<!-- END MODAL -->
<?php $this->load->view('main/footer')?>
<!-- Control Sidebar -->
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
function function_edit(licensePlate){
$('#form_slot').attr('action',"<?php echo base_url()?>cashier/stop");
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment