first commit
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user