first commit
This commit is contained in:
@@ -0,0 +1,270 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<?php if ($msg) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $msg ? $msg : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<font id="message" color=red></font>
|
||||
<h3>ACL ADDING</h3>
|
||||
<form id="acl-form" name="acl-form" method="post" action="create" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="class_name">Controller</lrbel>
|
||||
<?= $controller_name ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="address">Method</label>
|
||||
<select class="form-control" name="method_name"></select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="plevel">Permission</label>
|
||||
<?= $permission_level ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" id="btn-add" class="btn btn-info btn-block btn-sm">Add</button>
|
||||
<button type="button" id="btn-update" class="btn btn-info btn-block btn-sm hidden">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="card_class_filter">Class</label>
|
||||
<?= $card_class_filter ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="method_filter">Method</label>
|
||||
<input type="search" class="form-control" id="method_filter" name="method_filter" value='<?= isset($method_filter) ? $method_filter : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="card_permission_level_filter">Permission</label>
|
||||
<?= $card_permission_level_filter ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary btn-search" type="button" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row col-lg-12">
|
||||
<div class="panel-heading" style="margin-bottom: 15px">
|
||||
<div class="heading-elements">
|
||||
<div id="pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="acl-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:lightgreen;">
|
||||
<thead class="bg-indigo">
|
||||
<th>ID</th>
|
||||
<th>Class</th>
|
||||
<th>Method</th>
|
||||
<th>Permission</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Detect pagination click
|
||||
$('#pagination').on('click', 'a', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).attr('href').trim() === '#') {
|
||||
return;
|
||||
}
|
||||
|
||||
var pageno = $(this).attr('data-ci-pagination-page');
|
||||
loadPagination(pageno, $('.search-block').serialize());
|
||||
});
|
||||
|
||||
// Prevent submit form by press the enter button
|
||||
$(window).keydown(function(event) {
|
||||
if (event.keyCode == 13) {
|
||||
loadPagination(0);
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// Load Page
|
||||
loadPagination(0);
|
||||
|
||||
function loadPagination(pagno, filters = null, btn_search = null) {
|
||||
loadingButton(btn_search);
|
||||
|
||||
$.ajax({
|
||||
url: '/acl/loadRecord',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
'rowno': pagno,
|
||||
'filters': filters
|
||||
},
|
||||
success: function(response) {
|
||||
$('#pagination').html(response.pagination);
|
||||
createTable(response.result);
|
||||
},
|
||||
complete: function() {
|
||||
stopLoadingButton(btn_search);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTable(result) {
|
||||
|
||||
$('#acl-list tbody').empty();
|
||||
|
||||
for (index in result) {
|
||||
var id = result[index].id;
|
||||
var controller = result[index].class_name;
|
||||
var method = result[index].method_name;
|
||||
var plevel = result[index].plevel;
|
||||
var permission = result[index].name;
|
||||
|
||||
var tr =
|
||||
`<tr>
|
||||
<td>${id}</td>
|
||||
<td>${controller}</td>
|
||||
<td>${method}</td>
|
||||
<td class="hidden">${plevel}</td>
|
||||
<td>${permission}</td>
|
||||
<td class="input-group-btn">
|
||||
<button type='button' class='btn btn-info btn-sm btn-update'>Update</button>
|
||||
<button type='button' class='btn btn-secondary btn-sm btn-cancel hidden'>Cancel</button>
|
||||
<button type='button' class='btn btn-danger btn-sm btn-delete'>Delete</button>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
$('#acl-list tbody').append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
// Init page
|
||||
getMethodsByController($('[name="controller_name"]').val());
|
||||
|
||||
function getMethodsByController(controller) {
|
||||
|
||||
$('#btn-add').button("loading");
|
||||
$.ajax({
|
||||
url: '/Acl/getMethodsByController',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
'controller': controller
|
||||
},
|
||||
success: function(data) {
|
||||
var options = $('[name="method_name"]');
|
||||
options.empty();
|
||||
$.each(data, function(value) {
|
||||
$.each(this, function(k, v) {
|
||||
options.append($("<option />").val(v).text(v));
|
||||
});
|
||||
});
|
||||
},
|
||||
complete: function() {
|
||||
$('#btn-add').button("reset");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Detect controller combobox changed
|
||||
$('[name="controller_name"]').change(function() {
|
||||
var controller = $(this).val();
|
||||
|
||||
getMethodsByController(controller);
|
||||
});
|
||||
|
||||
// Detect on click the update button on form
|
||||
$('#btn-update').click(function() {
|
||||
$('#acl-form').submit();
|
||||
});
|
||||
|
||||
// button search for filter
|
||||
$('.btn-search').on('click', function() {
|
||||
loadPagination(0, $('.search-block').serialize());
|
||||
})
|
||||
});
|
||||
|
||||
// Detect on click the update button
|
||||
$(document).on('click', '.btn-update', function(e) {
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$('.btn-cancel').addClass('hidden');
|
||||
$('.btn-update').removeClass('hidden');
|
||||
$('#btn-add').addClass('hidden');
|
||||
$('#btn-update').removeClass('hidden');
|
||||
|
||||
$(this).siblings('.btn-cancel').removeClass('hidden');
|
||||
$(this).addClass('hidden');
|
||||
|
||||
$('[name="controller_name"]').prop('disabled', true).val('');
|
||||
$('[name="method_name"]').prop('disabled', true).val('');
|
||||
$('[name="permission_level"]').val($tds[3].innerText);
|
||||
|
||||
$('#acl-form').attr('action', origin + "/Acl/update/" + $tds[0].innerText);
|
||||
});
|
||||
|
||||
// Detect on click the cancel button
|
||||
$(document).on('click', '.btn-cancel', function(e) {
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$(this).siblings('.btn-update').removeClass('hidden');
|
||||
$(this).addClass('hidden');
|
||||
$('#btn-add').removeClass('hidden');
|
||||
$('#btn-update').addClass('hidden');
|
||||
|
||||
$('[name="controller_name"]').prop('disabled', false);
|
||||
$('[name="method_name"]').prop('disabled', false);
|
||||
|
||||
$('#acl-form').attr('action', origin + "/Acl/create");
|
||||
});
|
||||
|
||||
// Detect on click the delete button
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
|
||||
if (!confirm('Are you sure want to delete?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$('#acl-form').attr('action', origin + "/Acl/destroy/" + $tds[0].innerText);
|
||||
$('#acl-form').submit();
|
||||
});
|
||||
|
||||
// Detect on click the add button on form
|
||||
$('#btn-add').click(function() {
|
||||
$('#acl-form').attr('action', origin + "/Acl/create");
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,231 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<?php if ($msg) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $msg ? $msg : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<font id="message" color=red></font>
|
||||
<h3>ACL WhiteList Extra ADDING</h3>
|
||||
<form id="acl-whitelist-extra-form" name="acl-whitelist-extra-form" method="post" action="create" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="class_name">Class - Method</lrbel>
|
||||
<?= $class_method ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="parameter_name">Parameter Name</lrbel>
|
||||
<input type="text" value="<?= isset($parameter_name) ? $parameter_name : '' ?>" class="form-control" name="parameter_name" id="parameter_name" maxlength="50" placeholder="Parameter Name" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="parameter_value">Parameter Value</lrbel>
|
||||
<input type="text" value="<?= isset($parameter_value) ? $parameter_value : '' ?>" class="form-control" name="parameter_value" id="parameter_value" maxlength="50" placeholder="Parameter Value" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" id="btn-add" class="btn btn-info btn-block btn-sm">Add</button>
|
||||
<button type="button" id="btn-update" class="btn btn-info btn-block btn-sm hidden">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="card_class_filter">Class</label>
|
||||
<?= $card_class_filter ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="method_filter">Method</label>
|
||||
<input type="search" class="form-control" id="method_filter" name="method_filter" value='<?= isset($method_filter) ? $method_filter : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="card_permission_level_filter">Permission</label>
|
||||
<?= $card_permission_level_filter ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary btn-search" type="button" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row col-lg-12">
|
||||
<div class="panel-heading" style="margin-bottom: 15px">
|
||||
<div class="heading-elements">
|
||||
<div id="pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="acl-whitelist-extra-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:lightgreen;">
|
||||
<thead class="bg-indigo">
|
||||
<th>ID</th>
|
||||
<th>Class</th>
|
||||
<th>Method</th>
|
||||
<th>Permission</th>
|
||||
<th>Parameter Name</th>
|
||||
<th>Parameter Value</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Detect pagination click
|
||||
$('#pagination').on('click', 'a', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).attr('href').trim() === '#') {
|
||||
return;
|
||||
}
|
||||
|
||||
var pageno = $(this).attr('data-ci-pagination-page');
|
||||
loadPagination(pageno, $('.search-block').serialize());
|
||||
});
|
||||
|
||||
// Load Page
|
||||
loadPagination(0);
|
||||
|
||||
function loadPagination(pagno, filters = null, btn_search = null) {
|
||||
loadingButton(btn_search);
|
||||
|
||||
$.ajax({
|
||||
url: '/Acl_WhiteList/loadRecord',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
'rowno': pagno,
|
||||
'filters': filters
|
||||
},
|
||||
success: function(response) {
|
||||
$('#pagination').html(response.pagination);
|
||||
createTable(response.result);
|
||||
},
|
||||
complete: function() {
|
||||
stopLoadingButton(btn_search);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createTable(result) {
|
||||
|
||||
$('#acl-whitelist-extra-list tbody').empty();
|
||||
|
||||
for (index in result) {
|
||||
var id = result[index].acl_wl_ext_id;
|
||||
var controller = result[index].class_name;
|
||||
var method = result[index].method_name;
|
||||
var permission = result[index].name;
|
||||
var param_name = result[index].parameter_name;
|
||||
var param_value = result[index].parameter_value;
|
||||
var acl_wl_id = result[index].acl_wl_id;
|
||||
|
||||
var tr =
|
||||
`<tr>
|
||||
<td>${id}</td>
|
||||
<td>${controller}</td>
|
||||
<td>${method}</td>
|
||||
<td>${permission}</td>
|
||||
<td>${param_name}</td>
|
||||
<td>${param_value}</td>
|
||||
<td hidden>${acl_wl_id}</td>
|
||||
<td class="input-group-btn">
|
||||
<button type='button' class='btn btn-info btn-sm btn-update'>Update</button>
|
||||
<button type='button' class='btn btn-secondary btn-sm btn-cancel hidden'>Cancel</button>
|
||||
<button type='button' class='btn btn-danger btn-sm btn-delete'>Delete</button>
|
||||
</td>
|
||||
</tr>`;
|
||||
|
||||
$('#acl-whitelist-extra-list tbody').append(tr);
|
||||
}
|
||||
}
|
||||
|
||||
// Detect on click the update button on form
|
||||
$('#btn-update').click(function() {
|
||||
$('#acl-whitelist-extra-form').submit();
|
||||
});
|
||||
|
||||
// Detect on click the add button on form
|
||||
$('#btn-add').click(function() {
|
||||
$('#acl-whitelist-extra-form').attr('action', origin + "/Acl_WhiteList/create");
|
||||
});
|
||||
|
||||
// button search for filter
|
||||
$('.btn-search').on('click', function() {
|
||||
loadPagination(0, $('.search-block').serialize());
|
||||
})
|
||||
});
|
||||
|
||||
// Detect on click the update button
|
||||
$(document).on('click', '.btn-update', function(e) {
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$('.btn-cancel').addClass('hidden');
|
||||
$('.btn-update').removeClass('hidden');
|
||||
$('#btn-add').addClass('hidden');
|
||||
$('#btn-update').removeClass('hidden');
|
||||
|
||||
$(this).siblings('.btn-cancel').removeClass('hidden');
|
||||
$(this).addClass('hidden');
|
||||
|
||||
$('[name="class_method"]').prop('disabled', true).val($tds[6].innerText);
|
||||
$('[name="parameter_name"]').val($tds[4].innerText);
|
||||
$('[name="parameter_value"]').val($tds[5].innerText);
|
||||
|
||||
$('#acl-whitelist-extra-form').attr('action', origin + "/Acl_WhiteList/update/" + $tds[0].innerText);
|
||||
});
|
||||
|
||||
// Detect on click the cancel button
|
||||
$(document).on('click', '.btn-cancel', function(e) {
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$(this).siblings('.btn-update').removeClass('hidden');
|
||||
$(this).addClass('hidden');
|
||||
$('#btn-add').removeClass('hidden');
|
||||
$('#btn-update').addClass('hidden');
|
||||
|
||||
$('[name="class_method"]').prop('disabled', false);
|
||||
|
||||
$('#acl-whitelist-extra-form').attr('action', origin + "/Acl_WhiteList/create");
|
||||
});
|
||||
|
||||
// Detect on click the delete button
|
||||
$(document).on('click', '.btn-delete', function(e) {
|
||||
|
||||
if (!confirm('Are you sure want to delete?')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $row = $(this).closest("tr"); // Finds the closest row <tr>
|
||||
var $tds = $row.find("td"); // Finds all children <td> elements
|
||||
|
||||
$('#acl-whitelist-extra-form').attr('action', origin + "/Acl_WhiteList/destroy/" + $tds[0].innerText);
|
||||
$('#acl-whitelist-extra-form').submit();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,45 @@
|
||||
<div class="row mt-3">
|
||||
<?php if ($errMsg) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0 fade show" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<strong>Error - </strong> <?php echo $errMsg ? $errMsg : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-12 col-sm-4">
|
||||
<input type="hidden" name="id" value="<?php echo set_value('id', isset($address) ? $address['id'] : ''); ?>" />
|
||||
<div class="form-group mb-3">
|
||||
<label for="address">Address</label>
|
||||
<input type="text" class="form-control <?php echo form_error('address') ? 'is-invalid' : ''; ?> " id="address" name="address" placeholder="Enter address" value="<?php echo set_value('address', isset($address) ? $address['address'] : ''); ?>">
|
||||
<div class="text-danger">
|
||||
<?php echo form_error('address') ? form_error('address') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-4">
|
||||
<div class="form-group mb-3">
|
||||
<label for="geocoding_date">Geocoding date</label>
|
||||
<input type="text" class="form-control <?php echo form_error('geocoding_date') ? 'is-invalid' : ''; ?>" id="geocoding_date" name="geocoding_date" placeholder="Geocoding date" value="<?php echo set_value('geocoding_date', isset($address) ? $address['geocoding_date'] : ''); ?>">
|
||||
<div class="text-danger">
|
||||
<?php echo form_error('geocoding_date') ? form_error('geocoding_date') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-4">
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<textarea class="form-control" name="description" id="description" rows="5" maxlength="100" placeholder="Description"><?php echo set_value('description', isset($address) ? $address['description'] : ''); ?></textarea>
|
||||
<div class="text-danger">
|
||||
<?php echo form_error('description') ? form_error('description') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/pages/addresses/form.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Address</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Create new address</h4>
|
||||
<form action="/addresses/create" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-3 col-lg-2 offset-sm-9 offset-lg-10 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Create</button>
|
||||
<a href="/addresses" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Trips</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Address detail</h4>
|
||||
|
||||
<form action="<?php echo '/addresses/'.(string) $address['id'].'/edit' ?>" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-3 col-lg-2 offset-sm-9 offset-lg-10 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Save</button>
|
||||
<a href="/addresses" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,150 @@
|
||||
<link href="/assets/css/address/list.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right text-right action">
|
||||
<a href="/addresses/create" class="btn btn-success">New address</a>
|
||||
</div>
|
||||
<h4 class="page-title">Addresses</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<!-- start alert -->
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-success alert-dismissible bg-success text-white border-0 fade show" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $this->session->flashdata('success') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- end alert -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="search-block form-inline" id="searchForm" action="/addresses/search" method="get">
|
||||
<div class="form-group">
|
||||
<label for="city">City</label>
|
||||
<select id="city">
|
||||
<?= ! empty($city_name)
|
||||
? '<option selected value="' . $city . '">' . $city_name . '</option>'
|
||||
: ''
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="width: 40%; display: flex; flex-direction: column;">
|
||||
<label for="address">Address</label>
|
||||
<select id="address">
|
||||
<?= ! empty($address)
|
||||
? '<option selected value="' . $address . '">' . $address . '</option>'
|
||||
: ''
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>GPS</label>
|
||||
<label for="radius_default">Radius: 5000m</label>
|
||||
<input type="checkbox" name="radius_default" id="radius_default"
|
||||
<?= empty($radius_default) ? '' : 'checked' ?>
|
||||
>
|
||||
<div class="search-by-gps">
|
||||
<input style="width: 100px;" type="search" class="form-control" id="lat" name="latitude" placeholder="Latitude" value="<?= isset($latitude) ? $latitude : '' ?>">
|
||||
<input style="width: 100px;" type="search" class="form-control" id="lng" name="longitude" placeholder="Longitude" value="<?= isset($longitude) ? $longitude : '' ?>">
|
||||
<input style="width: 100px;" type="search" class="form-control" id="rad" name="radius" placeholder="Radius in km" value="<?= isset($radius) ? $radius : '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-warning btn-search" id="btnClear" type="button">Clear</button>
|
||||
<button class="btn btn-primary btn-search" id="btnSearch" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive-sm">
|
||||
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Address</th>
|
||||
<th>Latitude</th>
|
||||
<th>Longitude</th>
|
||||
<th>Timezone</th>
|
||||
<th>Geocoding date</th>
|
||||
<th>Postal</th>
|
||||
<th>Country</th>
|
||||
<th class="actions">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-striped">
|
||||
<?php foreach ($list as $item) : ?>
|
||||
<tr>
|
||||
<td><?php echo $item['id'] ?></td>
|
||||
<td><?php echo $item['address'] ?></td>
|
||||
<td><?php echo $item['latitude'] ?></td>
|
||||
<td><?php echo $item['longitude'] ?></td>
|
||||
<td><?php echo $item['timezone'] ?></td>
|
||||
<td><?php echo $item['geocoding_date'] ?></td>
|
||||
<td><?php echo $item['postal'] ?></td>
|
||||
<td><?php echo $item['country'] ?></td>
|
||||
<td class="actions">
|
||||
<a href="/addresses/<?php echo $item['id']; ?>/edit" class="btn btn-primary">View</a>
|
||||
<button type="button" class="btn btn-danger btn-remove" data-id="<?php echo $item['id'] ?>" data-address="<?php echo $item['address'] ?>" data-toggle="modal" data-target="#remove-address-warning-modal">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo $pagination ?>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
|
||||
<div id="remove-address-warning-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="warning-header-modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header modal-colored-header bg-warning">
|
||||
<h4 class="modal-title" id="warning-header-modalLabel"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 class="mt-0">Remove warning</h5>
|
||||
<p>This can not be undone. Do you want to conitnue?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-warning" id="removeBtn" data-id="">Continue</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script src="/assets/js/app.js" type="text/javascript"></script>
|
||||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||||
<script src="/assets/js/pages/addresses/list.js" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
.search-block {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
@@ -0,0 +1,151 @@
|
||||
<!-- Main sidebar -->
|
||||
<div class="sidebar sidebar-main">
|
||||
<div class="sidebar-content">
|
||||
|
||||
<!-- User menu -->
|
||||
<div class="sidebar-user">
|
||||
<div class="category-content">
|
||||
<div class="media">
|
||||
<div class="media-body">
|
||||
<span class="media-heading text-semibold"><?php echo $_SESSION['firstname']; ?></span>
|
||||
<div class="text-size-mini text-muted">
|
||||
<?php echo $_SESSION['loc']; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="media-right media-middle">
|
||||
<ul class="icons-list">
|
||||
<li>
|
||||
<a href="#"><i class="icon-cog3"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /user menu -->
|
||||
|
||||
|
||||
<!-- Main navigation -->
|
||||
<div class="sidebar-category sidebar-category-visible">
|
||||
<div class="category-content no-padding">
|
||||
<ul class="navigation navigation-main navigation-accordion">
|
||||
|
||||
<!-- Main -->
|
||||
<li class="navigation-header"><span>Main</span> <i class="icon-menu" title="Main pages"></i></li>
|
||||
<li><a href="/dash"><i class="icon-home4"></i> <span>Dashboard</span></a></li>
|
||||
|
||||
|
||||
<!-- /main -->
|
||||
|
||||
<!-- Forms -->
|
||||
<li class="navigation-header"><span>Members</span> <i class="icon-menu" title="Members"></i></li>
|
||||
<li><a href="/dash/memberlist"><i class="icon-home4"></i> <span>Member List</span></span></a></li>
|
||||
<li>
|
||||
<a href="/member/findmember"><i class="icon-people"></i> <span>Find Members</span></a>
|
||||
</li>
|
||||
|
||||
<li class="navigation-header"><span>Notifications</span> <i class="icon-menu" title="Notifications"></i></li>
|
||||
<li>
|
||||
<a href="/notifications/noticelist"><i class="icon-home4"></i> <span>Notification</span></span></a>
|
||||
<ul>
|
||||
<li><a href="/notifications/noticelist">Notification Triggers</a></li>
|
||||
<li><a href="/notifications/emailtrigger">Trigger Settings</a></li>
|
||||
<li><a href="/notifications/triggerreport">Trigger Reports</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="navigation-header"><span>Reports</span> <i class="icon-menu" title="Reports"></i></li>
|
||||
|
||||
<!-- Data Reports -->
|
||||
<li>
|
||||
<a href="/bkoreport/"><i class="icon-graph"></i> <span>Reports</span></a>
|
||||
<ul>
|
||||
<!-- <li><a href="/dash">Members</a></li>-->
|
||||
<li><a href="/bkoreport/devices">Member Devices</a></li>
|
||||
<li><a href="/bkoreport/cards_clicked_report">Cards Clicked Report</a></li>
|
||||
<li><a href="/bkoreport/signup_email_report">Email Signup Report</a></li>
|
||||
<li><a href="/bkoreport/quotes">Quotes</a></li>
|
||||
<li><a href="/bkoreport/trips">Transport Vendors</a></li>
|
||||
<li><a href="/bkoreport/heatmap">Heatmap</a></li>
|
||||
<li><a href="/bkoreport/oauth2pulls">OAuth2 Pulls</a></li>
|
||||
<li><a href="#">Activities</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="/bkoreport/loginreport">Login</a></li>
|
||||
<li><a href="/bkoreport/resetreport">Pass Reset</a></li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<li><a href="/report/chart">Price Comparison Trend</a></li>
|
||||
<li><a href="/report/surgePricingVaraition">Surge Pricing Varaition</a></li>
|
||||
<li><a href="/report/emailAndBankConnectionReport">Email & Bank Connection Report</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/bkoreport/grabpricing"><i class="icon-graph"></i> <span>Grab Pricing Simulator</span></a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/phone_farm_phones/"><i class="icon-menu"></i> <span>Phone Farm</span></a>
|
||||
<ul>
|
||||
<li><a href="/phone_farm_phones">Phone farm phones</a></li>
|
||||
<li><a href="/transport_provider">Transport Provider</a></li>
|
||||
<li><a href="/transport_provider_accounts">Transport Provider Account</a></li>
|
||||
<li><a href="/automation_jobs">Automation Job</a></li>
|
||||
<li><a href="/android_automation_job_details">Android Automation Job Detail</a></li>
|
||||
<li><a href="/farm_records">Farm Records Generated Daily</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/bkoreport/"><i class="icon-graph"></i> <span>Integrations</span></a>
|
||||
<ul>
|
||||
<li><a href="/bkoadmin/mytransport"><i class="icon-graph"></i> <span>MyTransportSG</span></a></li>
|
||||
<li> <a href="/bkoadmin/compare"><i class="icon-graph"></i> <span>Compare</span></a> </li>
|
||||
<li> <a href="/bkoadmin/geofencing"><i class="icon-graph"></i> <span>Geofencing</span></a></li>
|
||||
<li> <a href="/bkoadmin/gas_station_map"><i class="icon-graph"></i> <span>Gas station Map</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/bkoreport/surgereport"><i class="icon-graph"></i> <span>Surge Report</span></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/bkoreport/"><i class="icon-menu"></i><span>Geofencing Area Types</span></a>
|
||||
<ul>
|
||||
<li><a href="/geofence_area"><span>Geofence Area</span></a></li>
|
||||
<li><a href="/geofence_area_anchor"><span>Geofence Area Anchor</span></a></li>
|
||||
<li><a href="/geofence_area_city"><span>Geofence Area City</span></a></li>
|
||||
<li><a href="/geofence_area_city_settings"><span>Geofence Area City Settings</span></a></li>
|
||||
<li><a href="/geofence_area_country"><span>Geofence Area Country</span></a></li>
|
||||
<li><a href="/geofence_area/comparePriceBetweenAreas"><span>Price comparison</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/emission/"><i class="icon-menu"></i><span>Emission</span></a>
|
||||
<ul>
|
||||
<li><a href="/emission/"><span>Model</span></a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/member/trackedemail"><i class="icon-graph"></i> <span>Tracked Email</span></a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="/Parsed_Receipts/index"><i class="icon-graph"></i> <span>Parsed Receipts</span></a>
|
||||
</li>
|
||||
|
||||
<!-- <li>
|
||||
<a href="/blog"><i class="icon-graph"></i> <span>Blog</span></a>
|
||||
</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /main navigation -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /main sidebar -->
|
||||
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
<form method="POST" action="?">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_id ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-lg-6">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Template</label>
|
||||
<?= $card_template ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category</label>
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Can user save ?</label>
|
||||
<?= $card_can_save ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardPictureslabel">Picture</label>
|
||||
<?= $card_pictures ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardName">Card ID</label>
|
||||
<input type="text" class="form-control" id="cardName" name="card_name" maxlength="100" placeholder="Card Unique ID" value="<?= $card_name ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Title</label>
|
||||
<?= $card_titleshow ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardShortTitle">Card Short Title</label>
|
||||
<input type="text" class="form-control" id="cardShortTitle" name="short_title" maxlength="35" placeholder="Card Short Title" value="<?= $short_title ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardTitle">Card Title</label>
|
||||
<input type="text" class="form-control" id="cardTitle" name="card_title" maxlength="100" placeholder="Card Title" value="<?= $card_title ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="card_country">Card Country</label>
|
||||
<?= $card_country ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descriptionCardlab">Description[250]</label>
|
||||
<textarea class="form-control" name="description" id="descriptionCardlab" rows="5" maxlength="250" placeholder="Description"><?= $description ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button </label>
|
||||
<input type="text" class="form-control" name="button1" id="exampleFormControlTextarea1" maxlength="35" placeholder="Button 1" value="<?= $button1 ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button Text</label>
|
||||
<input type="text" class="form-control" name="button1_text" id="descriptionCardlab" maxlength="35" placeholder="Button 1 Text" value="<?= $button1_text ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Can Expire</label>
|
||||
<?= $card_canexpire ?>
|
||||
<br>
|
||||
<label for="categoryLabel">Expiration date</label>
|
||||
<input type="text" class="form-control" name="card_expiration" value="<?= $card_expiration ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Notification</label>
|
||||
<?= $card_notify ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" style="width: 100%; background-color:honeydew;">
|
||||
<div class="card-body">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
|
||||
<button type="button" class="btn btn-danger btn-block btn-sm" data-toggle="modal" data-target="#exampleModalScrollable">More Setting</button>
|
||||
|
||||
<p class="card-text">We are ready to go on here.</p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<? /* http://www.daterangepicker.com/ */ ?>
|
||||
<script>
|
||||
$(function () {
|
||||
$('input[name="card_expiration"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: <?= date("Y") ?>,
|
||||
maxYear: <?= date("Y") + 10 ?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function (start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,80 @@
|
||||
<style>
|
||||
#wrapper {
|
||||
width:600px;
|
||||
margin:0 auto;
|
||||
border-radius:0 0 5px 5px;
|
||||
-moz-border-radius:0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
background:#fff;
|
||||
border:1px solid #ccc;
|
||||
padding:25px;
|
||||
border-top:none;
|
||||
box-shadow:0 0 5px #ccc;
|
||||
-moz-box-shadow:0 0 5px #ccc;
|
||||
-webkit-box-shadow:0 0 5px #ccc;
|
||||
text-align:left;
|
||||
}
|
||||
#lightbox {
|
||||
position:fixed; /* keeps the lightbox window in the current viewport */
|
||||
top:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:url(/assets/images/overlay.png) repeat;
|
||||
text-align:center;
|
||||
}
|
||||
#lightbox p {
|
||||
text-align:right;
|
||||
color:#fff;
|
||||
margin-right:20px;
|
||||
font-size:12px;
|
||||
}
|
||||
#lightbox img {
|
||||
box-shadow:0 0 25px #111;
|
||||
-webkit-box-shadow:0 0 25px #111;
|
||||
-moz-box-shadow:0 0 25px #111;
|
||||
max-width:940px;
|
||||
}
|
||||
#lightbox_container {
|
||||
background:red;
|
||||
width:200px;
|
||||
position:fixed;
|
||||
top:50%;
|
||||
left:50%;
|
||||
/* bring your own prefixes */
|
||||
transform: translate(-50%, -50%);
|
||||
border: 1px solid Black;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function show_light_box(id) {
|
||||
/*
|
||||
If the lightbox window HTML already exists in document,
|
||||
change the img src to to match the href of whatever link was clicked
|
||||
If the lightbox window HTML doesn't exists, create it and insert it.
|
||||
(This will only happen the first time around)
|
||||
*/
|
||||
if ($('#lightbox').length > 0) { // #lightbox exists
|
||||
//place href as img src value
|
||||
$('#lightbox_container').html($('#'+id).html());
|
||||
//show lightbox window - you could use .show('fast') for a transition
|
||||
$('#lightbox').show();
|
||||
}
|
||||
else { //#lightbox does not exist - create and insert (runs 1st time only)
|
||||
//create HTML markup for lightbox window
|
||||
var lightbox =
|
||||
'<div id="lightbox">' +
|
||||
'<p>Click to close</p>' +
|
||||
'<div id="lightbox_container">' + //insert clicked link's href into img src
|
||||
$('#'+id).html()
|
||||
'</div>' +
|
||||
'</div>';
|
||||
//insert lightbox HTML into page
|
||||
$('body').append(lightbox);
|
||||
//Click anywhere on the page to get rid of lightbox window
|
||||
$('#lightbox').click(function() { //must use live, as the lightbox element is inserted into the DOM
|
||||
$('#lightbox').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
|
||||
<!-- Members online -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/service/ludropoff'>Laundry Drop Off</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /members online -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
<!-- Current server load -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/service/dryclean'>Dryclean Pick & Deliv</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /current server load -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
<!-- Today's revenue -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/service/homecleaning'>Home Cleaning</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /today's revenue -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
<!-- Current server load -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/service/homelundry'>Home Laundry</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /current server load -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-2">
|
||||
<!-- Current server load -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/service/washandfold'>Wash/Fold</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /current server load -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
<!-- Current server load -->
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href='/serv/support'>Contacts</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /current server load -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Configured Subscrtiption</h6>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $subscription_table ?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="height: 800px;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Users Decision Group</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/bkoreport/decisionstatus/" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="order">Order</label>
|
||||
<div class="search-by-order">
|
||||
<input type="search" class="form-control" id="from_order" name="from_order" value='<?= isset($from_order) ? $from_order : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_order" name="to_order" value='<?= isset($to_order) ? $to_order : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title">Description</label>
|
||||
<input type="search" class="form-control" id="description" name="description" value='<?= isset($description) ? $description : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="personalty">Personalty</label>
|
||||
<input type="search" class="form-control" id="personalty" name="personalty" value='<?= isset($personalty) ? $personalty : '' ?>'>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="key">Key</label>
|
||||
<input type="search" class="form-control" id="key" name="key" value='<?= isset($key) ? $key : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div class="table-responsive">
|
||||
<?= $decision_group ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="panel panel-flat">
|
||||
<div id="transp_detail">
|
||||
Select Group to view settings.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function configureDescision(decision_id, card_category) {
|
||||
//alert(decision_id);
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#cacc' + decision_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoreport/configuredecision?proc=PROCESS&decision_id=" + decision_id + "&card_category=" + card_category
|
||||
}).done(function(data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#cacc' + decision_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function configureNext(decision_id, card_category) {
|
||||
//alert(decision_id);
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#nacc' + decision_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/descision/configurenextaction?proc=PROCESS&decision_id=" + decision_id + "&card_category=" + card_category
|
||||
}).done(function(data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#nacc' + decision_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function configureCard(decision_id, card_category) {
|
||||
//alert(decision_id);
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#cacc' + decision_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoreport/decisioncard?proc=PROCESS&decision_id=" + decision_id + "&card_category=" + card_category
|
||||
}).done(function(data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#cacc' + decision_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
var elm = document.createElement("div");
|
||||
var jelm = $(elm);//convert to jQuery Element
|
||||
var htmlElm = jelm[0];//convert to HTML Element
|
||||
*/
|
||||
function addCard(id, element, decision_id, card_order) {
|
||||
$(element).html('Processing...');
|
||||
$(element).prop('disabled', true);
|
||||
var td = element.parentElement;
|
||||
var tr = td.parentElement;
|
||||
var tbody = tr.parentElement;
|
||||
var table = tbody.parentElement;
|
||||
//var jqTable = $(table).closest('table');
|
||||
var jqTable = $('#sel_list').children('table');
|
||||
var targetTable = jqTable[0]; // convert to HTML Element
|
||||
$.ajax({
|
||||
url: "/bkoreport/decisioncard?proc=ADD&decision_id=" + decision_id + "&id=" + id
|
||||
}).done(function(data) {
|
||||
if (parseInt(data) > 0) {
|
||||
// Add
|
||||
var row = targetTable.insertRow(1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(1);
|
||||
var cell3 = row.insertCell(2);
|
||||
cell1.innerHTML = '<button id="acc' + data + '" type="button" class="btn btn-danger btn-xs" onclick="removeCard(' + data + ',this,' + decision_id + ',' + card_order + ');"> Remove </button>';
|
||||
cell2.innerHTML = $(tr).find('td:first').html();
|
||||
cell3.innerHTML = card_order;
|
||||
// Remove
|
||||
//$(tr).children('td').eq(2).remove();
|
||||
//$(tr).attr('card_list_remove_'+id);
|
||||
$(tr).remove();
|
||||
} else {
|
||||
$(element).html(' Add ');
|
||||
$(element).prop('disabled', false);
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeCard(id, element, decision_id, card_order) {
|
||||
$(element).html('Processing...');
|
||||
$(element).prop('disabled', true);
|
||||
var td = element.parentElement;
|
||||
var tr = td.parentElement;
|
||||
var tbody = tr.parentElement;
|
||||
var table = tbody.parentElement;
|
||||
var jqTable = $('#card_list').children('table');
|
||||
var targetTable = jqTable[0]; // convert to HTML Element
|
||||
$.ajax({
|
||||
url: "/bkoreport/decisioncard?proc=DEL&decision_id=" + decision_id + "&id=" + id
|
||||
}).done(function(data) {
|
||||
if (parseInt(data) > 0) {
|
||||
// Add
|
||||
var row = targetTable.insertRow(1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(1);
|
||||
cell1.innerHTML = $(tr).find('td:nth-last-child(2)').html();
|
||||
cell2.innerHTML = '<button id="acc' + data + '" type="button" class="btn btn-primary btn-xs" onclick="addCard(' + data + ',this,' + decision_id + ',' + card_order + ');"> Add </button>';
|
||||
// Remove
|
||||
$(tr).remove();
|
||||
//alert(table.nodeName);
|
||||
} else {
|
||||
$(element).html(' Remove ');
|
||||
$(element).prop('disabled', false);
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function addLogic(id, element, decision_id) {
|
||||
$(element).html('Processing...');
|
||||
$(element).prop('disabled', true);
|
||||
var td = element.parentElement;
|
||||
var tr = td.parentElement;
|
||||
var tbody = tr.parentElement;
|
||||
var table = tbody.parentElement;
|
||||
//var jqTable = $(table).closest('table');
|
||||
var jqTable = $('#sel_logic_list').children('table');
|
||||
var targetTable = jqTable[0]; // convert to HTML Element
|
||||
$.ajax({
|
||||
url: "/bkoreport/decisionlogic?proc=ADD&decision_id=" + decision_id + "&id=" + id
|
||||
}).done(function(data) {
|
||||
if (parseInt(data) > 0) {
|
||||
// Add
|
||||
var row = targetTable.insertRow(1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(1);
|
||||
var cell3 = row.insertCell(2);
|
||||
cell1.innerHTML = '<button id="logic' + data + '" type="button" class="btn btn-info btn-sm" onclick="removeLogic(' + data + ',this,' + decision_id + ');"><-</button>';
|
||||
cell3.innerHTML = $(tr).find('td:first').html();
|
||||
cell2.innerHTML = $(tr).find('td:nth-child(2)').html();
|
||||
// Remove
|
||||
//$(tr).children('td').eq(2).remove();
|
||||
//$(tr).attr('card_list_remove_'+id);
|
||||
$(tr).remove();
|
||||
} else {
|
||||
$(element).html(' Add ');
|
||||
$(element).prop('disabled', false);
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeLogic(id, element, decision_id) {
|
||||
$(element).html('Processing...');
|
||||
$(element).prop('disabled', true);
|
||||
var td = element.parentElement;
|
||||
var tr = td.parentElement;
|
||||
var tbody = tr.parentElement;
|
||||
var table = tbody.parentElement;
|
||||
var jqTable = $('#logic_list').children('table');
|
||||
var targetTable = jqTable[0]; // convert to HTML Element
|
||||
$.ajax({
|
||||
url: "/bkoreport/decisionlogic?proc=DEL&decision_id=" + decision_id + "&id=" + id
|
||||
}).done(function(data) {
|
||||
if (parseInt(data) > 0) {
|
||||
// Add
|
||||
var row = targetTable.insertRow(1);
|
||||
var cell1 = row.insertCell(0);
|
||||
var cell2 = row.insertCell(1);
|
||||
var cell3 = row.insertCell(2);
|
||||
cell1.innerHTML = data;
|
||||
cell2.innerHTML = $(tr).find('td:last').html();
|
||||
cell3.innerHTML = '<button id="logic' + data + '" type="button" class="btn btn-danger btn-sm" onclick="addLogic(' + data + ',this,' + decision_id + ');">+></button>';
|
||||
// Remove
|
||||
$(tr).remove();
|
||||
//alert(table.nodeName);
|
||||
} else {
|
||||
$(element).html(' Remove ');
|
||||
$(element).prop('disabled', false);
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.search-block-item .form-group {
|
||||
flex-basis: 75px;
|
||||
}
|
||||
|
||||
.search-block-item .form-group input {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.search-by-order {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Cards</h6>
|
||||
<div class="heading-elements">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="card_list" class="table-responsive">
|
||||
<?= $card_list ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<!-- h6 class="panel-title">Decision Cards</h6 -->
|
||||
<div class="heading-elements">
|
||||
<b>Decision Cards : <?= $decision_group_title ?> </b>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sel_list" class="table-responsive">
|
||||
<?= $sel_list ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$(function () {
|
||||
$('select[name=card_category]').change(function () {
|
||||
configureCard(<?= $decision_id ?>, this.value == '' ? '0' : this.value);
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,206 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Possible Decision Logic</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="logic_list" class="table-responsive">
|
||||
<?= $logic_list ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-6" style="background-color:#B7F0E4; padding:5px;">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" >
|
||||
<div class="panel-heading">
|
||||
<!-- h6 class="panel-title">Decision Cards</h6 -->
|
||||
<div class="heading-elements">
|
||||
<b><h5><?= $decision_group_desc ?> : <?= $decision_group_title ?> </h5></b>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sel_logic_list" class="table-responsive">
|
||||
<?= $group_logic_list ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
|
||||
<hr size="2">
|
||||
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#F0C1B7;">
|
||||
|
||||
<div id="sel_logic_list" class="table-responsive">
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th scope="col" colspan="3">Add Survey Condition</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Survey</th>
|
||||
<td colspan="2"><?= $survey_list ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Answer</th>
|
||||
<td> <input type="text" maxlength="15" id="survey_ans" class="form-control" id="basic-url" aria-describedby="basic-addon3"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><div id="survey_result"></div></th>
|
||||
<td><button type="button" class="btn btn-warning btn-sm" onclick="addSurveyCondition('<?= $decision_group_title ?>');">Add</button></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
|
||||
<hr size="2">
|
||||
|
||||
<!--tr Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#F0C100;">
|
||||
|
||||
<div id="sel_logic_list" class="table-responsive">
|
||||
|
||||
<table class="table table-sm">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th scope="col" colspan="3">Add GPS Trigger Location Condition</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Location</th>
|
||||
<td colspan="2"><?= $location_list ?></td>
|
||||
</tr>
|
||||
<!-- tr>
|
||||
<th scope="row">Frequency</th>
|
||||
<td> <input type="text" maxlength="10" id="dcount" class="form-control" id="basic-url" aria-describedby="basic-addon3"></td>
|
||||
<td></td>
|
||||
</!-- tr -->
|
||||
<tr>
|
||||
<th scope="row" colspan="2"><div id="survey_result"></div></th>
|
||||
<td><button type="button" class="btn btn-warning btn-sm" onclick="addGPSTriggerCondition('<?= $decision_group_title ?>');">Add</button><div id="trigger_result"></div></td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
//gps_location_list
|
||||
function addGPSTriggerCondition(decision_group) {
|
||||
// alert(card_id);
|
||||
var result = confirm("Continue adding GPS Trigger Logic ? ");
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
|
||||
var gps_location_list = "gps_location_list";
|
||||
|
||||
|
||||
var e = document.getElementById("gps_location_list");
|
||||
var address_id_value = e.options[e.selectedIndex].value;
|
||||
|
||||
|
||||
// alert("/descision/addGPSTriggerLogic?decision_group=" + decision_group + "&gps_address_id=" + address_id_value);
|
||||
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/descision/addGPSTriggerLogic?decision_group=" + decision_group + "&gps_address_id=" + address_id_value
|
||||
}).done(function (data) {
|
||||
$('#trigger_result').html(data);
|
||||
//alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function addSurveyCondition(decision_group) {
|
||||
// alert(card_id);
|
||||
var result = confirm("Continue adding Survey Logic ? ");
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
var survey_ans = "survey_ans";
|
||||
// alert(decision_group);
|
||||
var survey_ans_value = document.getElementById(survey_ans).value;
|
||||
//alert(survey_ans_value);
|
||||
|
||||
var survey_list = "survey_list";
|
||||
// var survey_id_value = document.getElementsByName(survey_list).value;
|
||||
// alert(survey_id_value);
|
||||
|
||||
var e = document.getElementById("survey_list");
|
||||
var survey_id_value = e.options[e.selectedIndex].value;
|
||||
//alert("/descision/addSurveyLogic?decision_group=" + decision_group + "&survey_id_value=" + survey_id_value + "&survey_ans_value=" + survey_ans_value);
|
||||
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/descision/addSurveyLogic?decision_group=" + decision_group + "&survey_id_value=" + survey_id_value + "&survey_ans_value=" + survey_ans_value
|
||||
}).done(function (data) {
|
||||
$('#survey_result').html(data);
|
||||
//alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateLogic(setting_id, setting_key) {
|
||||
// alert(card_id);
|
||||
var result = confirm("Update Settings = " + setting_id + ":" + setting_key + "?");
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
var temp = "T" + setting_id;
|
||||
//alert(temp);
|
||||
var setting_value = document.getElementById(temp).value;
|
||||
// alert(setting_value);
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/descision/updatelogic?setting_id=" + setting_id + "&setting_key=" + setting_key + "&setting_value=" + setting_value
|
||||
}).done(function (data) {
|
||||
//$('#set_form'+setting_key).html(data);
|
||||
alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('select[name=card_category]').change(function () {
|
||||
configureCard(<?= $decision_id ?>, this.value == '' ? '0' : this.value);
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Farm records generated daily - last 10 days [SG]</h6>
|
||||
|
||||
</div>
|
||||
<?= $records_generated_daily_SG ?>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Farm records generated daily - last 10 days [US]</h6>
|
||||
|
||||
</div>
|
||||
<?= $records_generated_daily_US ?>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,151 @@
|
||||
<div class="block rad-0">
|
||||
<h2>Cards clicked report</h2>
|
||||
</div>
|
||||
<div class="block">
|
||||
<form method="get" action="/bkoreport/cards_clicked_report" onsubmit="return fnSubmitFormReport();">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3 text-right">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="date_range" name="date_range"
|
||||
value="<?= $date_range ?? '' ?>" style="width: 100%" autocomplete="off"
|
||||
placeholder="Select or input date range"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="btn-group">
|
||||
<!-- <input type="submit" class="btn btn-primary btn-xs" value="Filter">-->
|
||||
<input type="button" onclick="fn_export_csv();" class="btn btn-info btn-xs" value="Export CSV">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<div class="table-responsive">
|
||||
<table id="tblReport" class="table table-striped table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Card id</th>
|
||||
<th>Count of cards</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.block {
|
||||
background-color: #FFF;
|
||||
padding: 10px;
|
||||
box-shadow: rgba(57, 70, 78, 0.15) 0px 0px 1px 0px;
|
||||
}
|
||||
|
||||
.rad-0 {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.block:nth-child(1) h2 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.block:nth-child(1) {
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.block:nth-child(2) {
|
||||
margin-top: 5px;
|
||||
padding: 20px 10px 0px 10px;
|
||||
}
|
||||
|
||||
.block:nth-child(3) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.pt-6 {
|
||||
padding-top: 6px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const $date_range = $('input[name="date_range"]');
|
||||
$date_range.daterangepicker({
|
||||
opens: 'right',
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
cancelLabel: 'Clear'
|
||||
},
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'Last 60 Days': [moment().subtract(59, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
|
||||
'Two months ago': [moment().subtract(2, 'month').startOf('month'), moment().subtract(2, 'month').endOf('month')]
|
||||
},
|
||||
alwaysShowCalendars: true
|
||||
});
|
||||
$date_range.on('apply.daterangepicker', function (ev, picker) {
|
||||
$(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
|
||||
fnSubmitFormReport();
|
||||
});
|
||||
|
||||
$date_range.on('cancel.daterangepicker', function (ev, picker) {
|
||||
$(this).val('');
|
||||
});
|
||||
|
||||
$('select[name="card_category"]').change(function(){
|
||||
fnSubmitFormReport();
|
||||
});
|
||||
window.tblReport = null;
|
||||
window.date_range_value = '';
|
||||
$(function () {
|
||||
window.tblReport = $('#tblReport').DataTable({
|
||||
"responsive": true,
|
||||
"processing":true,
|
||||
"serverSide":true,
|
||||
'ajax': {
|
||||
'url': '/bkoreport/cards_clicked_report_datatables',
|
||||
"type": "POST",
|
||||
"data": {
|
||||
"date_range": function() { return window.date_range_value },
|
||||
"card_category": function() { return $('select[name="card_category"]').val() }
|
||||
}
|
||||
},
|
||||
"order": [[0, "asc"]],
|
||||
"columnDefs": [
|
||||
{"orderable": true, "targets": [0,1, 2]},
|
||||
{"orderable": false, "targets": []}
|
||||
],
|
||||
"pageLength": 25,
|
||||
"lengthMenu": [10, 25, 50, 100, 200, 500, 1000],
|
||||
'columns': [
|
||||
{data: 'title'},
|
||||
{data: 'card_id'},
|
||||
{data: 'cards_total'}
|
||||
],
|
||||
'language': {
|
||||
'loadingRecords': ' ',
|
||||
'processing': 'Loading...'
|
||||
}
|
||||
});
|
||||
});
|
||||
//filter clicked
|
||||
function fnSubmitFormReport(){
|
||||
window.date_range_value = $("#date_range").val();
|
||||
window.tblReport.ajax.reload(false);
|
||||
return false;
|
||||
}
|
||||
function fn_export_csv(){
|
||||
window.location.assign("/bkoreport/cards_clicked_report_export_csv");
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Platforms</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="device_platforms" class="table-responsive">
|
||||
<canvas id="canvas_device_platforms_chart"></canvas>
|
||||
<?=$device_platforms?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Models</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="device_models" class="table-responsive">
|
||||
<canvas id="canvas_device_models_chart"></canvas>
|
||||
<?=$device_models?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Manufacturers</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="device_manufacturers" class="table-responsive">
|
||||
<canvas id="canvas_device_manufacturers_chart"></canvas>
|
||||
<?=$device_manufacturers?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$(function() {
|
||||
var ctxPlatforms = document.getElementById("canvas_device_platforms_chart");
|
||||
var platformsPieChart = new Chart(ctxPlatforms, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$device_platforms_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$device_platforms_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxModels = document.getElementById("canvas_device_models_chart");
|
||||
var modelsPieChart = new Chart(ctxModels, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$device_models_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$device_models_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxManufactures = document.getElementById("canvas_device_manufacturers_chart");
|
||||
var manufacturersPieChart = new Chart(ctxManufactures, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$device_manufacturers_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$device_manufacturers_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,217 @@
|
||||
<h1>Heatmap</h1>
|
||||
<br/>
|
||||
<style>
|
||||
/* Always set the map height explicitly to define the size of the div
|
||||
* element that contains the map. */
|
||||
#map {
|
||||
height: 625px;
|
||||
}
|
||||
/* Optional: Makes the sample page fill the window. */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#floating-panel {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 25%;
|
||||
z-index: 5;
|
||||
background-color: #fff;
|
||||
padding: 5px;
|
||||
border: 1px solid #999;
|
||||
text-align: center;
|
||||
font-family: 'Roboto','sans-serif';
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#floating-panel {
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
left: 25%;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
z-index: 5;
|
||||
}
|
||||
</style>
|
||||
<div id="floating-panel">
|
||||
<button onclick="toggleHeatmap()">Toggle Heatmap</button>
|
||||
<button onclick="changeGradient()">Change gradient</button>
|
||||
<button onclick="changeRadius()">Change radius</button>
|
||||
<button onclick="changeOpacity()">Change opacity</button>
|
||||
</div>
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
|
||||
// This example requires the Visualization library. Include the libraries=visualization
|
||||
// parameter when you first load the API. For example:
|
||||
// <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=visualization">
|
||||
|
||||
var map, heatmap;
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 12,
|
||||
center: {lat: <?=$center_lat?>, lng: <?=$center_lng?>},
|
||||
mapTypeId: 'roadmap'
|
||||
});
|
||||
|
||||
heatmap = new google.maps.visualization.HeatmapLayer({
|
||||
data: getPoints(),
|
||||
map: map
|
||||
});
|
||||
|
||||
var iconBase =
|
||||
'https://developers.google.com/maps/documentation/javascript/examples/full/images/';
|
||||
var icons = {
|
||||
parking: {
|
||||
icon: iconBase + 'parking_lot_maps.png'
|
||||
},
|
||||
library: {
|
||||
icon: iconBase + 'library_maps.png'
|
||||
},
|
||||
info: {
|
||||
icon: iconBase + 'info-i_maps.png'
|
||||
}
|
||||
};
|
||||
var icon = {
|
||||
url: '/assets/images/pin-673-443159.png',
|
||||
size: new google.maps.Size(30, 40),
|
||||
scaledSize: new google.maps.Size(30, 40)
|
||||
};
|
||||
var features = []; //getParkings();
|
||||
// Create markers.
|
||||
for (var i = 0; i < features.length; i++) {
|
||||
var marker = new google.maps.Marker({
|
||||
position: features[i].position,
|
||||
icon: icon, /*icons['parking'].icon,*/ /*features[i].type].icon,*/
|
||||
title: features[i].provider + '\r\n' + features[i].name + '\r\n' + features[i].description,
|
||||
map: map
|
||||
});
|
||||
};
|
||||
var toplocations = getTopLocations();
|
||||
for (var i = 0; i <toplocations.length; i++) {
|
||||
var marker = new google.maps.Marker({
|
||||
position: toplocations[i].position,
|
||||
icon: icons['library'].icon, /*features[i].type].icon,*/
|
||||
title: 'Total ' + toplocations[i].count,
|
||||
map: map
|
||||
});
|
||||
}
|
||||
customSettings();
|
||||
}
|
||||
|
||||
function toggleHeatmap() {
|
||||
heatmap.setMap(heatmap.getMap() ? null : map);
|
||||
}
|
||||
|
||||
function changeGradient() {
|
||||
var gradient = [
|
||||
'rgba(0, 255, 255, 0)',
|
||||
'rgba(0, 255, 255, 1)',
|
||||
'rgba(0, 191, 255, 1)',
|
||||
'rgba(0, 127, 255, 1)',
|
||||
'rgba(0, 63, 255, 1)',
|
||||
'rgba(0, 0, 255, 1)',
|
||||
'rgba(0, 0, 223, 1)',
|
||||
'rgba(0, 0, 191, 1)',
|
||||
'rgba(0, 0, 159, 1)',
|
||||
'rgba(0, 0, 127, 1)',
|
||||
'rgba(63, 0, 91, 1)',
|
||||
'rgba(127, 0, 63, 1)',
|
||||
'rgba(191, 0, 31, 1)',
|
||||
'rgba(255, 0, 0, 1)'
|
||||
]
|
||||
heatmap.set('gradient', heatmap.get('gradient') ? null : gradient);
|
||||
}
|
||||
|
||||
function changeRadius() {
|
||||
heatmap.set('radius', heatmap.get('radius') ? null : 50);
|
||||
}
|
||||
|
||||
function changeOpacity() {
|
||||
heatmap.set('opacity', heatmap.get('opacity') ? null : 0.2);
|
||||
}
|
||||
|
||||
// Heatmap data: 500 Points
|
||||
function getPoints() {
|
||||
return [
|
||||
<?
|
||||
foreach ($top_locations as $f) {
|
||||
if ($f["total"]>1) {
|
||||
for ($i=0;$i<$f["total"];$i++) {
|
||||
echo "new google.maps.LatLng(".$f["lat"].",".$f["lng"]."),\n";
|
||||
}
|
||||
} else {
|
||||
echo "new google.maps.LatLng(".$f["lat"].",".$f["lng"]."),\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
];
|
||||
}
|
||||
|
||||
function getTopLocations() {
|
||||
return [
|
||||
<? $i=0; foreach ($top_locations as $f) { ?>
|
||||
{position: new google.maps.LatLng(<?=$f["lat"].",".$f["lng"]?>), count: <?=$f["total"]?>},
|
||||
<? $i++; if ($i>10) break; } ?>
|
||||
];
|
||||
}
|
||||
function getParkings() {
|
||||
return [<?
|
||||
$handle = fopen("application/models/parking.txt", "r");
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
echo "{position: new google.maps.LatLng(".trim(str_replace('position: {lat:','',str_replace('lng:','',str_replace('},','',$line))))."),";
|
||||
echo " provider: \"\", name: \"\", description: \"\"},\n";
|
||||
}
|
||||
fclose($handle);?>];
|
||||
}
|
||||
</script>
|
||||
Showing <?php echo count($top_locations); ?> result(s)
|
||||
<script async defer
|
||||
src="https://maps.googleapis.com/maps/api/js?key=<?=$googleKey?>&libraries=visualization&callback=initMap">
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// $(function() {
|
||||
// Handler for .ready() called.
|
||||
function customSettings() {
|
||||
heatmap.set('radius', 30);
|
||||
var gradient = [
|
||||
'rgba(0, 255, 255, 0)',
|
||||
'rgba(0, 255, 255, 1)',
|
||||
'rgba(0, 191, 255, 1)',
|
||||
'rgba(0, 127, 255, 1)',
|
||||
'rgba(0, 63, 255, 1)',
|
||||
'rgba(0, 0, 255, 1)',
|
||||
'rgba(0, 0, 223, 1)',
|
||||
'rgba(0, 0, 191, 1)',
|
||||
'rgba(0, 0, 159, 1)',
|
||||
'rgba(0, 0, 127, 1)',
|
||||
'rgba(63, 0, 91, 1)',
|
||||
'rgba(127, 0, 63, 1)',
|
||||
'rgba(191, 0, 31, 1)',
|
||||
'rgba(255, 0, 0, 1)'
|
||||
]
|
||||
heatmap.set('gradient', gradient);
|
||||
}
|
||||
//});
|
||||
/*
|
||||
<button onclick="toggleHeatmap()">Toggle Heatmap</button>
|
||||
<button onclick="changeGradient()">Change gradient</button>
|
||||
<button onclick="changeRadius()">Change radius</button>
|
||||
<button onclick="changeOpacity()">Change opacity</button>
|
||||
*/
|
||||
</script>
|
||||
<h1>Top locations</h1>
|
||||
<table>
|
||||
<tr><th>Total</th><th>Latitude</th><th>Longitude</th></tr>
|
||||
<? foreach ($top_locations as $f) { ?>
|
||||
<tr align=right>
|
||||
<td><?=$f["total"]?></td>
|
||||
<td><?=$f["lat"]?></td>
|
||||
<td><?=$f["lng"]?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
@@ -0,0 +1,173 @@
|
||||
<style>
|
||||
#vendor_cost{
|
||||
padding: 4px;
|
||||
}
|
||||
#vendor_cost h3{
|
||||
font-size: 16px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
#vendor_cost h4{
|
||||
font-size: 14px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
#vendor_cost .pad{
|
||||
padding: 10px;
|
||||
}
|
||||
#vendor_cost .panel{
|
||||
border: none;
|
||||
}
|
||||
a.selected{
|
||||
background-color: yellow;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-lg-10">
|
||||
<div>
|
||||
<form method="GET" action="/bkoreport/surgereport">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Travel date</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="travel_date"
|
||||
value="<?= set_value('travel_date', date('Y-m-d', strtotime('-30 days')).' - '.date('Y-m-d')) ?>"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Duration from</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="duration_from"
|
||||
value="<?= set_value('duration_from') ?>" >
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_from') ? form_error('duration_from') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Duration to</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="duration_to"
|
||||
value="<?= set_value('duration_to') ?>">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_to') ? form_error('duration_to') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Distance from</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="distance_from"
|
||||
value="<?= set_value('distance_from') ?>">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_from') ? form_error('distance_from') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Distance to</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="distance_to"
|
||||
value="<?= set_value('distance_to') ?>">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_to') ? form_error('distance_to') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Cost from</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="cost_from"
|
||||
value="<?= set_value('cost_from') ?>">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('cost_from') ? form_error('cost_from') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Cost to</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="cost_to"
|
||||
value="<?= set_value('cost_to') ?>">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('cost_to') ? form_error('cost_to') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Email (comma separated)</label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
placeholder="Multiple values field (comma separated)"
|
||||
rows="4"
|
||||
name="email"><?= set_value('email') ?></textarea>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('email') ? form_error('email') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" m-y-sm">
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
<div class="row">
|
||||
<div class="col-lg-10">
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div id="vendor_count" class="table-responsive">
|
||||
<?=$report_parsedemail?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2">
|
||||
<div class="panel panel-flat">
|
||||
<div id="vendor_cost" class="table-responsive">
|
||||
<div class="pad">...</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( document ).ready(function() {
|
||||
/** date range picker */
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let travelDateEl = $('input[name="travel_date"]');
|
||||
const travelDateVal = travelDateEl.val();
|
||||
if (travelDateVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(30, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
travelDateEl.daterangepicker(datepickerOptions);
|
||||
|
||||
travelDateEl.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
travelDateEl.on('cancel.daterangepicker', function(ev, picker) {
|
||||
travelDateEl.val('');
|
||||
});
|
||||
});
|
||||
const $vendor_cost = $('#vendor_cost');
|
||||
function showTripInsights(member_id, trackedemail_item_id, that){
|
||||
$('.showTripInsights').removeClass('selected');
|
||||
$(that).addClass('selected');
|
||||
$vendor_cost.html('<div class="pad">Insights Loading...</div>');
|
||||
$.get(`/bkoreport/tripinsights?member_id=${member_id}&id=${trackedemail_item_id}`, function(data){
|
||||
//console.log(member_id, trackedemail_item_id, data);
|
||||
$vendor_cost.html(data);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-7">
|
||||
<!-- Recent Members -->
|
||||
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<form method="post" action="?" autocomplete="off">
|
||||
<fieldset>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Last Run: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="from_last_run" name="from_last_run" value="<?= isset($oauth2_pulls_params['from_last_run']) ? $oauth2_pulls_params['from_last_run'] : '' ?>"></td>
|
||||
<td> - </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="to_last_run" name="to_last_run" value="<?= isset($oauth2_pulls_params['to_last_run']) ? $oauth2_pulls_params['to_last_run'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Elapsed: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="from_elapsed" name="from_elapsed" value="<?= isset($oauth2_pulls_params['from_elapsed']) ? $oauth2_pulls_params['from_elapsed'] : '' ?>"></td>
|
||||
<td> - </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="to_elapsed" name="to_elapsed" value="<?= isset($oauth2_pulls_params['to_elapsed']) ? $oauth2_pulls_params['to_elapsed'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Oauth2 Token ID: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="oauth2_token_id" name="oauth2_token_id" value="<?= isset($oauth2_pulls_params['oauth2_token_id']) ? $oauth2_pulls_params['oauth2_token_id'] : '' ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Member ID: </td>
|
||||
<td><input type="text" class="form-control" style="width:100px;" id="member_id" name="member_id" value="<?= isset($oauth2_pulls_params['member_id']) ? $oauth2_pulls_params['member_id'] : '' ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<label for="email" style="margin-right: 6rem;">Email:</label>
|
||||
<input type="text" class="form-control" style="width:217px; display: inline-block" id="email" name="email" value="<?= isset($oauth2_pulls_params['email']) ? $oauth2_pulls_params['email'] : '' ?>">
|
||||
</div>
|
||||
<input type="submit" name="filter" value="Filter" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">OAuth2 pulls Gmail</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="oauth2_pulls" class="table-responsive">
|
||||
<?= $oauth2_pulls_links ?>
|
||||
<?= $oauth2_pulls ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<?php if ($member_id > 0) { ?>
|
||||
<div class="col-lg-5">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">OAuth2 threads (latest) for <?= $member["member"] ?></h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="oauth2_threads" class="table-responsive">
|
||||
<div align="center">
|
||||
<h1>Duration</h1>
|
||||
</div>
|
||||
<canvas id="canvas_oauth2_threads_duration_chart"></canvas>
|
||||
<div align="center">
|
||||
<h1>Count</h1>
|
||||
</div>
|
||||
<canvas id="canvas_oauth2_threads_count_chart"></canvas>
|
||||
<?= $oauth2_threads ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
function viewStats(member_id) {
|
||||
if (member_id != null && member_id > 0) {
|
||||
document.location = '/member/viewLocateMember?member_id=' + member_id;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewPulls(member_id, oauth2_token_id) {
|
||||
if (member_id != null && member_id > 0 && oauth2_token_id != null && oauth2_token_id > 0) {
|
||||
document.location = '?member_id=' + member_id + '&oauth2_token_id=' + oauth2_token_id;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input[name="filter"]').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$(this).closest('form').attr('action', '/bkoreport/oauth2pulls/0').submit();
|
||||
})
|
||||
|
||||
// Datepicker
|
||||
$("input[name='from_last_run']").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
onClose: function(selectedDate) {
|
||||
$("#from_last_run").datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[name='to_last_run']").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: "yyyy-mm-dd",
|
||||
onClose: function(selectedDate) {
|
||||
$("input[name='to_last_run']").datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var ctxDuration = document.getElementById("canvas_oauth2_threads_duration_chart");
|
||||
var durationPieChart = new Chart(ctxDuration, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?= isset($oauth2_threads_duration_values)
|
||||
? implode(',', $oauth2_threads_duration_values)
|
||||
: "" ?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?= implode("','", $oauth2_threads_duration_labels) ?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxCount = document.getElementById("canvas_oauth2_threads_count_chart");
|
||||
var countPieChart = new Chart(ctxCount, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?= implode(',', $oauth2_threads_count_values) ?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?= implode("','", $oauth2_threads_count_labels) ?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,520 @@
|
||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||
<link rel="stylesheet" href="/assets/css/query-builder.default.min.css">
|
||||
<div id="overlay" style="display:none;">
|
||||
<div class="spinner"></div>
|
||||
<br />
|
||||
Importing...
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-11">
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Get Quote</h6>
|
||||
<div class="heading-elements">
|
||||
<a href="/bkoreport/quote">Recent</a>
|
||||
| <a href="/bkoreport/quotes">Aggregate</a>
|
||||
| <a href="/bkoreport/totalquotes">Total</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="getquote" class="table-responsive" style="background-color:#CEE0D7;">
|
||||
<div style="margin-left:20px;width:800px;">
|
||||
<span style="color:red"><b><?=isset($message) ? $message : '' ?></b></span>
|
||||
<form method="get" action="/bkoreport/quote" id="search-form">
|
||||
<input type="hidden" name="from" id="from" value="<?= isset($from) ? $from : '' ?>">
|
||||
<input type="hidden" name="to" id="to" value="<?= isset($to) ? $to : '' ?>">
|
||||
<fieldset>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<th style="text-align:right;">Origin:</th>
|
||||
<td><input type="text" class="form-control" name="address_from" id="autofrom" value="<?= isset($address_from) ? $address_from : '' ?>" size="20"></td>
|
||||
<th style="text-align:right;">Country:</th>
|
||||
<td><?= $card_country ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:right;">Destination:</th>
|
||||
<td><input type="text" class="form-control" name="address_to" id="autoto" value="<?= isset($address_to) ? $address_to : '' ?>" size="20"></td>
|
||||
<th style="text-align:right;">Provider:</th>
|
||||
<td><?= $card_transport_provider ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="text-align:right;">Quote Source: </th>
|
||||
<td><?= $card_prefill ?></td>
|
||||
<td colspan="2" style="text-align:right;">
|
||||
<input type="button" name="quote" data-action="quote" value="Quote" />
|
||||
<input type="button" name="filter" data-action="quote" value="Filter" />
|
||||
<input type="button" name="export" data-action="exportCSV" value="Export" /></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<input type="hidden" id="sql_raw" name="sql_raw" value="<?= isset($sql_raw) ? $sql_raw : '' ?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="query-builder">
|
||||
<div id="builder"></div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary parse-sql" data-target="import_export" data-stmt="false" id="btn-parse-sql">
|
||||
Apply
|
||||
</button>
|
||||
<button class="btn btn-warning reset" id="btn-reset" data-target="basic">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container">
|
||||
<div class="import-group">
|
||||
<form id="form-upload">
|
||||
<div class="member">
|
||||
<label>Member ID</label>
|
||||
<input type="text" class="form-control" name="member_id" maxlength=10>
|
||||
</div>
|
||||
<div class="file-upload">
|
||||
<span id="pickfiles">[Choose files]</span>
|
||||
<input type="button" id="btn-upload" class="btn btn-warning btn-sm" value="Upload">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filelist"></div>
|
||||
<div id="import-message"></div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Recent Quotes</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div id="quotes" class="table-responsive">
|
||||
<?= $quotes_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function checkQuote(id, btn) {
|
||||
if (id > 0) {
|
||||
//document.location = '/bkoreport/checkQuote?id='+id;
|
||||
btn.disabled = true;
|
||||
$.ajax({
|
||||
url: "/bkoreport/checkQuote?id=" + id
|
||||
}).done(function(data) {
|
||||
btn.disabled = false;
|
||||
$('#check' + id).html(data);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- jQuery UI -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
console.log('aaaa');
|
||||
// Initialize
|
||||
$("#autofrom").autocomplete({
|
||||
source: function(request, response) {
|
||||
console.log('bbbb');
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function(data) {
|
||||
response(data);
|
||||
},
|
||||
error: function(data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
// Set selection
|
||||
$('#autofrom').val(ui.item.label); // display the selected text
|
||||
$('#from').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#autoto").autocomplete({
|
||||
source: function(request, response) {
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function(data) {
|
||||
response(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
// Set selection
|
||||
$('#autoto').val(ui.item.label); // display the selected text
|
||||
$('#to').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script src="/assets/js/query-builder.standalone.min.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
let DOMCACHESTORE = {};
|
||||
DOMCACHE = {
|
||||
get: function(selector, force) {
|
||||
if (DOMCACHESTORE[selector] !== undefined && !force) {
|
||||
return DOMCACHESTORE[selector];
|
||||
}
|
||||
|
||||
DOMCACHESTORE[selector] = $(selector);
|
||||
return DOMCACHESTORE[selector];
|
||||
}
|
||||
};
|
||||
|
||||
const _filters = [
|
||||
{
|
||||
id: 'a.id',
|
||||
label: 'ID',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'transport_provider_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'automation_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'cost_raw',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
id: 'cost',
|
||||
type: 'double'
|
||||
},
|
||||
{
|
||||
id: 'DATE(created)',
|
||||
label: 'created',
|
||||
type: 'date',
|
||||
placeholder: '____-__-__',
|
||||
validation: {
|
||||
format: 'YYYY/MM/DD'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'DATE(completed)',
|
||||
label: 'completed',
|
||||
type: 'date',
|
||||
placeholder: '____-__-__',
|
||||
validation: {
|
||||
format: 'YYYY/MM/DD'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'member_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'location_start_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'location_end_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'quote_group_id',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'a.prefill',
|
||||
label: 'Data Source',
|
||||
type: 'string',
|
||||
input: 'select',
|
||||
values: {
|
||||
'f' : 'Application',
|
||||
't': 'Automatic'
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'pool',
|
||||
type: 'integer'
|
||||
},
|
||||
{
|
||||
id: 'DATE(travel_date)',
|
||||
label: 'travel_date',
|
||||
type: 'date',
|
||||
placeholder: '____-__-__',
|
||||
validation: {
|
||||
format: 'YYYY/MM/DD'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
let init_builder_query = {
|
||||
filters: _filters,
|
||||
}
|
||||
|
||||
// If sql_raw is empty then clear localstorage
|
||||
if (window.getURLParameter(window.location.href, 'sql_raw') === null) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
|
||||
const rule_basics =
|
||||
JSON.parse(window.localStorage.getItem('rules'));
|
||||
|
||||
if (rule_basics) {
|
||||
init_builder_query.rules = rule_basics;
|
||||
}
|
||||
|
||||
DOMCACHE.get('#builder').queryBuilder(init_builder_query)
|
||||
|
||||
$('#btn-parse-sql').on('click', function() {
|
||||
const result = DOMCACHE.get('#builder').queryBuilder('getSQL');
|
||||
|
||||
window.localStorage.setItem(
|
||||
'rules',
|
||||
JSON.stringify(DOMCACHE.get('#builder').queryBuilder('getRules'))
|
||||
);
|
||||
|
||||
if (result.sql.length) {
|
||||
DOMCACHE
|
||||
.get('#search-form')
|
||||
.children('#sql_raw')
|
||||
.val(result.sql);
|
||||
DOMCACHE
|
||||
.get('#search-form')
|
||||
.attr('action', 'quote')
|
||||
.submit();
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-reset').on('click', function() {
|
||||
DOMCACHE.get('#builder').queryBuilder('reset');
|
||||
$('#sql_raw').val('');
|
||||
});
|
||||
|
||||
// Fix for Bootstrap Datepicker
|
||||
DOMCACHE.get('#builder').on('afterUpdateRuleValue.queryBuilder', function(e, rule) {
|
||||
const date_picker = [
|
||||
'created',
|
||||
'completed',
|
||||
'travel_date'
|
||||
]
|
||||
|
||||
if (date_picker.indexOf(rule.filter.label) !== -1) {
|
||||
addDatePicker(rule.$el.find('.rule-value-container input'));
|
||||
}
|
||||
})
|
||||
|
||||
DOMCACHE.get('#search-form').on('click', 'input[type="button"]', function() {
|
||||
const action = $(this).data('action');
|
||||
DOMCACHE.get('#search-form').attr('action', `/bkoreport/${action}`).submit();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<!-- upload and import file -->
|
||||
<script src="/assets/js/plupload.full.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function() {
|
||||
let uploader = new plupload.Uploader({
|
||||
runtimes: 'html5',
|
||||
browse_button: 'pickfiles',
|
||||
container: document.getElementById('container'),
|
||||
url: '/bkoreport/upload',
|
||||
chunk_size: '200kb',
|
||||
max_retries: 2,
|
||||
filters: {
|
||||
max_file_size: '50mb',
|
||||
mime_types: [{
|
||||
title: "CSV files",
|
||||
extensions: "csv"
|
||||
}]
|
||||
},
|
||||
init: {
|
||||
PostInit: function() {
|
||||
document.getElementById('filelist').innerHTML = '';
|
||||
},
|
||||
FilesAdded: function(up, files) {
|
||||
$("#import-message").text('');
|
||||
plupload.each(files, function(file) {
|
||||
document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
|
||||
});
|
||||
},
|
||||
UploadProgress: function(up, file) {
|
||||
document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
||||
},
|
||||
Error: function(up, err) {
|
||||
// DO YOUR ERROR HANDLING!
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
uploader.bind('FileUploaded', function() {
|
||||
// After file uploaded , send signal to insert all records
|
||||
removeFile();
|
||||
$('#overlay').fadeIn();
|
||||
$.ajax({
|
||||
url: '/bkoreport/importCSV',
|
||||
method: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: {
|
||||
'member_id' : $('input[name="member_id"]').val()
|
||||
},
|
||||
success: function(data) {
|
||||
$("#import-message").text(data.message);
|
||||
},
|
||||
error: function(err) {
|
||||
$("#import-message").text('Something went wrong !!!');
|
||||
},
|
||||
complete: function() {
|
||||
$('#overlay').fadeOut();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
uploader.init()
|
||||
|
||||
function removeFile() {
|
||||
$.each(uploader.files, function (i, file) {
|
||||
if (file) {
|
||||
uploader.removeFile(file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// validate upload form
|
||||
$("#form-upload").validate({
|
||||
rules: {
|
||||
member_id: {
|
||||
required: true,
|
||||
number: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
member_id: {
|
||||
required: 'Please input Member ID',
|
||||
number: 'Please input number'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-upload').on('click', function(e) {
|
||||
$('#import-message').text('');
|
||||
|
||||
if (uploader.files.length === 0) {
|
||||
$('#import-message').text('Please choose a file !!!');
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! uploader.files[0].size) {
|
||||
$('#import-message').text('File is empty');
|
||||
removeFile();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $("#form-upload").valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uploader.start();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- upload and import file -->
|
||||
<style>
|
||||
#query-builder {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.btn-group {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
background: #ffffff;
|
||||
color: #666666;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 5000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding-top: 25%;
|
||||
opacity: .80;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
margin: 0 auto;
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
animation: rotate 0.8s infinite linear;
|
||||
border: 5px solid firebrick;
|
||||
border-right-color: transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#form-upload {
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 1rem;
|
||||
width: 33rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input[name='member_id'] {
|
||||
width: 16rem;
|
||||
}
|
||||
|
||||
.file-upload {
|
||||
position: absolute;
|
||||
left: 17rem;
|
||||
top: 3.2rem;
|
||||
}
|
||||
|
||||
.import-group {
|
||||
padding: 10px;
|
||||
padding-bottom: 6px;
|
||||
border: 1px solid #dcc896;
|
||||
background: rgba(250,240,210,.5);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,124 @@
|
||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
|
||||
<form method="post" action="?">
|
||||
<fieldset>
|
||||
<table>
|
||||
<tr>
|
||||
<td>From</td>
|
||||
<td><input type="hidden" id="from" name="from" value="<?= $from ?>"><input type="text" name="autofrom" id="autofrom" class="form-control" style="width:400px;" value="<?= $autofrom ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>To</td>
|
||||
<td><input type="hidden" id="to" name="to" value="<?= $to ?>"><input type="text" name="autoto" id="autoto" class="form-control" style="width:400px;" value="<?= $autoto ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Origin Country</td>
|
||||
<td><?= $card_from_country ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dest Country</td>
|
||||
<td><?= $card_to_country ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Origin Postal</td>
|
||||
<td><input type="text" class="form-control" style="width:400px;" id="from_postal" name="from_postal" value="<?= $from_postal ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dest Postal</td>
|
||||
<td><input type="text" class="form-control" style="width:400px;" id="to_postal" name="to_postal" value="<?= $to_postal ?>"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Filter" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Quotes</h6>
|
||||
<div class="heading-elements">
|
||||
<a href="/bkoreport/quote">Recent</a>
|
||||
| <a href="/bkoreport/quotes">Aggregate</a>
|
||||
| <a href="/bkoreport/totalquotes">Total</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="quotes" class="table-responsive">
|
||||
<?= $links ?>
|
||||
<?= $quotes_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function viewQuotes(from, to) {
|
||||
if (from > 0 && to > 0) {
|
||||
document.location = '/bkoadmin/compare?from=' + from + '&to=' + to;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<!-- jQuery UI -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function() {
|
||||
console.log('aaaa');
|
||||
// Initialize
|
||||
$("#autofrom").autocomplete({
|
||||
source: function(request, response) {
|
||||
console.log('bbbb');
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function(data) {
|
||||
response(data);
|
||||
},
|
||||
error: function(data) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
// Set selection
|
||||
$('#autofrom').val(ui.item.label); // display the selected text
|
||||
$('#from').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$("#autoto").autocomplete({
|
||||
source: function(request, response) {
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function(data) {
|
||||
response(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function(event, ui) {
|
||||
// Set selection
|
||||
$('#autoto').val(ui.item.label); // display the selected text
|
||||
$('#to').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-7">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Total Quotes</h6>
|
||||
<div class="heading-elements">
|
||||
<a href="/bkoreport/quote">Recent</a>
|
||||
| <a href="/bkoreport/quotes">Aggregate</a>
|
||||
| <a href="/bkoreport/totalquotes">Total</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="total_quotes" class="table-responsive">
|
||||
<form method="post">
|
||||
<select name="days">
|
||||
<option value="1">Past 1 day</option>
|
||||
<option value="7"<?=$days==7?" selected":""?>>Past 7 days</option>
|
||||
<option value="30"<?=$days==30?" selected":""?>>Past 30 days</option>
|
||||
<option value="60"<?=$days==60?" selected":""?>>Past 60 days</option>
|
||||
<option value="90"<?=$days==90?" selected":""?>>Past 90 days</option>
|
||||
<option value="180"<?=$days==180?" selected":""?>>Past 180 days</option>
|
||||
<option value="365"<?=$days==365?" selected":""?>>Past 365 days</option>
|
||||
</select>
|
||||
<input type="submit" name="quotes" value="Show"/>
|
||||
</form>
|
||||
<?=$total_quotes_table?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat">
|
||||
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Insights</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="insights" class="table-responsive">
|
||||
<?php foreach ($payload["insights"] as $insight) { ?>
|
||||
<h3><?= $insight["name"] ?></h3>
|
||||
<?php if (array_key_exists("trip", $insight) && is_array($insight["trip"]) && count($insight["trip"]) > 0) { ?>
|
||||
<h4>Trip</h4>
|
||||
<ul>
|
||||
<li><b>Date:</b> <?= $insight["trip"]["travel_date"] ?> </li>
|
||||
<li><b>From:</b> <?= $insight["trip"]["location_start_address"] ?> </li>
|
||||
<li><b>To:</b> <?= $insight["trip"]["location_end_address"] ?> </li>
|
||||
<li><b>Cost:</b> <?= $insight["trip"]["cost_raw"] ?> </li>
|
||||
<li><b>Distance:</b> <?= $insight["trip"]["distance"] ?> </li>
|
||||
<li><b>Duration:</b> <?= $insight["trip"]["duration"] ?> </li>
|
||||
<li><b>Vendor:</b> <?= $insight["trip"]["transport_provder_name"] ?> </li>
|
||||
<li><b>Category:</b> <?= $insight["trip"]["category"] ?> </li>
|
||||
<li><b>Is surge:</b> <?= $insight["trip"]["surge_price"] ?> </li>
|
||||
<li><b>Cheaper:</b> <?= $insight["trip"]["cheaper_alternative"] ?> </li>
|
||||
<li><b>Min cost:</b> <?= $insight["trip"]["min_cost"] ?></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<?php } ?>
|
||||
<h3>Alternatives</h3>
|
||||
<?php if (array_key_exists("alternatives", $insight) && is_array($insight["alternatives"]) && count($insight["alternatives"]) > 0) { ?>
|
||||
<?php foreach ($insight["alternatives"] as $alternative) { ?>
|
||||
<hr size=-1 color="black">
|
||||
<ul>
|
||||
<li><b>Date:</b> <?= $alternative["travel_date"] ?> </li>
|
||||
<li><b>From:</b> <?= $alternative["location_start_address"] ?> </li>
|
||||
<li><b>To:</b> <?= $alternative["location_end_address"] ?> </li>
|
||||
<li><b>Cost:</b> <?= $alternative["cost_raw"] ?> </li>
|
||||
<li><b>Distance:</b> <?= $alternative["distance"] ?> </li>
|
||||
<li><b>Duration:</b> <?= $alternative["duration"] ?> </li>
|
||||
<li><b>Vendor:</b> <?= $alternative["transport_provder_name"] ?> </li>
|
||||
<li><b>Category:</b> <?= $alternative["category"] ?> </li>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="pad">No alternatives found at the moment.</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Count by Vendor</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="vendor_count" class="table-responsive">
|
||||
<canvas id="canvas_vendor_count_chart"></canvas>
|
||||
<?=$vendor_count?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Cost by Vendor</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="vendor_cost" class="table-responsive">
|
||||
<canvas id="canvas_vendor_cost_chart"></canvas>
|
||||
<?=$vendor_cost?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Members by Vendor</h6>
|
||||
<div class="heading-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="vendor_members" class="table-responsive">
|
||||
<canvas id="canvas_vendor_members_chart"></canvas>
|
||||
<?=$vendor_members?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$(function() {
|
||||
var ctxCount = document.getElementById("canvas_vendor_count_chart");
|
||||
var countPieChart = new Chart(ctxCount, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$vendor_count_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$vendor_count_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxCost = document.getElementById("canvas_vendor_cost_chart");
|
||||
var costPieChart = new Chart(ctxCost, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$vendor_cost_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$vendor_cost_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
var ctxMembers = document.getElementById("canvas_vendor_members_chart");
|
||||
var memebersPieChart = new Chart(ctxMembers, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
datasets: [{
|
||||
data: [<?=implode(',',$vendor_members_values)?>],
|
||||
backgroundColor: ["#0074D9", "#FF4136", "#2ECC40", "#FF851B", "#7FDBFF", "#B10DC9", "#FFDC00", "#001f3f", "#39CCCC", "#01FF70", "#85144b", "#F012BE", "#3D9970", "#111111", "#AAAAAA"]
|
||||
}],
|
||||
labels: ['<?=implode("','",$vendor_members_labels)?>']
|
||||
},
|
||||
options: {
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,262 @@
|
||||
<!-- include css -->
|
||||
<link href="/assets/css/reports/signup_email_report.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<?php
|
||||
$startdate = isset( $_GET['startdate'] ) ? str_replace( '-', '/', $_GET['startdate'] ) : null;
|
||||
$enddate = isset( $_GET['enddate'] ) ? str_replace( '-', '/', $_GET['enddate'] ) : null;
|
||||
?>
|
||||
<div class="wrap-form-date-range-filter" style="max-width: 400px; margin-bottom: 20px;">
|
||||
<form name="range-date-filter" method="GET" action="/bkoreport/signup_email_report">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
|
||||
<input type="text" class="form-control inp-filter-date" placeholder="Search" value="<?php if ( $startdate and $enddate ) echo $startdate . ' - ' . $enddate; ?>">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<i class="glyphicon glyphicon-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
<div class="panel panel-flat" style="background-color:#CEE0D7;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Signup Email Report</h6>
|
||||
<div class="heading-elements"></div>
|
||||
</div>
|
||||
<table class="table table-striped table-hover table-bordered table-condensed" style="font-size:10px;">
|
||||
<thead class="bg-indigo">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ( $signup_emails ): ?>
|
||||
<?php foreach ( $signup_emails as $item ): ?>
|
||||
<?php
|
||||
// $email = call_user_func_array( 'array_merge', $item['email'] );
|
||||
// $count = count( $email );
|
||||
// $content = implode( "<br/>", $email );
|
||||
// array_push( $counts, $count );
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $item['day']; ?></td>
|
||||
<td><a href="#" type="button" class="btn explode" data-toggle="modal" data-date="<?php echo $item['day']; ?>"><?php echo $item['count']; ?></a></td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
<canvas id="signup-emails-charts"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Popup - list emails detail -->
|
||||
<div class="modal fade" id="explode" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document" style="width: 80%;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Email Details</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="pagination" style="margin-left: 20px; margin-top: 20px;"></div>
|
||||
<div class="modal-body" id="table-content"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( $signup_emails ): ?>
|
||||
<?php
|
||||
$labels = array_map( function( $e ) {return "'$e'"; }, array_column( $signup_emails, 'day') );
|
||||
$counts = array_map( function( $e ) {return "'$e'"; }, array_column( $signup_emails, 'count') );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
(function( $ ) {
|
||||
$(function() {
|
||||
var buildchart = {
|
||||
targ: document.getElementById('signup-emails-charts'),
|
||||
init: function() {
|
||||
if ( !this.targ ) return;
|
||||
this.build();
|
||||
},
|
||||
build: function() {
|
||||
var ctx = this.targ.getContext('2d');
|
||||
var chart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [<?php echo implode( ', ', $labels ); ?>],
|
||||
datasets: [{
|
||||
data: [<?php echo implode( ', ', $counts ); ?>],
|
||||
backgroundColor: '#d6ebfb',
|
||||
borderWidth: 1,
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
plugins: { labels: { render: 'value' } },
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
userCallback: function( label, index, labels ) {
|
||||
if ( Math.floor(label) === label ) {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
},
|
||||
}]
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
fontSize: 18,
|
||||
padding: 20,
|
||||
text: 'Signup Email Report <?php echo ( $startdate and $enddate ) ? 'from ' . $startdate . ' - to ' . $enddate : 'in last month'; ?>'
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
buildchart.init();
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
<?php endif ?>
|
||||
<script type="text/javascript">
|
||||
(function( $ ) {
|
||||
$(function() {
|
||||
var daterange = {
|
||||
targ: $('.inp-filter-date'),
|
||||
form: $('form[name="range-date-filter"]'),
|
||||
init: function() {
|
||||
if ( !this.targ ) return;
|
||||
this.rangeDateInputInit();
|
||||
// submit date range filter
|
||||
this.submitFilter();
|
||||
},
|
||||
rangeDateInputInit: function() {
|
||||
this.targ.daterangepicker({
|
||||
opens: 'right',
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
cancelLabel: 'Clear'
|
||||
},
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'Last 60 Days': [moment().subtract(59, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
|
||||
'Two months ago': [moment().subtract(2, 'month').startOf('month'), moment().subtract(2, 'month').endOf('month')]
|
||||
},
|
||||
alwaysShowCalendars: true
|
||||
}, function(start, end, label) {
|
||||
$('.calendar.left').find('th.month').next().addClass('next available').html('<i class="icon-arrow-right32"></i>');
|
||||
});
|
||||
|
||||
this.targ.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
|
||||
});
|
||||
|
||||
this.targ.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$(this).val('');
|
||||
});
|
||||
},
|
||||
submitFilter: function() {
|
||||
this.form.on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
var _this = $(this),
|
||||
input = _this.find( daterange.targ ),
|
||||
startdate,
|
||||
enddate;
|
||||
|
||||
if ( input.val().length <= 0 ) {
|
||||
startdate = null;
|
||||
enddate = null;
|
||||
window.location.replace( '/bkoreport/signup_email_report/' );
|
||||
} else {
|
||||
var rangeDate = input.val().split('-');
|
||||
startdate = $.trim( rangeDate[0].replaceAll('/', '-') );
|
||||
enddate = $.trim( rangeDate[1].replaceAll('/', '-') );
|
||||
window.location.href = '/bkoreport/signup_email_report/?startdate=' + startdate +'&enddate='+ enddate;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
daterange.init();
|
||||
|
||||
// run popup
|
||||
$(document).on('click', '.explode', function(event) {
|
||||
var date = $(this).attr('data-date');
|
||||
$('#explode').find('.modal-body').attr( 'data-content', date );
|
||||
$('#explode').modal( {cache:false}, 'show' );
|
||||
});
|
||||
|
||||
$(document).on('shown.bs.modal', function(event) {
|
||||
var date = $('#explode').find('.modal-body').attr( 'data-content' );
|
||||
showTable( date );
|
||||
});
|
||||
|
||||
// pagination
|
||||
$(document).on('click', '#pagination>ul>li>a', function(event) {
|
||||
event.preventDefault();
|
||||
var url = $(this).attr('href');
|
||||
$.ajax({
|
||||
url: url,
|
||||
})
|
||||
.done(function( res ) {
|
||||
$('#table-content').html( res.results );
|
||||
$('#pagination').html( res.pagination.link );
|
||||
})
|
||||
.fail(function( err ) {
|
||||
console.log( err );
|
||||
})
|
||||
.always(function() {
|
||||
console.log("complete");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function showTable( date ) {
|
||||
try {
|
||||
$.ajax({
|
||||
url: '/bkoreport/signup_email_report_details/',
|
||||
type: 'GET',
|
||||
data: {
|
||||
date: date,
|
||||
},
|
||||
dataType: 'json'
|
||||
})
|
||||
.done(function( res ) {
|
||||
// create datatable
|
||||
$('#table-content').html( res.results );
|
||||
$('#pagination').html( res.pagination.link );
|
||||
})
|
||||
.fail(function( err ) {
|
||||
console.log( err );
|
||||
})
|
||||
.always(function() {
|
||||
console.log("complete");
|
||||
});
|
||||
} catch ( err ) {
|
||||
alert( err );
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="footer text-muted">
|
||||
© 2018-<?php echo date("Y"); ?>. <a href="#">Main BackOffice</a> for <?php echo SITE_NAME; ?>
|
||||
</div>
|
||||
<!-- /footer -->
|
||||
|
||||
</div>
|
||||
<!-- /content area -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
</div>
|
||||
<!-- /page container -->
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
function LocateMember(member_id) {
|
||||
// alert(member_id);
|
||||
$('#transp_detail').html('Processing...');
|
||||
//$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/member/locateMember?proc=PROCESS&member_id=" + member_id
|
||||
}).done(function (data) {
|
||||
$('#transp_detail').html(data);
|
||||
// $('#acc' + member_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="/assets/customjs/general.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<META HTTP-EQUIV="REFRESH" CONTENT="<?= MAX_ADMIN_SESSION ?>;URL=/logout">
|
||||
<title><?php echo SITE_NAME; ?></title>
|
||||
|
||||
<!-- Global stylesheets -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/core.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/components.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/colors.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/spacing.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/global/css/icons/icomoon/styles.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/bootstrap_limitless.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/layout.min.css" rel="stylesheet" type="text/css">
|
||||
-->
|
||||
|
||||
<!-- /global stylesheets -->
|
||||
<style>
|
||||
/* Always set the map height explicitly to define the size of the div
|
||||
* element that contains the map. */
|
||||
#map {
|
||||
height: 100%;
|
||||
}
|
||||
/* Optional: Makes the sample page fill the window. */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<!-- Core JS files -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/loaders/pace.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/libraries/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/libraries/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/loaders/blockui.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/tables/datatables/datatables.min.js"></script>
|
||||
|
||||
<!-- /core JS files -->
|
||||
|
||||
|
||||
<!-- Theme JS files -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/visualization/d3/d3.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/visualization/d3/d3_tooltip.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/styling/switchery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/styling/uniform.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/moment/moment.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/pickers/daterangepicker.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/pages/datatables_basic.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/app.js?ver=3"></script>
|
||||
<script type="text/javascript" src="/assets/js/pages/dashboard.js"></script>
|
||||
|
||||
|
||||
<!--script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script -->
|
||||
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" />
|
||||
|
||||
|
||||
|
||||
<!-- <script type="text/javascript" src="/assets/js/core/app.js"></script>-->
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/notifications/jgrowl.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/notifications/bootbox.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/moment/moment.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/pickers/anytime.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="/assets/js/core/app.js"></script>-->
|
||||
<script type="text/javascript" src="/assets/js/pages/picker_date.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/ripple.min.js"></script>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.date.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.time.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/legacy.js"></script>
|
||||
<script src="/assets/js/d3-mitch-tree.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/d3-mitch-tree.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/d3-mitch-tree-theme-default.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.css">
|
||||
|
||||
<!-- /theme JS files -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/emn178/chartjs-plugin-labels/src/chartjs-plugin-labels.js"></script>
|
||||
|
||||
<!-- form validator -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/validation/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/validation/additional-methods.js"></script>
|
||||
|
||||
<?php if (isset($js) && is_array($js)) {
|
||||
foreach ($js as $url) {
|
||||
?>
|
||||
<script src="<?php echo $url; ?>"></script>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<!-- add custom css -->
|
||||
<?php if (isset($extra_styles) && is_array($extra_styles)) {
|
||||
foreach ($extra_styles as $url) {
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo $url; ?>" >
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Main navbar -->
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-header">
|
||||
<a style='margin-top:0px;' href="/dash"><h4> <?php echo SITE_NAME; ?></h4></a>
|
||||
<ul class="nav navbar-nav visible-xs-block">
|
||||
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
|
||||
<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse" id="navbar-mobile">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right" style="background-color:#B22222;">
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Booking</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/booking/summary"><i class="icon-user-plus"></i>Booking Summary</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Cards</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/cards"><i class="icon-user-plus"></i>App Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/surveycards"><i class="icon-user-plus"></i>Survey Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/cardorder"><i class="icon-user-plus"></i>Card Order</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/blog_app_articles"><i class="icon-user-plus"></i>Blog App Articles</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/dynamiccards"><i class="icon-user-plus"></i>Manage Dynamic Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/expiredcards"><i class="icon-user-plus"></i>Expired Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/arcvcards"><i class="icon-user-plus"></i>Archived Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/deletedcards"><i class="icon-user-plus"></i>Deleted Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i> Not used yet....</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Screen_Cards/list"><i class="icon-user-plus"></i> Screen Cards</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Subscription</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/subscription/subscriptionreport"><i class="icon-user-plus"></i>Subscription Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription/subscribed_deals"><i class="icon-user-plus"></i>Subscribed Deals</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription/carpoolreport"><i class="icon-user-plus"></i>CarPool Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription/carpoolfriend"><i class="icon-user-plus"></i>CarPool Friend</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription"><i class="icon-user-plus"></i>Configured</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i>........</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Surveys</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/subscription/surveyreport"><i class="icon-user-plus"></i>Survey Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription"><i class="icon-user-plus"></i>Survey List</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i>........</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Points</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/points"><i class="icon-user-plus"></i>Redeem Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoadmin/points"><i class="icon-user-plus"></i>Points Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/points/assignpoints"><i class="icon-user-plus"></i>Assign Points</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/points/systemicpointssummary"><i class="icon-user-plus"></i>Systemic Points Summary</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Tools</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/uploads/cardimages"><i class="icon-user-plus"></i>Card Images</a></li>
|
||||
<!-- li class="divider"></li>
|
||||
<li><a href="/bkoadmin/cards"><i class="icon-user-plus"></i>App Cards</a></li>
|
||||
<li><a href="/bkoadmin/arcvcards"><i class="icon-user-plus"></i>Deleted Cards</a></li -->
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/pointsofinterest"><i class="icon-user-plus"></i>Point of Interest[POS]</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/gpstriggeraddress"><i class="icon-user-plus"></i>GPS Trigger Addresses</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/neighborhood"><i class="icon-user-plus"></i>Neighborhood Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/advice/advicelist"><i class="icon-user-plus"></i>Advice List</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/advice/receiptadvice"><i class="icon-user-plus"></i>Receipt Advice</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/acl/index"><i class="icon-user-plus"></i>ACL</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Acl_WhiteList/index"><i class="icon-user-plus"></i>ACL WhiteList Extra</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Global_settings/index"><i class="icon-user-plus"></i>Global Setting</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Addresses/index"><i class="icon-user-plus"></i>Addresses</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Geofence_area_anchor/index"><i class="icon-user-plus"></i>Geofence Area Anchor</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Credit_cards/index"><i class="icon-user-plus"></i>Credit Card Benefits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>System</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<!-- li><a href="/bkoreport/decisionstatus"><i class="icon-user-plus"></i>Personalty Group</a></li>
|
||||
<li class="divider"></li -->
|
||||
<li><a href="/bkoadmin/country"><i class="icon-user-plus"></i>Country Settings</a></li>
|
||||
<li><a href="/bkoadmin/transport"><i class="icon-user-plus"></i>Transport Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<!-- li><a href="/bkoadmin/points"><i class="icon-user-plus"></i>Points Settings</a></!-->
|
||||
<li><a href="/bkoadmin/appsettings"><i class="icon-user-plus"></i>App Settings</a></li>
|
||||
<li><a href="/bkoadmin/usermanagerment"><i class="icon-user-plus"></i>User Management</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoadmin/globals"><i class="icon-user-plus"></i>Globals</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/testaccounts"><i class="icon-shield-check"></i>Test Accounts</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/security"><i class="icon-shield-check"></i>Blocked IPs</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tracking/crashlog/"><i class="icon-shield-check"></i>Crash Log</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/myfloat_version/"><i class="icon-help"></i>My Float Version</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Personalty</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/bkoreport/decisionstatus"><i class="icon-user-plus"></i>Personalty Group</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/feed/onboardingsurvey"><i class="icon-user-plus"></i>Onboarding Survey</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/descisionlogic"><i class="icon-user-plus"></i>Descision Logic</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/personaltyname"><i class="icon-user-plus"></i>Personalty Name</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/personaltycards"><i class="icon-user-plus"></i>Personalty Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li><a href="/descision/descisionreport"><i class="icon-user-plus"></i> Report</a></li>
|
||||
<li><a href="/descision/descisiontree"><i class="icon-user-plus"></i> Tree</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Account</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/logout"><i class="icon-switch2"></i> Logout</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoreport"><i class="icon-user-plus"></i> Manage Users</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /main navbar -->
|
||||
|
||||
|
||||
<!-- Page container -->
|
||||
<div class="page-container">
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="page-content">
|
||||
|
||||
<?php echo include 'common/admin_sidebar.php'; ?>
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="page-header page-header-default">
|
||||
<div class="page-header-content">
|
||||
<div class="page-title" style="padding: 10px;">
|
||||
<h4><a href="/dash"><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold">Dashboard</span></a> - <?php echo isset($page_title) ? $page_title : 'BKO Session'; ?></h4>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /page header -->
|
||||
|
||||
|
||||
<!-- Content area -->
|
||||
<div class="content">
|
||||
@@ -0,0 +1,367 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<META HTTP-EQUIV="REFRESH" CONTENT="<?= MAX_ADMIN_SESSION ?>;URL=/logout">
|
||||
<title><?php echo SITE_NAME; ?></title>
|
||||
|
||||
<!-- Global stylesheets -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/icons/icomoon/styles.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/bootstrap.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/core.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/components.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/colors.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/spacing.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700,900" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/global/css/icons/icomoon/styles.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/bootstrap_limitless.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/layout.min.css" rel="stylesheet" type="text/css">
|
||||
-->
|
||||
|
||||
<!-- /global stylesheets -->
|
||||
<style>
|
||||
/* Always set the map height explicitly to define the size of the div
|
||||
* element that contains the map. */
|
||||
#map {
|
||||
height: 100%;
|
||||
}
|
||||
/* Optional: Makes the sample page fill the window. */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<!-- Core JS files -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/loaders/pace.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/libraries/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/libraries/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/loaders/blockui.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/tables/datatables/datatables.min.js"></script>
|
||||
|
||||
<!-- /core JS files -->
|
||||
|
||||
|
||||
<!-- Theme JS files -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/visualization/d3/d3.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/visualization/d3/d3_tooltip.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/styling/switchery.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/styling/uniform.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/selects/bootstrap_multiselect.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/moment/moment.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/pickers/daterangepicker.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/pages/datatables_basic.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/app.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/pages/dashboard.js"></script>
|
||||
|
||||
|
||||
<!--script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script -->
|
||||
<script src="https://cdn.datatables.net/1.10.12/js/dataTables.bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css" />
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="/assets/js/core/app.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/notifications/jgrowl.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/notifications/bootbox.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/moment/moment.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/pickers/anytime.min.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/core/app.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/pages/picker_date.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/assets/js/plugins/ui/ripple.min.js"></script>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.date.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/picker.time.js"></script>
|
||||
<script src="/assets/js/plugins/pickers/pickadate/legacy.js"></script>
|
||||
<script src="/assets/js/d3-mitch-tree.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/d3-mitch-tree.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/d3-mitch-tree-theme-default.min.css">
|
||||
|
||||
<!-- /theme JS files -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.bundle.min.js"></script>
|
||||
|
||||
<!-- form validator -->
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/validation/jquery.validate.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/plugins/forms/validation/additional-methods.js"></script>
|
||||
|
||||
<?php if (isset($js) && is_array($js)) {
|
||||
foreach ($js as $url) {
|
||||
?>
|
||||
<script src="<?php echo $url; ?>"></script>
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<!-- add custom css -->
|
||||
<?php if (isset($extra_styles) && is_array($extra_styles)) {
|
||||
foreach ($extra_styles as $url) {
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo $url; ?>" >
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Main navbar -->
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-header">
|
||||
<a style='margin-top:0px;' href="/dash"><h4> <?php echo SITE_NAME; ?></h4></a>
|
||||
<ul class="nav navbar-nav visible-xs-block">
|
||||
<li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
|
||||
<li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navbar-collapse collapse" id="navbar-mobile">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right" style="background-color:#B22222;">
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Member</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/member/trackedemail"><i class="icon-user-plus"></i>Tracked Email</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Receipts</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/Parsed_Receipts/index"><i class="icon-user-plus"></i>Parsed Receipts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Cards</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/cards"><i class="icon-user-plus"></i>App Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/surveycards"><i class="icon-user-plus"></i>Survey Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/cardorder"><i class="icon-user-plus"></i>Card Order</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/dynamiccards"><i class="icon-user-plus"></i>Manage Dynamic Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/arcvcards"><i class="icon-user-plus"></i>Archived Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/cards/deletedcards"><i class="icon-user-plus"></i>Deleted Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i> Not used yet....</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Subscription</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/subscription/subscriptionreport"><i class="icon-user-plus"></i>Subscription Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription/carpoolreport"><i class="icon-user-plus"></i>CarPool Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription/carpoolfriend"><i class="icon-user-plus"></i>CarPool Friend</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription"><i class="icon-user-plus"></i>Configured</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i>........</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Surveys</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/subscription/surveyreport"><i class="icon-user-plus"></i>Survey Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/subscription"><i class="icon-user-plus"></i>Survey List</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#"><i class="icon-user-plus"></i>........</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Points</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/points"><i class="icon-user-plus"></i>Redeem Report</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoadmin/points"><i class="icon-user-plus"></i>Points Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/points/assignpoints"><i class="icon-user-plus"></i>Assign Points</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Tools</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/uploads/cardimages"><i class="icon-user-plus"></i>Card Images</a></li>
|
||||
<!-- li class="divider"></li>
|
||||
<li><a href="/bkoadmin/cards"><i class="icon-user-plus"></i>App Cards</a></li>
|
||||
<li><a href="/bkoadmin/arcvcards"><i class="icon-user-plus"></i>Deleted Cards</a></li -->
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/pointsofinterest"><i class="icon-user-plus"></i>Point of Interest[POS]</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/gpstriggeraddress"><i class="icon-user-plus"></i>GPS Trigger Addresses</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/neighborhood"><i class="icon-user-plus"></i>Neighborhood Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/advice/advicelist"><i class="icon-user-plus"></i>Advice List</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/advice/receiptadvice"><i class="icon-user-plus"></i>Receipt Advice</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/acl/index"><i class="icon-user-plus"></i>ACL</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Acl_WhiteList/index"><i class="icon-user-plus"></i>ACL WhiteList Extra</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Global_settings/index"><i class="icon-user-plus"></i>Global Setting</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Addresses/index"><i class="icon-user-plus"></i>Addresses</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Geofence_area_anchor/index"><i class="icon-user-plus"></i>Geofence Area Anchor</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/Credit_cards/index"><i class="icon-user-plus"></i>Credit Card Benefits</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>System</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<!-- li><a href="/bkoreport/decisionstatus"><i class="icon-user-plus"></i>Personalty Group</a></li>
|
||||
<li class="divider"></li -->
|
||||
<li><a href="/bkoadmin/country"><i class="icon-user-plus"></i>Country Settings</a></li>
|
||||
<li><a href="/bkoadmin/transport"><i class="icon-user-plus"></i>Transport Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<!-- li><a href="/bkoadmin/points"><i class="icon-user-plus"></i>Points Settings</a></!-->
|
||||
<li><a href="/bkoadmin/appsettings"><i class="icon-user-plus"></i>App Settings</a></li>
|
||||
<li><a href="/bkoadmin/usermanagerment"><i class="icon-user-plus"></i>User Management</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoadmin/globals"><i class="icon-user-plus"></i>Globals</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tools/testaccounts"><i class="icon-shield-check"></i>Test Accounts</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/security"><i class="icon-shield-check"></i>Blocked IPs</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/tracking/crashlog/"><i class="icon-shield-check"></i>Crash Log</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/myfloat_version/"><i class="icon-help"></i>My Float Version</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Personalty</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="/bkoreport/decisionstatus"><i class="icon-user-plus"></i>Personalty Group</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/descisionlogic"><i class="icon-user-plus"></i>Descision Logic</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/personaltyname"><i class="icon-user-plus"></i>Personalty Name</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/descision/personaltycards"><i class="icon-user-plus"></i>Personalty Cards</a></li>
|
||||
<li class="divider"></li>
|
||||
|
||||
<li><a href="/descision/descisionreport"><i class="icon-user-plus"></i> Report</a></li>
|
||||
<li><a href="/descision/descisiontree"><i class="icon-user-plus"></i> Tree</a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown dropdown-user">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown">
|
||||
<span>Account</span>
|
||||
<i class="caret"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="#"><i class="icon-user-plus"></i> My profile</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/logout"><i class="icon-switch2"></i> Logout</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="/bkoreport"><i class="icon-user-plus"></i> Manage Users</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /main navbar -->
|
||||
|
||||
|
||||
<!-- Page container -->
|
||||
<div class="page-container">
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="page-content">
|
||||
|
||||
<?php echo include 'common/admin_sidebar.php'; ?>
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="page-header page-header-default">
|
||||
<div class="page-header-content">
|
||||
<div class="page-title" style="padding: 10px;">
|
||||
<h4><a href="/dash"><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold">Dashboard</span></a> - <?php echo isset($page_title) ? $page_title : 'BKO Session'; ?></h4>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /page header -->
|
||||
|
||||
|
||||
<!-- Content area -->
|
||||
<div class="content">
|
||||
@@ -0,0 +1,79 @@
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Support tickets -->
|
||||
<div class="panel panel-flat">
|
||||
|
||||
|
||||
<!-- Right aligned buttons -->
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<form action="#">
|
||||
<div class="form-group">
|
||||
<label>Your name:</label>
|
||||
<input type="text" class="form-control" placeholder="Eugene Kopyov">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Your password:</label>
|
||||
<input type="password" class="form-control" placeholder="Your strong password">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Your message:</label>
|
||||
<textarea rows="3" cols="3" class="form-control" placeholder="Enter your message here"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end align-items-center">
|
||||
<button type="submit" class="btn bg-blue ml-3">ADD <i class="icon-paperplane ml-2"></i></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /right aligned buttons -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-9">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Users Status Types</h6>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<?=$backoffice_users?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-lg-3">
|
||||
|
||||
<!-- Support tickets -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
|
||||
<form class="needs-validation" novalidate>
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="firstName">First name</label>
|
||||
<input type="text" class="form-control" id="firstName" placeholder="" value="" required>
|
||||
<div class="invalid-feedback">
|
||||
Valid first name is required.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="lastName">Last name</label>
|
||||
<input type="text" class="form-control" id="lastName" placeholder="" value="" required>
|
||||
<div class="invalid-feedback">
|
||||
Valid last name is required.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="username">Username</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">@</span>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="username" placeholder="Username" required>
|
||||
<div class="invalid-feedback" style="width: 100%;">
|
||||
Your username is required.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="email">Email <span class="text-muted">(Optional)</span></label>
|
||||
<input type="email" class="form-control" id="email" placeholder="you@example.com">
|
||||
<div class="invalid-feedback">
|
||||
Please enter a valid email address for shipping updates.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr class="mb-4">
|
||||
<button class="btn btn-primary btn-lg btn-block" type="submit">Add Account</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-9">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Back office users</h6>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<?=$backoffice_users?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<h3>App Settings</h3>
|
||||
<p>Settings related to the APP</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method="GET" action="/bkoadmin/appsettings">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Name</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="name"
|
||||
value="<?= $filterData['name'] ?? '' ?>" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Key</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="key"
|
||||
value="<?= $filterData['key'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
<div>
|
||||
<?=$app_setttings_table?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function updateSettings(setting_id,setting_key){
|
||||
// alert(card_id);
|
||||
var result = confirm("Update Settings = "+setting_key+":"+setting_id+"?");
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
var temp = "T"+setting_key;
|
||||
//alert(temp);
|
||||
var setting_value = document.getElementById(temp).value;
|
||||
//alert(setting_value);
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/updatesettings?setting_id=" + setting_id + "&setting_key=" + setting_key + "&setting_value=" + setting_value
|
||||
}).done(function (data) {
|
||||
//$('#set_form'+setting_key).html(data);
|
||||
alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?
|
||||
include 'common/lightbox.php';
|
||||
?>
|
||||
@@ -0,0 +1,114 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center" style="background-color:lightsalmon;">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold"> Inactive or Archived Cards</h6>
|
||||
<div class="heading-elements">
|
||||
<table><tr><td><?= $links ?></td><td><?= $card_category ?></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="lightbox_container">
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function activateCard(card_id){
|
||||
|
||||
// alert(card_id);
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/bkoadmin/arcvcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<?
|
||||
include 'common/lightbox.php';
|
||||
?>
|
||||
@@ -0,0 +1,271 @@
|
||||
<div class="modal fade" id="ipAddressModal" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title text-capitalize">Modal Header</h4>
|
||||
</div>
|
||||
<form id="ipAddressForm">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="recipient-name" class="control-label">IP Address:</label>
|
||||
<div class="input">
|
||||
<input type="text" class="form-control" id="ip_address" name="ip_address">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="reason-group">
|
||||
<label for="message-text" class="control-label">Reason:</label>
|
||||
<div class="input">
|
||||
<input type="text" class="form-control" id="reason" name="reason" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" id="modal-btn-apply" disabled >Apply</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-xs-8 col-xs-offset-2">
|
||||
<div class="row p-b-md">
|
||||
<div class="col-xs-1 col-xs-offset-10">
|
||||
<button type="button" class="btn btn-primary btn-sm btn-block"
|
||||
data-toggle="modal"
|
||||
data-target="#ipAddressModal"
|
||||
data-action="block"
|
||||
>Block</button>
|
||||
</div>
|
||||
<div class="col-xs-1">
|
||||
<button type="button" class="btn btn-primary btn-sm btn-block"
|
||||
data-toggle="modal"
|
||||
data-target="#ipAddressModal"
|
||||
data-action="unblock"
|
||||
>Unblock</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method="GET" class="blocked-ip-search-form" action="/security/blockedIpData">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="">IP address</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="ip_address_filter"
|
||||
value="<?= $filterData['ip_address_filter'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="">Reason</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="reason_filter"
|
||||
value="<?= $filterData['reason_filter'] ?? '' ?>" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Blocked date</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="blocked_date_filter"
|
||||
readonly
|
||||
value="<?= $filterData['blocked_date_filter'] ?? (date('Y-m-d', strtotime('-30 days')).' - '.date('Y-m-d')) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
<div>
|
||||
<?= $blocked_ip_table?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function () {
|
||||
/*********** date range picker ***********/
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let fromToElement = $('input[name="blocked_date_filter"]');
|
||||
const fromToVal = fromToElement.val();
|
||||
if (fromToVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(30, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
fromToElement.daterangepicker(datepickerOptions);
|
||||
|
||||
fromToElement.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
fromToElement.on('cancel.daterangepicker', function(ev, picker) {
|
||||
fromToElement.val('');
|
||||
});
|
||||
/***************************************/
|
||||
|
||||
jQuery.validator.addMethod("ip", function(value, element) {
|
||||
return this.optional(element) || /^(((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(((\/([4-9]|[12][0-9]|3[0-2]))?)|\s?-\s?((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))))(,\s?|$))+/.test(value);
|
||||
}, "Please specify the correct IP Address");
|
||||
|
||||
$('#ipAddressForm').on('blur keyup change', 'input', function (event) {
|
||||
validateForm('#ipAddressForm');
|
||||
});
|
||||
|
||||
$(".blocked-ip-search-form").validate({
|
||||
rules: {
|
||||
ip_address_filter: {
|
||||
ip: true
|
||||
},
|
||||
},
|
||||
errorElement: "em",
|
||||
errorPlacement: function ( error, element ) {
|
||||
error.addClass( "text-danger" );
|
||||
error.insertAfter( element );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function validateForm(id) {
|
||||
if ($(id).valid()) {
|
||||
$('#modal-btn-apply').prop('disabled', false);
|
||||
} else {
|
||||
$('#modal-btn-apply').prop('disabled', 'disabled');
|
||||
}
|
||||
}
|
||||
|
||||
var ipAddressModal = function(callback){
|
||||
var action = null;
|
||||
var validator;
|
||||
$('#ipAddressModal').on('show.bs.modal', function (event) {
|
||||
|
||||
var button = $(event.relatedTarget);
|
||||
action = button.data('action');
|
||||
var modal = $(this);
|
||||
|
||||
modal.find('.modal-title').text(action);
|
||||
modal.find('#ip_address').val('');
|
||||
modal.find('#reason').val('');
|
||||
|
||||
var rules = {
|
||||
ip_address: {
|
||||
required: true,
|
||||
ip: true
|
||||
},
|
||||
reason: {
|
||||
required: true,
|
||||
minlength: 5,
|
||||
maxlength: 20
|
||||
}
|
||||
};
|
||||
|
||||
if(action === 'unblock') {
|
||||
modal.find("#reason-group").hide();
|
||||
rules = {};
|
||||
} else if(action === 'block') {
|
||||
modal.find("#reason-group").show();
|
||||
}
|
||||
|
||||
|
||||
validator = $('#ipAddressForm').validate({
|
||||
rules: rules,
|
||||
errorElement: "em",
|
||||
errorPlacement: function ( error, element ) {
|
||||
// Add the `help-block` class to the error element
|
||||
error.addClass( "help-block" );
|
||||
error.insertAfter( element );
|
||||
},
|
||||
highlight: function ( element, errorClass, validClass ) {
|
||||
$( element ).parents( ".input" ).addClass( "has-error" );
|
||||
},
|
||||
unhighlight: function (element, errorClass, validClass) {
|
||||
$( element ).parents( ".input" ).removeClass( "has-error" );
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('#ipAddressModal').on('hide.bs.modal', function(event) {
|
||||
if(validator) {
|
||||
validator.destroy()
|
||||
}
|
||||
});
|
||||
|
||||
$("#modal-btn-apply").on("click", function() {
|
||||
if(validator.valid()) {
|
||||
var ipAddress = $("#ip_address").val();
|
||||
var reason = $("#reason").val();
|
||||
callback(action, {'ip_address': ipAddress, reason: reason });
|
||||
$("#ipAddressModal").modal('hide');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var ipAction = function (action, data) {
|
||||
var url = `/security/${action}ip`;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
dataType:'JSON',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
ipAddressModal(ipAction);
|
||||
|
||||
function confirmUnblockIp(ipAddress) {
|
||||
bootbox.confirm(`The IP '${ipAddress}' will be unblocked`, function(result) {
|
||||
if (result === true) {
|
||||
ipAction('unblock', {'ip_address': `${ipAddress}`})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,140 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<form method="POST" action="?">
|
||||
<? if (isset($card_action_id) && $card_action_id>0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_action_id ?>" />
|
||||
<? } ?>
|
||||
<div class="row">
|
||||
<div class="col col-lg-6">
|
||||
<div class="form-group">
|
||||
<label for="cardActionName">Card Action Name</label>
|
||||
<input type="text" class="form-control" id="cardActionName" name="name" maxlength="100" placeholder="Card Action Name" value="<?= $name ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardActionType">Card Action Type</label>
|
||||
<?= $type_combo ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardActionData">Card Action Data</label>
|
||||
<textarea class="form-control" id="cardActionData" name="data" rows="10" placeholder="Card Action Data"><?= $data ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-9">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Configured Card Actions</h6>
|
||||
<div class="heading-elements">
|
||||
<table><tr><td><?= $links ?></td><td><?= $card_category ?></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_action_table ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
<div id="lightbox_container">
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function deleteCardAction(card_action_id){
|
||||
|
||||
// alert(card_id);
|
||||
var result = confirm("Confirm archive card action id="+card_action_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardactionarchive?proc=PROCESS&card_id=" + card_action_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCardAction(card_action_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_action_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/viewcardaction?proc=PROCESS&card_action_id=" + card_action_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_action_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCardAction(card_action_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_action_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcardaction?proc=PROCESS&card_id=" + card_action_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_action_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/bkoadmin/cards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<?
|
||||
include 'common/lightbox.php';
|
||||
?>
|
||||
@@ -0,0 +1,121 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-6">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<?php
|
||||
include 'common/card_form.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Configured Cards</h6>
|
||||
<div class="heading-elements">
|
||||
<table><tr><td><?= $links ?></td><td><?= $card_category ?></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
<div id="lightbox_container">
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function deleteCard(card_id){
|
||||
|
||||
// alert(card_id);
|
||||
var result = confirm("Confirm archive card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardarchive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/bkoadmin/cards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<?
|
||||
include 'common/lightbox.php';
|
||||
?>
|
||||
@@ -0,0 +1,341 @@
|
||||
<h1>Compare</h1>
|
||||
<form method="post" action="?">
|
||||
<fieldset>
|
||||
<table>
|
||||
<tr>
|
||||
<td>From</td>
|
||||
<td><select name="from"><?php foreach ($address as $i=>$j) { ?>
|
||||
<option value="<?= $i ?>"<?=$i==$from?" selected":""?>><?=$j?></option>
|
||||
<?php } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>To</td>
|
||||
<td><select name="to"><?php foreach ($address as $i=>$j) { ?>
|
||||
<option value="<?= $i ?>"<?=$i==$to?" selected":""?>><?=$j?></option>
|
||||
<?php } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="all" value="1"<?=$all==1?'checked':''?> /></td>
|
||||
<td>All time</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><input type="radio" name="all" value="0"<?=$all!=1?'checked':''?> /></td>
|
||||
<td>Range: <input type="text" name="daterange" value="<?=$date_from?> - <?=$date_to?>" size="30" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Compare" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<div id="container"></div>
|
||||
<br/>
|
||||
<style type="text/css">
|
||||
.holder {
|
||||
position: relative;
|
||||
z-index: 10000;
|
||||
}
|
||||
.datepicker {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
canvas {
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
.tabcontainer{
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
ul.tabs{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
ul.tabs li{
|
||||
background: none;
|
||||
color: #222;
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul.tabs li.current{
|
||||
background: #ededed;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-content{
|
||||
display: none;
|
||||
background: #ededed;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.tab-content.current{
|
||||
display: inherit;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="tabcontainer">
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="tab-link current" data-tab="tab-1">Data</li>
|
||||
<li class="tab-link" data-tab="tab-2">History</li>
|
||||
<li class="tab-link" data-tab="tab-3">Vendor</li>
|
||||
<li class="tab-link" data-tab="tab-4">Hour of the Day</li>
|
||||
</ul>
|
||||
|
||||
<div id="tab-1" class="tab-content current">
|
||||
<?=$past_trips?>
|
||||
<br/>
|
||||
<?=$quotes?>
|
||||
</div>
|
||||
<div id="tab-2" class="tab-content">
|
||||
<canvas id="canvasHistory"></canvas>
|
||||
</div>
|
||||
<div id="tab-3" class="tab-content">
|
||||
<canvas id="canvasVendorLine"></canvas>
|
||||
<canvas id="canvasVendor"></canvas>
|
||||
</div>
|
||||
<div id="tab-4" class="tab-content">
|
||||
<canvas id="canvasChart"></canvas>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var sourceFormat = 'YYYY-MM-DD HH:mm:ss';
|
||||
var timeFormat = 'MM/DD/YYYY HH:mm';
|
||||
|
||||
function newDate(date) {
|
||||
return moment(date, sourceFormat).format(timeFormat);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var ctxHistory = document.getElementById("canvasHistory");
|
||||
var chartHistory = new Chart(ctxHistory, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [ // Date Objects
|
||||
<? foreach ($bulk_data as $key=>$val) { echo "newDate('${key}'),"; } echo "newDate('".date("Y-m-d H:i:s",time()+86400)."')"; ?>
|
||||
],
|
||||
datasets: [{
|
||||
label: 'All values',
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
borderColor: 'rgba(255,99,132,1)',
|
||||
fill: false,
|
||||
data: [
|
||||
<? foreach ($bulk_data as $key=>$val) { echo "'${val}',"; } ?>
|
||||
],
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
title: {
|
||||
text: 'Past trips and quotes history'
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
type: 'time',
|
||||
time: {
|
||||
parser: timeFormat,
|
||||
// round: 'day'
|
||||
tooltipFormat: 'll HH:mm'
|
||||
},
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'Date'
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
scaleLabel: {
|
||||
display: true,
|
||||
labelString: 'value'
|
||||
}
|
||||
}]
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
var ctxVendor = document.getElementById("canvasVendor");
|
||||
var chartVendor = new Chart(ctxVendor, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
<? foreach ($by_vendor as $key=>$val) { echo "\"${key}\","; } ?>
|
||||
],
|
||||
datasets: [{
|
||||
label: 'Grab',
|
||||
data: [
|
||||
<? foreach ($by_vendor as $key=>$val) { echo (isset($val[3])?$val[3]:'').","; } ?>
|
||||
],
|
||||
backgroundColor: 'rgba(255, 206, 86, 0.2)',
|
||||
borderColor: 'rgba(255, 206, 86, 1)',
|
||||
borderWidth: 1
|
||||
},{
|
||||
label: 'ComfortDelGro',
|
||||
data: [
|
||||
<? foreach ($by_vendor as $key=>$val) { echo (isset($val[4])?$val[4]:'').","; } ?>
|
||||
],
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
borderColor: 'rgba(255,99,132,1)',
|
||||
borderWidth: 1
|
||||
},{
|
||||
label: 'Gojek',
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1,
|
||||
data: [
|
||||
<? foreach ($by_vendor as $key=>$val) { echo (isset($val[5])?$val[5]:'').","; } ?>
|
||||
]
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var ctxVendorLine = document.getElementById("canvasVendorLine");
|
||||
var chartVendorLine = new Chart(ctxVendorLine, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [
|
||||
<? foreach ($by_vendor as $key=>$val) { echo "\"${key}\","; } ?>
|
||||
],
|
||||
datasets: [{
|
||||
label: 'Grab',
|
||||
data: [
|
||||
<? $pv=0; foreach ($by_vendor as $key=>$val) { if(isset($val[3])) { echo $val[3].","; $pv=$val[3]; } else { echo $pv.","; }} ?>
|
||||
],
|
||||
backgroundColor: 'rgba(255, 206, 86, 0.2)',
|
||||
borderColor: 'rgba(255, 206, 86, 1)',
|
||||
borderWidth: 1
|
||||
},{
|
||||
label: 'ComfortDelGro',
|
||||
data: [
|
||||
<? $pv=0; foreach ($by_vendor as $key=>$val) { if(isset($val[4])) { echo $val[4].","; $pv=$val[4]; } else { echo $pv.","; }} ?>
|
||||
],
|
||||
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||||
borderColor: 'rgba(255,99,132,1)',
|
||||
borderWidth: 1
|
||||
},{
|
||||
label: 'Gojek',
|
||||
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||||
borderColor: 'rgba(54, 162, 235, 1)',
|
||||
borderWidth: 1,
|
||||
data: [
|
||||
<? $pv=0; foreach ($by_vendor as $key=>$val) { if(isset($val[5])) { echo $val[5].","; $pv=$val[5]; } else { echo $pv.","; }} ?>
|
||||
]
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
<?
|
||||
$backgroundColor = [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
];
|
||||
$borderColor = [
|
||||
'rgba(255,99,132,1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)',
|
||||
'rgba(75, 192, 192, 1)',
|
||||
'rgba(153, 102, 255, 1)',
|
||||
'rgba(255, 159, 64, 1)'
|
||||
];
|
||||
?>
|
||||
var ctxChart = document.getElementById("canvasChart");
|
||||
var chartChart = new Chart(ctxChart, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
<? $n = 1; for($h=0;$h<24;$h++) { $hh = sprintf("%02d",$h); if (isset($day_hour[$hh])) { foreach($day_hour[$hh] as $val) {
|
||||
echo "\"${hh}\",";
|
||||
$n++; }} else { echo "\"${hh}\","; $n++; } } ?>
|
||||
],
|
||||
datasets: [<? for ($i=0;$i<24;$i++) { $ii = sprintf("%02d",$i); ?>{
|
||||
label: '<?= $ii ?> hr',
|
||||
backgroundColor: '<?= $backgroundColor[$i%6] ?>',
|
||||
borderColor: '<?= $borderColor[$i%6] ?>',
|
||||
borderWidth: 1,
|
||||
data: [
|
||||
<? for ($h=0;$h<24;$h++) { $hh = sprintf("%02d",$h); if (isset($day_hour[$hh])) { foreach($day_hour[$hh] as $val) {
|
||||
echo $hh==$ii ? "\"${val}\"," : ",";
|
||||
}} else { echo "\"\","; }} ?>
|
||||
]
|
||||
},<? } ?>]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
barPercentage: <?= 20.0 * $n / 100 ?> /* <?= $n ?> */
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('ul.tabs li').click(function(){
|
||||
var tab_id = $(this).attr('data-tab');
|
||||
|
||||
$('ul.tabs li').removeClass('current');
|
||||
$('.tab-content').removeClass('current');
|
||||
|
||||
$(this).addClass('current');
|
||||
$("#"+tab_id).addClass('current');
|
||||
});
|
||||
|
||||
$('input[name="daterange"]').daterangepicker({
|
||||
timePicker: false,
|
||||
opens: 'right',
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function(start, end, label) {
|
||||
console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
//var_dump($bulk_data);
|
||||
/*
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255,99,132,1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)',
|
||||
'rgba(75, 192, 192, 1)',
|
||||
'rgba(153, 102, 255, 1)',
|
||||
'rgba(255, 159, 64, 1)'
|
||||
],
|
||||
*/
|
||||
@@ -0,0 +1,159 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<form class="search-block form-inline" action="/bkoadmin/country" method="POST">
|
||||
<div class="row">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="search_text">Name</label>
|
||||
<input type="text" class="form-control" name="search_text" value='<?=isset($search_text)?$search_text:''?>'>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Countries</h6>
|
||||
<div class="heading-elements">
|
||||
<?= $links ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped media-library table-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Country</th>
|
||||
<th>Code</th>
|
||||
<th>Status</th>
|
||||
<th colspan=2 style="text-align:center">Top Image[400x600]</th>
|
||||
<th>Cities</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?
|
||||
foreach ($countries as $item) {
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $item['country'] ?><? if ($item['uniqueid'] != '') { ?><br/>
|
||||
<div id="country_image_link_<?= $item['id'] ?>"><a href="<?= $storage ?>topcard/<?= $item['uniqueid'] . "." . $item['format'] ?>"><?= $storage ?>topcard/<?= $item['uniqueid'] . "." . $item['format'] ?></a></div><? } ?>
|
||||
</td>
|
||||
<td style="width:50px;"><?= $item['code'] ?></td>
|
||||
<td style="width:50px;"><input type="checkbox" name="status_<?= $item['id'] ?>" value="1" class="styled" <?= $item['status'] == 1 ? 'checked' : '' ?> onchange="return updateCountryStatus('<?= $item["id"] ?>', this.checked);"></td>
|
||||
<td align=right><div id="country_image_<?= $item['id'] ?>"><? if ($item['uniqueid'] != '') { ?>
|
||||
<a href="<?= $storage ?>topcard/<?= $item['uniqueid'] . "." . $item['format'] ?>" data-popup="lightbox">
|
||||
<img src="<?= $storage ?>topcard/<?= $item['uniqueid'] . "." . $item['format'] ?>?size=40x40" alt="" class="img-rounded img-preview">
|
||||
</a>
|
||||
<? } ?></div></td>
|
||||
<td style="width:150px;"><div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" class="btn btn-info" onclick="return showUploadForm('<?= $item["id"] ?>', '<?= $item["country"] ?>')">U</button>
|
||||
<button type="button" class="btn btn-danger" onclick="return deleteCountryImage('<?= $item["id"] ?>');">X</button>
|
||||
</div></td>
|
||||
<td style="width:50px;">
|
||||
<a href="/bkoadmin/countrycity?country=<?=$item['code']?>">Cities</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<font color=red><b><div id="message"><?= $message ?></div></b></font>
|
||||
<div id="upload_form" style="display:none;">
|
||||
<form class="form-horizontal" action="?" method="POST" enctype="multipart/form-data">
|
||||
<fieldset class="content-group"><?= $message ?>
|
||||
<legend id="top_image_legend" class="text-bold">Top Image</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label text-semibold"> Select File:</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="file" name="cardimg" class="file-input form-control btn btn-danger">
|
||||
<span class="help-block">Upload country top image</code>.</span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="id" id="top_image_country_id" value="0" />
|
||||
<input type="hidden" name="catid" value="4" />
|
||||
<div style="text-align:center;">
|
||||
<input type="submit" class="btn btn-primary" value="Upload">
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:20px;">
|
||||
<h3>Top Image Standard</h3>
|
||||
<p>The app is optimized for image <b>600x920</b> jpg files only. The image must be optimized for web use, the smaller the file size the better</p>
|
||||
</div>
|
||||
<b><h3>Default Image - https://www.float.sg/float/static_top.jpg </h3></b>
|
||||
<img src="https://www.float.sg/float/static_top.jpg" alt="Default Image">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function showUploadForm(id, name) {
|
||||
$('#top_image_country_id').val(id);
|
||||
$('#top_image_legend').html(name);
|
||||
$('#upload_form').show();
|
||||
return false;
|
||||
}
|
||||
function updateCountryStatus(id, enabled) {
|
||||
var status = enabled ? 1 : 0;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/bkoadmin/countryStatus?id=' + id + '&status=' + status, true);
|
||||
xhr.responseType = 'html';
|
||||
xhr.onload = function () {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
alert(xhr.response);
|
||||
} else {
|
||||
alert('ERROR:' + xhr.response);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
function deleteCountryImage(id) {
|
||||
if (!confirm('Are you sure you want to delete country top image?'))
|
||||
return false;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/bkoadmin/countryImageDelete?id=' + id, true);
|
||||
xhr.responseType = 'html';
|
||||
xhr.onload = function () {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
$('#message').html(xhr.response);
|
||||
$('#country_image_' + id).html('');
|
||||
$('#country_image_link_' + id).html('');
|
||||
} else {
|
||||
$('#message').html('ERROR:' + xhr.response);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,151 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
|
||||
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold"><a href="/bkoadmin/country"> << Return to Countries</a></h6>
|
||||
<div class="heading-elements">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-warning" type="button" onclick="cleanUp()">CleanUp</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $links ?>
|
||||
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>City name</th>
|
||||
<th>Country name</th>
|
||||
<th>Latitude</th>
|
||||
<th>Longitude</th>
|
||||
<th>Radius</th>
|
||||
<th>Status</th>
|
||||
<th class="actions">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-striped">
|
||||
<?php foreach ($cities as $item): ?>
|
||||
<tr>
|
||||
<td><?php echo $item->id ?></td>
|
||||
<td id="lbl_city_name_<?php echo $item->id ?>"><?php echo $item->city ?></td>
|
||||
<td><?php echo $item->country ?></td>
|
||||
<td><?php echo $item->latitude ?></td>
|
||||
<td><?php echo $item->longitude ?></td>
|
||||
<td><?php echo $item->radius ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if ($item->status == Geofence_area_city_model::ACTIVE_STATUS) {
|
||||
echo 'Active';
|
||||
} else {
|
||||
echo 'Inactive';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="actions">
|
||||
<a href="/geofence_area_city/<?php echo $item->id; ?>/edit" class="btn btn-primary">View</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-danger btn-remove"
|
||||
data-id="<?php echo $item->id ?>"
|
||||
data-city-name="<?php echo $item->city ?>"
|
||||
data-toggle="modal"
|
||||
data-target="#remove-geofence-area-city-modal"
|
||||
>Remove</button>
|
||||
<button
|
||||
onclick ="correctName('lbl_city_name_<?php echo $item->id ?>','<?php echo $item->id ?>','<?php echo $item->latitude ?>','<?php echo $item->longitude ?>');"
|
||||
type="button"
|
||||
class="btn btn-success btn-remove">Correct</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<font color=red><b><div id="message"><?= $message ?></div></b></font>
|
||||
<div id="upload_form" style="display:none;">
|
||||
<form class="form-horizontal" action="?" method="POST" enctype="multipart/form-data">
|
||||
<fieldset class="content-group"><?= $message ?>
|
||||
<legend id="top_image_legend" class="text-bold">Top Image</legend>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label text-semibold"> Select File:</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="file" name="cardimg" class="file-input form-control btn btn-danger">
|
||||
<span class="help-block">Upload country top image</code>.</span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="id" id="top_image_country_id" value="0" />
|
||||
<input type="hidden" name="catid" value="4" />
|
||||
<div style="text-align:center;">
|
||||
<input type="submit" class="btn btn-primary" value="Upload">
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<h3>Top Image Standard</h3>
|
||||
<p>The app is optimized for image 400X400 jpg files only. The image must be optimized for web use, the smaller the size the better</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="/assets/js/app.js" type="text/javascript"></script>
|
||||
<script src="/assets/js/pages/geofence_area_city/list.js" type="text/javascript"></script>
|
||||
<script>
|
||||
function showUploadForm(id, name) {
|
||||
$('#top_image_country_id').val(id);
|
||||
$('#top_image_legend').html(name);
|
||||
$('#upload_form').show();
|
||||
return false;
|
||||
}
|
||||
function updateCountryStatus(id, enabled) {
|
||||
var status = enabled ? 1 : 0;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/bkoadmin/countryStatus?id=' + id + '&status=' + status, true);
|
||||
xhr.responseType = 'html';
|
||||
xhr.onload = function () {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
alert(xhr.response);
|
||||
} else {
|
||||
alert('ERROR:' + xhr.response);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
function deleteCountryImage(id) {
|
||||
if (!confirm('Are you sure you want to delete country top image?'))
|
||||
return false;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/bkoadmin/countryImageDelete?id=' + id, true);
|
||||
xhr.responseType = 'html';
|
||||
xhr.onload = function () {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
$('#message').html(xhr.response);
|
||||
$('#country_image_' + id).html('');
|
||||
$('#country_image_link_' + id).html('');
|
||||
} else {
|
||||
$('#message').html('ERROR:' + xhr.response);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,176 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<!-- Basic modal -->
|
||||
<div id="modal_theme_primary" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-content">
|
||||
<div class="map-container map-symbol-custom">
|
||||
</div>
|
||||
<div id="directionsDiv" style="margin-top:15px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /basic modal -->
|
||||
|
||||
<!-- Support tickets -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method="GET" class="crash-log-search-form" action="/tracking/crashlog">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="">Member id</label>
|
||||
<input type="number"
|
||||
class="form-control"
|
||||
name="member_id_filter"
|
||||
value="<?= $filterData['member_id_filter'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Username</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="username_filter"
|
||||
value="<?= $filterData['username_filter'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">IP</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="ip_address_filter"
|
||||
value="<?= $filterData['ip_address_filter'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Number</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="number_filter"
|
||||
value="<?= $filterData['number_filter'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Added</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="added_filter"
|
||||
readonly
|
||||
value="<?= $filterData['added_filter'] ?? (date('Y-m-d', strtotime('-7 days')).' - '.date('Y-m-d')) ?>" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $crashlog_table?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Selected log entry details</h6>
|
||||
<div class="heading-elements">
|
||||
<span class="heading-text">number: <span id="number" class="text-bold text-danger-600 position-right">N/A</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="crashlogentry" style="border:1px;border-style: dotted;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script type="text/javascript">
|
||||
$( document ).ready( function () {
|
||||
/*********** date range picker ***********/
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let fromToElement = $('input[name="added_filter"]');
|
||||
const fromToVal = fromToElement.val();
|
||||
if (fromToVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
fromToElement.daterangepicker(datepickerOptions);
|
||||
|
||||
fromToElement.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
fromToElement.on('cancel.daterangepicker', function(ev, picker) {
|
||||
fromToElement.val('');
|
||||
});
|
||||
/***************************************/
|
||||
|
||||
jQuery.validator.addMethod("ip", function(value, element) {
|
||||
return this.optional(element) || /^(((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(((\/([4-9]|[12][0-9]|3[0-2]))?)|\s?-\s?((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))))(,\s?|$))+/.test(value);
|
||||
}, "Please specify the correct IP Address");
|
||||
|
||||
$(".crash-log-search-form").validate({
|
||||
rules: {
|
||||
ip_address_filter: {
|
||||
ip: true
|
||||
},
|
||||
},
|
||||
errorElement: "em",
|
||||
errorPlacement: function ( error, element ) {
|
||||
error.addClass( "text-danger" );
|
||||
error.insertAfter( element );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function viewCrash(id,number) {
|
||||
$.ajax({
|
||||
url: "/tracking/crashlogentry?id=" + id
|
||||
}).done(function (data) {
|
||||
$('#crashlogentry').html(data);
|
||||
$('#number').html(number);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,13 @@
|
||||
<h1>Call stack:</h1>
|
||||
<pre style="color:red;">
|
||||
<?= $entry["callstack"] ?>
|
||||
</pre>
|
||||
<h1>Data:</h1>
|
||||
<pre>
|
||||
<?= $entry["data"] ?>
|
||||
</pre>
|
||||
<h1>Notes:</h1>
|
||||
<pre>
|
||||
<?= $entry["notes"] ?>
|
||||
</pre>
|
||||
<br/>
|
||||
@@ -0,0 +1,133 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
|
||||
|
||||
<!-- Basic modal -->
|
||||
<div id="modal_theme_primary" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-content">
|
||||
|
||||
<div class="map-container map-symbol-custom">
|
||||
|
||||
</div>
|
||||
<div id="directionsDiv" style="margin-top:15px"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /basic modal -->
|
||||
|
||||
<!-- Support tickets -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
|
||||
<?= $member_table ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-9">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Recent Travel Tracking</h6>
|
||||
<div class="heading-elements">
|
||||
<span class="heading-text">Last: <span class="text-bold text-danger-600 position-right">PUT TIME HERE</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="map" style="border:1px;border-style: dotted; height:750px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var map;
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: 3.397, lng: 10.644},
|
||||
zoom: 3
|
||||
});
|
||||
}
|
||||
|
||||
var loaded_data = new Array();
|
||||
function showTranspModal(service_request_id) {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
// alert(service_request_id);
|
||||
// collect data - either from forms or from data variables
|
||||
var id = $(this).data('id');
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
//alert(5);
|
||||
// do the ajax bit
|
||||
var post_data = {
|
||||
'interest_id': service_request_id,
|
||||
};
|
||||
//alert(6);
|
||||
$.ajax({
|
||||
url: "/transp/transp_modal?service_request_id=" + service_request_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
//alert(7);
|
||||
$('#modal-content').html(data);
|
||||
//initialize_map();
|
||||
var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
|
||||
var myOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
directionsDisplay.setMap(map);
|
||||
directionsDisplay.setPanel(document.getElementById("directionsDiv"));
|
||||
|
||||
fitMapToBounds_map();
|
||||
|
||||
calcRoute(loaded_data[0], loaded_data[1]);
|
||||
//alert(loaded_data[0]);
|
||||
});
|
||||
}
|
||||
|
||||
function viewMember(member_id) {
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/member/viewmember?proc=PROCESS&member_id=" + member_id
|
||||
}).done(function (data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#acc' + member_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvjiRTxngOQyBP4zpqFlZuiquc0ROvo9c&callback=initMap" async defer></script>
|
||||
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Support tickets -->
|
||||
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $member_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive"> <?=$links?> </div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Recent Travel Tracking</h6>
|
||||
<div class="heading-elements">
|
||||
<span class="heading-text">Last: <span class="text-bold text-danger-600 position-right">PUT TIME HERE</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="map" style="border:1px;border-style: dotted; height:750px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var map;
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: 3.397, lng: 10.644},
|
||||
zoom: 3
|
||||
});
|
||||
}
|
||||
|
||||
var loaded_data = new Array();
|
||||
function showTranspModal(service_request_id) {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
// alert(service_request_id);
|
||||
// collect data - either from forms or from data variables
|
||||
var id = $(this).data('id');
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
//alert(5);
|
||||
// do the ajax bit
|
||||
var post_data = {
|
||||
'interest_id': service_request_id,
|
||||
};
|
||||
//alert(6);
|
||||
$.ajax({
|
||||
url: "/transp/transp_modal?service_request_id=" + service_request_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
//alert(7);
|
||||
$('#modal-content').html(data);
|
||||
//initialize_map();
|
||||
var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
|
||||
var myOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
directionsDisplay.setMap(map);
|
||||
directionsDisplay.setPanel(document.getElementById("directionsDiv"));
|
||||
|
||||
fitMapToBounds_map();
|
||||
|
||||
calcRoute(loaded_data[0], loaded_data[1]);
|
||||
//alert(loaded_data[0]);
|
||||
});
|
||||
}
|
||||
|
||||
function viewMember(member_id) {
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/member/viewmember?proc=PROCESS&member_id=" + member_id
|
||||
}).done(function (data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#acc' + member_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?=$google_api_key?>&callback=initMap" async defer></script>
|
||||
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
<div class="row">
|
||||
<div class="container-fluid">
|
||||
<h2 class="text-center" style="background-color: #1E88E5;color: white; padding: 10px;">Gas station Map</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Map</div>
|
||||
<div class="panel-body">
|
||||
<div id="map" style="border:1px;border-style: dotted; height:750px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<form action="" class="form-horizontal">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Station list</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label for="start_location" class="col-sm-3 control-label text-right">Start
|
||||
localtion</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="search" class="form-control" id="start_location" name="start_location"
|
||||
placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="end_location" class="col-sm-3 control-label text-right">End
|
||||
localtion</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="search" class="form-control" id="station_location"
|
||||
name="station_location" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="end_location" class="col-sm-3 control-label text-right">Order by</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="order_by" name="order_by">
|
||||
<option value="title">Name</option>
|
||||
<option value="distance">Distance</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 text-center">
|
||||
<button type="button" id="btn_search" onclick="fn_search();" class="btn btn-primary">Search</button>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<table id="tbl_gas" class="table table-bordered table-striped" style="margin-top: 10px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Brand</th>
|
||||
<th>Distance (miles)</th>
|
||||
<th>Price (regular)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.locations = [
|
||||
// ['Bondi Beach', -33.890542, 151.274856, 4],
|
||||
// ['Coogee Beach', -33.923036, 151.259052, 5],
|
||||
// ['Cronulla Beach', -34.028249, 151.157507, 3],
|
||||
// ['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
|
||||
// ['Maroubra Beach', -33.950198, 151.259302, 1]
|
||||
];
|
||||
window.center = {
|
||||
lat: 52.5228,
|
||||
lng: 13.41
|
||||
};
|
||||
let geocoder;
|
||||
|
||||
function initMap() {
|
||||
geocoder = new google.maps.Geocoder();
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 12,
|
||||
center: new google.maps.LatLng(window.center.lat, window.center.lng),
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
});
|
||||
|
||||
var infowindow = new google.maps.InfoWindow();
|
||||
|
||||
var marker, i;
|
||||
|
||||
for (i = 0; i < window.locations.length; i++) {
|
||||
marker = new google.maps.Marker({
|
||||
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
|
||||
map: map
|
||||
});
|
||||
|
||||
google.maps.event.addListener(marker, 'click', (function (marker, i) {
|
||||
return function () {
|
||||
infowindow.setContent(locations[i][0]);
|
||||
infowindow.open(map, marker);
|
||||
}
|
||||
})(marker, i));
|
||||
}
|
||||
}
|
||||
function codeLatLng(lat, lng, fcallback) {
|
||||
var latlng = new google.maps.LatLng(lat, lng);
|
||||
geocoder.geocode({
|
||||
'latLng': latlng
|
||||
}, function (results, status) {
|
||||
if (status === google.maps.GeocoderStatus.OK) {
|
||||
if (results[1]) {
|
||||
console.log(results);
|
||||
fcallback(results[0]);
|
||||
} else {
|
||||
fcallback(false);
|
||||
}
|
||||
} else {
|
||||
fcallback(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
const $tbl_gas = $("#tbl_gas");
|
||||
const $tbody = $tbl_gas.find('tbody');
|
||||
const $btn_search = $("#btn_search");
|
||||
|
||||
function fn_search() {
|
||||
$tbody.html('');
|
||||
$btn_search.attr('disabled','disabled').text('Searching...');
|
||||
const start_location = $("#start_location").val();
|
||||
let start_location_split = start_location.split(',');
|
||||
|
||||
let lat = start_location_split[0].trim();
|
||||
let lng = start_location_split[1].trim();
|
||||
window.center = {
|
||||
lat: 52.5228,
|
||||
lng: 13.41
|
||||
};
|
||||
codeLatLng(lat, lng, fn_call_api_search);
|
||||
//52.5228,13.41
|
||||
}
|
||||
function fn_call_api_search(results){
|
||||
console.log(results);
|
||||
let is_sg = false;
|
||||
if(results !== false){
|
||||
results.address_components.every(function(item, index){
|
||||
if(item.short_name == 'Sg' || item.short_name == 'Singapore'){
|
||||
is_sg = true;
|
||||
return false; //break;
|
||||
}
|
||||
return true; //next
|
||||
});
|
||||
}
|
||||
const start_location = $("#start_location").val();
|
||||
const order_by = $("#order_by").val();
|
||||
var settings = {
|
||||
//https://goldenowl.intg01-dev.float.sg
|
||||
url: `https://goldenowl.intg01-dev.float.sg/search-gas-stations?start=${start_location}&order_by=${order_by}&is_sg=${is_sg}`,
|
||||
method: "GET",
|
||||
timeout: 0,
|
||||
crossDomain: true,
|
||||
dataType: "json",
|
||||
};
|
||||
$.ajax(settings).done(function (response) {
|
||||
fill_tbl_gas(response.results.locations);
|
||||
}).always(function(){
|
||||
$btn_search.removeAttr('disabled').text('Search');
|
||||
});
|
||||
}
|
||||
|
||||
function fill_tbl_gas(data_locations) {
|
||||
if (data_locations.length === 0) {
|
||||
$tbody.html(`
|
||||
<tr>
|
||||
<td colspan="3">Empty data</td>
|
||||
</tr>
|
||||
`);
|
||||
return;
|
||||
}
|
||||
window.center = {
|
||||
lat: data_locations[0].position.lat,
|
||||
lng: data_locations[0].position.lng,
|
||||
};
|
||||
window.locations = data_locations.map(function (item, index) {
|
||||
return [item.title, item.position.lat, item.position.lng];
|
||||
});
|
||||
initMap();
|
||||
$tbody.html('');
|
||||
data_locations.forEach(function (item) {
|
||||
$tbody.append(`
|
||||
<tr>
|
||||
<td>${item.title}</td>
|
||||
<td>${item.distance}</td>
|
||||
<td>${item.price || ''}</td>
|
||||
</tr>
|
||||
`);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvjiRTxngOQyBP4zpqFlZuiquc0ROvo9c&callback=initMap" async
|
||||
defer></script>
|
||||
@@ -0,0 +1,445 @@
|
||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-11">
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Geofencing</h6>
|
||||
<div class="heading-elements">
|
||||
</div>
|
||||
</div>
|
||||
<div id="getquote" class="table-responsive" style="background-color:#CEE0D7;">
|
||||
<div style="margin-left:20px;width:800px;">
|
||||
<span style="color:red"><b><?=$message?></b></span>
|
||||
<form method="post" action="?">
|
||||
<input type="hidden" name="from" id="from" value="<?=$from?>">
|
||||
<input type="hidden" name="to" id="to" value="<?=$to?>">
|
||||
<table width="50%">
|
||||
<tr>
|
||||
<td>From</td>
|
||||
<td><input type="text" class="form-control" name="autofrom" id="autofrom" value="<?=$autofrom?>" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>To</td>
|
||||
<td><input type="text" class="form-control" name="autoto" id="autoto" value="<?=$autoto?>" size="20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Threshold</td>
|
||||
<td><input type="text" name="threshold" value="<?= $threshold ?>" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" value="Query" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<? echo $geofence; ?>
|
||||
<style>
|
||||
canvas {
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
td:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
col:first-child {background: #EEF}
|
||||
col:nth-child(2n+3) {background: #EEF}
|
||||
tr:first-child {background: #DDF}
|
||||
tr:nth-child(2n+3) {background: #DFD}
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
body{
|
||||
margin-top: 100px;
|
||||
font-family: 'Trebuchet MS', serif;
|
||||
line-height: 1.6
|
||||
}
|
||||
.container{
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
ul.tabs{
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
list-style: none;
|
||||
}
|
||||
ul.tabs li{
|
||||
background: none;
|
||||
color: #222;
|
||||
display: inline-block;
|
||||
padding: 10px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul.tabs li.current{
|
||||
background: #ededed;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-content{
|
||||
display: none;
|
||||
background: #ededed;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.tab-content.current{
|
||||
display: inherit;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
/* Always set the map height explicitly to define the size of the div
|
||||
* element that contains the map. */
|
||||
#map {
|
||||
height: 625px;
|
||||
}
|
||||
/* Optional: Makes the sample page fill the window. */
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#floating-panel {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 25%;
|
||||
z-index: 5;
|
||||
background-color: #fff;
|
||||
padding: 5px;
|
||||
border: 1px solid #999;
|
||||
text-align: center;
|
||||
font-family: 'Roboto','sans-serif';
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#floating-panel {
|
||||
background-color: #fff;
|
||||
border: 1px solid #999;
|
||||
left: 25%;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
z-index: 5;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
var getJSON = function(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = function() {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
callback(null, xhr.response);
|
||||
} else {
|
||||
callback(status, xhr.response);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
};
|
||||
// This example creates a simple polygon representing the Bermuda Triangle.
|
||||
|
||||
var x = [];
|
||||
var n = 0;
|
||||
|
||||
function initMap() {
|
||||
getJSON('/district.json', function(err, data) {
|
||||
if (err !== null) {
|
||||
alert('Something went wrong: ' + err);
|
||||
} else {
|
||||
n = data.data.features.length;
|
||||
for (var i=0; i<n; i++) {
|
||||
var k = data.data.features[i].geometry.coordinates.length;
|
||||
for (var i1 = 0; i1 < k; i1++) {
|
||||
var l = data.data.features[i].geometry.coordinates[i1].length;
|
||||
for (var i2 = 0; i2 < l; i2++) {
|
||||
var coords = data.data.features[i].geometry.coordinates[i1][i2];
|
||||
var y = [];
|
||||
for (var j=0; j<coords.length; j++) {
|
||||
y.push({lng: coords[j][0], lat: coords[j][1]});
|
||||
}
|
||||
x.push(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
initMapReal(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initMapReal(x) {
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 11,
|
||||
center: {lat: 1.32366175, lng: 103.8483699},
|
||||
mapTypeId: 'terrain'
|
||||
});
|
||||
|
||||
for (var i=0; i<x.length; i++) {
|
||||
// Construct the polygon.
|
||||
var graphTmp = new google.maps.Polygon({
|
||||
paths: x[i],
|
||||
strokeColor: '#FF0000',
|
||||
strokeOpacity: 0.8,
|
||||
strokeWeight: 2,
|
||||
fillColor: '#FF0000',
|
||||
fillOpacity: 0.35
|
||||
});
|
||||
graphTmp.setMap(map);
|
||||
}
|
||||
|
||||
<? if (isset($data_from) && is_object($data_from)) { ?>
|
||||
var marker_from = new google.maps.Marker({
|
||||
position: {lat: <?= $data_from->{"latitude"}?> , lng: <?= $data_from->{"longitude"}?>},
|
||||
map: map,
|
||||
title: '<?= $data_from->{"address"}?>'
|
||||
});
|
||||
<? } ?>
|
||||
<? if (isset($data_to) && is_object($data_to)) { ?>
|
||||
var marker_to = new google.maps.Marker({
|
||||
position: {lat: <?= $data_to->{"latitude"}?> , lng: <?= $data_to->{"longitude"}?>},
|
||||
map: map,
|
||||
title: '<?= $data_to->{"address"}?>'
|
||||
});
|
||||
<? } ?>
|
||||
<?
|
||||
if (isset($route_overlay) && is_array($route_overlay) && count($route_overlay)>0) {
|
||||
$i = 0;
|
||||
foreach ($route_overlay as $route) {
|
||||
if (isset($route["polyline"]) && count($route["polyline"])>0) { ?>
|
||||
var routeCoordinates<?= $i ?> = [
|
||||
<? foreach ($route["polyline"] as $j) { ?>{lat: <?= $j[0] ?>, lng: <?= $j[1] ?>},
|
||||
<? } ?>
|
||||
];
|
||||
var routePath<?= $i ?> = new google.maps.Polyline({
|
||||
path: routeCoordinates<?= $i ?>,
|
||||
geodesic: true,
|
||||
strokeColor: '#0000FF',
|
||||
strokeOpacity: 1.0,
|
||||
strokeWeight: 4
|
||||
});
|
||||
routePath<?= $i ?>.setMap(map);
|
||||
<? } ?>
|
||||
<? $i++; } ?>
|
||||
<? } ?>
|
||||
}
|
||||
</script>
|
||||
<script async defer
|
||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvjiRTxngOQyBP4zpqFlZuiquc0ROvo9c&callback=initMap">
|
||||
</script>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="tab-link current" data-tab="tab-1">Geofencing Map</li>
|
||||
<li class="tab-link" data-tab="tab-2">Matching History</li>
|
||||
<li class="tab-link" data-tab="tab-3">Geofenced Areas</li>
|
||||
<li class="tab-link" data-tab="tab-4">All Regions</li>
|
||||
</ul>
|
||||
|
||||
<div id="tab-1" class="tab-content current">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
<div id="tab-2" class="tab-content">
|
||||
<table>
|
||||
<col><col><col><col><col><col><col><col>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Distance</th>
|
||||
<th>Cost</th>
|
||||
<th>Cost Raw</th>
|
||||
<th>Duration</th>
|
||||
<th>From Address</th>
|
||||
<th>To Address</th>
|
||||
<th>Provider</th>
|
||||
</tr>
|
||||
<? foreach ($history as $f) { ?>
|
||||
<? if (is_numeric($f["distance"]) &&
|
||||
($distance-$threshold) <= $f["distance"] &&
|
||||
$f["distance"] <= ($distance+$threshold)) { ?>
|
||||
<tr>
|
||||
<? } else { ?>
|
||||
<tr style="color:#cccccc">
|
||||
<? } ?>
|
||||
<td><?= $f["travel_date"] ?></td>
|
||||
<td align=right><?= $f["distance"] ?></td>
|
||||
<td align=right><?= $f["cost"] ?></td>
|
||||
<td align=right><?= $f["cost_raw"] ?></td>
|
||||
<td align=center><?= $f["duration"] ?></td>
|
||||
<td><?= $f["saddress"] ?></td>
|
||||
<td><?= $f["eaddress"] ?></td>
|
||||
<td align=right><?= $f["transport_provider_id"] ?></td>
|
||||
<? /*
|
||||
array(16) { ["id"]=> string(4) "5434"
|
||||
["trackedemail_item_id"]=> string(5) "15248"
|
||||
["updated"]=> string(26) "2019-03-08 08:36:01.033791"
|
||||
["transport_provider_id"]=> string(1) "3"
|
||||
["scheduled"]=> NULL
|
||||
["travel_date_end"]=> string(19) "2017-04-22 15:45:43"
|
||||
["dup_id"]=> NULL
|
||||
["location_start_id"]=> string(3) "369"
|
||||
["location_end_id"]=> string(3) "708"
|
||||
["postal"]=> string(6) "437918"
|
||||
["address"]=> string(29) "97 Meyer Rd, Singapore 437918" }
|
||||
*/ ?>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tab-3" class="tab-content">
|
||||
<table><? $i = (array)$area_from; $j = (array)$area_to; ?>
|
||||
<col><col><col>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Area From</th>
|
||||
<th>Area To</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Name</b></td>
|
||||
<td><?=$i["name"] ?></td>
|
||||
<td><?=$j["name"] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Sector</b></td>
|
||||
<td><?=$i["sector"] ?></td>
|
||||
<td><?=$j["sector"] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Region</b></td>
|
||||
<td><?=$i["region"] ?></td>
|
||||
<td><?=$j["region"] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Postal Codes</b></td>
|
||||
<td><?=implode(",",json_decode($i["postal_code"],true)["postal_code"]) ?></td>
|
||||
<td><?=implode(",",json_decode($j["postal_code"],true)["postal_code"]) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Area</b></td>
|
||||
<td><?=$i["area"] ?></td>
|
||||
<td><?=$j["area"] ?></td>
|
||||
</tr>
|
||||
<?/*
|
||||
["id"]=> string(1) "1"
|
||||
["region_id"]=> string(1) "1"
|
||||
["sector_id"]=> string(1) "1"
|
||||
} */ ?>
|
||||
</table>
|
||||
<!-- pre>
|
||||
<? var_dump($route_overlay); ?>
|
||||
</pre -->
|
||||
</div>
|
||||
<div id="tab-4" class="tab-content">
|
||||
<table>
|
||||
<col><col><col><col><col><col>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Region</th>
|
||||
<th>Sector</th>
|
||||
<th>District</th>
|
||||
<th>Area</th>
|
||||
<th>Postal Code</th>
|
||||
</tr>
|
||||
<?
|
||||
foreach ($areas as $f) {
|
||||
echo "<tr>";
|
||||
echo "<td>".$f->{"id"}."</td>";
|
||||
echo "<td>".$f->{"region"}."</td>";
|
||||
echo "<td>".$f->{"sector"}."</td>";
|
||||
echo "<td>".$f->{"name"}."</td>";
|
||||
echo "<td>".$f->{"area"}."</td>";
|
||||
echo "<td>";
|
||||
$i = 0;
|
||||
$codes = json_decode($f->{"postal_code"},true);
|
||||
foreach ($codes["postal_code"] as $code) {
|
||||
echo ($i?', ':'').$code;
|
||||
$i++;
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div><!-- container -->
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('ul.tabs li').click(function(){
|
||||
var tab_id = $(this).attr('data-tab');
|
||||
|
||||
$('ul.tabs li').removeClass('current');
|
||||
$('.tab-content').removeClass('current');
|
||||
|
||||
$(this).addClass('current');
|
||||
$("#"+tab_id).addClass('current');
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- jQuery UI -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function(){
|
||||
console.log('aaaa');
|
||||
// Initialize
|
||||
$( "#autofrom" ).autocomplete({
|
||||
source: function( request, response ) {
|
||||
console.log('bbbb');
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function( data ) {
|
||||
response( data );
|
||||
},
|
||||
error: function ( data ) {
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function (event, ui) {
|
||||
// Set selection
|
||||
$('#autofrom').val(ui.item.label); // display the selected text
|
||||
$('#from').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
$( "#autoto" ).autocomplete({
|
||||
source: function( request, response ) {
|
||||
// Fetch data
|
||||
$.ajax({
|
||||
url: "/bkoreport/addresssearch",
|
||||
type: 'post',
|
||||
dataType: "json",
|
||||
data: {
|
||||
search: request.term
|
||||
},
|
||||
success: function( data ) {
|
||||
response( data );
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function (event, ui) {
|
||||
// Set selection
|
||||
$('#autoto').val(ui.item.label); // display the selected text
|
||||
$('#to').val(ui.item.value); // save selected id to input
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<h3>Global Settings</h3>
|
||||
<p>Settings and status generated by the system</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method="GET" action="/bkoadmin/globals">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Key</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="key"
|
||||
value="<?= $filterData['key'] ?? '' ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Description</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="description"
|
||||
value="<?= $filterData['description'] ?? '' ?>" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-2 col-md-2">
|
||||
<div class="form-group">
|
||||
<label for="">Status</label>
|
||||
<?php echo $status_dropdown; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
<div>
|
||||
<?=$global_table?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,133 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
|
||||
|
||||
<!-- Basic modal -->
|
||||
<div id="modal_theme_primary" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content" id="modal-content">
|
||||
|
||||
<div class="map-container map-symbol-custom">
|
||||
|
||||
</div>
|
||||
<div id="directionsDiv" style="margin-top:15px"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /basic modal -->
|
||||
|
||||
<!-- Support tickets -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
|
||||
<?= $member_table ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Recent Travel Tracking</h6>
|
||||
<div class="heading-elements">
|
||||
<span class="heading-text">Last: <span class="text-bold text-danger-600 position-right">PUT TIME HERE</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="map" style="border:1px;border-style: dotted; height:750px;"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var map;
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: 3.397, lng: 10.644},
|
||||
zoom: 7
|
||||
});
|
||||
}
|
||||
|
||||
var loaded_data = new Array();
|
||||
function showTranspModal(service_request_id) {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
// alert(service_request_id);
|
||||
// collect data - either from forms or from data variables
|
||||
var id = $(this).data('id');
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
//alert(5);
|
||||
// do the ajax bit
|
||||
var post_data = {
|
||||
'interest_id': service_request_id,
|
||||
};
|
||||
//alert(6);
|
||||
$.ajax({
|
||||
url: "/transp/transp_modal?service_request_id=" + service_request_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
//alert(7);
|
||||
$('#modal-content').html(data);
|
||||
//initialize_map();
|
||||
var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
|
||||
var myOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
directionsDisplay.setMap(map);
|
||||
directionsDisplay.setPanel(document.getElementById("directionsDiv"));
|
||||
|
||||
fitMapToBounds_map();
|
||||
|
||||
calcRoute(loaded_data[0], loaded_data[1]);
|
||||
//alert(loaded_data[0]);
|
||||
});
|
||||
}
|
||||
|
||||
function processPendTransp(link_id) {
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#acc' + link_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/service/selpending?proc=PROCESS&transp_id=" + link_id
|
||||
}).done(function (data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#acc' + link_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDvjiRTxngOQyBP4zpqFlZuiquc0ROvo9c&callback=initMap" async defer></script>
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
<style>
|
||||
.ui-timepicker-standard{
|
||||
z-index: 10 !important;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.css">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
|
||||
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold"> Grab Pricing Simulator</h6>
|
||||
<div class="heading-elements">
|
||||
<div class="form-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block" style="margin-top: 10px">
|
||||
<form method="get" action="/bkoreport/grabpricing">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="TravelDate">Travel date</label>
|
||||
<input type="text" class="form-control"
|
||||
id="TravelDate"
|
||||
name="TravelDate"
|
||||
autocomplete="off"
|
||||
placeholder="Date"
|
||||
value="<?= $TravelDate ?? '' ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="date_range">Travel Date Variance</label>
|
||||
<select class="form-control" id="TravelDateVariance" name="TravelDateVariance">
|
||||
<?php for ($i = 0; $i <= 15; $i += 0.5) {
|
||||
$check_selected = isset($TravelDateVariance) && $TravelDateVariance == $i;
|
||||
$plural = $i <= 1 ? '' : 's';
|
||||
echo '<option value="' . $i . '" ' . ($check_selected ? "selected" : "") . '>' . $i . ' day' . $plural . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="TravelTime">Travel time</label>
|
||||
<input type="text" class="form-control"
|
||||
id="TravelTime"
|
||||
name="TravelTime"
|
||||
autocomplete="off"
|
||||
placeholder="Time"
|
||||
value="<?= $TravelTime ?? '' ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="TravelTime">Travel Time Variance</label>
|
||||
<select class="form-control" id="TravelTimeVariance" name="TravelTimeVariance">
|
||||
<?php for ($i = 0; $i <= 300; $i += 15) {
|
||||
$check_selected = isset($TravelTimeVariance) && $TravelTimeVariance == $i;
|
||||
$plural = $i <= 1 ? '' : 's';
|
||||
echo '<option value="' . $i . '" ' . ($check_selected ? "selected" : "") . '>' . $i . ' min' . $plural . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="TravelDistance">Travel Distance</label>
|
||||
<input type="number" step="any" class="form-control"
|
||||
id="TravelDistance"
|
||||
name="TravelDistance"
|
||||
autocomplete="off"
|
||||
placeholder="Distance"
|
||||
value="<?= $TravelDistance ?? '' ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="TravelTime">Travel Distance Variance</label>
|
||||
<select class="form-control" id="TravelDistanceVariance" name="TravelDistanceVariance">
|
||||
<?php for ($i = 0; $i <= 20; $i += 1) {
|
||||
$check_selected = isset($TravelDistanceVariance) && $TravelDistanceVariance == $i;
|
||||
echo '<option value="' . $i . '" ' . ($check_selected ? "selected" : "") . '>' . $i . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" style="padding-top: 26px;">
|
||||
<button type="submit" class="btn btn-primary">Filter</button>
|
||||
<a class="btn btn-default" href="/bkoreport/grabpricing">Reset</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div style="padding: 0 10px;">
|
||||
<?= !empty($final_date_range)?'date range: <code>'.$final_date_range.'</code>':''?>
|
||||
<?= !empty($final_time_range)?' time range: <code>'.$final_time_range.'</code>':''?>
|
||||
</div>
|
||||
<div class="m-y-sm text-right"><?= $links ?></div>
|
||||
<div class="clearfix"></div>
|
||||
<?=$grap_history?>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat" style="background-color:#D8EAE7;">
|
||||
<div id="upload_form" >
|
||||
|
||||
<legend id="top_image_legend" class="text-bold">Test Pricing</legend>
|
||||
<div class="form-group">
|
||||
<br><br><br><br><br><br><br><br><br><br>LEAVE THIS BOX HERE <br> ANOTHER TOOLS HERE
|
||||
<br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js"></script>
|
||||
<script>
|
||||
const $travel_date = $('#TravelDate');
|
||||
const $travel_time = $('#TravelTime');
|
||||
$travel_date.datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: 'yyyy-mm-dd',
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$travel_time.timepicker({
|
||||
timeFormat: 'HH:mm',
|
||||
//defaultTime: '00',
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<!-- Support tickets -->
|
||||
<form class="search-block" action="/Bkoreport/loginreport/" method="GET" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="search" class="form-control" id="username" name="username" value='<?= isset($username) ? $username : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="member_id">Member ID</label>
|
||||
<input type="search" class="form-control" id="member_id" name="member_id" value='<?= isset($member_id) ? $member_id : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_created">Created</label>
|
||||
<div class="search-by-date">
|
||||
<input type="search" class="form-control" id="from_created" name="from_created" value='<?= isset($from_created) ? $from_created : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_created" name="to_created" value='<?= isset($to_created) ? $to_created : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_updated">Updated</label>
|
||||
<div class="search-by-date">
|
||||
<input type="search" class="form-control" id="from_updated" name="from_updated" value='<?= isset($from_updated) ? $from_updated : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_updated" name="to_updated" value='<?= isset($to_updated) ? $to_updated : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="loc">Loc</label>
|
||||
<input type="search" class="form-control" id="loc" name="loc" value='<?= isset($loc) ? $loc : '' ?>'>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: flex; align-self: center; margin-bottom: unset;">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $login_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive"> <?= $link ?> </div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Datepicker
|
||||
$("#from_created, #from_updated").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: 'yyyy-mm-dd',
|
||||
onClose: function(selectedDate) {
|
||||
$("#from_created, #from_updated")
|
||||
.datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
})
|
||||
|
||||
$("#to_created, #to_updated").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: 'yyyy-mm-dd',
|
||||
onClose: function(selectedDate) {
|
||||
$("#to_created, #to_updated")
|
||||
.datepicker("option", "maxDate", selectedDate);
|
||||
}
|
||||
})
|
||||
|
||||
$('#btn-search').on('click', function() {
|
||||
$(this).parent('form').attr('action', '/Bkoreport/loginreport/');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.search-block {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background: #ccffff;
|
||||
}
|
||||
|
||||
.search-by-date {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,191 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<!-- Support tickets -->
|
||||
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $member_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive"> <?= $links ?> </div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">View a member</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
<?php
|
||||
$c = 0;
|
||||
$plot_transpotercount = array();
|
||||
$labelArray = '';
|
||||
$valueArray = '';
|
||||
foreach ($plot_signup as $rr) {
|
||||
// echo "{$key} => {$value} ";
|
||||
// print_r($rr);
|
||||
if ($c > 0) {
|
||||
$labelArray .= ',';
|
||||
$valueArray .= ',';
|
||||
}
|
||||
$labelArray .= "'" . $rr['dt'] . "'";
|
||||
$valueArray .= $rr['dcount'];
|
||||
$c++;
|
||||
}
|
||||
|
||||
|
||||
$c = 0;
|
||||
$labelArray1 = '';
|
||||
$valueArray1 = '';
|
||||
foreach ($plot_emaildownload as $rr) {
|
||||
// echo "{$key} => {$value} ";
|
||||
// print_r($rr);
|
||||
if ($c > 0) {
|
||||
$labelArray1 .= ',';
|
||||
$valueArray1 .= ',';
|
||||
}
|
||||
$labelArray1 .= "'" . $rr['created'] . "'";
|
||||
$valueArray1 .= $rr['count'];
|
||||
$c++;
|
||||
}
|
||||
?>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
var map;
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {
|
||||
lat: 3.397,
|
||||
lng: 10.644
|
||||
},
|
||||
zoom: 3
|
||||
});
|
||||
}
|
||||
|
||||
var loaded_data = new Array();
|
||||
|
||||
function showTranspModal(service_request_id) {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
// alert(service_request_id);
|
||||
// collect data - either from forms or from data variables
|
||||
var id = $(this).data('id');
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
//alert(5);
|
||||
// do the ajax bit
|
||||
var post_data = {
|
||||
'interest_id': service_request_id,
|
||||
};
|
||||
//alert(6);
|
||||
$.ajax({
|
||||
url: "/transp/transp_modal?service_request_id=" + service_request_id
|
||||
}).done(function(data) {
|
||||
//alert(data);
|
||||
//alert(7);
|
||||
$('#modal-content').html(data);
|
||||
//initialize_map();
|
||||
var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
|
||||
var myOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
directionsDisplay.setMap(map);
|
||||
directionsDisplay.setPanel(document.getElementById("directionsDiv"));
|
||||
|
||||
fitMapToBounds_map();
|
||||
|
||||
calcRoute(loaded_data[0], loaded_data[1]);
|
||||
//alert(loaded_data[0]);
|
||||
});
|
||||
}
|
||||
|
||||
function viewMember(member_id) {
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/member/viewmedberdetail?proc=PROCESS&member_id=" + member_id
|
||||
}).done(function(data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#acc' + member_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function blockMember(member_id) {
|
||||
bootbox.confirm(`The member with ID: '${member_id}' will be blocked`, function(result) {
|
||||
if (result === true) {
|
||||
memberAction('block', {
|
||||
member_id: member_id
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function unblockMember(member_id) {
|
||||
bootbox.confirm(`The member with ID: '${member_id}' will be unblocked`, function(result) {
|
||||
if (result === true) {
|
||||
memberAction('unblock', {
|
||||
member_id: member_id
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function memberAction(action, data) {
|
||||
var url = `/security/${action}member`;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
$(document).ready(() => {
|
||||
$('body').on('click', '#search-member-detail', function(e) {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/member/viewmedberdetail?proc=PROCESS',
|
||||
dataType: 'json',
|
||||
data: $('#member-detail-form').serialize(),
|
||||
}).always(function(data) {
|
||||
$('#transp_detail').html(data.responseText);
|
||||
});
|
||||
})
|
||||
})
|
||||
//initMap();
|
||||
//
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $google_api_key ?>&callback=initMap" async defer></script>
|
||||
@@ -0,0 +1,255 @@
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-9">
|
||||
<div class="row">
|
||||
<!-- Media library -->
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">My Float Version Managerment</h6>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form method="GET" action="/myfloat_version/index">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Platform</label>
|
||||
<select class="form-control" name="platform_filter">
|
||||
<option value="0">All Platform</option>
|
||||
<?php foreach ($platforms as $value):?>
|
||||
<option
|
||||
<?=(isset($filterData['platform_filter']) && $value['id'] == $filterData['platform_filter']) ? 'selected' : ''?>
|
||||
value="<?php echo $value['id']; ?>">
|
||||
<?php echo $value['platform']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Text (name or notes or url)</label>
|
||||
<input type="text" class="form-control" name="text_filter" value="<?= $filterData['text_filter'] ?? '';?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Released</label>
|
||||
<input type="text" class="form-control" name="released_filter" value="<?= $filterData['released_filter'] ?? (date('Y-m-d', strtotime('-30 days')).' - '.date('Y-m-d')) ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Rev count</label>
|
||||
<input type="number" class="form-control" name="rev_count_filter" value="<?= $filterData['rev_count_filter'] ?? '';?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label for="">Short hash</label>
|
||||
<input type="text" class="form-control" name="short_hash_filter" value="<?= $filterData['short_hash_filter'] ?? '';?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
<div>
|
||||
<table class="table table-bordered table-hover table-striped" >
|
||||
<thead class="bg-indigo">
|
||||
<th>ID</th>
|
||||
<th>Platform</th>
|
||||
<th>Name</th>
|
||||
<th>Released</th>
|
||||
<th>Notes</th>
|
||||
<th>Rev Count</th>
|
||||
<th>Short Hash</th>
|
||||
<th>URL</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<?php foreach ($versions as $key => $version):?>
|
||||
<tr id="<?=$version["id"]?>-<?=$version['platform_id']?>" style="word-break:break-all;">
|
||||
<td style="word-break:keep-all"><?php echo $version['id']; ?></td>
|
||||
<td class="text-center"><?php echo $version['platform']; ?></td>
|
||||
<td><?php echo $version['name']; ?></td>
|
||||
<td><?php echo $version['released']; ?></td>
|
||||
<td><?php echo $version['notes']; ?></td>
|
||||
<td><?php echo $version['rev_count']; ?></td>
|
||||
<td><?php echo $version['short_hash']; ?></td>
|
||||
<td><?php echo $version['url']; ?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-primary" style="width:60px;margin:5px" onclick="return viewVersion(this);">View</button>
|
||||
<button type="button" class="btn btn-sm btn-danger" style="width:60px;margin:5px" onclick="return deleteVersion('<?= $version["id"]?>');">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: lemonchiffon; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font id="message" color=red><?=$message?> </font>
|
||||
<form id="editform" name="editform" method="post" action="" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="platform_id"">Platform</label>
|
||||
<select class="form-control" id="platform_id" name="platform_id">
|
||||
<?php foreach ($platforms as $value):?>
|
||||
<option
|
||||
<?=(isset($platform_id) && $value['id'] == $platform_id) ? 'selected' : ''?>
|
||||
value="<?php echo $value['id']; ?>">
|
||||
<?php echo $value['platform']; ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name"">Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="50" placeholder="Name" value="<?=$name?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="released">Released</label>
|
||||
<input type="text" class="form-control" id="released" name="released" maxlength="50" placeholder="Released" value="<?=$released?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="notes">Notes</label>
|
||||
<textarea rows="5" class="form-control" id="notes" name="notes" maxlength="500" placeholder="Notes"><?=$notes?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="rev_count"">Rev Count</label>
|
||||
<input type="text" autocomplete="off" class="form-control" id="rev_count" name="rev_count" maxlength="25" placeholder="Rev Count" value="<?=$rev_count?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="short_hash"">Short Hash</label>
|
||||
<input type="text"" autocomplete="off" class="form-control" id="short_hash" name="short_hash" maxlength="125" placeholder="Short Hash" value="<?=$short_hash?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="url"">URL</label>
|
||||
<input type="text"" class="form-control" id="url" name="url" maxlength="255" placeholder="URL" value="<?=$url?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="hidden" class="form-control" id="id" name="id" value="" />
|
||||
<button type="submit" onclick="submitForm()" name="gobtn" id="gotbtn" class="btn btn-info btn-block btn-sm"><?=$form_button?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#released').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
today: false,
|
||||
editable: false,
|
||||
minYear: <?=date("Y")?>,
|
||||
maxYear: <?=date("Y") + 10?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function(start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
|
||||
/*********** date range picker ***********/
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let fromToElement = $('input[name="released_filter"]');
|
||||
const fromToVal = fromToElement.val();
|
||||
if (fromToVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(30, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
fromToElement.daterangepicker(datepickerOptions);
|
||||
|
||||
fromToElement.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
fromToElement.on('cancel.daterangepicker', function(ev, picker) {
|
||||
fromToElement.val('');
|
||||
});
|
||||
/***************************************/
|
||||
});
|
||||
|
||||
var table = document.getElementsByTagName("table")[0];
|
||||
var tbody = table.getElementsByTagName("tbody")[0];
|
||||
tbody.onclick = function (e) {
|
||||
e = e || window.event;
|
||||
var target = e.srcElement || e.target;
|
||||
fillFormData(target)
|
||||
};
|
||||
|
||||
function viewVersion(ele){
|
||||
var target = ele.parentElement;
|
||||
fillFormData(target)
|
||||
}
|
||||
|
||||
function fillFormData(target){
|
||||
|
||||
while (target && target.nodeName !== "TR") {
|
||||
target = target.parentNode;
|
||||
}
|
||||
|
||||
if (target) {
|
||||
var all_rows = target.parentNode.children;
|
||||
for (i = 0; i < all_rows.length; i++) {
|
||||
all_rows[i].style.backgroundColor = "";
|
||||
}
|
||||
var cells = target.getElementsByTagName("td");
|
||||
|
||||
var info=target.id.split('-');
|
||||
document.getElementsByName('id')[0].value = cells[0].innerHTML;
|
||||
document.getElementsByName('platform_id')[0].value = info[1];
|
||||
document.getElementsByName('name')[0].value = cells[2].innerHTML;
|
||||
document.getElementsByName('released')[0].value = cells[3].innerHTML;
|
||||
document.getElementsByName('notes')[0].value = cells[4].innerHTML;
|
||||
document.getElementsByName('rev_count')[0].value = cells[5].innerHTML;
|
||||
document.getElementsByName('short_hash')[0].value = cells[6].innerHTML;
|
||||
document.getElementsByName('url')[0].value = cells[7].innerHTML;
|
||||
document.getElementsByName('gobtn')[0].innerText = "Update";
|
||||
target.style.backgroundColor="lightgreen";
|
||||
}
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
var frm = document.getElementsByName('editform')[0];
|
||||
frm.submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteVersion(id) {
|
||||
if (!confirm('Are you sure you want to delete?')) return false;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/myfloat_version/deleteVersion?id='+id, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = function() {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
if (xhr.response.state === "successful") {
|
||||
window.location.href = "/myfloat_version/index";
|
||||
}
|
||||
$('#message').html(xhr.response.message);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
<div class="row" style="position: absolute;height:75%;width:78%;background-color:white;">
|
||||
|
||||
|
||||
|
||||
<iframe src="https://oauth2.float.sg/mytransport.sg/#" width="100%" height="100%" allowfullscreen="allowfullscreen"></iframe>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,104 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
|
||||
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label for="offerName">Offer Name</label>
|
||||
<input type="email" class="form-control" id="offerName" aria-describedby="emailHelp" placeholder="Enter email">
|
||||
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleInputPassword1">Category</label>
|
||||
<input type="text" class="form-control" id="exampleInputPassword1" placeholder="Password">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="exampleCheck1">
|
||||
<label class="form-check-label" for="exampleCheck1">This offer expires</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-8">
|
||||
|
||||
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Configured Offers</h6>
|
||||
<div class="heading-elements">
|
||||
<ul class="icons-list">
|
||||
<li><a data-action="collapse"></a></li>
|
||||
<li><a data-action="reload"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped media-library table-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="styled"></th>
|
||||
<th>Offer Name</th>
|
||||
<th>Category</th>
|
||||
<th>Unique ID</th>
|
||||
<th>Start Date</th>
|
||||
<th>End Date</th>
|
||||
<th>Quantity</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? foreach ($images as $image) { ?>
|
||||
<tr>
|
||||
<td><input type="checkbox" class="styled"></td>
|
||||
<td>
|
||||
<a href="<?= $storage ?>cards/<?=$image['uniqueid']?>.<?=$image['format']?>" data-popup="lightbox">
|
||||
<img src="<?= $storage ?>cards/<?=$image['uniqueid']?>.<?=$image['format']?>?size=70x70" alt="" class="img-rounded img-preview">
|
||||
</a>
|
||||
</td>
|
||||
<td> Category: <?=$image['category_name']?> <br>
|
||||
<a href="<?= $storage ?>cards/<?=$image['uniqueid']?>.<?=$image['format']?>"><?= $storage ?>cards/<?=$image['uniqueid']?>.<?=$image['format']?></a></td>
|
||||
<td><a href="#"><?=$image['uniqueid']?></a></td>
|
||||
<td><?=$image['created']?></td>
|
||||
<td>
|
||||
<ul class="list-condensed list-unstyled no-margin">
|
||||
<li><span class="text-semibold">Size:</span> <?=$image['file_size'] ?></li>
|
||||
<li><span class="text-semibold">Format:</span> <?=$image['format'] ?></li>
|
||||
<li><span class="text-semibold">Dim:</span> <?=$image['dimensions'] ?></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="text-center"> </td>
|
||||
<td class="text-center"> </td>
|
||||
|
||||
|
||||
</tr>
|
||||
<? } ?>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,113 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<h3>Points Settings</h3>
|
||||
<p>These are system level set up</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/bkoadmin/points" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="key">Key</label>
|
||||
<input type="search" class="form-control" id="key" name="key" value='<?= isset($key) ? $key : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<input type="search" class="form-control" id="name" name="name" value='<?= isset($name) ? $name : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_value">Value</label>
|
||||
<div class="search-by-date">
|
||||
<input type="search" class="form-control" id="from_value" name="from_value" value='<?= isset($from_value) ? $from_value : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_value" name="to_value" value='<?= isset($to_value) ? $to_value : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_date">Added</label>
|
||||
<div class="search-by-date">
|
||||
<input type="search" class="form-control" id="from_date" name="from_date" value='<?= isset($from_date) ? $from_date : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_date" name="to_date" value='<?= isset($to_date) ? $to_date : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Activated</label>
|
||||
<?= $card_activated ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white" id="points-table">
|
||||
<?= $points_table ?>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script type="text/javascript">
|
||||
function UpdatePoints(button, id) {
|
||||
let points = document.getElementById('points' + id);
|
||||
if (points.value >= 0) {
|
||||
button.innerHTML = 'Processing...';
|
||||
button.disabled = true;
|
||||
//$('#transp_detail').html('Processing...');
|
||||
//$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/pointsupdate?id=" + id + "&value=" + points.value
|
||||
}).done(function(data) {
|
||||
//$('#transp_detail').html(data);
|
||||
//$('#acc' + member_id).prop('disabled', false);
|
||||
button.innerHTML = 'Update';
|
||||
button.disabled = false;
|
||||
alert(data);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
$('document').ready(function() {
|
||||
// add library datepicker
|
||||
addDatePicker('#from_date, #to_date');
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.search-by-date {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.search-by-date input {
|
||||
width: 95px;
|
||||
}
|
||||
|
||||
.default_date {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
top: 27px;
|
||||
}
|
||||
|
||||
#points-table table tr td:last-child {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,105 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<!-- Support tickets -->
|
||||
<form class="search-block" action="/Bkoreport/resetreport/" method="GET" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="search" class="form-control" id="username" name="username" value='<?= isset($username) ? $username : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="member_id">Member ID</label>
|
||||
<input type="search" class="form-control" id="member_id" name="member_id" value='<?= isset($member_id) ? $member_id : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_date">Created</label>
|
||||
<div class="search-by-date">
|
||||
<input type="search" class="form-control" id="from_date" name="from_date" value='<?= isset($from_date) ? $from_date : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_date" name="to_date" value='<?= isset($to_date) ? $to_date : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="loc">Loc</label>
|
||||
<input type="search" class="form-control" id="loc" name="loc" value='<?= isset($loc) ? $loc : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="display: flex; align-self: center; margin-bottom: unset;">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $reset_table ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive"> <?= $link ?> </div>
|
||||
</div>
|
||||
<!-- /support tickets -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ccffff; height: 800px;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">[ttl]</h6>
|
||||
<div class="heading-elements">
|
||||
<span class="heading-text">Last: <span class="text-bold text-danger-600 position-right">PUT DATA HERE</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<div id="map" style="border:1px;border-style: dotted; height:750px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
// Datepicker
|
||||
$("#from_date").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: 'yyyy-mm-dd',
|
||||
onClose: function(selectedDate) {
|
||||
$("#from_date").datepicker("option", "minDate", selectedDate);
|
||||
}
|
||||
})
|
||||
|
||||
$("#to_date").datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
format: 'yyyy-mm-dd',
|
||||
onClose: function(selectedDate) {
|
||||
$("#to_date").datepicker("option", "maxDate", selectedDate);
|
||||
}
|
||||
})
|
||||
|
||||
$('#btn-search').on('click', function() {
|
||||
$(this).parent('form').attr('action', '/Bkoreport/resetreport/');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.search-block {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background: #ccffff;
|
||||
}
|
||||
|
||||
.search-by-date {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,260 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<canvas id="myChart" style="width:100%; height:400px"></canvas>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<canvas id="myChart1" style="width:100%; height:400px"></canvas>
|
||||
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<canvas id="myChart" style="width:100%; height:400px"></canvas>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<canvas id="myChart" style="width:100%; height:400px"></canvas>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<canvas id="myChart" style="width:100%; height:400px"></canvas>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<!-- /dashboard content -->
|
||||
<?php
|
||||
|
||||
$c=0;
|
||||
$plot_transpotercount = array();
|
||||
$labelArray = '';
|
||||
$valueArray = '';
|
||||
foreach ($plot_signup as $rr) {
|
||||
// echo "{$key} => {$value} ";
|
||||
// print_r($rr);
|
||||
if ( $c > 0 )
|
||||
{
|
||||
$labelArray .= ',';
|
||||
$valueArray .= ',';
|
||||
}
|
||||
$labelArray .= "'".$rr['dt']."'";
|
||||
$valueArray .= $rr['dcount'];
|
||||
$c++;
|
||||
}
|
||||
|
||||
|
||||
$c=0;
|
||||
$labelArray1 = '';
|
||||
$valueArray1 = '';
|
||||
foreach ($plot_emaildownload as $rr) {
|
||||
// echo "{$key} => {$value} ";
|
||||
// print_r($rr);
|
||||
if ( $c > 0 )
|
||||
{
|
||||
$labelArray1 .= ',';
|
||||
$valueArray1 .= ',';
|
||||
}
|
||||
$labelArray1 .= "'".$rr['created']."'";
|
||||
$valueArray1 .= $rr['count'];
|
||||
$c++;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var map;
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {lat: 3.397, lng: 10.644},
|
||||
zoom: 3
|
||||
});
|
||||
}
|
||||
|
||||
var loaded_data = new Array();
|
||||
function showTranspModal(service_request_id) {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
// alert(service_request_id);
|
||||
// collect data - either from forms or from data variables
|
||||
var id = $(this).data('id');
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
//alert(5);
|
||||
// do the ajax bit
|
||||
var post_data = {
|
||||
'interest_id': service_request_id,
|
||||
};
|
||||
//alert(6);
|
||||
$.ajax({
|
||||
url: "/transp/transp_modal?service_request_id=" + service_request_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
//alert(7);
|
||||
$('#modal-content').html(data);
|
||||
//initialize_map();
|
||||
var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
|
||||
var myOptions = {
|
||||
zoom: 13,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP};
|
||||
map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
directionsDisplay.setMap(map);
|
||||
directionsDisplay.setPanel(document.getElementById("directionsDiv"));
|
||||
|
||||
fitMapToBounds_map();
|
||||
|
||||
calcRoute(loaded_data[0], loaded_data[1]);
|
||||
//alert(loaded_data[0]);
|
||||
});
|
||||
}
|
||||
|
||||
function viewMember(member_id) {
|
||||
|
||||
$('#transp_detail').html('Processing...');
|
||||
$('#acc' + member_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/member/viewmedberdetail?proc=PROCESS&member_id=" + member_id
|
||||
}).done(function (data) {
|
||||
$('#transp_detail').html(data);
|
||||
$('#acc' + member_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function blockMember(member_id) {
|
||||
bootbox.confirm(`The member with ID: '${member_id}' will be blocked`, function(result) {
|
||||
if (result === true) {
|
||||
memberAction('block', {member_id: member_id});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function unblockMember(member_id) {
|
||||
bootbox.confirm(`The member with ID: '${member_id}' will be unblocked`, function(result) {
|
||||
if (result === true) {
|
||||
memberAction('unblock', {member_id: member_id});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function memberAction(action, data) {
|
||||
var url = `/security/${action}member`;
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'POST',
|
||||
dataType:'JSON',
|
||||
data: data,
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
var ctx = document.getElementById("myChart");
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [<?=$labelArray?>],
|
||||
datasets: [{
|
||||
label: 'Sign up last 7 days',
|
||||
data: [<?=$valueArray?>],
|
||||
backgroundColor: [
|
||||
'rgba(255, 99, 132, 0.2)',
|
||||
'rgba(54, 162, 235, 0.2)',
|
||||
'rgba(255, 206, 86, 0.2)',
|
||||
'rgba(75, 192, 192, 0.2)',
|
||||
'rgba(153, 102, 255, 0.2)',
|
||||
'rgba(255, 159, 64, 0.2)'
|
||||
],
|
||||
borderColor: [
|
||||
'rgba(255,99,132,1)',
|
||||
'rgba(54, 162, 235, 1)',
|
||||
'rgba(255, 206, 86, 1)',
|
||||
'rgba(75, 192, 192, 1)',
|
||||
'rgba(153, 102, 255, 1)',
|
||||
'rgba(255, 159, 64, 1)'
|
||||
],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero:true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/* LINE NOW */
|
||||
var ctx1 = document.getElementById("myChart1");
|
||||
var myChart1 = new Chart(ctx1, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [<?=$labelArray1?>],
|
||||
datasets: [{
|
||||
label: 'Email Downlad last 30 days',
|
||||
data: [<?=$valueArray1?>],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero:true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?=$google_api_key?>&callback=initMap" async defer></script>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: lemonchiffon; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<?=$subscription_country?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
|
||||
<div class="panel panel-white">
|
||||
<div id="configured_subscritption">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Configured Subscrtiption</h6>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-3">
|
||||
<div id="card_detail">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function viewSubscription(subscription_id) {
|
||||
|
||||
$('#configured_subscritption').html('Processing...');
|
||||
$('#acc' + subscription_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/subscription/viewsubscription?proc=PROCESS&subscription_id=" + subscription_id
|
||||
}).done(function (data) {
|
||||
$('#configured_subscritption').html(data);
|
||||
$('#acc' + subscription_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/bkoadmin/cards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,145 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: lemonchiffon; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<form id="editform" name="editform" method="post" action="">
|
||||
<input type="hidden" name="id" value="<?= $id ?>" />
|
||||
<div class="form-group">
|
||||
<label for="name">Provider Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="50" placeholder="Provider Name" value="<?= $name ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Alias</label>
|
||||
<input type="text" class="form-control" id="name_alias" name="name_alias" maxlength="100" placeholder="Name Alias" value="<?= $name_alias??'' ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="client">Client ID</label>
|
||||
<input type="text" class="form-control" id="client" name="client" maxlength="100" placeholder="Client ID" value="<?= $client ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="token">Refresh Token</label>
|
||||
<input type="text" class="form-control" id="token" name="token" maxlength="200" placeholder="Refresh Token" value="<?= $token ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="code">Access Code</label>
|
||||
<input type="text" class="form-control" id="code" name="code" maxlength="100" placeholder="Access Code" value="<?= $code ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="access_token">Access Token</label>
|
||||
<input type="text" class="form-control" id="access_token" name="access_token" maxlength="200" placeholder="Access Token" value="<?= $access_token ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="card_status">Status</label>
|
||||
<?= $provider_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" name="gobtn" id="gotbtn" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-9">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Integrated Transporter List</h6>
|
||||
<div class="heading-elements">
|
||||
<table><tr><td><? ?></td><td><? ?></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form method="GET" action="/bkoadmin/transport">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Name</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="name"
|
||||
value="<?= $filterData['name'] ?? '' ?>" >
|
||||
</div>
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="m-y-sm"><?= $transporter_links ?: '' ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $transporter_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Transporter Apps</h6>
|
||||
<div class="heading-elements">
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $transporter_apps ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function EditTransportProvider(id) {
|
||||
if (id>0) {
|
||||
var data = transport_providers.get(id);
|
||||
var form = document.editform;
|
||||
form.id.value = data.get('id');
|
||||
form.name.value = data.get('name');
|
||||
form.name_alias.value = data.get('name_alias');
|
||||
form.client.value = data.get('client');
|
||||
form.token.value = data.get('token');
|
||||
form.code.value = data.get('code');
|
||||
form.access_token.value = data.get('access_token');
|
||||
form.card_status.value = data.get('active');
|
||||
/*for (var i = 0; i < form.card_status.options.length; ++i) {
|
||||
if (form.card_status.options[i].value === data.get('active')) {
|
||||
form.card_status.options[i].selected = true;
|
||||
} else {
|
||||
form.card_status.options[i].selected = false;
|
||||
}
|
||||
}*/
|
||||
console.log("active="+form.card_status.value);
|
||||
form.gobtn.innerHTML = 'Update';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var transport_providers = new Map();
|
||||
<?php foreach($transport_providers as $id=>$data) {
|
||||
echo "var transport_provider_entry_${id} = new Map();\n";
|
||||
foreach ($data as $key=>$val) {
|
||||
echo "transport_provider_entry_${id}.set('${key}','${val}');\n";
|
||||
}
|
||||
echo "transport_providers.set(${id},transport_provider_entry_${id});\n";
|
||||
} ?>
|
||||
function viewTransporter(id) {
|
||||
alert(id);
|
||||
return false;
|
||||
}
|
||||
|
||||
// prevent-form-resubmission-when-page-is-refreshed-f5-ctrlr
|
||||
if ( window.history.replaceState ) {
|
||||
window.history.replaceState( null, null, window.location.href );
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,80 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: lemonchiffon; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<form id="editform" name="editform" method="post" action="?id=<?= $id?>">
|
||||
<input type="hidden" name="id" value="<?= $id ?>" />
|
||||
<input type="hidden" name="app_id" value="<?= $app_id ?>" />
|
||||
<div class="form-group">
|
||||
<label for="name">Provider Name</label>
|
||||
<input type="text" class="form-control" id="name" name="name" maxlength="50" placeholder="Provider Name" value="<?= $name ?>" readonly />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="country">Country</label>
|
||||
<?= $country_select ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ios_app_id">iOS App ID</label>
|
||||
<input type="text" class="form-control" id="ios_app_id" name="ios_app_id" maxlength="100" placeholder="Apple Store iOS App ID" value="<?= $ios_app_id ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="android_app_id">Android App ID</label>
|
||||
<input type="text" class="form-control" id="android_app_id" name="android_app_id" maxlength="100" placeholder="Google Play Android App ID" value="<?= $android_app_id ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" name="gobtn" id="gotbtn" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-9">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">Transporter App List for <?=$name?></h6>
|
||||
<div class="heading-elements">
|
||||
<button type="submit" class="btn btn-info btn-xs" onclick="document.location='/bkoadmin/transport';return false;">Back to Transporter List</button>
|
||||
<table><tr><td><? ?></td><td><? ?></td></tr></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= isset($transporter_apps)?$transporter_apps:"" ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function EditTransportProviderApp(id) {
|
||||
if (id>0) {
|
||||
var data = transport_apps.get(id);
|
||||
var form = document.editform;
|
||||
form.app_id.value = data.get('id');
|
||||
form.country.value = data.get('country');
|
||||
form.ios_app_id.value = data.get('ios_app_id');
|
||||
form.android_app_id.value = data.get('android_app_id');
|
||||
form.gobtn.innerHTML = 'Update';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var transport_apps = new Map();
|
||||
<? foreach($transport_apps as $id=>$data) {
|
||||
echo "var transport_apps_entry_${id} = new Map();\n";
|
||||
foreach ($data as $key=>$val) {
|
||||
echo "transport_apps_entry_${id}.set('${key}','${val}');\n";
|
||||
}
|
||||
echo "transport_apps.set(${id},transport_apps_entry_${id});\n";
|
||||
} ?>
|
||||
<? if ($_SERVER['REQUEST_METHOD']=='GET' && $app_id>0) {
|
||||
echo "EditTransportProviderApp(${app_id});\n";
|
||||
} ?>
|
||||
// -->
|
||||
</script>
|
||||
@@ -0,0 +1,294 @@
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-3">
|
||||
<div class="card" style="width: 100%; background-color: lemonchiffon; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font id="message" color=red><?= $message ?> </font>
|
||||
<form id="editform" name="editform" method="post" action="?" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="pid">PID</label>
|
||||
<select class="form-control" id="pid" name="pid">
|
||||
<?php foreach($platform as $value) { ?>
|
||||
<option
|
||||
<?php echo (!empty($pid) && $pid == $value['pid']) ? 'selected' : '' ?>
|
||||
value="<?php echo $value['pid']; ?>"
|
||||
>
|
||||
<?php echo $value['name']; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstname">First Name</label>
|
||||
<input type="text" class="form-control" id="firstname" name="firstname" maxlength="50" placeholder="First Name" value="<?= $firstname ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastname">Last Name</label>
|
||||
<input type="text" class="form-control" id="lastname" name="lastname" maxlength="50" placeholder="Last Name" value="<?= $lastname ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
<input type="text" class="form-control" id="email" name="email" maxlength="150" placeholder="Email"" value="<?= $email ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" autocomplete="off" class="form-control" id="username" name="username" maxlength="25" placeholder="Username" value="<?= $username ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" autocomplete="off" class="form-control" id="password" name="password" maxlength="125" placeholder="Password" value="<?= $password ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confirm_password">Confirm Password</label>
|
||||
<input type="password" class="form-control" id="confirm_password" name="confirm_password" maxlength="125" placeholder="Confirm Password" value="<?= $confirm_password ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="plevel">Permission</label>
|
||||
<select class="form-control" id="permission" name="permission">
|
||||
<?php foreach($permission as $value) { ?>
|
||||
<option
|
||||
<?php echo (!empty($plevel) && $plevel == $value['plevel']) ? 'selected' : '' ?>
|
||||
value="<?php echo $value['plevel'] . ',' . $value['status']; ?>">
|
||||
<?php echo $value['name']; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="last_login">Last Login</label>
|
||||
<input type="text" class="form-control" id="last_login" name="last_login" maxlength="200" placeholder="Last Login" value="<?= $last_login ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="loc">Loc</label>
|
||||
<input type="text" class="form-control" id="loc" name="loc" maxlength="200" placeholder="Loc"" value="<?= $loc ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" onclick="submitForm()" name="gobtn" id="gotbtn" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-9">
|
||||
<div class="row">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title text-semibold">User Managerment</h6>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<form method="GET" action="/bkoadmin/usermanagerment">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="pid">PID</label>
|
||||
<select class="form-control" id="pid" name="pid">
|
||||
<option value="">All</option>
|
||||
<?php foreach($platform as $value) { ?>
|
||||
<option
|
||||
<?php echo (!empty($filterData['pid']) && $filterData['pid'] == $value['pid']) ? 'selected' : '' ?>
|
||||
value="<?php echo $value['pid']; ?>">
|
||||
<?php echo $value['name']; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">First name</label>
|
||||
<input type="text" class="form-control" name="first_name" value="<?php echo $filterData['first_name'] ?? '';?>">
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Last name</label>
|
||||
<input type="text" class="form-control" name="last_name" value="<?php echo $filterData['last_name'] ?? '';?>">
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Email</label>
|
||||
<input type="text" class="form-control" name="email" value="<?php echo $filterData['email'] ?? '';?>">
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Username</label>
|
||||
<input type="text" class="form-control" name="username" value="<?php echo $filterData['username'] ?? '';?>">
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Plevel</label>
|
||||
<select class="form-control" name="plevel">
|
||||
<option value="">All</option>
|
||||
<?php foreach($permission as $value) { ?>
|
||||
<option
|
||||
<?php echo (!empty($filterData['plevel']) && $filterData['plevel'] == $value['plevel']) ? 'selected' : '' ?>
|
||||
value="<?php echo $value['plevel']; ?>">
|
||||
<?php echo $value['name']; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<label for="">Last login</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="last_login"
|
||||
value="<?php echo $filterData['last_login'] ?? (date('Y-m-d', strtotime('-30 days')).' - '.date('Y-m-d')) ?>"
|
||||
readonly>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 col-sm-2">
|
||||
<div class="form-group">
|
||||
<label for=""></label>
|
||||
<div style="margin-top: 7px">
|
||||
<button type="submit" class=" btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-y-sm"><?= $links ?: '' ?></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<table class="table-bordered table-condensed table-hover table-striped table-condensed" style="padding:0px; background-color:lightgreen;">
|
||||
<thead class="bg-indigo">
|
||||
<th>ID</th>
|
||||
<th>PID</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Email</th>
|
||||
<th>Username</th>
|
||||
<th>Plevel</th>
|
||||
<th>Status</th>
|
||||
<th>Added</th>
|
||||
<th>Last Login</th>
|
||||
<th>Loc</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<?php if(isset($user_management_table)) ?>
|
||||
<?php foreach($user_management_table as $key => $user) { ?>
|
||||
<tr id="<?=$user["id"]?>" style="cursor: pointer;">
|
||||
<td><?php echo $page + $key + 1;?></td>
|
||||
<td><?php echo $user['pid'] ;?></td>
|
||||
<td><?php echo $user['firstname'] ;?></td>
|
||||
<td><?php echo $user['lastname'] ;?></td>
|
||||
<td><?php echo $user['email'] ;?></td>
|
||||
<td><?php echo $user['username'] ;?></td>
|
||||
<td><?php echo $user['plevel'] ;?></td>
|
||||
<td><?php echo $user['status'] ;?></td>
|
||||
<td><?php echo $user['added'] ;?></td>
|
||||
<td><?php echo $user['last_login'] ;?></td>
|
||||
<td><?php echo $user['loc'] ;?></td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger" onclick="return deleteUserManagement('<?=$user["id"]?>');">X</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
/** date range picker */
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let fromToElement = $('input[name="last_login"]');
|
||||
const fromToVal = fromToElement.val();
|
||||
if (fromToVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
fromToElement.daterangepicker(datepickerOptions);
|
||||
|
||||
fromToElement.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
fromToElement.on('cancel.daterangepicker', function(ev, picker) {
|
||||
fromToElement.val('');
|
||||
});
|
||||
});
|
||||
|
||||
function deleteRow(rowid)
|
||||
{
|
||||
var row = document.getElementById(rowid);
|
||||
row.parentNode.removeChild(row);
|
||||
}
|
||||
|
||||
var table = document.getElementsByTagName("table")[0];
|
||||
var tbody = table.getElementsByTagName("tbody")[0];
|
||||
tbody.onclick = function (e) {
|
||||
e = e || window.event;
|
||||
var data = [];
|
||||
var target = e.srcElement || e.target;
|
||||
while (target && target.nodeName !== "TR") {
|
||||
target = target.parentNode;
|
||||
}
|
||||
if (target) {
|
||||
var cells = target.getElementsByTagName("td");
|
||||
document.getElementsByName('pid')[0].value = cells[1].innerHTML;
|
||||
document.getElementsByName('firstname')[0].value = cells[2].innerHTML;
|
||||
document.getElementsByName('lastname')[0].value = cells[3].innerHTML;
|
||||
document.getElementsByName('email')[0].value = cells[4].innerHTML;
|
||||
document.getElementsByName('username')[0].value = cells[5].innerHTML;
|
||||
document.getElementsByName('permission')[0].value = cells[6].innerHTML + "," + cells[7].innerHTML;
|
||||
document.getElementsByName('last_login')[0].value = cells[9].innerHTML;
|
||||
document.getElementsByName('loc')[0].value = cells[10].innerHTML;
|
||||
|
||||
document.getElementsByName('gobtn')[0].innerText = "Update";
|
||||
|
||||
var element = document.getElementById("underline-email");
|
||||
if (element !== null) {
|
||||
element.removeAttribute('id');
|
||||
}
|
||||
cells[4].id="underline-email";
|
||||
}
|
||||
};
|
||||
|
||||
function submitForm() {
|
||||
// Get the first form with the name
|
||||
// Usually the form name is not repeated
|
||||
// but duplicate names are possible in HTML
|
||||
// Therefore to work around the issue, enforce the correct index
|
||||
var frm = document.getElementsByName('editform')[0];
|
||||
frm.submit(); // Submit the form
|
||||
// frm.reset(); // Reset all form data
|
||||
return false; // Prevent page refresh
|
||||
}
|
||||
|
||||
function deleteUserManagement(id) {
|
||||
if (!confirm('Are you sure you want to delete?')) return false;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/bkoadmin/userManagementDelete?id='+id, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = function() {
|
||||
var status = xhr.status;
|
||||
if (status === 200) {
|
||||
if (xhr.response.state === "successful") {
|
||||
deleteRow(xhr.response.user_id);
|
||||
}
|
||||
$('#message').html(xhr.response.message);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#underline-email {text-decoration: underline;}
|
||||
</style>
|
||||
@@ -0,0 +1,433 @@
|
||||
<link rel="stylesheet" type="text/css" href="/assets/json-view/jsonview.css">
|
||||
<script type="text/javascript" src="/assets/json-view/jsonview.js"></script>
|
||||
|
||||
<!-- Dashboard content -->
|
||||
<div id="overlay" style="display:none;">
|
||||
<div class="spinner"></div>
|
||||
<br />
|
||||
Importing...
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div>
|
||||
<div>
|
||||
<form method="GET" id="search-form" action="/advice/advicelist">
|
||||
<div class="form-group">
|
||||
<div class="travel_date">
|
||||
<label for="travel_date">Travel date</label>
|
||||
<input type="text" class="form-control" name="travel_date" value="<?= set_value('travel_date') ?>" readonly>
|
||||
</div>
|
||||
<div class="duration">
|
||||
<label for="">Duration</label>
|
||||
<div class="search-by-range">
|
||||
<input type="text" class="form-control" name="duration_from" value="<?= set_value('duration_from') ?>">
|
||||
|
||||
<input type="text" class="form-control" name="duration_to" value="<?= set_value('duration_to') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="distance">
|
||||
<label for="">Distance</label>
|
||||
<div class="search-by-range">
|
||||
<input type="text" class="form-control" name="distance_from" value="<?= set_value('distance_from') ?>">
|
||||
|
||||
<input type="text" class="form-control" name="distance_to" value="<?= set_value('distance_to') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="location">
|
||||
<label for="">Location</label>
|
||||
<div class="search-by-range">
|
||||
<select name="location_start_id" id="location_start_id">
|
||||
<?php if (!empty(set_value('location_start_id'))) {
|
||||
echo '<option selected value="' . set_value('location_start_id') . '">' . set_value('location_start_name') . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
<select name="location_end_id" id="location_end_id">
|
||||
<?php if (!empty(set_value('location_end_id'))) {
|
||||
echo '<option selected value="' . set_value('location_end_id') . '">' . set_value('location_end_name') . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" id="search" data-action="/advice/advicelist" class="btn btn-primary btn-sm">Search</button>
|
||||
<button type="button" id="export-csv" data-action="/advice/exportcsv" class="btn btn-warning btn-sm">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="location_start_name" value="<?= set_value('location_start_name') ?>">
|
||||
<input type="hidden" name="location_end_name" value="<?= set_value('location_end_name') ?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<div class="import-group">
|
||||
<form id="form-upload">
|
||||
<div class="member">
|
||||
<label>Member ID</label>
|
||||
<input type="text" class="form-control" name="member_id" maxlength=10>
|
||||
</div>
|
||||
<div class="file-upload">
|
||||
<span id="pickfiles">[Choose files]</span>
|
||||
<input type="button" id="btn-upload" class="btn btn-warning btn-sm" value="Upload">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filelist"></div>
|
||||
<div id="import-message"></div>
|
||||
</div>
|
||||
<div class="error">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_from') ? form_error('duration_from') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_to') ? form_error('duration_to') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_from') ? form_error('distance_from') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_to') ? form_error('distance_to') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Display status message -->
|
||||
<?php if (!empty($this->session->flashdata('success'))) { ?>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-success"><?php echo $this->session->flashdata('success'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($this->session->flashdata('error'))) { ?>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-danger"><?php echo $this->session->flashdata('error'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $advice_list ?: '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat" style="height: 100%;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">View</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive" style="height:100%;">
|
||||
<div id="json" class="root"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
/** date range picker */
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let travelDateEl = $('input[name="travel_date"]');
|
||||
const travelDateVal = travelDateEl.val();
|
||||
if (travelDateVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
travelDateEl.daterangepicker(datepickerOptions);
|
||||
|
||||
travelDateEl.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
travelDateEl.on('cancel.daterangepicker', function(ev, picker) {
|
||||
travelDateEl.val('');
|
||||
});
|
||||
|
||||
let start_address = generateSelect2('#location_start_id');
|
||||
let end_address = generateSelect2('#location_end_id');
|
||||
|
||||
|
||||
$('#location_start_id').on('select2:select', function(e) {
|
||||
var data = e.params.data;
|
||||
$('input[name="location_start_name"]').val(data.text);
|
||||
});
|
||||
|
||||
$('#location_end_id').on('select2:select', function(e) {
|
||||
var data = e.params.data;
|
||||
$('input[name="location_end_name"]').val(data.text);
|
||||
});
|
||||
|
||||
$('#search-form button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const action = $(this).data('action');
|
||||
|
||||
$(this)
|
||||
.closest('form')
|
||||
.attr('action', action)
|
||||
.submit();
|
||||
})
|
||||
});
|
||||
|
||||
function generateSelect2(ele) {
|
||||
return $(ele).select2({
|
||||
placeholder: "Search by Address",
|
||||
width: '18rem',
|
||||
maximumSelectionSize: 1,
|
||||
minimumInputLength: 3,
|
||||
ajax: {
|
||||
url: "/addresses/getAddressesAjax",
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
delay: 250,
|
||||
data: function(params) {
|
||||
const query = {
|
||||
name: params.term,
|
||||
page: params.page || 1,
|
||||
per_page: 20,
|
||||
};
|
||||
return query;
|
||||
},
|
||||
processResults: function(res, params) {
|
||||
const {
|
||||
data,
|
||||
total
|
||||
} = res;
|
||||
params.page = params.page || 1;
|
||||
return {
|
||||
results: data.map(item => ({
|
||||
id: item.id,
|
||||
text: item.address
|
||||
})),
|
||||
pagination: {
|
||||
more: params.page * 20 < +total
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function viewAdvice(id) {
|
||||
$('.root').html('');
|
||||
|
||||
fetch('/advice/advicejson?id=' + id)
|
||||
.then((res) => {
|
||||
return res.text();
|
||||
})
|
||||
.then((data) => {
|
||||
jsonView.format(data, '.root');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- upload and import file -->
|
||||
<script src="/assets/js/plupload.full.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function() {
|
||||
let uploader = new plupload.Uploader({
|
||||
runtimes: 'html5',
|
||||
browse_button: 'pickfiles',
|
||||
container: document.getElementById('container'),
|
||||
url: '/advice/upload',
|
||||
chunk_size: '200kb',
|
||||
max_retries: 2,
|
||||
filters: {
|
||||
max_file_size: '50mb',
|
||||
mime_types: [{
|
||||
title: "CSV files",
|
||||
extensions: "csv"
|
||||
}]
|
||||
},
|
||||
init: {
|
||||
PostInit: function() {
|
||||
document.getElementById('filelist').innerHTML = '';
|
||||
},
|
||||
FilesAdded: function(up, files) {
|
||||
$("#import-message").text('');
|
||||
plupload.each(files, function(file) {
|
||||
document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
|
||||
});
|
||||
},
|
||||
UploadProgress: function(up, file) {
|
||||
document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
||||
},
|
||||
Error: function(up, err) {
|
||||
// DO YOUR ERROR HANDLING!
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
uploader.bind('FileUploaded', function() {
|
||||
// After file uploaded , send signal to insert all records
|
||||
removeFile();
|
||||
$('#overlay').fadeIn();
|
||||
$.ajax({
|
||||
url: '/advice/importCSV',
|
||||
method: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: {
|
||||
'member_id' : $('input[name="member_id"]').val()
|
||||
},
|
||||
success: function(data) {
|
||||
$("#import-message").text(data.message);
|
||||
},
|
||||
error: function(err) {
|
||||
$("#import-message").text('Something went wrong !!!');
|
||||
},
|
||||
complete: function() {
|
||||
$('#overlay').fadeOut();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
uploader.init()
|
||||
|
||||
function removeFile() {
|
||||
$.each(uploader.files, function (i, file) {
|
||||
if (file) {
|
||||
uploader.removeFile(file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// validate upload form
|
||||
$("#form-upload").validate({
|
||||
rules: {
|
||||
member_id: {
|
||||
required: true,
|
||||
number: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
member_id: {
|
||||
required: 'Please input Member ID',
|
||||
number: 'Please input number'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-upload').on('click', function(e) {
|
||||
$('#import-message').text('');
|
||||
|
||||
if (uploader.files.length === 0) {
|
||||
$('#import-message').text('Please choose a file !!!');
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! uploader.files[0].size) {
|
||||
$('#import-message').text('File is empty');
|
||||
removeFile();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $("#form-upload").valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uploader.start();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- upload and import file -->
|
||||
<style>
|
||||
#import-form .form-group {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#search-form .form-group {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.search-by-range,
|
||||
.form-group,
|
||||
#wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.duration,
|
||||
.distance {
|
||||
flex-basis: 15%;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.form-control-file {
|
||||
padding-top: 0.7rem;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
background: #ffffff;
|
||||
color: #666666;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 5000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding-top: 25%;
|
||||
opacity: .80;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
margin: 0 auto;
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
animation: rotate 0.8s infinite linear;
|
||||
border: 5px solid firebrick;
|
||||
border-right-color: transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#form-upload {
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 1rem;
|
||||
width: 33rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input[name='member_id'] {
|
||||
width: 16rem;
|
||||
}
|
||||
|
||||
.file-upload {
|
||||
position: absolute;
|
||||
left: 17rem;
|
||||
top: 3.2rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,433 @@
|
||||
<link rel="stylesheet" type="text/css" href="/assets/json-view/jsonview.css">
|
||||
<script type="text/javascript" src="/assets/json-view/jsonview.js"></script>
|
||||
|
||||
<!-- Dashboard content -->
|
||||
<div id="overlay" style="display:none;">
|
||||
<div class="spinner"></div>
|
||||
<br />
|
||||
Importing...
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div>
|
||||
<div>
|
||||
<form method="GET" id="search-form" action="/advice/receiptadvice">
|
||||
<div class="form-group">
|
||||
<div class="travel_date">
|
||||
<label for="travel_date">Travel date</label>
|
||||
<input type="text" class="form-control" name="travel_date" value="<?= set_value('travel_date') ?>" readonly>
|
||||
</div>
|
||||
<div class="duration">
|
||||
<label for="">Duration</label>
|
||||
<div class="search-by-range">
|
||||
<input type="text" class="form-control" name="duration_from" value="<?= set_value('duration_from') ?>">
|
||||
|
||||
<input type="text" class="form-control" name="duration_to" value="<?= set_value('duration_to') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="distance">
|
||||
<label for="">Distance</label>
|
||||
<div class="search-by-range">
|
||||
<input type="text" class="form-control" name="distance_from" value="<?= set_value('distance_from') ?>">
|
||||
|
||||
<input type="text" class="form-control" name="distance_to" value="<?= set_value('distance_to') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="location">
|
||||
<label for="">Location</label>
|
||||
<div class="search-by-range">
|
||||
<select name="location_start_id" id="location_start_id">
|
||||
<?php if (!empty(set_value('location_start_id'))) {
|
||||
echo '<option selected value="' . set_value('location_start_id') . '">' . set_value('location_start_name') . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
|
||||
<select name="location_end_id" id="location_end_id">
|
||||
<?php if (!empty(set_value('location_end_id'))) {
|
||||
echo '<option selected value="' . set_value('location_end_id') . '">' . set_value('location_end_name') . '</option>';
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" id="search" data-action="/advice/receiptadvice" class="btn btn-primary btn-sm">Search</button>
|
||||
<button type="button" id="export-csv" data-action="/advice/exportCSV_receipt_advice" class="btn btn-warning btn-sm">Export</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="location_start_name" value="<?= set_value('location_start_name') ?>">
|
||||
<input type="hidden" name="location_end_name" value="<?= set_value('location_end_name') ?>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<div class="import-group">
|
||||
<form id="form-upload">
|
||||
<div class="member">
|
||||
<label>Member ID</label>
|
||||
<input type="text" class="form-control" name="member_id" maxlength=10>
|
||||
</div>
|
||||
<div class="file-upload">
|
||||
<span id="pickfiles">[Choose files]</span>
|
||||
<input type="button" id="btn-upload" class="btn btn-warning btn-sm" value="Upload">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="filelist"></div>
|
||||
<div id="import-message"></div>
|
||||
</div>
|
||||
<div class="error">
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_from') ? form_error('duration_from') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('duration_to') ? form_error('duration_to') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_from') ? form_error('distance_from') : '' ?>
|
||||
</div>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('distance_to') ? form_error('distance_to') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Display status message -->
|
||||
<?php if (!empty($this->session->flashdata('success'))) { ?>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-success"><?php echo $this->session->flashdata('success'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!empty($this->session->flashdata('error'))) { ?>
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-danger"><?php echo $this->session->flashdata('error'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="panel panel-flat">
|
||||
<div class="table-responsive">
|
||||
<?= $receipt_advice ?: '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-y-sm"><?= $pagination_link ?: '' ?></div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-flat" style="height: 100%;">
|
||||
<div id="transp_detail">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">View</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive" style="height:100%;">
|
||||
<div id="json" class="root"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
/** date range picker */
|
||||
let datepickerOptions = {
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD',
|
||||
cancelLabel: 'Clear'
|
||||
}
|
||||
};
|
||||
|
||||
let travelDateEl = $('input[name="travel_date"]');
|
||||
const travelDateVal = travelDateEl.val();
|
||||
if (travelDateVal == '') {
|
||||
datepickerOptions.startDate = moment().subtract(7, 'days').format('YYYY-MM-DD');
|
||||
datepickerOptions.endDate = moment().format('YYYY-MM-DD');
|
||||
}
|
||||
travelDateEl.daterangepicker(datepickerOptions);
|
||||
|
||||
travelDateEl.on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD'));
|
||||
});
|
||||
|
||||
travelDateEl.on('cancel.daterangepicker', function(ev, picker) {
|
||||
travelDateEl.val('');
|
||||
});
|
||||
|
||||
let start_address = generateSelect2('#location_start_id');
|
||||
let end_address = generateSelect2('#location_end_id');
|
||||
|
||||
|
||||
$('#location_start_id').on('select2:select', function(e) {
|
||||
var data = e.params.data;
|
||||
$('input[name="location_start_name"]').val(data.text);
|
||||
});
|
||||
|
||||
$('#location_end_id').on('select2:select', function(e) {
|
||||
var data = e.params.data;
|
||||
$('input[name="location_end_name"]').val(data.text);
|
||||
});
|
||||
|
||||
$('#search-form button').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
const action = $(this).data('action');
|
||||
|
||||
$(this)
|
||||
.closest('form')
|
||||
.attr('action', action)
|
||||
.submit();
|
||||
})
|
||||
});
|
||||
|
||||
function generateSelect2(ele) {
|
||||
return $(ele).select2({
|
||||
placeholder: "Search by Address",
|
||||
width: '18rem',
|
||||
maximumSelectionSize: 1,
|
||||
minimumInputLength: 3,
|
||||
ajax: {
|
||||
url: "/addresses/getAddressesAjax",
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
delay: 250,
|
||||
data: function(params) {
|
||||
const query = {
|
||||
name: params.term,
|
||||
page: params.page || 1,
|
||||
per_page: 20,
|
||||
};
|
||||
return query;
|
||||
},
|
||||
processResults: function(res, params) {
|
||||
const {
|
||||
data,
|
||||
total
|
||||
} = res;
|
||||
params.page = params.page || 1;
|
||||
return {
|
||||
results: data.map(item => ({
|
||||
id: item.id,
|
||||
text: item.address
|
||||
})),
|
||||
pagination: {
|
||||
more: params.page * 20 < +total
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function viewAdvice(id) {
|
||||
$('.root').html('');
|
||||
|
||||
fetch('/advice/advicejson?id=' + id)
|
||||
.then((res) => {
|
||||
return res.text();
|
||||
})
|
||||
.then((data) => {
|
||||
jsonView.format(data, '.root');
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- upload and import file -->
|
||||
<script src="/assets/js/plupload.full.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function() {
|
||||
let uploader = new plupload.Uploader({
|
||||
runtimes: 'html5',
|
||||
browse_button: 'pickfiles',
|
||||
container: document.getElementById('container'),
|
||||
url: '/advice/upload',
|
||||
chunk_size: '200kb',
|
||||
max_retries: 2,
|
||||
filters: {
|
||||
max_file_size: '50mb',
|
||||
mime_types: [{
|
||||
title: "CSV files",
|
||||
extensions: "csv"
|
||||
}]
|
||||
},
|
||||
init: {
|
||||
PostInit: function() {
|
||||
document.getElementById('filelist').innerHTML = '';
|
||||
},
|
||||
FilesAdded: function(up, files) {
|
||||
$("#import-message").text('');
|
||||
plupload.each(files, function(file) {
|
||||
document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
|
||||
});
|
||||
},
|
||||
UploadProgress: function(up, file) {
|
||||
document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
|
||||
},
|
||||
Error: function(up, err) {
|
||||
// DO YOUR ERROR HANDLING!
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
uploader.bind('FileUploaded', function() {
|
||||
// After file uploaded , send signal to insert all records
|
||||
removeFile();
|
||||
$('#overlay').fadeIn();
|
||||
$.ajax({
|
||||
url: '/advice/importCSV',
|
||||
method: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: {
|
||||
'member_id' : $('input[name="member_id"]').val()
|
||||
},
|
||||
success: function(data) {
|
||||
$("#import-message").text(data.message);
|
||||
},
|
||||
error: function(err) {
|
||||
$("#import-message").text('Something went wrong !!!');
|
||||
},
|
||||
complete: function() {
|
||||
$('#overlay').fadeOut();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
uploader.init()
|
||||
|
||||
function removeFile() {
|
||||
$.each(uploader.files, function (i, file) {
|
||||
if (file) {
|
||||
uploader.removeFile(file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// validate upload form
|
||||
$("#form-upload").validate({
|
||||
rules: {
|
||||
member_id: {
|
||||
required: true,
|
||||
number: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
member_id: {
|
||||
required: 'Please input Member ID',
|
||||
number: 'Please input number'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-upload').on('click', function(e) {
|
||||
$('#import-message').text('');
|
||||
|
||||
if (uploader.files.length === 0) {
|
||||
$('#import-message').text('Please choose a file !!!');
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! uploader.files[0].size) {
|
||||
$('#import-message').text('File is empty');
|
||||
removeFile();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $("#form-upload").valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
uploader.start();
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
<!-- upload and import file -->
|
||||
<style>
|
||||
#import-form .form-group {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#search-form .form-group {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.search-by-range,
|
||||
.form-group,
|
||||
#wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.duration,
|
||||
.distance {
|
||||
flex-basis: 15%;
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.form-control-file {
|
||||
padding-top: 0.7rem;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
background: #ffffff;
|
||||
color: #666666;
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 5000;
|
||||
top: 0;
|
||||
left: 0;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding-top: 25%;
|
||||
opacity: .80;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
margin: 0 auto;
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
animation: rotate 0.8s infinite linear;
|
||||
border: 5px solid firebrick;
|
||||
border-right-color: transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#form-upload {
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 1rem;
|
||||
width: 33rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input[name='member_id'] {
|
||||
width: 16rem;
|
||||
}
|
||||
|
||||
.file-upload {
|
||||
position: absolute;
|
||||
left: 17rem;
|
||||
top: 3.2rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,278 @@
|
||||
<link href="/assets/css/android_automation_job_detail/form.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<div class="row mt-3 quote-estimate-form">
|
||||
<?php if ($this->session->flashdata('error')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="margin-right: 15px;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<strong>Error - </strong> <?php echo $this->session->flashdata('error') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('job_id') ? 'has-error' : ''; ?>">
|
||||
<label for="job_id">Job ID</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="job_id"
|
||||
name="job_id"
|
||||
value="<?php echo set_value('job_id', $android_automation_job_detail['job_id']); ?>"
|
||||
placeholder="Enter Job ID"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('job_id') ? form_error('job_id') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('icon_info') ? 'has-error' : ''; ?>">
|
||||
<label for="icon_info">Icon Info</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="icon_info"
|
||||
name="icon_info"
|
||||
value="<?php echo set_value('icon_info', $android_automation_job_detail['icon_info']); ?>"
|
||||
placeholder="Enter Icon Info"
|
||||
maxlength="200"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('icon_info') ? form_error('icon_info') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('name') ? 'has-error' : ''; ?>">
|
||||
<label for="name">Name</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="name"
|
||||
name="name"
|
||||
value="<?php echo set_value('name', $android_automation_job_detail['name']); ?>"
|
||||
placeholder="Enter Name"
|
||||
maxlength="200"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('name') ? form_error('name') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('icon_url') ? 'has-error' : ''; ?>">
|
||||
<label for="icon_url">Icon Url</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="icon_url"
|
||||
name="icon_url"
|
||||
value="<?php echo set_value('icon_url', $android_automation_job_detail['icon_url']); ?>"
|
||||
placeholder="Enter Icon Url"
|
||||
maxlength="200"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('icon_url') ? form_error('icon_url') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('descriptor') ? 'has-error' : ''; ?>">
|
||||
<label for="descriptor">Descriptor</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="descriptor"
|
||||
autocomplete="off"
|
||||
name="descriptor"
|
||||
value="<?php echo set_value('descriptor', $android_automation_job_detail['descriptor']); ?>"
|
||||
placeholder="Enter Descriptor"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('descriptor') ? form_error('descriptor') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('warning_message') ? 'has-error' : ''; ?>">
|
||||
<label for="warning_message">Warning Message</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="warning_message"
|
||||
autocomplete="off"
|
||||
name="warning_message"
|
||||
value="<?php echo set_value('warning_message', $android_automation_job_detail['warning_message']); ?>"
|
||||
placeholder="Enter Warning Message"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('warning_message') ? form_error('warning_message') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('uuid') ? 'has-error' : ''; ?>">
|
||||
<label for="uuid">UUID</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="uuid"
|
||||
autocomplete="off"
|
||||
name="uuid"
|
||||
value="<?php echo set_value('uuid', $android_automation_job_detail['uuid']); ?>"
|
||||
placeholder="Enter UUID"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('uuid') ? form_error('uuid') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('series_id') ? 'has-error' : ''; ?>">
|
||||
<label for="series_id">Series ID</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="series_id"
|
||||
autocomplete="off"
|
||||
name="series_id"
|
||||
value="<?php echo set_value('series_id', $android_automation_job_detail['series_id']); ?>"
|
||||
placeholder="Enter Series ID"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('series_id') ? form_error('series_id') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('series_id') ? 'has-error' : ''; ?>">
|
||||
<label for="service_id">Service ID</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="service_id"
|
||||
autocomplete="off"
|
||||
name="service_id"
|
||||
value="<?php echo set_value('service_id', $android_automation_job_detail['service_id']); ?>"
|
||||
placeholder="Enter Service ID"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('service_id') ? form_error('service_id') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('additional_booking_fee') ? 'has-error' : ''; ?>">
|
||||
<label for="additional_booking_fee">Additional Booking Fee</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="additional_booking_fee"
|
||||
autocomplete="off"
|
||||
name="additional_booking_fee"
|
||||
value="<?php echo set_value('additional_booking_fee', $android_automation_job_detail['additional_booking_fee']); ?>"
|
||||
placeholder="Enter Additional Booking Fee"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('additionn_booking_fee') ? form_error('additional_booking_fee') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('advance_booking_fee') ? 'has-error' : ''; ?>">
|
||||
<label for="advance_booking_fee">Advance Booking Fee</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="advance_booking_fee"
|
||||
autocomplete="off"
|
||||
name="advance_booking_fee"
|
||||
value="<?php echo set_value('advance_booking_fee', $android_automation_job_detail['advance_booking_fee']); ?>"
|
||||
placeholder="Enter Advance Booking Fee"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('advance_booking_fee') ? form_error('advance_booking_fee') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('low_estimate') ? 'has-error' : ''; ?>">
|
||||
<label for="low_estimate">Low Estimate</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="low_estimate"
|
||||
autocomplete="off"
|
||||
name="low_estimate"
|
||||
value="<?php echo set_value('low_estimate', $android_automation_job_detail['low_estimate']); ?>"
|
||||
placeholder="Enter Low Estimate"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('low_estimate') ? form_error('low_estimate') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('high_estimate') ? 'has-error' : ''; ?>">
|
||||
<label for="high_estimate">High Estimate</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="high_estimate"
|
||||
autocomplete="off"
|
||||
name="high_estimate"
|
||||
value="<?php echo set_value('high_estimate', $android_automation_job_detail['high_estimate']); ?>"
|
||||
placeholder="Enter High Estimate"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('high_estimate') ? form_error('high_estimate') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('fixed') ? 'has-error' : ''; ?>">
|
||||
<label for="fixed">Fixed</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="fixed"
|
||||
autocomplete="off"
|
||||
name="fixed"
|
||||
value="<?php echo set_value('fixed', $android_automation_job_detail['fixed']); ?>"
|
||||
placeholder="Enter Fixed"
|
||||
maxlength="4"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('fixed') ? form_error('fixed') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('quote_date') ? 'has-error' : ''; ?>">
|
||||
<label for="quote_date">Quote Date</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="quote_date"
|
||||
autocomplete="off"
|
||||
name="quote_date"
|
||||
value="<?php echo set_value('quote_date', $android_automation_job_detail['quote_date']); ?>"
|
||||
placeholder="Enter Quote Date"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('quote_date') ? form_error('quote_date') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/pages/android_automation_job_detail/list.js" type="text/javascript"></script>
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Android Automation Job Detail</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Create New Android Automation Job Detail</h4>
|
||||
|
||||
<form action="/android_automation_job_details/store" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Create</button>
|
||||
<a href="/android_automation_job_details" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Android Automation Job Detail</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Edit Android Automation Job Detail <?php echo $id ?></h4>
|
||||
|
||||
<form action="/android_automation_job_details/update/<?php echo $id ?>" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Edit</button>
|
||||
<a href="/android_automation_job_details" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,207 @@
|
||||
<link href="/assets/css/android_automation_job_detail/list.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right text-right action">
|
||||
<a href="/android_automation_job_details/create" class="btn btn-success">New Android Automation Job Detail</a>
|
||||
</div>
|
||||
<h4 class="page-title">Android Automation Job Detail</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<!-- start alert -->
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-success alert-dismissible bg-success text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $this->session->flashdata('success') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- end alert -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<form class="search-block form-inline" id="searchForm" action="/android_automation_job_details" method="get">
|
||||
<div class="form-group mr-sm-3">
|
||||
<label for="filter_transport_provider" style="width: 17.3rem;" class="font-weight-bold"><h6>Transport Provider</h6></label>
|
||||
<select class="form-control select2 w-100" id="filter_transport_provider" name="transport_provider_id" allow-search="false">
|
||||
<option value="">All</option>
|
||||
<?php
|
||||
foreach($transport_provider as $key=>$value) {
|
||||
$selected = ($filterData['transport_provider_id'] == $value['id']) ? 'selected' : '';
|
||||
echo '<option value="' . $value['id'] . '"' . $selected . '>' . $value['name'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mr-sm-3">
|
||||
<label for="filter_android_automation_job" class="font-weight-bold"><h6>Android Automation Job</h6></label>
|
||||
<!-- <select class="form-control select2 w-100" id="filter_android_automation_job" name="job_id" allow-search="false">
|
||||
<option value="">All</option>
|
||||
<?php
|
||||
foreach($android_automation_jobs as $key=>$value) {
|
||||
$selected = ($filterData['job_id'] == $value['id']) ? 'selected' : '';
|
||||
echo '<option value="' . $value['id'] . '"' . $selected . '>' . $value['id'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select> -->
|
||||
<input
|
||||
class="form-control"
|
||||
id="filter_android_automation_job"
|
||||
name="job_id"
|
||||
placeholder="Android Automation Job ID"
|
||||
value="<?= isset($filterData['job_id']) ? $filterData['job_id'] : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||||
<label style="width: 15.8rem" for="from_complete">Name</label>
|
||||
<input class="form-control"
|
||||
id="name"
|
||||
name="name"
|
||||
placeholder="Name"
|
||||
value="<?= isset($filterData['name']) ? $filterData['name'] : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||||
<label style="width: 15.8rem" for="uuid">UUID</label>
|
||||
<input class="form-control"
|
||||
id="uuid"
|
||||
name="uuid"
|
||||
placeholder="UUID"
|
||||
value="<?= isset($filterData['uuid']) ? $filterData['uuid'] : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||||
<label style="width: 15.8rem" for="from_complete">Service ID</label>
|
||||
<input class="form-control"
|
||||
id="service_id"
|
||||
name="service_id"
|
||||
placeholder="Service ID"
|
||||
value="<?= isset($filterData['service_id']) ? $filterData['service_id'] : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-search" id="btnSearch" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="table-responsive-sm">
|
||||
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Location Start</th>
|
||||
<th>Location End</th>
|
||||
<th>Name</th>
|
||||
<th>Icon Url</th>
|
||||
<th>Icon Info</th>
|
||||
<th>Descriptor</th>
|
||||
<th>Warning Message</th>
|
||||
<th>UUID</th>
|
||||
<th>Series ID</th>
|
||||
<th>Service ID</th>
|
||||
<th>Additional Booking Fee</th>
|
||||
<th>Advance Booking Fee</th>
|
||||
<th>Low Estimate</th>
|
||||
<th>High Estimate</th>
|
||||
<th>Fixed</th>
|
||||
<th>Quote Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-striped">
|
||||
<?php foreach($list as $item): ?>
|
||||
<tr>
|
||||
<td><?php echo $item['id'] ?></td>
|
||||
<td><?php echo $item['location_start'] ?></td>
|
||||
<td><?php echo $item['location_end'] ?></td>
|
||||
<td><?php echo $item['name'] ?></td>
|
||||
<td><?php echo $item['icon_url'] ?></td>
|
||||
<td><?php echo $item['icon_info'] ?></td>
|
||||
<td><?php echo $item['descriptor'] ?></td>
|
||||
<td><?php echo $item['warning_message'] ?></td>
|
||||
<td><?php echo $item['uuid'] ?></td>
|
||||
<td><?php echo $item['series_id'] ?></td>
|
||||
<td><?php echo $item['service_id'] ?></td>
|
||||
<td><?php echo $item['additional_booking_fee'] ?></td>
|
||||
<td><?php echo $item['advance_booking_fee'] ?></td>
|
||||
<td><?php echo $item['low_estimate'] ?></td>
|
||||
<td><?php echo $item['high_estimate'] ?></td>
|
||||
<td><?php echo $item['fixed'] ?></td>
|
||||
<td><?php echo $item['quote_date'] ?></td>
|
||||
<td class="actions">
|
||||
<a href="/android_automation_job_details/edit/<?php echo $item['id']; ?>" class="btn btn-primary">View</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-danger btn-remove"
|
||||
data-id="<?php echo $item['id'] ?>"
|
||||
data-android-automation-job-detail="<?php echo $item['name'] ?>"
|
||||
data-toggle="modal"
|
||||
data-target="#remove-android-automation-job-detail-warning-modal"
|
||||
>Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo $pagination ?>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
|
||||
<div id="remove-android-automation-job-detail-warning-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="warning-header-modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header modal-colored-header bg-warning">
|
||||
<h4 class="modal-title" id="warning-header-modalLabel"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 class="mt-0">Remove warning</h5>
|
||||
<p>This can not be undone. Do you want to conitnue?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-warning" id="removeBtn" data-id="">Continue</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/app.js" type="text/javascript"></script>
|
||||
<script src="/assets/js/pages/android_automation_job_detail/list.js" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
#searchForm {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#btnSearch {
|
||||
width: 100px;
|
||||
margin-top: 1rem;
|
||||
margin-left: 18.3rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,269 @@
|
||||
<!-- <link href="/assets/css/transport_providers/form.css" rel="stylesheet" type="text/css" /> -->
|
||||
|
||||
<div class="row mt-3 automation-job-form">
|
||||
<?php if ($this->session->flashdata('error')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="margin-right: 15px;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<strong>Error - </strong> <?php echo $this->session->flashdata('error') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('name') ? 'has-error' : ''; ?>">
|
||||
<label for="location-start">Location start</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-start"
|
||||
name="location_start"
|
||||
value="<?php echo set_value('location_start', (isset($job) && isset($job['location_start']) ? $job['location_start'] : null)); ?>"
|
||||
placeholder="Enter location start"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_start') ? form_error('location_start') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('name') ? 'has-error' : ''; ?>">
|
||||
<label for="location-end">Location end</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-end"
|
||||
name="location_end"
|
||||
value="<?php echo set_value('location_end', (isset($job) && isset($job['location_end']) ? $job['location_end'] : null)); ?>"
|
||||
placeholder="Enter location end"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_end') ? form_error('location_end') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('location_start_lat') ? 'has-error' : ''; ?>">
|
||||
<label for="location-start-lat">Location start lat</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-start-lat"
|
||||
name="location_start_lat"
|
||||
value="<?php echo set_value('location_start_lat', (isset($job) && isset($job['location_start_lat']) ? $job['location_start_lat'] : null)); ?>"
|
||||
placeholder="Enter location start latitude"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_start_lat') ? form_error('location_start_lat') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('location_start_lng') ? 'has-error' : ''; ?>">
|
||||
<label for="location-start-lng">Location start lng</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-start-lng"
|
||||
name="location_start_lng"
|
||||
value="<?php echo set_value('location_start_lng', (isset($job) && isset($job['location_start_lng']) ? $job['location_start_lng'] : null)); ?>"
|
||||
placeholder="Enter location start longitude"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_start_lng') ? form_error('location_start_lng') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('location_end_lat') ? 'has-error' : ''; ?>">
|
||||
<label for="location-end-lat">Location end lat</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-end-lat"
|
||||
name="location_end_lat"
|
||||
value="<?php echo set_value('location_end_lat', (isset($job) && isset($job['location_end_lat']) ? $job['location_end_lat'] : null)); ?>"
|
||||
placeholder="Enter location end lat"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_end_lat') ? form_error('location_end_lat') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('location_end_lng') ? 'has-error' : ''; ?>">
|
||||
<label for="location-end-lng">Location end lng</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="location-end-lng"
|
||||
name="location_end_lng"
|
||||
value="<?php echo set_value('location_end_lng', (isset($job) && isset($job['location_end_lng']) ? $job['location_end_lng'] : null)); ?>"
|
||||
placeholder="Enter location start longitude"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('location_end_lng') ? form_error('location_end_lng') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('trackedemail_item_id') ? 'has-error' : ''; ?>">
|
||||
<label for="trackedemail-item-id">Trackedemail item</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="trackedemail-item-id"
|
||||
name="trackedemail_item_id"
|
||||
value="<?php echo set_value('trackedemail_item_id', (isset($job) && isset($job['trackedemail_item_id']) ? $job['trackedemail_item_id'] : null)); ?>"
|
||||
placeholder="Enter trackedemail item"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('trackedemail_item_id') ? form_error('trackedemail_item_id') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('transport_provider_id') ? 'has-error' : ''; ?>">
|
||||
<label for="transport-provider">Transport provider</label>
|
||||
<select
|
||||
class="form-control"
|
||||
id="transport-provider"
|
||||
name="transport_provider_id"
|
||||
placeholder="Enter transport provider"
|
||||
>
|
||||
<?php
|
||||
if (isset($job) && isset($job['transport_provider_id'])) {
|
||||
echo '<option value="' . $job['transport_provider_id'] . '" selected >' . $job['transport_provider_name'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('transport_provider_id') ? form_error('transport_provider_id') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('cost_raw') ? 'has-error' : ''; ?>">
|
||||
<label for="cost-raw">Cost raw</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="cost-raw"
|
||||
name="cost_raw"
|
||||
value="<?php echo set_value('cost_raw', (isset($job) && isset($job['cost_raw']) ? $job['cost_raw'] : null)); ?>"
|
||||
placeholder="Enter cost raw"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('cost_raw') ? form_error('cost_raw') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('cost') ? 'has-error' : ''; ?>">
|
||||
<label for="cost">Cost</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="cost"
|
||||
name="cost"
|
||||
value="<?php echo set_value('cost', (isset($job) && isset($job['cost']) ? $job['cost'] : null)); ?>"
|
||||
placeholder="Enter cost"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('cost') ? form_error('cost') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('started') ? 'has-error' : ''; ?>">
|
||||
<label for="started">Started</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="started"
|
||||
name="started"
|
||||
datepicker
|
||||
autocomplete="off"
|
||||
value="<?php echo set_value('started', (isset($job) && isset($job['started']) ? date('Y-m-d', strtotime($job['started'])) : null)); ?>"
|
||||
placeholder="Enter started date"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('started') ? form_error('started') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('complete') ? 'has-error' : ''; ?>">
|
||||
<label for="complete">Complete</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="complete"
|
||||
name="complete"
|
||||
datepicker
|
||||
autocomplete="off"
|
||||
value="<?php echo set_value('complete', (isset($job) && isset($job['complete']) ? date('Y-m-d', strtotime($job['complete'])) : null)); ?>"
|
||||
placeholder="Enter complete date"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('complete') ? form_error('complete') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('status') ? 'has-error' : ''; ?>">
|
||||
<label for="status">Status</label>
|
||||
<input type="text"
|
||||
type="number"
|
||||
class="form-control"
|
||||
id="status"
|
||||
name="status"
|
||||
value="<?php echo set_value('status', (isset($job) && isset($job['status']) ? $job['status'] : null)); ?>"
|
||||
placeholder="Enter status"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('status') ? form_error('status') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('attempts') ? 'has-error' : ''; ?>">
|
||||
<label for="attemps">Attemps</label>
|
||||
<input type="text"
|
||||
type="number"
|
||||
class="form-control"
|
||||
id="attemps"
|
||||
name="attempts"
|
||||
value="<?php echo set_value('attempts', (isset($job) && isset($job['attempts']) ? $job['attempts'] : null)); ?>"
|
||||
placeholder="Enter attemps"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('attempts') ? form_error('attempts') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<div class="form-group mb-3 <?php echo form_error('message') ? 'has-error' : ''; ?>">
|
||||
<label for="message">Message</label>
|
||||
<textarea type="text"
|
||||
class="form-control"
|
||||
id="message"
|
||||
name="message"
|
||||
placeholder="Enter message"
|
||||
><?php echo set_value('message', (isset($job) && isset($job['message']) ? $job['message'] : null)); ?></textarea>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('message') ? form_error('message') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||||
<script src="/assets/js/pages/automation_jobs/form.js" type="text/javascript"></script>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Automation Jobs</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Create New Automation Job</h4>
|
||||
|
||||
<form action="/automation_jobs/store" method="post" id="automation-job-form">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Create</button>
|
||||
<a href="/automation_jobs" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Automation Jobs</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Edit Automation Job</h4>
|
||||
|
||||
<form action="/automation_jobs/update/<?php echo $jobId ?>" method="post" id="automation-job-form">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Edit</button>
|
||||
<a href="/automation_jobs" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,185 @@
|
||||
<link href="/assets/css/transport_provider/list.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right text-right action">
|
||||
<a href="/automation_jobs/create" class="btn btn-success">New automation job</a>
|
||||
</div>
|
||||
<h4 class="page-title">Automation Jobs</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<!-- start alert -->
|
||||
<?php if ($this->session->flashdata('success')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-success alert-dismissible bg-success text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $this->session->flashdata('success') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<!-- end alert -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form class="search-block form-inline" id="searchForm" action="/automation_jobs" method="get">
|
||||
<div class="form-group mr-sm-3">
|
||||
<label style="width: 110px" for="transport-provider">Transport Provider</label>
|
||||
<select
|
||||
class="form-control"
|
||||
id="transport-provider"
|
||||
name="transport_provider_id"
|
||||
placeholder="Enter transport provider"
|
||||
>
|
||||
<?php
|
||||
if (isset($transport_provider_id) && isset($transport_provider_name)) {
|
||||
echo '<option value="' . $transport_provider_id . '" selected >' . $transport_provider_name . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||||
<label style="width: 95px" for="location_start">Location</label>
|
||||
<input class="form-control"
|
||||
id="location_start"
|
||||
name="location_start"
|
||||
placeholder="Location"
|
||||
value="<?= isset($location_start) ? $location_start : '' ?>"
|
||||
/>
|
||||
<input class="form-control"
|
||||
id="location_end"
|
||||
name="location_end"
|
||||
placeholder="Location"
|
||||
value="<?= isset($location_end) ? $location_end : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="form-group mr-sm-3" style="margin-top: 1rem">
|
||||
<label style="width: 95px" for="from_complete">Complete Date</label>
|
||||
<input class="form-control"
|
||||
id="from_complete"
|
||||
name="from_complete"
|
||||
placeholder="Complete"
|
||||
value="<?= isset($from_complete) ? $from_complete : '' ?>"
|
||||
/>
|
||||
<input class="form-control"
|
||||
id="to_complete"
|
||||
name="to_complete"
|
||||
placeholder="Complete"
|
||||
value="<?= isset($to_complete) ? $to_complete : '' ?>"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary btn-search" id="btnSearch" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive-sm">
|
||||
<table id="trips-datatable" class="table table-sm table-centered mb-0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Id</td>
|
||||
<td>Location Start</td>
|
||||
<td>Location End</td>
|
||||
<td>Cost Raw</td>
|
||||
<td>Trackedemail Item</td>
|
||||
<td>Cost</td>
|
||||
<td>Transport Provider</td>
|
||||
<td>Request Date</td>
|
||||
<td>Started</td>
|
||||
<td>Complete</td>
|
||||
<td>Status</td>
|
||||
<td>Action</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-striped">
|
||||
<?php foreach($list as $item): ?>
|
||||
<tr>
|
||||
<td><?php echo $item['id'] ?></td>
|
||||
<td><?php echo $item['location_start'] ?></td>
|
||||
<td><?php echo $item['location_end'] ?></td>
|
||||
<td><?php echo $item['cost_raw'] ?></td>
|
||||
<td><?php echo $item['trackedemail_item_id'] ?></td>
|
||||
<td><?php echo $item['cost'] ?></td>
|
||||
<td><?php echo isSet($item['transport_provider_name']) ? $item['transport_provider_name'] : '' ?></td>
|
||||
<td><?php echo $item['request_date'] ?></td>
|
||||
<td><?php echo date('Y-m-d', strtotime($item['started'])) ?></td>
|
||||
<td><?php echo date('Y-m-d', strtotime($item['complete'])) ?></td>
|
||||
<td><?php echo $item['status'] ?></td>
|
||||
<td class="actions">
|
||||
<a href="/automation_jobs/edit/<?php echo $item['id']; ?>" class="btn btn-primary">View</a>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-danger btn-remove"
|
||||
data-id="<?php echo $item['id'] ?>"
|
||||
data-job="<?php echo $item['id'] ?>"
|
||||
data-toggle="modal"
|
||||
data-target="#remove-job-warning-modal"
|
||||
>Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php echo $pagination ?>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
|
||||
<div id="remove-job-warning-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="warning-header-modalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header modal-colored-header bg-warning">
|
||||
<h4 class="modal-title" id="warning-header-modalLabel"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5 class="mt-0">Remove warning</h5>
|
||||
<p>This can not be undone. Do you want to conitnue?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-warning" id="removeBtn" data-id="">Continue</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/app.js" type="text/javascript"></script>
|
||||
<script src="/assets/js/plugins/forms/selects/select2.min.js"></script>
|
||||
<script src="/assets/js/pages/automation_jobs/list.js" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
#searchForm {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
span.select2-container {
|
||||
width: 37%;
|
||||
}
|
||||
#btnSearch {
|
||||
width: 100px;
|
||||
margin-top: 1rem;
|
||||
margin-left: 12rem;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,133 @@
|
||||
<style>
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
.col-8 {
|
||||
flex-basis: 66.66%;
|
||||
}
|
||||
.col-4 {
|
||||
flex-basis: 33.33%;
|
||||
}
|
||||
.col-3 {
|
||||
flex-basis: 25%;
|
||||
}
|
||||
.p-15 {
|
||||
padding: 15px;
|
||||
}
|
||||
.mb-15 {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
.d-none {
|
||||
display: none;
|
||||
}
|
||||
.custom-form-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.custom-form-group label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.mr-15 {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.filter-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mt-0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="d-flex panel panel-white">
|
||||
<div class="form-wrapper col-4 p-15">
|
||||
|
||||
<div id="add-form-wrapper">
|
||||
<h4 class="mt-0">Add new blog</h4>
|
||||
<form id="add-form">
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Blog ID: </label>
|
||||
<input type="text" name="blog_id" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Description: </label>
|
||||
<input type="text" name="description" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Status: </label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="update-form-wrapper" class="d-none">
|
||||
<h4 class="mt-0">Update blog <span class="badge badge-primary" onclick="showAddForm()" style="cursor: pointer">New</span></h4>
|
||||
<form id="update-form">
|
||||
<input type="hidden" name="id">
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Blog ID: </label>
|
||||
<input type="text" name="blog_id" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Description: </label>
|
||||
<input type="text" name="description" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Status: </label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="blog-wrapper col-8 p-15">
|
||||
<form id="filter-form" class="filter-wrapper">
|
||||
<input type="text" name="blog_id" class="form-control col-3 mr-15" placeholder="Blog ID">
|
||||
<input type="text" name="description" class="form-control col-3 mr-15" placeholder="Description">
|
||||
<select name="status" class="form-control col-3 mr-15">
|
||||
<option value="-1" selected>All statuses</option>
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
<button class="btn btn-primary">Search</button>
|
||||
</form>
|
||||
<h5 id="blog-table-loading" class="d-none">Loading...</h5>
|
||||
<table id="blog-table" class="table-bordered table-condensed table-hover table-striped table-condensed d-none mb-15" style="background-color:#f0f8ff;" width="100%">
|
||||
<thead class="bg-indigo">
|
||||
<th width="83px">Blog ID</th>
|
||||
<th>Description</th>
|
||||
<th width="79px">Status</th>
|
||||
<th width="104px" style="text-align: center">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="blog-pagination" class="text-center"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pagination/bootpag.min.js"></script>
|
||||
<script src="/assets/js/pages/blog/index.js"></script>
|
||||
|
||||
<script>
|
||||
loadPage();
|
||||
</script>
|
||||
@@ -0,0 +1,138 @@
|
||||
<style>
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
.col-8 {
|
||||
flex-basis: 66.66%;
|
||||
}
|
||||
.col-4 {
|
||||
flex-basis: 33.33%;
|
||||
}
|
||||
.col-3 {
|
||||
flex-basis: 25%;
|
||||
}
|
||||
.p-15 {
|
||||
padding: 15px;
|
||||
}
|
||||
.mb-15 {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
.d-none {
|
||||
display: none;
|
||||
}
|
||||
.custom-form-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.custom-form-group label {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.mr-15 {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.filter-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mt-0 {
|
||||
margin-top: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="d-flex panel panel-white">
|
||||
<div class="form-wrapper col-4 p-15">
|
||||
|
||||
<div id="add-form-wrapper">
|
||||
<h4 class="mt-0">Add new blog</h4>
|
||||
<form id="add-form">
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Blog list: </label>
|
||||
<select id="blog_list" class="form-control"></select>
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Blog ID: </label>
|
||||
<input type="text" id="new_blog_id" name="blog_id" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Description: </label>
|
||||
<input type="text" id="new_blog_description" name="description" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Status: </label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="update-form-wrapper" class="d-none">
|
||||
<h4 class="mt-0">Update blog <span class="badge badge-primary" onclick="showAddForm()" style="cursor: pointer">New</span></h4>
|
||||
<form id="update-form">
|
||||
<input type="hidden" name="id">
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Blog ID: </label>
|
||||
<input type="text" name="blog_id" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Description: </label>
|
||||
<input type="text" name="description" class="form-control">
|
||||
</div>
|
||||
<div class="custom-form-group">
|
||||
<label style="width: 95px;">Status: </label>
|
||||
<select name="status" class="form-control">
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
</div>
|
||||
<button class="btn btn-primary float-right">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="blog-wrapper col-8 p-15">
|
||||
<form id="filter-form" class="filter-wrapper">
|
||||
<input type="text" name="blog_id" class="form-control col-3 mr-15" placeholder="Blog ID">
|
||||
<input type="text" name="description" class="form-control col-3 mr-15" placeholder="Description">
|
||||
<select name="status" class="form-control col-3 mr-15">
|
||||
<option value="-1" selected>All statuses</option>
|
||||
<option value="1">Active</option>
|
||||
<option value="0">Inactive</option>
|
||||
</select>
|
||||
<button class="btn btn-primary">Search</button>
|
||||
</form>
|
||||
<h5 id="blog-table-loading" class="d-none">Loading...</h5>
|
||||
<table id="blog-table" class="table-bordered table-condensed table-hover table-striped table-condensed d-none mb-15" style="background-color:#f0f8ff;" width="100%">
|
||||
<thead class="bg-indigo">
|
||||
<th width="83px">Blog ID</th>
|
||||
<th>Description</th>
|
||||
<th width="79px">Status</th>
|
||||
<th width="104px" style="text-align: center">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="blog-pagination" class="text-center"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pagination/bootpag.min.js"></script>
|
||||
<script src="/assets/js/pages/blog_app_article/index.js"></script>
|
||||
|
||||
<script>
|
||||
loadPage();
|
||||
loadBlogs();
|
||||
</script>
|
||||
@@ -0,0 +1,142 @@
|
||||
<style>
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
.flex-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.col-1 {
|
||||
flex-basis: 8.333333%;
|
||||
}
|
||||
.col-2 {
|
||||
flex-basis: 16.666667%;
|
||||
}
|
||||
.col-3 {
|
||||
flex-basis: 25%;
|
||||
}
|
||||
.d-none {
|
||||
display: none;
|
||||
}
|
||||
.p-15 {
|
||||
padding: 15px;
|
||||
}
|
||||
.pr-15 {
|
||||
padding-right: 15px !important;
|
||||
}
|
||||
.mb-15 {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.overflow-auto {
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="panel panel-white overflow-auto p-15">
|
||||
<form id="filter-form" class="d-flex flex-wrap">
|
||||
<div class="col-2 mb-15 pr-15"><input type="text" name="id" class="form-control" placeholder="ID"></div>
|
||||
<div class="col-2 mb-15 pr-15"><input type="text" name="quote_id" class="form-control" placeholder="Quote ID"></div>
|
||||
<div class="col-2 mb-15 pr-15"><input type="text" name="provider_booking_ref" class="form-control" placeholder="Provider Booking Ref"></div>
|
||||
<!-- <div class="col-2 mb-15 pr-15"><input type="text" name="details" class="form-control" placeholder="Detail"></div> -->
|
||||
<div class="col-2 mb-15 pr-15"><input type="text" name="message" class="form-control" placeholder="Message"></div>
|
||||
<div class="col-2 mb-15 pr-15">
|
||||
<select name="status" id="" class="form-control">
|
||||
<option value="recent">Recent Bookings</option>
|
||||
<option value="pending">Pending Bookings</option>
|
||||
<option value="cancelled">Cancelled Bookings</option>
|
||||
<option value="active">Active Bookings</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-1 mb-15 pr-15"><input type="text" name="member_id" class="form-control" placeholder="Member ID"></div>
|
||||
<div class="col-1 mb-15 pr-15"><input type="text" name="cost" class="form-control" placeholder="Cost"></div>
|
||||
<div class="input-group col-3 mb-15 pr-15">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
|
||||
<input type="text" name="created" value="" class="form-control" placeholder="Created"/>
|
||||
</div>
|
||||
<div class="input-group col-3 mb-15 pr-15">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
|
||||
<input type="text" name="updated" value="" class="form-control" placeholder="Updated"/>
|
||||
</div>
|
||||
<div class="input-group col-3 mb-15 pr-15">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
|
||||
<input type="text" name="completed" value="" class="form-control" placeholder="Completed"/>
|
||||
</div>
|
||||
<div class="col pr-15">
|
||||
<button class="btn btn-primary">Search</button>
|
||||
</div>
|
||||
</form>
|
||||
<h5 id="booking-table-loading" class="col-12 d-none">Loading...</h5>
|
||||
<table id="booking-table" class="table-bordered table-condensed table-hover table-striped table-condensed d-none mb-15" style="background-color:#f0f8ff;" width="100%">
|
||||
<thead class="bg-indigo">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Quote ID</th>
|
||||
<th>Provider Booking Ref</th>
|
||||
<th>Detail</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th>Completed</th>
|
||||
<th>Status</th>
|
||||
<th>Message</th>
|
||||
<th>Member ID</th>
|
||||
<th>Cost</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
<td>No result</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="booking-pagination" class="col-12 text-center"></div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pagination/bootpag.min.js"></script>
|
||||
<script src="/assets/js/pages/booking/index.js"></script>
|
||||
|
||||
<script>
|
||||
loadPage();
|
||||
|
||||
$(function() {
|
||||
var daterangeInputs = 'input[name="created"], input[name="updated"], input[name="completed"]';
|
||||
var start = moment().subtract(29, 'days');
|
||||
var end = moment();
|
||||
|
||||
$(daterangeInputs).daterangepicker({
|
||||
opens: 'right',
|
||||
autoUpdateInput: false,
|
||||
locale: {
|
||||
cancelLabel: 'Clear',
|
||||
format: 'YYYY/MM/DD'
|
||||
},
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
||||
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
||||
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
||||
'Last 60 Days': [moment().subtract(59, 'days'), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')],
|
||||
'Last 2 Months': [moment().subtract(2, 'month').startOf('month'), moment().subtract(2, 'month').endOf('month')]
|
||||
},
|
||||
alwaysShowCalendars: true,
|
||||
});
|
||||
|
||||
$(daterangeInputs).on('apply.daterangepicker', function(ev, picker) {
|
||||
$(this).val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
|
||||
$(daterangeInputs).on('cancel.daterangepicker', function(ev, picker) {
|
||||
$(this).val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,237 @@
|
||||
<form method="POST" action="?" id="frm_update_card">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_id ?>" />
|
||||
<?php } ?>
|
||||
<input type="hidden" name="card_logic" value="" />
|
||||
<div class="row">
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Template</label>
|
||||
<?= $card_template ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category <span class="required">*</span></label>
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category Type</label>
|
||||
<?= $card_type ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Card Time</label>
|
||||
<?= $card_time ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Can user save ?</label>
|
||||
<?= $card_can_save ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardPictureslabel">Picture</label>
|
||||
<?= $card_pictures ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardName">Card Id <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" id="cardName" name="card_name" maxlength="100" placeholder="Card Unique" value="<?= $card_name ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Short Title</label>
|
||||
<?= $use_short_title_combo ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardShortTitle">Card Short Title</label>
|
||||
<input type="text" class="form-control" id="cardShortTitle" name="short_title" maxlength="35" placeholder="Card Short Title" value="<?= $short_title ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Title</label>
|
||||
<?= $card_titleshow ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showDynamicKeyInput">Dynamic Card key</label>
|
||||
<h3> <?= isset($dynamic_key)?$dynamic_key:'' ?></h3>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="activity_screen">Activity Screen</label>
|
||||
<?= $activity_screen??'' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardTitle">Card Title <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" id="cardTitle" name="card_title" maxlength="100" placeholder="Card Title" value="<?= $card_title ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Can Expire</label>
|
||||
<?= $card_canexpire ?>
|
||||
<br>
|
||||
<label for="categoryLabel">Expiration date</label>
|
||||
<input type="text" class="form-control" name="card_expiration" value="<?= $card_expiration ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Notification</label>
|
||||
<?= $card_notify ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" id="description_label">Description <strong class="required">*</strong> <span>[250]</span></label>
|
||||
<textarea class="form-control" name="description" id="description" rows="3" maxlength="250" placeholder="Description"><?= $description ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="long_description" id="long_description_label">Long Description <span>[400]</span></label>
|
||||
<textarea class="form-control" name="long_description" id="long_description" rows="6" maxlength="400" placeholder="Long Description"><?= $long_description ?></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="button1">1st Button <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" name="button1" id="button1" maxlength="35" placeholder="Button 1" value="<?= $button1 ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="button1_text">1st Button Text <span class="required">*</span></label>
|
||||
<input type="text" class="form-control" name="button1_text" id="button1_text" maxlength="35" placeholder="Button 1 Text" value="<?= $button1_text ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Blog Article Id <span class="required">*</span></label>
|
||||
<?= $card_blog_id ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="show_area">Show Area</label>
|
||||
<?= $show_area??'' ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
|
||||
|
||||
<div style="background-color: lightsteelblue; padding 3px;">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Card Target</label>
|
||||
<?= $target_key ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Target Text[Used in pop up messages]</label>
|
||||
<textarea class="form-control" name="target_text" id="targetTextCardlab" rows="3" maxlength="250" placeholder="Target Text"><?= $target_text ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Behavior <span class="required">*</span></label>
|
||||
<?= $card_behavior ?>
|
||||
</div>
|
||||
<?php include("card_part_location.php"); ?>
|
||||
<?php include("card_part_points.php"); ?>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card List Order</label>
|
||||
<input type="text" class="form-control" name="card_order" id="IDcard_order" maxlength="3" placeholder="List order 1-100" value="<?= $card_order ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card Background Color</label>
|
||||
<input type="text" class="form-control" name="background_color" id="IDbackground_color" maxlength="6" placeholder="Color Code no #" value="<?= $background_color ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="expiration">Expiration</label>
|
||||
<?= $expiration??'' ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card" style="width: 100%; background-color:honeydew;">
|
||||
<div class="card-body">
|
||||
<?php if (isset($card_id) && $card_id > 0) { ?>
|
||||
|
||||
<button type="button" class="btn btn-danger btn-block btn-sm" data-toggle="modal" data-target="#exampleModalScrollable">More Setting</button>
|
||||
|
||||
<p class="card-text">We are ready to go on here.</p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
window.TEMPLATE_ACTIVE_TIP = <?=$TEMPLATE_ACTIVE_TIP??-1?>;
|
||||
$(function () {
|
||||
const $frm_update_card = $("#frm_update_card");
|
||||
$frm_update_card.on('submit', function() {
|
||||
// check validation
|
||||
const template_selected_id = $("select[name=card_template]").val();
|
||||
const background_color = $("input[name=background_color]").val().trim();
|
||||
const picture_select_value = $("select[name=card_pictures]").val().trim();
|
||||
if(window.TEMPLATE_ACTIVE_TIP == template_selected_id){
|
||||
if(background_color.length === 0){
|
||||
alert('Invalid input - select Card Background Color for Active Tip template');
|
||||
return false;
|
||||
}
|
||||
}else if(background_color.length === 0 && picture_select_value.length === 0){
|
||||
alert('Invalid input - Please Select Card Background Picture');
|
||||
return false;
|
||||
}
|
||||
// validate for "Blog Card" category require title
|
||||
if($("#card_category").val() === "BLOGCARD" && $("#card_titleshow").val() != 1){
|
||||
alert('Invalid input - Please select Show Title for Blog Card!');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$('input[name="card_expiration"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: <?= date("Y") ?>,
|
||||
maxYear: <?= date("Y") + 10 ?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function (start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
|
||||
$("#long_description").keyup(function (){
|
||||
let cur_length = $(this).val().length;
|
||||
let max_length = $(this).attr("maxlength");
|
||||
$("#long_description_label").find("span").html("["+cur_length+"/"+max_length+"]");
|
||||
}).trigger('keyup');
|
||||
$("#description").keyup(function (){
|
||||
let cur_length = $(this).val().length;
|
||||
let max_length = $(this).attr("maxlength");
|
||||
$("#description_label").find("span").html("["+cur_length+"/"+max_length+"]");
|
||||
}).trigger('keyup');
|
||||
|
||||
//reset errors
|
||||
$frm_update_card.find('input').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
$frm_update_card.find('select').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
$frm_update_card.find('textarea').on('change', function(){
|
||||
$(this).removeClass('error');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="form-group">
|
||||
<label for="card_country">Card Country</label>
|
||||
<?= $card_country ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="card_location">Card Location</label>
|
||||
<?=$card_location?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="form-group">
|
||||
<label for="card_receipt">Card Reciept</label>
|
||||
<?= $card_reciept ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Card Points</label>
|
||||
<?=$card_points?>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
<form method="POST" action="?">
|
||||
<?php if (isset($card_id) && $card_id>0) { ?>
|
||||
<input type="hidden" name="id" value="<?= $card_id ?>" />
|
||||
<input type="hidden" name="card_category" value="<?= $card_category_value ?>" />
|
||||
<input type="hidden" name="card_can_save" value="<?= $card_can_save_value?>" />
|
||||
<input type="hidden" name="long_description" value="<?= $long_description?>" />
|
||||
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Template</label>
|
||||
<?= $card_template ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category</label>
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Category Type</label>
|
||||
<?= $card_type ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardName">Card Id</label>
|
||||
<input type="text" class="form-control" id="cardName" name="card_name" maxlength="100" placeholder="Card Unique" value="<?= $card_name ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Short Title</label>
|
||||
<?= $use_short_title_combo ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cardShortTitle">Card Short Title</label>
|
||||
<input type="text" class="form-control" id="cardShortTitle" name="short_title" maxlength="35" placeholder="Card Short Title" value="<?= $short_title ?>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="showTitleInput">Show Title</label>
|
||||
<?= $card_titleshow ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cardTitle">Card Title</label>
|
||||
<input type="text" class="form-control" id="cardTitle" name="card_title" maxlength="100" placeholder="Card Title" value="<?= $card_title ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div clas s="form-group">
|
||||
<label for="categoryLabel">Card Time</label>
|
||||
<?= $card_time ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Multiple Answer ?</label>
|
||||
<?= $multiple_answer ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="surveyLogic">Survey Logic</label>
|
||||
<input type="text" class="form-control" id="surveyLogic" name="card_logic" maxlength="10" placeholder="Survey Logic" value="<?= $card_logic ?>" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Blog Article Id</label>
|
||||
<?= $card_blog_id ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
<div class="form-group">
|
||||
<label for="cardPictureslabel">Picture</label>
|
||||
<?= $card_pictures ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card Background Color</label>
|
||||
<input type="text" class="form-control" name="background_color" id="IDbackground_color" maxlength="6" placeholder="Color Code no #" value="<?= $background_color ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button </label>
|
||||
<input type="text" class="form-control" name="button1" id="exampleFormControlTextarea1" maxlength="35" placeholder="Button 1" value="<?= $button1 ?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">1st Button Text</label>
|
||||
<input type="text" class="form-control" name="button1_text" id="descriptionCardlab" maxlength="35" placeholder="Button 1 Text" value="<?= $button1_text ?>" />
|
||||
</div>
|
||||
|
||||
<?php include("card_part_location.php"); ?>
|
||||
<?php include("card_part_points.php"); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="activity_screen">Activity Screen</label>
|
||||
<?= $activity_screen ?? '' ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="show_area">Show Area</label>
|
||||
<?= $show_area ?? '' ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col col-lg-4">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="descriptionCardlab">Survey Answer Options [comma delimited]</label>
|
||||
<textarea class="form-control" name="description" id="descriptionCardlab" rows="5" maxlength="250" placeholder="Survey Options(s)"><?= $description ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categoryLabel">Can Expire</label>
|
||||
<?= $card_canexpire ?>
|
||||
<br>
|
||||
<label for="categoryLabel">Expiration date</label>
|
||||
<input type="text" class="form-control" name="card_expiration" value="<?=$card_expiration?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cansaveLabel">Notification</label>
|
||||
<?= $card_notify ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="behaveLabel">Behavior</label>
|
||||
<?= $card_behavior ?>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="exampleFormControlTextarea1">Card List Order</label>
|
||||
<input type="text" class="form-control" name="card_order" id="IDcard_order" maxlength="3" placeholder="List order 1-100" value="<?= $card_order ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" name="go" class="btn btn-info btn-block btn-sm"><?= $form_button ?></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<?php /* http://www.daterangepicker.com/ */ ?>
|
||||
<script>
|
||||
$(function() {
|
||||
$('input[name="card_expiration"]').daterangepicker({
|
||||
singleDatePicker: true,
|
||||
showDropdowns: true,
|
||||
minYear: <?=date("Y")?>,
|
||||
maxYear: <?=date("Y")+10?>, /*parseInt(moment().format('YYYY'),10),*/
|
||||
locale: {
|
||||
format: 'YYYY-MM-DD'
|
||||
}
|
||||
}, function(start, end, label) {
|
||||
var years = moment().diff(start, 'years');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,291 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
#wrapper {
|
||||
width:600px;
|
||||
margin:0 auto;
|
||||
border-radius:0 0 5px 5px;
|
||||
-moz-border-radius:0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
background:#fff;
|
||||
border:1px solid #ccc;
|
||||
padding:25px;
|
||||
border-top:none;
|
||||
box-shadow:0 0 5px #ccc;
|
||||
-moz-box-shadow:0 0 5px #ccc;
|
||||
-webkit-box-shadow:0 0 5px #ccc;
|
||||
text-align:left;
|
||||
}
|
||||
#lightbox {
|
||||
z-index: 3;
|
||||
position:fixed; /* keeps the lightbox window in the current viewport */
|
||||
top:0;
|
||||
left:0;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:url(/assets/images/overlay.png) repeat;
|
||||
text-align:center;
|
||||
}
|
||||
#lightbox p {
|
||||
text-align:right;
|
||||
color:#fff;
|
||||
margin-right:20px;
|
||||
font-size:12px;
|
||||
}
|
||||
#lightbox img {
|
||||
box-shadow:0 0 25px #111;
|
||||
-webkit-box-shadow:0 0 25px #111;
|
||||
-moz-box-shadow:0 0 25px #111;
|
||||
max-width:940px;
|
||||
}
|
||||
#lightbox_container {
|
||||
/* background:red; */
|
||||
position:fixed;
|
||||
top:45%;
|
||||
left:50%;
|
||||
/* bring your own prefixes */
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.card-bg {
|
||||
width: 600px;
|
||||
height: 600px;
|
||||
border-radius: 18px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.card-bg-gradient-sub {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(159.4deg, rgba(0, 0, 0, 0.4) -3.74%, rgba(0, 0, 0, 0) 47.17%);
|
||||
}
|
||||
|
||||
.card-bg-gradient-main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 40px;
|
||||
border-radius: 18px;
|
||||
background: linear-gradient(182.6deg, rgba(0, 0, 0, 0) 20.15%, rgba(0, 0, 0, 0.4) 97.96%);
|
||||
}
|
||||
|
||||
.card-header-wrapper {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.card-header-wrapper img {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.nav-right-icon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.card-body-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-body-wrapper img {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper p {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper .slogan {
|
||||
margin-bottom: 18px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-size: 35px !important;
|
||||
line-height: 110%;
|
||||
letter-spacing: 0.03em;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
|
||||
.card-body-wrapper .description {
|
||||
margin-bottom: 0;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-size: 25px !important;
|
||||
line-height: 34px;
|
||||
letter-spacing: 0.03em;
|
||||
color: #FFFFFF !important;
|
||||
}
|
||||
.card-body-wrapper .relative{
|
||||
position: relative;
|
||||
}
|
||||
/* for template: "upper title 600x600 text + image"*/
|
||||
.card-template-8 .card-body-wrapper{
|
||||
position: unset !important;
|
||||
}
|
||||
.card-template-8 .slogan{
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
left: 30px;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.nav-right-icon-rocket{
|
||||
display: none;
|
||||
}
|
||||
/* active tip template */
|
||||
.card-template-7 .nav-right-icon-rocket{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -30px;
|
||||
right: -30px;
|
||||
}
|
||||
.card-template-7 .nav-right-icon{
|
||||
display: none;
|
||||
}
|
||||
.card-bg.card-template-7{
|
||||
height: auto;
|
||||
}
|
||||
.card-template-7 .card-header-wrapper{
|
||||
display: none;
|
||||
}
|
||||
/* Tall layout 600 x 750 = 9 */
|
||||
.card-template-wrap-9{
|
||||
width: 600px;
|
||||
height: auto;
|
||||
border-radius: 22px;
|
||||
background-color: white;
|
||||
}
|
||||
.card-template-wrap-9 .relative{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom{
|
||||
position: absolute;
|
||||
padding: 10px 14px;
|
||||
display: block !important;
|
||||
margin-top: -18px;
|
||||
background-color: white;
|
||||
border-radius: 0 0 18px 18px;
|
||||
width: 100%;
|
||||
}
|
||||
.card-template-wrap-9 .card-body-wrapper .slogan{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom .slogan{
|
||||
color: #000 !important;
|
||||
font-size: 1.8em !important;
|
||||
text-align: left !important;
|
||||
font-weight: bold !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom p.description{
|
||||
font-size: 1.5em !important;
|
||||
color: #000 !important;
|
||||
width: 94% !important;
|
||||
text-align: justify !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-9 .relative-bottom .nav-right-icon{
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
right: 14px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/* Tall Layout upper title 600x800 text + image = 10 */
|
||||
.card-template-wrap-10{
|
||||
width: 600px;
|
||||
height: auto;
|
||||
border-radius: 22px;
|
||||
background-color: white;
|
||||
}
|
||||
.card-template-wrap-10 .relative{
|
||||
display: none !important;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom{
|
||||
position: absolute;
|
||||
padding: 10px 14px;
|
||||
display: block !important;
|
||||
margin-top: -18px;
|
||||
background-color: white;
|
||||
border-radius: 0 0 18px 18px;
|
||||
width: 100%;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom .slogan{
|
||||
display: none;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom p.description{
|
||||
font-size: 1.5em !important;
|
||||
color: #000 !important;
|
||||
width: 94% !important;
|
||||
text-align: justify !important;
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
.card-template-wrap-10 .relative-bottom .nav-right-icon{
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 14px;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/*1. short layout 600X300 text+image -> title top*/
|
||||
.card-template-wrap-1 .card-body-wrapper{
|
||||
position: unset !important;
|
||||
}
|
||||
.card-template-wrap-1 .slogan{
|
||||
position: absolute !important;
|
||||
top: 20px !important;
|
||||
}
|
||||
/*2. image only*/
|
||||
.card-template-wrap-2 .card-body-wrapper{
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/*3. tall layout image only*/
|
||||
.card-template-wrap-3 .card-body-wrapper {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/*6. default layout image only*/
|
||||
.card-template-wrap-6 .card-body-wrapper {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
/* Short Layout 600x300 Solid Color 1 */
|
||||
.card-template-wrap-4 .card-bg{
|
||||
width: 600px !important;
|
||||
height: 300px !important;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function show_light_box(id) {
|
||||
/*
|
||||
If the lightbox window HTML already exists in document,
|
||||
change the img src to to match the href of whatever link was clicked
|
||||
If the lightbox window HTML doesn't exists, create it and insert it.
|
||||
(This will only happen the first time around)
|
||||
*/
|
||||
if ($('#lightbox').length > 0) { // #lightbox exists
|
||||
//place href as img src value
|
||||
$('#lightbox_container').html($('#'+id).html());
|
||||
//show lightbox window - you could use .show('fast') for a transition
|
||||
$('#lightbox').show();
|
||||
}
|
||||
else { //#lightbox does not exist - create and insert (runs 1st time only)
|
||||
//create HTML markup for lightbox window
|
||||
var lightbox =
|
||||
'<div id="lightbox">' +
|
||||
'<p>Click to close</p>' +
|
||||
'<div id="lightbox_container">' + //insert clicked link's href into img src
|
||||
$('#'+id).html()
|
||||
'</div>' +
|
||||
'</div>';
|
||||
//insert lightbox HTML into page
|
||||
$('body').append(lightbox);
|
||||
//Click anywhere on the page to get rid of lightbox window
|
||||
$('#lightbox').on('click', function(){ //must use live, as the lightbox element is inserted into the DOM
|
||||
$('#lightbox').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,127 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/arcvcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group">
|
||||
<label for=""><b>Inactive or Archived Cards</b></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?=$filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/cards/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteCard(card_id){
|
||||
|
||||
$('#xd_form' +card_id).html('Processing...');
|
||||
$('#xd' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/deletecard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#xd_form' + card_id).html(data);
|
||||
$('#xd' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/arcvcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,120 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
|
||||
<div class="col col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/cardorder/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>"/>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-4">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/cardorder/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,215 @@
|
||||
<style type="text/css">
|
||||
.error{
|
||||
border-color: red;
|
||||
}
|
||||
.error:focus{
|
||||
border-color: red !important;
|
||||
}
|
||||
span.required, strong.required{
|
||||
color:red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-6">
|
||||
<div class="card" style="width: 100%; background-color: #B3CDC9; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<?php
|
||||
include 'common/card_form.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
HELP :<a href="https://wiki.float.sg/backoffice/offercards/offercards">https://wiki.float.sg/backoffice/offercards/offercards</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/cardspage/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>" />
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm clearSearchText">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function deleteCard(card_id){
|
||||
|
||||
// alert(card_id);
|
||||
var result = confirm("Confirm archive card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardarchive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/cardspage/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
// update card
|
||||
var customizer = {
|
||||
locker: false,
|
||||
init: function() {
|
||||
this.handleCardUpdate();
|
||||
this.clearSearchText();
|
||||
},
|
||||
handleCardUpdate: function() {
|
||||
$(document.body).find('#card_form').on('submit', 'form', function(event) {
|
||||
event.preventDefault();
|
||||
if ( customizer.locker ) {return;}
|
||||
customizer.locker = true;
|
||||
|
||||
var _this = $(this),
|
||||
button = _this.find('button[type="submit"]'),
|
||||
button_text = button.text(),
|
||||
formdata = _this.serialize();
|
||||
$.ajax({
|
||||
url: '/cards/cardspage',
|
||||
type: 'POST',
|
||||
data: formdata,
|
||||
beforeSend: function() {
|
||||
$('#frm_update_card').find('.error').removeClass('error');
|
||||
button.text('loading...');
|
||||
}
|
||||
})
|
||||
.done(function( res ) {
|
||||
if ( !res.success ) {
|
||||
res.message = button_text + " card get errors: " + res.message.replace(/(?:\<br\/>)/gm, '\n');
|
||||
if(typeof res.error_ids !== 'undefined' && res.error_ids.length>0){
|
||||
res.error_ids.forEach(function(err_id, ierr_id){
|
||||
$('#'+err_id).addClass('error');
|
||||
if(ierr_id === 0){
|
||||
$('#'+err_id).focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var cardSection = $(document.body).find('#acc'+res.fragments.id);
|
||||
var parentElement = cardSection.closest('td');
|
||||
parentElement.next().html( res.fragments.html );
|
||||
}
|
||||
alert( res.message );
|
||||
})
|
||||
.fail(function( throwErr ) {
|
||||
console.log( throwErr );
|
||||
})
|
||||
.always(function() {
|
||||
customizer.locker = false;
|
||||
button.text( button_text );
|
||||
});
|
||||
});
|
||||
},
|
||||
clearSearchText: function() {
|
||||
$(document.body).find('.clearSearchText').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
var _this = $(this),
|
||||
searchTextarea = _this.closest('.form-group').find('textarea');
|
||||
if ( searchTextarea.val() == '' ) return;
|
||||
searchTextarea.val('');
|
||||
window.location.replace('/cards/cardspage/');
|
||||
});
|
||||
}
|
||||
};
|
||||
customizer.init();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,115 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/deletedcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Deleted Cards</b></label>
|
||||
</div>
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function returnCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/deletetoinactive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
|
||||
document.location = '/cards/deletedcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Dynamic Assigned Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $dynamic_card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-4">
|
||||
<div class="card" style="width: 100%; background-color: #a2a0c7; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?= $card_id ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
|
||||
<div class="col col-lg-12">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-inline" method="GET" action="/cards/expiredcards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="form-group">
|
||||
<label for=""><b><?php echo $page_title; ?></b></label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?=$filterData['filter_value'] ?? '' ?>"/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function activateCard(card_id){
|
||||
var result = confirm("Confirm Activating Card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/cards/cardactivate?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function deleteCard(card_id){
|
||||
|
||||
$('#xd_form' +card_id).html('Processing...');
|
||||
$('#xd' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/deletecard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#xd_form' + card_id).html(data);
|
||||
$('#xd' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function viewCard(card_id) {
|
||||
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/bkoadmin/editcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/expiredcards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,135 @@
|
||||
<!-- div class="container" -->
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col col-lg-6">
|
||||
<div class="card" style="width: 100%; background-color: #a2a0c7; padding: 5px;">
|
||||
<div class="card-body" id="card_form">
|
||||
<font color=red><?= $message ?> </font>
|
||||
<?php
|
||||
include 'common/card_surveyform.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col col-lg-6">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<div class="panel-heading">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form id="frm_search_surveycards" class="form-inline" method="GET" action="/cards/surveycards/<?php echo $filterData['card_category'] ?? 0 ?>">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group p-y-sm">
|
||||
<label for=""><b>Configured Cards</b></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?php echo $cart_filter_by_selectbox; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<div class="form-group p-y-sm">
|
||||
<input type="search" name="filter_value" class="form-control" placeholder="Filter value" value="<?= $filterData['filter_value'] ?? '' ?>" />
|
||||
<button id="btn_search" type="submit" class="btn btn-primary btn-sm">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group p-y-sm">
|
||||
<?= $card_category ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="m-y-sm"><? echo $links ?></div>
|
||||
<div class="table-responsive">
|
||||
<?= $card_table ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
<div id="card_detail" style="display:none;">
|
||||
Cards Preview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="exampleModalScrollable" tabindex="-1" role="dialog" aria-labelledby="exampleModalScrollableTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalScrollableTitle">Card Settings: <?=$card_id?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function deleteCard(card_id){
|
||||
|
||||
var result = confirm("Confirm archive card id="+card_id+"?");
|
||||
if (result) {
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/bkoadmin/cardarchive?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#del_form'+card_id).html(data);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function viewCard(card_id) {
|
||||
$('#card_detail').html('Processing...');
|
||||
$('#acc' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/viewcard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_detail').html(data);
|
||||
$('#acc' + card_id).prop('disabled', false);
|
||||
show_light_box('card_detail');
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function editCard(card_id) {
|
||||
$('#card_form').html('Processing...');
|
||||
$('#edit' + card_id).prop('disabled', true);
|
||||
$.ajax({
|
||||
url: "/cards/editSurveycard?proc=PROCESS&card_id=" + card_id
|
||||
}).done(function (data) {
|
||||
$('#card_form').html(data);
|
||||
$('#edit' + card_id).prop('disabled', false);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('select[name=card_category]').change(function() {
|
||||
document.location = '/cards/surveycards/'+(this.value==''?'0':this.value)+'/0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
$this->load->view('cards/common/lightbox.php');
|
||||
?>
|
||||
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>CodeIgniter log viewer</title>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet"
|
||||
href="https://cdn.datatables.net/plug-ins/9dcbecd42ad/integration/bootstrap/3/dataTables.bootstrap.css">
|
||||
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
body {
|
||||
padding: 25px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.date {
|
||||
min-width: 75px;
|
||||
}
|
||||
|
||||
.text {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a.llv-active {
|
||||
z-index: 2;
|
||||
background-color: #f5f5f5;
|
||||
border-color: #777;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<h1><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span> CodeIgniter Log Viewer</h1>
|
||||
<p class="text-muted"><i>by <a href="https://github.com/SeunMatt" target="_blank">Seun Matt</a></i></p>
|
||||
<div class="list-group">
|
||||
<?php if(empty($files)): ?>
|
||||
<a class="list-group-item liv-active">No Log Files Found</a>
|
||||
<?php else: ?>
|
||||
<?php foreach($files as $file): ?>
|
||||
<a href="?f=<?= base64_encode($file); ?>"
|
||||
class="list-group-item <?= ($currentFile == $file) ? "llv-active" : "" ?>">
|
||||
<?= $file; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9 col-md-10 table-container">
|
||||
<?php if(is_null($logs)): ?>
|
||||
<div>
|
||||
<br><br>
|
||||
<strong>Log file > 50MB, please download it.</strong>
|
||||
<br><br>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<table id="table-log" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Level</th>
|
||||
<th>Date</th>
|
||||
<th>Content</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($logs as $key => $log): ?>
|
||||
<tr data-display="stack<?= $key; ?>">
|
||||
|
||||
<td class="text-<?= $log['class']; ?>">
|
||||
<span class="<?= $log['icon']; ?>" aria-hidden="true"></span>
|
||||
<?= $log['level']; ?>
|
||||
</td>
|
||||
<td class="date"><?= $log['date']; ?></td>
|
||||
<td class="text">
|
||||
<?php if (array_key_exists("extra", $log)): ?>
|
||||
<a class="pull-right expand btn btn-default btn-xs"
|
||||
data-display="stack<?= $key; ?>">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?= $log['content']; ?>
|
||||
<?php if (array_key_exists("extra", $log)): ?>
|
||||
<div class="stack" id="stack<?= $key; ?>"
|
||||
style="display: none; white-space: pre-wrap;">
|
||||
<?= $log['extra'] ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<?php if($currentFile): ?>
|
||||
<a href="?dl=<?= base64_encode($currentFile); ?>">
|
||||
<span class="glyphicon glyphicon-download-alt"></span>
|
||||
Download file
|
||||
</a>
|
||||
-
|
||||
<a id="delete-log" href="?del=<?= base64_encode($currentFile); ?>"><span
|
||||
class="glyphicon glyphicon-trash"></span> Delete file</a>
|
||||
<?php if(count($files) > 1): ?>
|
||||
-
|
||||
<a id="delete-all-log" href="?del=<?= base64_encode("all"); ?>"><span class="glyphicon glyphicon-trash"></span> Delete all files</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/plug-ins/9dcbecd42ad/integration/bootstrap/3/dataTables.bootstrap.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.table-container tr').on('click', function () {
|
||||
$('#' + $(this).data('display')).toggle();
|
||||
});
|
||||
|
||||
$('#table-log').DataTable({
|
||||
"order": [],
|
||||
"stateSave": true,
|
||||
"stateSaveCallback": function (settings, data) {
|
||||
window.localStorage.setItem("datatable", JSON.stringify(data));
|
||||
},
|
||||
"stateLoadCallback": function (settings) {
|
||||
var data = JSON.parse(window.localStorage.getItem("datatable"));
|
||||
if (data) data.start = 0;
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#delete-log, #delete-all-log').click(function () {
|
||||
return confirm('Are you sure?');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,143 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<div class="panel panel-flat">
|
||||
<div class="jumbotron" style="background-color:#F3DFE5; padding:10px;">
|
||||
<?php if (isset($msg)) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white border-0" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<?php echo $msg ? $msg : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<font id="message" color=red></font>
|
||||
<h3>Credit Card Benefits ADDING</h3>
|
||||
<form id="credit-card-form" name="credit-card-form" method="post" action="create" autocomplete="off">
|
||||
<div class="form-group">
|
||||
<label for="bank-name">Bank Name</label>
|
||||
<input type="text" name="bank_name" id="bank-name" placeholder="Bank Name" class="form-control" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="card-type">Card Type</label>
|
||||
<input type="text" name="card_name" id="card-type" placeholder="Card Type" class="form-control" />
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="credit_card_id" id="credit-card-id" />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="benefit">Benefits</label>
|
||||
<div id="benefit-list" class="container mt-3 mb-5">
|
||||
<ul class="list-group" style="padding: 0;">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="benefit" maxlength="256" placeholder="Benefit" />
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" id="btn-add-benefit" type="button">Add Benefit</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" id="btn-add" class="btn btn-info btn-block btn-sm">Add</button>
|
||||
<button type="button" id="btn-update" class="btn btn-info btn-block btn-sm hidden">Update</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="card_class_filter">Bank Name</label>
|
||||
<input type="search" class="form-control" id="bank_name_filter" name="bank_name_filter">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="method_filter">Card Type</label>
|
||||
<input type="search" class="form-control" id="card_type_filter" name="card_name_filter">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary btn-search" type="button" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="row col-lg-12">
|
||||
<div class="panel-heading mb-15">
|
||||
<div class="heading-elements">
|
||||
<div style='margin-top: 10px;' id='pagination'></div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="credit-card-list" class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" style="padding:0px; background-color:lightgreen;">
|
||||
<thead class="bg-indigo">
|
||||
<th>No.</th>
|
||||
<th>Bank Name</th>
|
||||
<th>Card Type</th>
|
||||
<th>Actions</th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="benefit-list-modal" role="dialog" aria-labelledby="Filter data dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<!-- Modal Header -->
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h1>
|
||||
Credit Card Benefits
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<!-- Modal Body -->
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<font id="message-benefits" color=red></font>
|
||||
<form class="form-inline" role="form" method="post" action="/credit_card_benefits/update" id="benefit-list" method="GET">
|
||||
<div class="table-responsive-sm">
|
||||
<table class="table-bordered table-condensed table-hover table-striped table-condensed col-lg-12" role="grid" style="background-color:lightgreen;">
|
||||
<thead role="row" class="bg-indigo">
|
||||
<th>Benefit</th>
|
||||
<th>Expired Date</th>
|
||||
</thead>
|
||||
<tbody role="row">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 2rem;">
|
||||
<button type="button" class="btn btn-primary" id="btn-save">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Modal Footer -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/plugins/pickers/datepicker.js"></script>
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script src="/assets/js/pages/credit_cards/list.js" type="text/javascript"></script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,63 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/Descision/descisionlogic/" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="logic">Logic</label>
|
||||
<input type="search" class="form-control" id="logic" name="logic" value='<?= isset($logic) ? $logic : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title">Description</label>
|
||||
<input type="search" class="form-control" id="description" name="description" value='<?= isset($description) ? $description : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Survey</label>
|
||||
<?= $card_survey ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_date">Weight</label>
|
||||
<div class="search-by-weight">
|
||||
<input type="search" class="form-control" id="from_weight" name="from_weight" value='<?= isset($from_weight) ? $from_weight : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_weight" name="to_weight" value='<?= isset($to_weight) ? $to_weight : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div class="panel panel-white">
|
||||
<?= $pos_table ?>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.search-block-item .form-group {
|
||||
flex-basis: 100px;
|
||||
}
|
||||
|
||||
.search-by-weight {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/Descision/descisionreport/" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="logic">Decision Group</label>
|
||||
<input type="search" class="form-control" id="decision_group" name="member[decision_group]" value='<?= isset($decision_group) ? $decision_group : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title">Description</label>
|
||||
<input type="search" class="form-control" id="description" name="member[description]" value='<?= isset($description) ? $description : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_date">Count</label>
|
||||
<div class="search-by-weight">
|
||||
<input type="search" class="form-control" id="from_count" name="member[from_count]" value='<?= isset($from_count) ? $from_count : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_weigto_countht" name="member[to_count]" value='<?= isset($to_count) ? $to_count : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div class="panel panel-white">
|
||||
<h3>Active Users Personalty</h3>
|
||||
|
||||
<?= $member_report ?>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
<div class="panel panel-white">
|
||||
<h3>Account Refresh</h3>
|
||||
|
||||
<?= $refresh_report ?>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.search-block-item .form-group {
|
||||
flex-basis: 75px;
|
||||
}
|
||||
|
||||
.search-block-item .form-group input {
|
||||
padding: 2px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.search-by-weight {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,224 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
<a href="/descision/descisiontree">Refresh</a>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-12">
|
||||
|
||||
<section id="visualisation" style="border: 0px black solid; max-width: 100%;">
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function getData() {
|
||||
var data = {
|
||||
"id": 1,
|
||||
"name": "A10AA01",
|
||||
"type": "Root",
|
||||
"description": "New User no Data",
|
||||
"children": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "A10BB01",
|
||||
"type": "Type",
|
||||
"description": "Not new User no Data",
|
||||
"children": [
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Felidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as cats",
|
||||
"children": [
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Siamese Cat",
|
||||
"type": "Organism",
|
||||
"description": "A breed of Asian cat. it has white fur",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Javanese Cat",
|
||||
"type": "Organism",
|
||||
"description": "Domestic breed of cats, of oriental origin",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Ursidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as bears",
|
||||
"children": [
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Polar Bear",
|
||||
"type": "Organism",
|
||||
"description": "White bear native to the Arctic Circle",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Panda Bear",
|
||||
"type": "Organism",
|
||||
"description": "Spotted bear native to South Central China",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Canidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as dogs",
|
||||
"children": [
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Labradore Retriever",
|
||||
"type": "Organism",
|
||||
"description": "One of the most popular dog breeds in Canada, UK and USA",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Golden Retriever",
|
||||
"type": "Organism",
|
||||
"description": "Generally friendly, loyal and intelligent breed of dogs",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "A100001",
|
||||
"type": "Type",
|
||||
"description": "Not New User with Data",
|
||||
"children": [
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Bovidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as cattle or cows",
|
||||
"children": [
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Angus Cattle",
|
||||
"type": "Organism",
|
||||
"description": "Scottish breed of black cattle",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Holstein Friesian Cattle",
|
||||
"type": "Organism",
|
||||
"description": "Known as the highest-production dairy animals",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Equidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as horses",
|
||||
"children": [
|
||||
{
|
||||
"id": 17,
|
||||
"name": "Barb Horse",
|
||||
"type": "Organism",
|
||||
"description": "A breed of Northern African horses with high stamina and hardiness. Their generally hot temperament makes it harder to tame.",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "Holsteiner Horse",
|
||||
"type": "Organism",
|
||||
"description": "One of the oldest of warmblood breeds, tracing back to the 13th century. Originates from Germany",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "Leporidae",
|
||||
"type": "Family",
|
||||
"description": "Also known as rabbits",
|
||||
"children": [
|
||||
{
|
||||
"id": 20,
|
||||
"name": "Lionhead rabbit",
|
||||
"type": "Organism",
|
||||
"description": "Unusual rabbit with a wool mane circling it's head, similar to a lion, hence it's name.",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "Silver Fox Rabbit",
|
||||
"type": "Organism",
|
||||
"description": "Bred for their meat and unique fur.",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
var data = getData();
|
||||
|
||||
var treePlugin = new d3.mitchTree.boxedTree()
|
||||
.setData(data)
|
||||
.setElement(document.getElementById("visualisation"))
|
||||
.setIdAccessor(function(data) {
|
||||
return data.id;
|
||||
})
|
||||
.setChildrenAccessor(function(data) {
|
||||
return data.children;
|
||||
})
|
||||
.setBodyDisplayTextAccessor(function(data) {
|
||||
return data.description;
|
||||
})
|
||||
.setTitleDisplayTextAccessor(function(data) {
|
||||
return data.name;
|
||||
})
|
||||
.initialize();
|
||||
|
||||
/* Alternative Options Object Syntax, opposed to the Fluent Interface Above
|
||||
var options = {
|
||||
data: data,
|
||||
element: document.getElementById("visualisation"),
|
||||
getId: function (data) {
|
||||
return data.id;
|
||||
},
|
||||
getChildren: function (data) {
|
||||
return data.children;
|
||||
},
|
||||
getBodyDisplayText: function (data) {
|
||||
return data.description;
|
||||
},
|
||||
getTitleDisplayText: function (data) {
|
||||
return data.name;
|
||||
}
|
||||
};
|
||||
var treePlugin = new d3.MitchTree.BoxedTree(options).initialize();
|
||||
*/
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Next Personalty</h6>
|
||||
<div class="heading-elements">
|
||||
xxxxxx
|
||||
</div>
|
||||
</div>
|
||||
<div id="logic_list" class="table-responsive">
|
||||
<?= $logic_list ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<!-- Recent Members -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Personalty Conditions</h6>
|
||||
<div class="heading-elements">
|
||||
xxxxxx
|
||||
</div>
|
||||
</div>
|
||||
<div id="logic_list" class="table-responsive">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/Descision/personaltycards/" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="dkey">Dkey</label>
|
||||
<input type="search" class="form-control" id="dkey" name="dkey" value='<?= isset($dkey) ? $dkey : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title">Description</label>
|
||||
<input type="search" class="form-control" id="description" name="description" value='<?= isset($description) ? $description : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Personality</label>
|
||||
<input type="search" class="form-control" id="personality" name="personality" value='<?= isset($personality) ? $personality : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div class="panel panel-white">
|
||||
|
||||
<table class='table table-striped table-hover table-bordered table-condensed' style='font-size:10px;'>
|
||||
<thead class='bg-teal'>
|
||||
<tr>
|
||||
<th style="width:50px">ID</th>
|
||||
<th style="width:50px">Lorder</th>
|
||||
<th style="width:50px">Dkey</th>
|
||||
<th style="width:50px">Status</th>
|
||||
<th>Description</th>
|
||||
<th>Personality</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? foreach ($pers_data as $row) { ?>
|
||||
<tr style="background-color:lightgreen;">
|
||||
<td><?=$row['id']?></td>
|
||||
<td><?=$row['lorder']?></td>
|
||||
<td><?=$row['dkey']?></td>
|
||||
<td><?=$row['status']?></td>
|
||||
<td><?=$row['description']?></td>
|
||||
<td><?=$row["personality"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<table>
|
||||
<td><?= $row["card_list"] ?></td>
|
||||
<td><?= $row["card_group"] ?></td>
|
||||
<td><?= $row["card_country"] ?></td>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function updatePersonaltyName(id, dkey) {
|
||||
// alert(card_id);
|
||||
var result = confirm("Continue saving prsonality text ? ");
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
var pers_text = "txt" + dkey;
|
||||
var pers_text_value = document.getElementById(pers_text).value;
|
||||
alert(pers_text_value);
|
||||
|
||||
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/descision/updatePersonaltyName?id=" + id + "&pers_text=" + pers_text_value + "&dkey=" + dkey
|
||||
}).done(function (data) {
|
||||
$('#pres' + dkey).html(data);
|
||||
//alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,151 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-8">
|
||||
<!-- Media library -->
|
||||
<div class="panel panel-white">
|
||||
<form class="search-block" action="/Descision/personaltyname/" method="GET" autocomplete="off">
|
||||
<div class="search-block-item">
|
||||
<div class="form-group">
|
||||
<label for="dkey">Dkey</label>
|
||||
<input type="search" class="form-control" id="dkey" name="dkey" value='<?= isset($dkey) ? $dkey : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Status</label>
|
||||
<?= $card_status ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title">Description</label>
|
||||
<input type="search" class="form-control" id="description" name="description" value='<?= isset($description) ? $description : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="search_text">Personality</label>
|
||||
<input type="search" class="form-control" id="personality" name="personality" value='<?= isset($personality) ? $personality : '' ?>'>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="from_offer">Offers</label>
|
||||
<div class="search-by-weight">
|
||||
<input type="search" class="form-control" id="from_offer" name="from_offer" value='<?= isset($from_offer) ? $from_offer : '' ?>'>
|
||||
|
||||
<input type="search" class="form-control" id="to_offer" name="to_offer" value='<?= isset($to_offer) ? $to_offer : '' ?>'>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary btn-search" type="submit">Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?= $link ?>
|
||||
<div class="panel panel-white">
|
||||
<?= $pers_table ?>
|
||||
</div>
|
||||
<!-- /media library -->
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
let input_changed_map = new Map();
|
||||
|
||||
$(document).ready(function() {
|
||||
$('input[id^=ofc]').on('change', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const id = $(this).closest('tr').find('td:eq(2)').html();
|
||||
!input_changed_map.has(id) ?
|
||||
input_changed_map.set(id, ['offers']) :
|
||||
input_changed_map.get(id).indexOf('offers') === -1 ?
|
||||
input_changed_map.set(id, ['offers', ...input_changed_map.get(id)]) :
|
||||
null;
|
||||
})
|
||||
|
||||
$('input[id^=txt]').on('change', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const id = $(this).closest('tr').find('td:eq(2)').html();
|
||||
!input_changed_map.has(id) ?
|
||||
input_changed_map.set(id, ['personality']) :
|
||||
input_changed_map.get(id).indexOf('personality') === -1 ?
|
||||
input_changed_map.set(id, ['personality', ...input_changed_map.get(id)]) :
|
||||
null;
|
||||
})
|
||||
})
|
||||
|
||||
function updatePersonaltyName(id, dkey) {
|
||||
// alert(card_id);
|
||||
let message = '';
|
||||
const input_changed = input_changed_map.get(dkey);
|
||||
|
||||
if (input_changed === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const input_changed_length = input_changed.length;
|
||||
|
||||
if (input_changed_length === 2) {
|
||||
|
||||
message = "Continue saving prsonality text and offers ? ";
|
||||
|
||||
} else if (input_changed.indexOf('personality') !== -1) {
|
||||
|
||||
message = "Continue saving prsonality text ?";
|
||||
|
||||
} else if (input_changed.indexOf('offers') !== -1) {
|
||||
|
||||
message = "Continue saving offers ?";
|
||||
|
||||
} else {
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
var result = confirm(message);
|
||||
if (result) {
|
||||
//alert(110);
|
||||
|
||||
var pers_text = "txt" + dkey;
|
||||
var pers_text_value = document.getElementById(pers_text).value;
|
||||
|
||||
var pers_offers = "ofc" + dkey;
|
||||
var pers_offers_value = document.getElementById(pers_offers).value;
|
||||
|
||||
alert(pers_text_value + ' ' + pers_offers_value);
|
||||
|
||||
//Logic to delete the item
|
||||
$.ajax({
|
||||
url: "/descision/updatePersonaltyName?id=" + id + "&pers_text=" + pers_text_value + "&dkey=" + dkey + "&pers_offers=" + pers_offers_value
|
||||
}).done(function(data) {
|
||||
$('#pres' + dkey).html(data);
|
||||
input_changed_map.get(dkey).length = 0;
|
||||
//alert(data);
|
||||
});
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//initMap();
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.search-block-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.search-block-item .form-group {
|
||||
flex-basis: 100px;
|
||||
}
|
||||
|
||||
.search-by-weight {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,120 @@
|
||||
<link href="/assets/css/phone_farm_phones/form.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<div class="row mt-3 quote-estimate-form">
|
||||
<?php if ($this->session->flashdata('error')) { ?>
|
||||
<div class="col-12">
|
||||
<div class="alert alert-danger alert-dismissible bg-danger text-white " role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="margin-right: 15px;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<strong>Error - </strong> <?php echo $this->session->flashdata('error') ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mr-sm-3 <?php echo form_error('mkey') ? 'has-error' : ''; ?>">
|
||||
<label for="mkey">Mkey</label>
|
||||
<select class="form-control select2 w-100" data-toggle="select2" id="mkey" name="mkey" allow-search="false">
|
||||
<option value="">--Select Mkey</option>
|
||||
<?php
|
||||
if (isset($mkeyOptions) && !empty($mkeyOptions)) {
|
||||
foreach($mkeyOptions as $key => $value) {
|
||||
$selected = set_value('mkey', $details['mkey']) == $value ? 'selected' : '';
|
||||
echo '<option value="' . $value . '"' . $selected . '>' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('mkey') ? form_error('mkey') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('gramskm_perc') ? 'has-error' : ''; ?>">
|
||||
<label for="gramskm_perc">Gramskm_perc</label>
|
||||
<input type="number"
|
||||
min="0"
|
||||
step="any"
|
||||
class="form-control"
|
||||
id="gramskm_perc"
|
||||
name="gramskm_perc"
|
||||
value="<?php echo isset($details['gramskm_perc']) ? $details['gramskm_perc'] : null; ?>"
|
||||
placeholder="Enter emission gramskm_perc"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('gramskm_perc') ? form_error('gramskm_perc') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mr-sm-3 <?php echo form_error('country') ? 'has-error' : ''; ?>">
|
||||
<label for="country">Country</label>
|
||||
<select class="form-control select2 w-100" data-toggle="select2" id="country" name="country" allow-search="false">
|
||||
<option value="">--Select Country</option>
|
||||
<?php
|
||||
if (isset($country) && !empty($country)) {
|
||||
foreach($country as $key => $value) {
|
||||
$selected = set_value('country', $details['country']) == $value ? 'selected' : '';
|
||||
echo '<option value="' . $value . '"' . $selected . '>' . $value . '</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('country') ? form_error('country') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('state') ? 'has-error' : ''; ?>">
|
||||
<label for="state">State</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="state"
|
||||
name="state"
|
||||
value="<?php echo isset($details['state']) ? $details['state'] : null; ?>"
|
||||
placeholder="Enter emission state"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('state') ? form_error('state') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mb-3 <?php echo form_error('city') ? 'has-error' : ''; ?>">
|
||||
<label for="city">City</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="city"
|
||||
name="city"
|
||||
value="<?php echo isset($details['city']) ? $details['city'] : null; ?>"
|
||||
placeholder="Enter emission city"
|
||||
>
|
||||
<div class="invalid-feedback text-danger">
|
||||
<?php echo form_error('city') ? form_error('city') : '' ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-6">
|
||||
<div class="form-group mr-sm-3 <?php echo form_error('status') ? 'has-error' : ''; ?>">
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control select2 w-100" data-toggle="select2" id="status" name="status" allow-search="false">
|
||||
<?php
|
||||
foreach($statusOptions as $key => $value) {
|
||||
$selected = set_value('status', $details['status']) == $value ? 'selected' : '';
|
||||
echo '<option value="' . $value . '"' . $selected . '>' . $key . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/assets/js/pages/quote_estimates/form.js"></script>
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Emission Average Commuting</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Create new emission average</h4>
|
||||
|
||||
<form action="/emission/store" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Create</button>
|
||||
<a href="/emission" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,36 @@
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<h4 class="page-title">Emission Average Commuting</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title">Edit Emission Avrg <?php echo $details['id']; ?></h4>
|
||||
|
||||
<form action="/emission/update/<?php echo $details['id']; ?>" method="post">
|
||||
<?php include '_form.php'; ?>
|
||||
<div class="row">
|
||||
<div class="col-12 col-sm-12 text-right mt-3">
|
||||
<div class="btn-group" role="group">
|
||||
<button type="submit" class="btn btn-primary mr-2">Edit</button>
|
||||
<a href="/emission" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- end card-body -->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
</div> <!-- container -->
|
||||
@@ -0,0 +1,172 @@
|
||||
<!-- Dashboard content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<!-- Recent Members -->
|
||||
|
||||
<div class="panel panel-flat" style="background-color: #ffffff; height: 380px;">
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title">Emission Model</h6>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<?= $emission_model??'' ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
<div class="col-lg-7">
|
||||
<div class="panel panel-flat" style="background-color: #ffffff;">
|
||||
<div class="panel-heading" style="display: flex; justify-content: space-between;">
|
||||
<h6 class="panel-title">AVERAGE COMMUTING DISTANCE (KM)</h6>
|
||||
<div class="page-title-right text-right action">
|
||||
<a href="/emission/create" class="btn btn-success">New emission avrg</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (isset($emission_model_item['results'])): ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-bordered table-condensed"
|
||||
style="padding:0px; background-color:lightgreen;">
|
||||
<thead class="bg-indigo">
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>transport_mode</th>
|
||||
<th>country</th>
|
||||
<th>state</th>
|
||||
<th>city</th>
|
||||
<th>gramskm_perc</th>
|
||||
<th>a</th>
|
||||
<th>b</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($emission_model_item['results']->result_array() as $key => $value): ?>
|
||||
<tr>
|
||||
<td><?php echo $value['id']; ?></td>
|
||||
<td><?php echo $value['transport_mode']; ?></td>
|
||||
<td><?php echo $value['country']; ?></td>
|
||||
<td><?php echo $value['state']; ?></td>
|
||||
<td><?php echo $value['city']; ?></td>
|
||||
<td><?php echo $value['gramskm_perc']; ?></td>
|
||||
<td><?php echo $value['a']; ?></td>
|
||||
<td><?php echo $value['b']; ?></td>
|
||||
<td class="input-group-btn">
|
||||
<a href="/emission/edit/<?php echo $value['id']; ?>" type="button"
|
||||
class="btn btn-info btn-sm btn-update legitRipple">Update
|
||||
<div class="legitRipple-ripple"></div>
|
||||
</a>
|
||||
<button type="button" class="btn btn-secondary btn-sm btn-cancel hidden legitRipple">
|
||||
Cancel
|
||||
</button>
|
||||
<button type="button" class="btn btn-danger btn-sm btn-delete legitRipple"
|
||||
data-id="<?php echo $value['id']; ?>">Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!--CHART-->
|
||||
|
||||
<div class="row" style="padding: 20px 0;">
|
||||
<div class="col-md-6">
|
||||
<canvas id="SG"></canvas>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<canvas id="US"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="pagi" style="margin-top: 30px;">
|
||||
<?php if (isset($emission_model_item['pagination'])): ?>
|
||||
<?php echo $emission_model_item['pagination']; ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<!-- /Recent Members -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /dashboard content -->
|
||||
|
||||
<script src="/assets/js/app.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var emissionCRUD = {
|
||||
init: function () {
|
||||
this.deleteEmissionManagement();
|
||||
},
|
||||
deleteEmissionManagement: function () {
|
||||
$('.btn-delete').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
if (!confirm('Are you sure want to delete?')) {
|
||||
return;
|
||||
}
|
||||
var $this = $(this),
|
||||
id = $this.data('id');
|
||||
$.ajax({
|
||||
url: origin + '/emission/deleteEmissionAvrg/' + id,
|
||||
type: 'POST'
|
||||
})
|
||||
.done(function (res) {
|
||||
if (res) {
|
||||
$this.closest('tr').remove();
|
||||
} else {
|
||||
alert('Delete emission average distance get errors!');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
emissionCRUD.init();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var radar_data = <?php echo json_encode($emission_model_item['charts']) ?>;
|
||||
for (let country in radar_data) {
|
||||
let marksCanvas = document.getElementById(country);
|
||||
let chart = radar_data[country];
|
||||
let marksData = {
|
||||
labels: chart.label,
|
||||
datasets: [{
|
||||
label: "AVG person in your city (" + country + ")",
|
||||
backgroundColor: "rgba(0,0,200,0.2)",
|
||||
data: chart.data
|
||||
}]
|
||||
};
|
||||
new Chart(marksCanvas, {
|
||||
type: 'radar',
|
||||
data: marksData,
|
||||
options: {
|
||||
backgroundColor: 'red',
|
||||
scale: {
|
||||
gridLines: {
|
||||
circular: true
|
||||
},
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
},
|
||||
pointLabels: {
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
labels: {
|
||||
render: 'percentage',
|
||||
fontColor: function (data) {
|
||||
var rgb = chartHexToRgb(data.dataset.backgroundColor[data.index]);
|
||||
var threshold = 140;
|
||||
var luminance = 0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b;
|
||||
return luminance > threshold ? 'black' : 'white';
|
||||
},
|
||||
precision: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nERROR: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
echo "\nDatabase error: ",
|
||||
$heading,
|
||||
"\n\n",
|
||||
$message,
|
||||
"\n\n";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user