first commit

This commit is contained in:
ryanwong
2022-06-30 05:46:02 -04:00
commit a96eaec33b
859 changed files with 199842 additions and 0 deletions
+356
View File
@@ -0,0 +1,356 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="attribute_type_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/attribute_type/0', ['method' => 'get']) ?>
<div class="row">
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/attribute_type/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/attribute_type/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/attribute_type/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->type}</td>";
echo "<td>{$data->field}</td>";
echo "<td>{$data->options}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/attribute_type/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/attribute_type/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+68
View File
@@ -0,0 +1,68 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/attribute_type/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/attribute_type/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+31
View File
@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/attribute_type/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
</div>
</div>
</div>
</div>
+222
View File
@@ -0,0 +1,222 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif;
?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/cart/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-4"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/cart/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/cart/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->product_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->session_id}</td>";
echo "<td>{$data->subtotal}</td>";
echo "<td>{$data->quantity}</td>";
echo "<td>{$data->total}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>#tab-content{padding:0px !important;margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/cart/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+84
View File
@@ -0,0 +1,84 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/cart/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="User ID">User ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Session ID">Session ID </label>
<input type="text" class="form-control data-input" id="form_session_id" name="session_id" value="<?php echo set_value('session_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Subtotal">Subtotal <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_subtotal" name="subtotal" value="<?php echo set_value('subtotal'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Total">Total <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_total" name="total" value="<?php echo set_value('total'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+83
View File
@@ -0,0 +1,83 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/cart/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="User ID">User ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id', $this->_data['view_model']->get_user_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Session ID">Session ID </label>
<input type="text" class="form-control data-input" id="form_session_id" name="session_id" value="<?php echo set_value('session_id', $this->_data['view_model']->get_session_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Subtotal">Subtotal <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_subtotal" name="subtotal" value="<?php echo set_value('subtotal', $this->_data['view_model']->get_subtotal());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Total">Total <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_total" name="total" value="<?php echo set_value('total', $this->_data['view_model']->get_total());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+76
View File
@@ -0,0 +1,76 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/cart/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
User ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_user_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Session ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_session_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Subtotal
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_subtotal();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Total
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_total();?>
</div>
</div>
</div>
</div>
</div>
</div>
+274
View File
@@ -0,0 +1,274 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="category_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/category/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/category/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/category/edit/' . $data->id . '">Edit</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/category/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+80
View File
@@ -0,0 +1,80 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/category/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+79
View File
@@ -0,0 +1,79 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/category/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+92
View File
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<title>outlineguru</title>
<style>
.form-container {
width: 40%;
min-width: 300px;
max-width: 500px;
border: 1px solid #ccc;
height: auto;
margin: 50px auto;
}
.btn-primary {
background-color: #2C5ED6;
}
@media (max-width: 500px) {
h1 {
font-size: 24px;
}
.form-container {
margin: 10px auto;
}
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-primary mb-3">
<div class="container">
<a class="navbar-brand" href="#">
outlineguru
<!-- <img style="height:35px" src="/assets/image/logo.png"/> -->
</a>
<div class="collapse navbar-collapse" id="navbarNav">
</div>
</div>
</nav>
<div class="">
<div class='text-center'>
<h1>Change your password</h1>
</div>
<div class="form-container p-5">
<?php echo form_open();?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="alert">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="form-group text-container">
<label class='required' for="Password">Password </label>
<input type="password" class="form-control site-input" id="password" name="password" required="true" >
</div>
<div class="form-group">
<input type="submit" name='btn-login' class="btn btn-primary btn-block" value="Submit">
</div>
</form>
</div>
</div>
<div class='text-center'>&copy; <?php echo date("yy"); ?> outlineguru. All Right Reserved.</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
<!-- Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020 -->
</body>
</html>
+274
View File
@@ -0,0 +1,274 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="class_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/class/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/class/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/class/edit/' . $data->id . '">Edit</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/class/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+80
View File
@@ -0,0 +1,80 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/class/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+79
View File
@@ -0,0 +1,79 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/class/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+218
View File
@@ -0,0 +1,218 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif;
?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/color/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-4"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/color/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/color/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>{$data->status}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>#tab-content{padding:0px !important;margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/color/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+68
View File
@@ -0,0 +1,68 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/color/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/color/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+31
View File
@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/color/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
</div>
</div>
</div>
</div>
+283
View File
@@ -0,0 +1,283 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="contact_us_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
Contact Search
</h5>
<?= form_open('/admin/contact_us/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Email">Email </label>
<input type="text" class="form-control" id="email" name="email" value="<?php echo $this->_data['view_model']->get_email();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Reason">Reason </label>
<input type="text" class="form-control" id="message" name="message" value="<?php echo $this->_data['view_model']->get_message();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Created At">Created At </label>
<input type="date" class="form-control" id="created_at" name="created_at" value="<?php echo $this->_data['view_model']->get_created_at();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
Contact
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
// echo '<td style=\'max-width: 100px;\'>';
// echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/contact_us/view/' . $data->id . '">View</a>';
// echo '</td>';
echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>{$data->email}</td>";
echo "<td>{$data->message}</td>";
echo "<td>{$data->created_at}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete Contact</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/contact_us/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+31
View File
@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/contact_us/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
</div>
</div>
</div>
</div>
+287
View File
@@ -0,0 +1,287 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="content_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/content/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Content Name">Content Name </label>
<input type="text" class="form-control" id="content_name" name="content_name" value="<?php echo $this->_data['view_model']->get_content_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Content Type">Content Type </label>
<select name="content_type" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->content_type_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_content_type() == $key && $view_model->get_content_type() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<!-- <span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/content/add"><i class="fas fa-plus-circle"></i></a></span> -->
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/content/edit/' . $data->id . '">Edit</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->content_name}</td>";
echo "<td>" . ucfirst($view_model->content_type_mapping()[$data->content_type]) ."</td>";
echo "<td>{$data->content}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/content/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+94
View File
@@ -0,0 +1,94 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/content/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Content Name">Content Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_content_name" name="content_name" value="<?php echo set_value('content_name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Content Type">Content Type <b class="required_field"> * </b></label>
<select id="form_content_type" name="content_type" class="form-control data-input">
<?php foreach ($view_model->content_type_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="col-md-12 col-sm-12">
<div class="form-group">
<label for="Content">Content <b class="required_field"> * </b></label>
<textarea id='content_sun-editor' name='content' class='form-control data-input sun-editor-component' row='20'></textarea>
</div>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+93
View File
@@ -0,0 +1,93 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/content/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Content Name">Content Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" disabled id="form_content_name" name="content_name" value="<?php echo set_value('content_name', $this->_data['view_model']->get_content_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Content Type">Content Type <b class="required_field"> * </b></label>
<select id="form_content_type" name="content_type" disabled class="form-control data-input">
<?php foreach ($view_model->content_type_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_content_type() == $key && $view_model->get_content_type() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="col-md-12 col-sm-12">
<div class="form-group">
<label for="Content">Content <b class="required_field"> * </b></label>
<textarea id="<?php echo ($this->_data['view_model']->get_content_name()=='terms_conditon' || $this->_data['view_model']->get_content_name()=='privacy_policy' ) ? 'content_sun-editor' : '' ?>" name='content' class='form-control data-input sun-editor-component' row='20'><?php echo $this->_data['view_model']->get_content();?></textarea>
</div>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" disabled class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+54
View File
@@ -0,0 +1,54 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="row">
</div>
<div class="row">
<?php if (validation_errors()) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<h5 class="card-header">Edit Credentials</h5>
<div class="card-body">
<?= form_open() ?>
<div class="form-group">
<label for="First Name">Email</label>
<input type="email" class="form-control" id="form_first_name" name="email" value="<?php echo set_value('email', $this->_data['view_model']->get_email());?>"/>
</div>
<div class="form-group">
<label for="Password">Password</label>
<input type="password" class="form-control" id="form_password" name="password" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+118
View File
@@ -0,0 +1,118 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<div class="tab-content mx-4" id="nav-tabContent">
<h2>Dashboard</h2>
<br>
<style>
.card-header{
font-weight: bold;
font-size: 22px;
}
</style>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
</div>
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-12">
<div class="card ">
<div class="card-header">
Transaction
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">This Week <span class="pull-right">0</span></li>
<li class="list-group-item">This Month <span class="pull-right">0</span></li>
<li class="list-group-item">This Year<span class="pull-right">0</span></li>
<li class="list-group-item">Total <span class="pull-right">0</span></li>
</ul>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="card ">
<div class="card-header">
Member Accounts
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">This Week <span class="pull-right"><?php echo $this->_data['member_accounts']['week'];?></span></li>
<li class="list-group-item">This Month <span class="pull-right"><?php echo $this->_data['member_accounts']['month'];?></span></li>
<li class="list-group-item">This Year<span class="pull-right"><?php echo $this->_data['member_accounts']['year'];?></span></li>
<li class="list-group-item">Total <span class="pull-right"><?php echo $this->_data['member_accounts']['total'];?></span></li>
</ul>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="card ">
<div class="card-header">
Uploaded Notes
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">This Week <span class="pull-right"><?php echo $this->_data['member_uploads']['week'];?></span></li>
<li class="list-group-item">This Month <span class="pull-right"><?php echo $this->_data['member_uploads']['month'];?></span></li>
<li class="list-group-item">This Year<span class="pull-right"><?php echo $this->_data['member_uploads']['year'];?></span></li>
<li class="list-group-item">Total <span class="pull-right"><?php echo $this->_data['member_uploads']['total'];?></span></li>
</ul>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-md-4 col-sm-12">
<div class="card ">
<div class="card-header">
Most Accounts By School
</div>
<ul class="list-group list-group-flush">
<?php foreach ( $this->_data['top_school_account'] as $key => $value) { ?>
<li class="list-group-item"><?php echo $value['school']??'User Not Select School';?><span class="pull-right"><?php echo $value['count']??'0';?></span></li>
<?php }?>
</ul>
</div>
</div>
<div class="col-md-4 col-sm-12">
<div class="card ">
<div class="card-header">
Most Uploads By School
</div>
<ul class="list-group list-group-flush">
<?php foreach ( $this->_data['top_school_upload'] as $key => $value) { ?>
<li class="list-group-item"><?php echo $value['school']??'User Not Select School';?><span class="pull-right"><?php echo $value['count']??'0';?></span></li>
<?php }?>
</ul>
</div>
</div>
</div>
</div>
+297
View File
@@ -0,0 +1,297 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="dispute_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/dispute/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order ID">Order ID </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="User ID">User ID </label>
<input type="text" class="form-control" id="user_id" name="user_id" value="<?php echo $this->_data['view_model']->get_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Reason">Reason </label>
<input type="text" class="form-control" id="reason" name="reason" value="<?php echo $this->_data['view_model']->get_reason();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Stripe Charge ID">Stripe Charge ID </label>
<input type="text" class="form-control" id="stripe_charge_id" name="stripe_charge_id" value="<?php echo $this->_data['view_model']->get_stripe_charge_id();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Stripe Dispute ID">Stripe Dispute ID </label>
<input type="text" class="form-control" id="stripe_dispute_id" name="stripe_dispute_id" value="<?php echo $this->_data['view_model']->get_stripe_dispute_id();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<input type="text" class="form-control" id="status" name="status" value="<?php echo $this->_data['view_model']->get_status();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/dispute/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/dispute/edit/' . $data->id . '">Edit</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->order_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->reason}</td>";
echo "<td>{$data->explanation}</td>";
echo "<td>{$data->stripe_charge_id}</td>";
echo "<td>{$data->stripe_dispute_id}</td>";
echo "<td>{$data->status}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/dispute/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+96
View File
@@ -0,0 +1,96 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dispute/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="User ID">User ID </label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Reason">Reason </label>
<input type="text" class="form-control data-input" id="form_reason" name="reason" value="<?php echo set_value('reason'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Explanation">Explanation </label>
<textarea id='form_explanation' name='explanation' class='form-control data-input' rows='5'><?php echo set_value('explanation'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Stripe Charge ID">Stripe Charge ID </label>
<input type="text" class="form-control data-input" id="form_stripe_charge_id" name="stripe_charge_id" value="<?php echo set_value('stripe_charge_id'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Stripe Dispute ID">Stripe Dispute ID </label>
<input type="text" class="form-control data-input" id="form_stripe_dispute_id" name="stripe_dispute_id" value="<?php echo set_value('stripe_dispute_id'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status </label>
<input type="text" class="form-control data-input" id="form_status" name="status" value="<?php echo set_value('status'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+95
View File
@@ -0,0 +1,95 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dispute/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id', $this->_data['view_model']->get_order_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="User ID">User ID </label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id', $this->_data['view_model']->get_user_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Reason">Reason </label>
<input type="text" class="form-control data-input" id="form_reason" name="reason" value="<?php echo set_value('reason', $this->_data['view_model']->get_reason());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Explanation">Explanation </label>
<textarea id='form_explanation' name='explanation' class='data-input form-control' rows='5'><?php echo set_value('explanation', $this->_data['view_model']->get_explanation());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Stripe Charge ID">Stripe Charge ID </label>
<input type="text" class="form-control data-input" id="form_stripe_charge_id" name="stripe_charge_id" value="<?php echo set_value('stripe_charge_id', $this->_data['view_model']->get_stripe_charge_id());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Stripe Dispute ID">Stripe Dispute ID </label>
<input type="text" class="form-control data-input" id="form_stripe_dispute_id" name="stripe_dispute_id" value="<?php echo set_value('stripe_dispute_id', $this->_data['view_model']->get_stripe_dispute_id());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status </label>
<input type="text" class="form-control data-input" id="form_status" name="status" value="<?php echo set_value('status', $this->_data['view_model']->get_status());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+269
View File
@@ -0,0 +1,269 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="email_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/emails/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Slug">Slug </label>
<input type="text" class="form-control" id="slug" name="slug" value="<?php echo $this->_data['view_model']->get_slug();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Subject">Subject </label>
<input type="text" id='subject' name='subject' class='form-control' value="<?php echo $this->_data['view_model']->get_subject();?>">
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Tags">Tags </label>
<input type="text" id='tag' name='tag' class='form-control' value="<?php echo $this->_data['view_model']->get_tag();?>">
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/emails/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/emails/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/emails/view/' . $data->id . '">View</a>';
echo '</td>'; echo "<td>{$data->slug}</td>";
echo "<td>{$data->subject}</td>";
echo "<td>{$data->tag}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/email/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+96
View File
@@ -0,0 +1,96 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/emails/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Slug">Slug <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_slug" name="slug" value="<?php echo set_value('slug'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Subject">Subject <b class="required_field"> * </b></label>
<textarea id='form_subject' name='subject' class='form-control data-input' rows='5'><?php echo set_value('subject'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Body Header">Body Header <b class="required_field"> * </b></label>
<textarea id='form_email_header' name='email_header' class='form-control data-input' rows='5'><?php echo set_value('email_header'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Body Footer">Body Footer <b class="required_field"> * </b></label>
<textarea id='form_email_footer' name='email_footer' class='form-control data-input' rows='5'><?php echo set_value('email_footer'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Subject">Subject <b class="required_field"> * </b></label>
<textarea id='form_subject' name='subject' class='form-control data-input' rows='5'><?php echo set_value('subject'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Tags">Tags <b class="required_field"> * </b></label>
<textarea id='form_tag' name='tag' class='form-control data-input' rows='5'><?php echo set_value('tag'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Email Body">Email Body <b class="required_field"> * </b></label>
<textarea id='form_html' name='html' class='form-control data-input' rows='5'><?php echo set_value('html'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+87
View File
@@ -0,0 +1,87 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/emails/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Subject">Subject <b class="required_field"> * </b></label>
<textarea id='form_subject' name='subject' class='data-input form-control' rows='5'><?php echo set_value('subject', $this->_data['view_model']->get_subject());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Body Header">Body Header <b class="required_field"> * </b></label>
<textarea id='form_email_header' name='email_header' class='data-input form-control' rows='5'><?php echo set_value('email_header', $this->_data['view_model']->get_email_header());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Email Body">Email Body <b class="required_field"> * </b></label>
<textarea id='form_html' name='html' class='data-input form-control' rows='5'><?php echo set_value('html', $this->_data['view_model']->get_html());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Body Footer">Body Footer <b class="required_field"> * </b></label>
<textarea id='form_email_footer' name='email_footer' class='data-input form-control' rows='5'><?php echo set_value('email_footer', $this->_data['view_model']->get_email_footer());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Tags">Tags </label>
<textarea id='form_tag' name='tag' class='data-input form-control' rows='5'><?php echo set_value('tag', $this->_data['view_model']->get_tag());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+94
View File
@@ -0,0 +1,94 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/emails/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Slug
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_slug();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Subject
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_subject();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Tags
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_tag();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Body Header
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_email_header();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Email Body
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_html();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Body Footer
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_email_footer();?>
</div>
</div>
</div>
</div>
</div>
</div>
+216
View File
@@ -0,0 +1,216 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif;
?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/image/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-4"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/image/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td><div class='mkd-image-container'><img class='img-fluid modal-image' src='$data->url' onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/></div></td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>#tab-content{padding:0px !important;margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/image/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+83
View File
@@ -0,0 +1,83 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/image/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="URL">URL <b class="required_field"> * </b></label>
<img id="output_url" style="max-height:100px" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<div class="btn uppload-button image_id_uppload_library btn-primary btn-sm " data-image-url="url" data-image-id="url_id" data-image-preview="output_url" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class='btn btn-success' onclick='show_image_gallery("url", "url_id")'>Gallery</div> <div class="btn btn-primary btn-sm mkd-media-gallery" data-target="#mkd-media-gallery" data-toggle="modal" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Media Gallery</div>
<input type="hidden" id="url" name="url" value=""/>
<input type="hidden" id="url_id" name="url_id" value=""/>
<span id="url_complete" class="image_complete_uppload" ></span></div> <div class="form-group col-md-5 col-sm-12 ">
<label for="Image Type">Image Type </label>
<select id="form_type" name="type" class="form-control data-input">
<?php foreach ($view_model->type_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+47
View File
@@ -0,0 +1,47 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/image/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col'>
<span class='d-block'>URL</span>
<img class="img-fluid d-block mb-3 mt-3 view-image" style='max-height: 100px;' src="<?php echo $view_model->get_url();?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Image Type
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->type_mapping()[$view_model->get_type()];?>
</div>
</div>
</div>
</div>
</div>
</div>
+395
View File
@@ -0,0 +1,395 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<style>
.select2-container .select2-selection--single {
height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
line-height: 34px !important;
}
</style>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="inventory_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
Uploaded Notes
</h5>
<?= form_open('/admin/inventory/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="School ID">School </label>
<select id="form_school_id" name="school_id" class="form-control get_schools_select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty($schools)):
foreach ($schools as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_class_id()==$res1->id ? 'selected' :'';?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Professor ID">Professor </label>
<select id="form_professor_id" name="professor_id" class="form-control get_professors_select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty($professors)):
foreach ($professors as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_professor_id()==$res1->id ? 'selected' : '' ; ?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Class ID">Course </label>
<select id="form_class_id" name="class_id" class="form-control get_courses_select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty($classes)):
foreach ($classes as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_class_id()==$res1->id ? 'selected' :'';?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Textbook ID">Textbook </label>
<select id="form_textbook_id" name="isbn" class="form-control get_textbooks_select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty($textbooks)):
foreach ($textbooks as $key => $res1): ?>
<?php if($res1['isbn']){?>
<option value='<?=$res1['isbn'];?>' <?= ($_GET['isbn'] ?? '')==$res1['isbn'] ? 'selected' :'';?> ><?=$res1['isbn'];?></option>
<?php }
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Word Count">Word Count </label>
<input type="text" class="form-control" id="word_count" name="word_count" value="<?php echo $this->_data['view_model']->get_word_count();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Year">Year </label>
<input type="text" class="form-control " id="year" name="year" value="<?php echo $this->_data['view_model']->get_year();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="email">Email </label>
<input type="email" class="form-control" id="email" name="email" value="<?php echo $email; ?>" />
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control select2">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="previews">Previews </label>
<select name="previews" class="form-control">
<option value="">All</option>
<option <?php if ($previews == 1): echo 'selected'; endif ?> value="1">Yes</option>
<option <?php if ($previews == 2): echo 'selected'; endif ?> value="2">No</option>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
Uploaded Notes
<!-- <span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/inventory/add"><i class="fas fa-plus-circle"></i></a></span> -->
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
$feature_image = " Yes ";
if ( empty($data->feature_image3) && empty($data->feature_image2) && empty($data->feature_image))
{
$feature_image = " No ";
}
echo "<td>{$feature_image}</td>";
echo "<td>{$data->school_id}</td>";
echo "<td>{$data->professor_id}</td>";
echo "<td>{$data->class_id}</td>";
echo "<td>{$data->isbn}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->email}</td>";
echo "<td>{$data->word_count}</td>";
echo "<td>{$data->year}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function()
{
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/inventory/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
}, false)
</script>
+137
View File
@@ -0,0 +1,137 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Title">Title <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_title" name="title" value="<?php echo set_value('title'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="School ID">School ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_school_id" name="school_id" value="<?php echo set_value('school_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Professor ID">Professor ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_professor_id" name="professor_id" value="<?php echo set_value('professor_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Class ID">Class ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_class_id" name="class_id" value="<?php echo set_value('class_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Textbook ID">Textbook ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_textbook_id" name="textbook_id" value="<?php echo set_value('textbook_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Word Count">Word Count <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_word_count" name="word_count" value="<?php echo set_value('word_count'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Year">Year <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_year" name="year" value="<?php echo set_value('year'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="ISBN">ISBN </label>
<input type="text" class="form-control data-input" id="form_isbn" name="isbn" value="<?php echo set_value('isbn'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Paypal Email">Paypal Email <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_paypal_email" name="paypal_email" value="<?php echo set_value('paypal_email'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<div class="mkd-upload-form-btn-wrapper">
<label for="File">File <b class="required_field"> * </b></label>
<button class="mkd-upload-btn btn btn-primary d-block">Upload a file</button>
<input type="file" name="file_upload" id="file_upload" onchange="onFileUploaded(event, 'file')" accept=".gif,.jpg,.jpeg,.png,.doc,.docx,.pdf,.md,.txt,.rtf,.xls,.xlsx,.xml,.json,.html,.mp3,.mp4,.csv,.bmp,.mpeg,.ppt,.pptx,.svg,.wav,.webm,.weba,.woff,.tiff"/>
<input type="hidden" id="file" name="file"/>
<input type="hidden" id="file_id" name="file_id"/>
<span id="file_text" class="mkd-upload-filename"></span>
</div>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Feature Image">Feature Image </label>
<img id="output_feature_image" style="max-height:100px" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<div class="btn uppload-button image_id_uppload_library btn-primary btn-sm " data-image-url="feature_image" data-image-id="feature_image_id" data-image-preview="output_feature_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class='btn btn-success' onclick='show_image_gallery("feature_image", "feature_image_id")'>Gallery</div> <div class="btn btn-primary btn-sm mkd-media-gallery" data-target="#mkd-media-gallery" data-toggle="modal" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Media Gallery</div>
<input type="hidden" id="feature_image" name="feature_image" value=""/>
<input type="hidden" id="feature_image_id" name="feature_image_id" value=""/>
<span id="feature_image_complete" class="image_complete_uppload" ></span></div> <div class="form-group col-md-5 col-sm-12 ">
<label for="Note Type">Note Type <b class="required_field"> * </b></label>
<select id="form_note_type" name="note_type" class="form-control data-input">
<?php foreach ($view_model->note_type_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Description">Description </label>
<textarea id='form_description' name='description' class='form-control data-input' rows='5'><?php echo set_value('description'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Inventory Note">Inventory Note </label>
<textarea id='form_inventory_note' name='inventory_note' class='form-control data-input' rows='5'><?php echo set_value('inventory_note'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+215
View File
@@ -0,0 +1,215 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/member/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/member/inventory/0" class="breadcrumb-link">Notes</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<style>
.select2-container .select2-selection--single {
height: 36px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
line-height: 32px !important;
}
</style>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit Notes
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="School ID">School <b class="required_field"> * </b></label>
<select id="form_school_id" name="school_id" class="get_schools_select2 form-control data-input" required>
<option>--Select--</option>
<?php
if (!empty($schools)):
foreach ($schools as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_school_id()==$res1->id ? 'selected' :'';?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Professor ID">Professor <b class="required_field"> * </b></label>
<select id="form_professor_id" name="professor_id" class="get_professors_select2 form-control data-input" required>
<option>--Select--</option>
<?php
if (!empty($professors)):
foreach ($professors as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_professor_id()==$res1->id ? 'selected' : '' ; ?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Class ID">Course <b class="required_field"> * </b></label>
<select id="form_class_id" name="class_id" class="get_courses_select2 form-control data-input" required>
<option>--Select--</option>
<?php
if (!empty($classes)):
foreach ($classes as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_class_id()==$res1->id ? 'selected' :'';?> ><?=$res1->name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Textbook ID">Textbook <b class="required_field"> </b></label>
<input type="text" name="isbn" class="form-control" value="<?php echo $this->_data['view_model']->get_isbn() ?? ''?>" />
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Word Count">Word Count <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_word_count" name="word_count" value="<?php echo set_value('word_count', $this->_data['view_model']->get_word_count());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Year">Year <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_year" name="year" value="<?php echo set_value('year', $this->_data['view_model']->get_year());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Note Type">Note Type <b class="required_field"> * </b></label>
<select id="form_note_type" name="note_type" class="form-control data-input">
<?php foreach ($view_model->note_type_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_note_type() == $key && $view_model->get_note_type() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12 mb-4">
<label for="feature_image" style="display: block;">Preview Image 1 </label>
<span class="img-delete-close " <?php if (empty($this->_data['view_model']->get_feature_image())): echo ' style="display: none;" '; endif; ?> ><i class="fa fa-trash img-wrapper-delete-close"></i></span>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image" src="<?php echo set_value('feature_image', $this->_data['view_model']->get_feature_image());?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<br/><div class="btn btn-info btn-sm image_id_uppload_library uppload-button" data-image-url="feature_image" data-image-id="feature_image_id" data-image-preview="output_feature_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<input type="hidden" class="check_change_event" id="feature_image" name="feature_image" value="<?php echo set_value('feature_image', $this->_data['view_model']->get_feature_image());?>"/>
<input type="hidden" id="feature_image_id" name="feature_image_id" value="<?php echo set_value('feature_image_id', $this->_data['view_model']->get_feature_image_id());?>"/>
<span class="feature_image_complete" id="feature_image_complete" style="display: block;"></span>
</div>
<div class="form-group col-md-5 col-sm-12 mb-4">
<label for="feature_image2" style="display: block;">Preview Image 2 </label>
<span class="img-delete-close " <?php if (empty($this->_data['view_model']->get_feature_image2())): echo ' style="display: none;" '; endif; ?> ><i class="fa fa-trash img-wrapper-delete-close"></i></span>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image2" src="<?php echo set_value('feature_image2', $this->_data['view_model']->get_feature_image2());?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<br/><div class="btn btn-info btn-sm image_id_uppload_library uppload-button" data-image-url="feature_image2" data-image-id="feature_image2_id" data-image-preview="output_feature_image2" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<input type="hidden" class="check_change_event" id="feature_image2" name="feature_image2" value="<?php echo set_value('feature_image2', $this->_data['view_model']->get_feature_image2());?>"/>
<input type="hidden" id="feature_image2_id" name="feature_image2_id" value="<?php echo set_value('feature_image2_id', $this->_data['view_model']->get_feature_image2_id());?>"/>
<span class="feature_image_complete" id="feature_image2_complete" style="display: block;"></span>
</div>
<div class="form-group col-md-5 col-sm-12 mb-4">
<label for="feature_image3" style="display: block;">Preview Image 3 </label>
<span class="img-delete-close " <?php if (empty($this->_data['view_model']->get_feature_image3())): echo ' style="display: none;" '; endif; ?> ><i class="fa fa-trash img-wrapper-delete-close"></i></span>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image3" src="<?php echo set_value('feature_image3', $this->_data['view_model']->get_feature_image3());?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<br/><div class="btn btn-info btn-sm image_id_uppload_library uppload-button" data-image-url="feature_image3" data-image-id="feature_image3_id" data-image-preview="output_feature_image3" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<input type="hidden" class="check_change_event" id="feature_image3" name="feature_image3" value="<?php echo set_value('feature_image3', $this->_data['view_model']->get_feature_image3());?>"/>
<input type="hidden" id="feature_image3_id" name="feature_image3_id" value="<?php echo set_value('feature_image3_id', $this->_data['view_model']->get_feature_image3_id());?>"/>
<span class="feature_image_complete" id="feature_image3_complete" style="display: block;"></span>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
<script>
function onFileUploadedCustom(event, id,name="file_upload") {
var selectedFile = event.target.files[0];
var formData = new FormData();
formData.append("file", selectedFile, "file");
jQuery.ajax({
url: "/v1/api/file/upload",
type: "post",
data: formData,
processData: false,
contentType: false,
cache: false,
async: false,
success: function (data)
{
$("#feature_image").val(data.file);
$("#feature_image_id").val(data.id);
$("#file_text2").html(data.file);
}
});
}
</script>
+222
View File
@@ -0,0 +1,222 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory/0" class="breadcrumb-link">Notes</a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
Notes Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<!-- <div class='row mb-4'>
<div class='col-lg-3 col-12'>
Title
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_title();?>
</div>
</div> -->
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
School
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_school_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Professor
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_professor_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Course
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_class_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Textbook
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_isbn();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Word Count
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_word_count();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Year
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_year();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ISBN
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_isbn();?>
</div>
</div>
<!-- <div class='row mb-4'>
<div class='col-lg-3 col-12'>
Paypal Email
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_paypal_email();?>
</div>
</div> -->
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
File
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_file();?>
<a style="display: table;" href="<?php echo $view_model->get_file(); ?>" class="btn btn-primary" >Download</a>
</div>
</div>
<?php if (!empty($this->_data['view_model']->get_feature_image())): ?>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Preview 1
</div>
<div class='col-lg-9 col-12'>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image3" src="<?php echo $this->_data['view_model']->get_feature_image();?>" />
</div>
</div>
<?php endif ?>
<?php if (!empty( $this->_data['view_model']->get_feature_image2()) ): ?>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Preview 2
</div>
<div class='col-lg-9 col-12'>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image3" src="<?php echo $this->_data['view_model']->get_feature_image2();?>" />
</div>
</div>
<?php endif ?>
<?php if (!empty($this->_data['view_model']->get_feature_image3())): ?>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Preview 3
</div>
<div class='col-lg-9 col-12'>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_feature_image3" src="<?php echo $this->_data['view_model']->get_feature_image3();?>" />
</div>
</div>
<?php endif ?>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Note Type
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->note_type_mapping()[$view_model->get_note_type()];?>
</div>
</div>
<!-- <div class='row mb-4'>
<div class='col-lg-3 col-12'>
Description
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_description();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Additional Note
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_inventory_note();?>
</div>
</div> -->
<!--
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Pin to top
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->pin_to_top_mapping()[$view_model->get_pin_to_top()];?>
</div>
</div> -->
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Approve
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->approve_mapping()[$view_model->get_approve()];?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Status
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->status_mapping()[$view_model->get_status()];?>
</div>
</div>
</div>
</div>
</div>
</div>
+356
View File
@@ -0,0 +1,356 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="inventory_attribute_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/inventory_attribute/0', ['method' => 'get']) ?>
<div class="row">
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/inventory_attribute/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory_attribute/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory_attribute/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->inventory_id}</td>";
echo "<td>{$data->attribute_id}</td>";
echo "<td>{$data->value}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/inventory_attribute/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/inventory_attribute/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+68
View File
@@ -0,0 +1,68 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_attribute/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_attribute/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+31
View File
@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_attribute/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
</div>
</div>
</div>
</div>
+220
View File
@@ -0,0 +1,220 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif;
?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/inventory_gallery_image_list/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-4"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory_gallery_image_list/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/inventory_gallery_image_list/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->inventory_id}</td>";
echo "<td><div class='mkd-image-container'><img class='img-fluid modal-image' src='$data->gallery_image' onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/></div></td>";
echo "<td>{$data->gallery_image_id}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>#tab-content{padding:0px !important;margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/inventory_gallery_image_list/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
@@ -0,0 +1,91 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_gallery_image_list/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Inventory ID">Inventory ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_inventory_id" name="inventory_id" value="<?php echo set_value('inventory_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Gallery Image">Gallery Image <b class="required_field"> * </b></label>
<img id="output_gallery_image" style="max-height:100px" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<div class="btn uppload-button image_id_uppload_library btn-primary btn-sm " data-image-url="gallery_image" data-image-id="gallery_image_id" data-image-preview="output_gallery_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class='btn btn-success' onclick='show_image_gallery("gallery_image", "gallery_image_id")'>Gallery</div> <div class="btn btn-primary btn-sm mkd-media-gallery" data-target="#mkd-media-gallery" data-toggle="modal" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Media Gallery</div>
<input type="hidden" id="gallery_image" name="gallery_image" value=""/>
<input type="hidden" id="gallery_image_id" name="gallery_image_id" value=""/>
<span id="gallery_image_complete" class="image_complete_uppload" ></span></div> <div class="form-group col-md-5 col-sm-12 ">
<label for="Image ID">Image ID </label>
<input type="text" class="form-control data-input" id="form_gallery_image_id" name="gallery_image_id" value="<?php echo set_value('gallery_image_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,89 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_gallery_image_list/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Inventory ID">Inventory ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_inventory_id" name="inventory_id" value="<?php echo set_value('inventory_id', $this->_data['view_model']->get_inventory_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 mb-4">
<label for="Gallery Image">Gallery Image <b class="required_field"> * </b></label>
<img class='edit-preview-image d-block' style="max-height:100px" id="output_gallery_image" src="<?php echo set_value('gallery_image', $this->_data['view_model']->get_gallery_image());?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<br/><div class="btn btn-primary image_id_uppload_library btn-sm uppload-button " data-image-url="gallery_image" data-image-id="gallery_image_id" data-image-preview="output_gallery_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class='btn btn-success' onclick='show_image_gallery("gallery_image", "gallery_image_id")'>Gallery</div> <input type="hidden" id="gallery_image" name="gallery_image" value="<?php echo set_value('gallery_image', $this->_data['view_model']->get_gallery_image());?>"/>
<input type="hidden" id="gallery_image_id" name="gallery_image_id" value="<?php echo set_value('gallery_image_id', $this->_data['view_model']->get_gallery_image_id());?>"/>
<span id="gallery_image_complete" class="image_complete_uppload" ></span></div> <div class="form-group col-md-5 col-sm-12">
<label for="Image ID">Image ID </label>
<input type="text" class="form-control data-input" id="form_gallery_image_id" name="gallery_image_id" value="<?php echo set_value('gallery_image_id', $this->_data['view_model']->get_gallery_image_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
@@ -0,0 +1,74 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/inventory_gallery_image_list/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Inventory ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_inventory_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col'>
<span class='d-block'>Gallery Image</span>
<img class="img-fluid d-block mb-3 mt-3 view-image" style='max-height: 100px;' src="<?php echo $view_model->get_gallery_image();?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Image ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_gallery_image_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Status
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->status_mapping()[$view_model->get_status()];?>
</div>
</div>
</div>
</div>
</div>
</div>
+121
View File
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<title>OutlineGurus</title>
<style>
.form-container {
width: 40%;
min-width: 300px;
max-width: 500px;
border: 1px solid #ccc;
height: auto;
margin: 50px auto;
}
@media (max-width: 500px) {
h1 {
font-size: 24px;
}
.form-container {
margin: 10px auto;
}
}
#logo{
width: 180px;
}
.navbar{
padding:3px 10px !important;
}
#Navbar2{
text-align: center;
}
.nav-link{
color:blue;
}
.nav-link.active{
text-decoration: underline;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-light navbar-danger" style="margin-bottom: 1px">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#Navbar">
<span class="navbar-toggler-icon"><img
src="https://img.icons8.com/material-outlined/24/000000/menu--v1.png" /></span>
</button>
<!-- Brand/logo -->
<a href="<?php echo base_url();?>"><img class="navbar-brand" id="logo" src="<?php echo base_url();?>/assets/frontend/img/Logo Files/Logo Files/SVG/Artboard 1 copy.svg" /></a>
<!-- Links -->
<div class="collapse navbar-collapse" id="Navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<!-- <a class="nav-link text-dark" href="<?php echo base_url();?>/member/register">Register</a> -->
</li>
</ul>
</div>
</nav>
<div class="">
<div class='text-center'>
<h1>Login</h1>
</div>
<div class="form-container p-5">
<?php echo form_open();?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="alert">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="form-group">
<label class='required' for="Email">Email</label>
<input type="email" class="form-control site-input" id="email" name="email" required="true" />
</div>
<div class="form-group text-container">
<label class='required' for="Password">Password </label>
<input type="password" class="form-control site-input" id="password" name="password" required="true" >
</div>
<div class="form-group">
<input type="submit" name='btn-login' class="btn btn-primary btn-block" value="Login">
</div>
</form>
</div>
</div>
<div class="row justify-content-center mt-0">
<div class="col-auto mt-3">
<p>© Copyright 2021 Outline Gurus</p>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
</body>
</html>
+386
View File
@@ -0,0 +1,386 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="Marketing_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/marketing/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Published Date">Published Date </label>
<input type="date" class="form-control" id="publish_date" name="publish_date" value="<?php echo $this->_data['view_model']->get_publish_date();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="User Id">User Id </label>
<input type="text" class="form-control" id="user_id" name="user_id" value="<?php echo $this->_data['view_model']->get_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Title">Title </label>
<input type="text" id='title' name='title' class='form-control' value="<?php echo $this->_data['view_model']->get_title();?>">
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/marketing/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/marketing/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/marketing/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->title}</td>";
echo "<td>{$data->slug}</td>";
echo "<td>" . date('F d Y', strtotime($data->publish_date)) . "</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/Marketing/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/marketing/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+170
View File
@@ -0,0 +1,170 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-2 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/marketing/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Title">Title <b class="required_field"> * </b></label>
<input type="text" id='form_title' name='title' class='form-control data-input generate_slug_marketing' value="<?php echo set_value('title'); ?>">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="SEO Title">SEO Title <b class="required_field"> * </b></label>
<input type="text" id='form_seo_title' name='seo_title' class='form-control data-input generate_slug_marketing' value="<?php echo set_value('seo_title'); ?>">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="SEO Description">SEO Description <b class="required_field"> * </b></label>
<input type="text" id='form_seo_description' name='seo_description' class='form-control data-input generate_slug_marketing' value="<?php echo set_value('seo_description'); ?>">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Path To URL">Url <b class="required_field"> * </b></label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $view_model->marketing_slug_url(); ?></span>
</div>
<input type="text" class="form-control" name='slug' id="form_slug_marketing" aria-describedby="basic-addon3">
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Content">Content <b class="required_field"> * </b></label>
<textarea id='content_sun-editor' name='content' class='form-control data-input sun-editor-component' row='20'></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12 ">
<label for="Page Password">Page Password <small>(if added, password required to see the page default username : <strong>guest</strong>)</small> </label>
<input type="text" class="form-control data-input" id="form_password_protect" name="password_protect" value="<?php echo set_value('password_protect'); ?>"/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5 col-sm-12">
<label for="Header Template">Header Template </label>
<select id="form_header_template_path" name="header_template_path" class="form-control data-input">
<!-- <option value="">None</option> -->
<?php foreach ($view_model->get_header_templates() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Template">Template </label>
<select id="form_content_template_path" name="content_template_path" class="form-control data-input">
<!-- <option value="">None</option> -->
<?php
if(is_array($view_model->get_content_templates()) && !empty($view_model->get_content_templates()))
{
foreach($view_model->get_content_templates() as $key => $value)
{ ?>
<optgroup label="<?= $key?>">
<?php foreach($value as $k => $val){
?>
<option value="<?php echo $k ?>" ><?php echo $val ?></option>
<?php }?>
</optgroup>
<?php }
} ?>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5 col-sm-12">
<label for="Footer Template">Footer Template </label>
<select id="form_footer_template_path" name="footer_template_path" class="form-control data-input">
<!-- <option value="">None</option> -->
<?php foreach ($view_model->get_footer_templates() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status </label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+162
View File
@@ -0,0 +1,162 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-2 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/marketing/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Title">Title <b class="required_field"> * </b></label>
<input type="text" id='form_title' name='title' class='data-input form-control generate_slug_marketing' value="<?php echo set_value('title', $this->_data['view_model']->get_title());?>">
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="SEO Title">SEO Title <b class="required_field"> * </b></label>
<input type="text" id='form_seo_title' name='seo_title' class='form-control data-input generate_slug_marketing' value="<?php echo set_value('seo_title', $this->_data['view_model']->get_seo_title());?>" ?>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="SEO Description">SEO Description <b class="required_field"> * </b></label>
<input type="text" id='form_seo_description' name='seo_description' class='form-control data-input generate_slug_marketing' value="<?php echo set_value('seo_description', $this->_data['view_model']->get_seo_description());?>" ?>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="URL">URL <b class="required_field"> * </b></label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon3"><?php echo $view_model->marketing_slug_url(); ?></span>
</div>
<input type="text" class="form-control" name='slug' id="form_slug_marketing" value="<?php echo set_value('slug', $this->_data['view_model']->get_slug());?>" aria-describedby="basic-addon3">
</div>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Content">Content <b class="required_field"> * </b></label>
<textarea id='content_sun-editor' name='content' class='form-control data-input sun-editor-component' row='20'><?php echo set_value('content', $this->_data['view_model']->get_content());?></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12 col-sm-12">
<label for="Page Password">Page Password <small>(if added, password required to see the page default username : <strong>guest</strong>)</small> </label>
<input type="text" class="form-control data-input" id="form_password_protect" name="password_protect" value="<?php echo set_value('password_protect', $this->_data['view_model']->get_password_protect());?>"/>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5 col-sm-12">
<label for="Header Template">Header Template </label>
<select id="form_header_template_path" name="header_template_path" class="form-control data-input">
<?php
foreach ($view_model->get_header_templates() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_header_templates() == $key && $view_model->get_header_templates() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Template">Template </label>
<select id="form_content_template_path" name="content_template_path" class="form-control data-input">
<?php
if(is_array($view_model->get_content_templates()) && !empty($view_model->get_content_templates()))
{
foreach($view_model->get_content_templates() as $key => $value)
{ ?>
<optgroup label="<?= $key?>">
<?php foreach($value as $k => $val){
echo "<option value='{$k}' " . (($view_model->get_content_template_path() == $k && $view_model->get_content_template_path() != '') ? 'selected' : '') . "> {$val} </option>";
}?>
</optgroup>
<?php }
} ?>
</select>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-5 col-sm-12">
<label for="Footer Template">Footer Template </label>
<select id="form_footer_template_path" name="footer_template_path" class="form-control data-input">
<?php foreach ($view_model->get_footer_templates() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_footer_templates() == $key && $view_model->get_footer_templates() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status </label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+139
View File
@@ -0,0 +1,139 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/marketing/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Title
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_title();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
SEO Title
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_seo_title();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
SEO Description
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_seo_description();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Content
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_content();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
URL
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_slug();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Page Password
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_password_protect();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Header Template
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_header_template_path();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Template
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_content_template_path();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Footer Template
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_footer_template_path();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Status
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->status_mapping()[$view_model->get_status()];?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Published Date
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_publish_date();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
User Id
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_user_id();?>
</div>
</div>
</div>
</div>
</div>
</div>
+63
View File
@@ -0,0 +1,63 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<br/>
<div class="tab-content m-4" id="nav-tabContent">
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<br/>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Change Password
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Email">Email </label>
<input type="text" class="form-control data-input" id="form_email" name="email" value="<?php echo set_value('email', $this->_data['email']);?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Password">Password </label>
<input type="password" class="form-control data-input" id="form_password" name="password" value=""/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+353
View File
@@ -0,0 +1,353 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<style>
.select2-container .select2-selection--single {
height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
line-height: 34px !important;
}
</style>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="order_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/order/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Purchase User ID">Purchase User ID </label>
<input type="text" class="form-control" id="purchase_user_id" name="purchase_user_id" value="<?php echo $this->_data['view_model']->get_purchase_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Sale User ID">Sale User ID </label>
<input type="text" class="form-control" id="sale_user_id" name="sale_user_id" value="<?php echo $this->_data['view_model']->get_sale_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div> -->
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Inventory ID">Inventory ID </label>
<input type="text" class="form-control" id="inventory_id" name="inventory_id" value="<?php echo $this->_data['view_model']->get_inventory_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div> -->
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Professor ID">Users </label>
<select id="form_professor_id" name="purchase_user_id" class="form-control select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty( $this->_data['users'])):
foreach ( $this->_data['users'] as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_purchase_user_id()==$res1->id ? 'selected' : '' ; ?> ><?=$res1->first_name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order Date">Order Date </label>
<input type="date" class="form-control" id="order_date" name="order_date" value="<?php echo $this->_data['view_model']->get_order_date();?>"/>
</div>
</div>
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order Time">Order Time </label>
<input type="text" class="form-control" id="order_time" name="order_time" value="<?php echo $this->_data['view_model']->get_order_time();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Subtotal">Subtotal </label>
<input type="text" class="form-control" id="subtotal" name="subtotal" value="<?php echo $this->_data['view_model']->get_subtotal();?>"/>
</div>
</div> -->
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Tax">Tax </label>
<input type="text" class="form-control" id="tax" name="tax" value="<?php echo $this->_data['view_model']->get_tax();?>"/>
</div>
</div> -->
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Discount">Discount </label>
<input type="text" class="form-control" id="discount" name="discount" value="<?php echo $this->_data['view_model']->get_discount();?>"/>
</div>
</div> -->
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Total">Amount </label>
<input type="text" class="form-control" id="total" name="total" value="<?php echo $this->_data['view_model']->get_total();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td>{$data->id}</td>";
echo "<td>{$data->purchase_user_id}</td>";
echo "<td>{$data->school_id}</td>";
echo "<td>{$data->isbn}</td>";
echo "<td>{$data->professor_id}</td>";
echo "<td>" . date('F d Y', strtotime($data->order_date)) . "</td>";
echo "<td>{$data->total} $</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '<td style=\'max-width: 100px;\'>';
// echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/order/view/' . $data->id . '">View</a>';
echo $data->status==1 ? ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/order/refund/' . $data->id . '">Refund</a>' : '' ;
echo '</td>';
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/order/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+148
View File
@@ -0,0 +1,148 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/order/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Purchase User ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_purchase_user_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Sale User ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_sale_user_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Inventory ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_inventory_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Order Date
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_order_date();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Order Time
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_order_time();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Subtotal
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_subtotal();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Tax
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_tax();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Discount
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_discount();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Total
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_total();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Stripe Charge ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_stripe_charge_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
xyzstripe_intent
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_stripe_intent();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Status
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->status_mapping()[$view_model->get_status()];?>
</div>
</div>
</div>
</div>
</div>
</div>
+338
View File
@@ -0,0 +1,338 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<style>
.select2-container .select2-selection--single {
height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
line-height: 34px !important;
}
</style>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="payout_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/payout/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order ID">Order ID </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Professor ID">Users </label>
<select id="form_professor_id" name="user_id" class="form-control select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty( $this->_data['users'])):
foreach ( $this->_data['users'] as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_user_id()==$res1->id ? 'selected' : '' ; ?> ><?=$res1->first_name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Amount">Amount </label>
<input type="text" class="form-control" id="amount" name="amount" value="<?php echo $this->_data['view_model']->get_amount();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<form action="/admin/payout/mark_all_paid" style="margin-left:76%;" method="get" id="submit_mark_all_form">
<input type="submit" class="btn btn-success pull-right" id="submit_mark_all" value="Bulk Paid" />
</form>
<span class="add-part d-flex justify-content-md-end "><a href="?format=csv" class="btn btn-info btn-sm ml-2"><i class="fas fa-download" style="color:white;"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td>'.($data->status==0 ?'<input style="margin-left:10px;" type="checkbox" data-id="'.$data->id.'" class="id_checkbox" />' : '' ).'</td>';
echo "<td>{$data->id}</td>";
echo "<td>{$data->order_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->paypal_email}</td>";
echo "<td>{$data->amount} $</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '<td style=\'max-width: 100px;\'>';
echo $data->status==0 ? '<a class="btn-link link-underline text-underline text-success " href="/admin/payout/paid/'.$data->id.'" >Mark Paid</a>': '';
echo '</td>';
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$('#submit_mark_all_form').on('submit',function(e){
var yes =0;
$('.additional_field').remove();
$.each($('.id_checkbox'),function(i,v){
if($(v).prop('checked')==true){
yes++;
$('#submit_mark_all_form').append('<input type="hidden" class="additional_field" name="id[]" value="'+$(v).attr('data-id')+'" />');
}
})
if(yes==0){
e.preventDefault();
alert('Please select some check box');
}
});
$('.id_checkbox_all').on('change',function(){
if($('.id_checkbox_all').prop('checked')){
$('.id_checkbox').prop('checked',true)
}else{
$('.id_checkbox').prop('checked',false)
}
})
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/payout/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+274
View File
@@ -0,0 +1,274 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="professor_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/professor/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/professor/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/professor/edit/' . $data->id . '">Edit</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/professor/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+80
View File
@@ -0,0 +1,80 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/professor/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+79
View File
@@ -0,0 +1,79 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/professor/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+65
View File
@@ -0,0 +1,65 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
<br/>
<div class="tab-content m-4" id="nav-tabContent">
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit Profile
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Email">Email </label>
<input type="email" class="form-control" id="form_email" name="email" value="<?php echo set_value('email', $this->_data['view_model']->get_email());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Password">Password </label>
<input type="password" class="form-control" id="form_password" name="password" value=""/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="First Name">First Name </label>
<input type="text" class="form-control" id="form_first_name" name="first_name" value="<?php echo set_value('first_name', $this->_data['view_model']->get_first_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Last Name">Last Name </label>
<input type="text" class="form-control" id="form_last_name" name="last_name" value="<?php echo set_value('last_name', $this->_data['view_model']->get_last_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+305
View File
@@ -0,0 +1,305 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="refund_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/refund/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order ID">Order ID </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="User ID">User ID </label>
<input type="text" class="form-control" id="user_id" name="user_id" value="<?php echo $this->_data['view_model']->get_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Amount">Amount </label>
<input type="text" class="form-control" id="amount" name="amount" value="<?php echo $this->_data['view_model']->get_amount();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Reason">Reason </label>
<input type="text" class="form-control" id="reason" name="reason" value="<?php echo $this->_data['view_model']->get_reason();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Stripe Charge ID">Stripe Charge ID </label>
<input type="text" class="form-control" id="stripe_charge_id" name="stripe_charge_id" value="<?php echo $this->_data['view_model']->get_stripe_charge_id();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Stripe Invoice ID">Stripe Invoice ID </label>
<input type="text" class="form-control" id="stripe_invoice_id" name="stripe_invoice_id" value="<?php echo $this->_data['view_model']->get_stripe_invoice_id();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<input type="text" class="form-control" id="status" name="status" value="<?php echo $this->_data['view_model']->get_status();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/refund/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/refund/edit/' . $data->id . '">Edit</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->order_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->amount}</td>";
echo "<td>{$data->reason}</td>";
echo "<td>{$data->explanation}</td>";
echo "<td>{$data->receipt_url}</td>";
echo "<td>{$data->stripe_charge_id}</td>";
echo "<td>{$data->stripe_invoice_id}</td>";
echo "<td>{$data->status}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/refund/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+104
View File
@@ -0,0 +1,104 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/refund/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="User ID">User ID </label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Amount">Amount </label>
<input type="text" class="form-control data-input" id="form_amount" name="amount" value="<?php echo set_value('amount'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Reason">Reason </label>
<input type="text" class="form-control data-input" id="form_reason" name="reason" value="<?php echo set_value('reason'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Explanation">Explanation </label>
<textarea id='form_explanation' name='explanation' class='form-control data-input' rows='5'><?php echo set_value('explanation'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Receipt URL">Receipt URL </label>
<input type="text" class="form-control data-input" id="form_receipt_url" name="receipt_url" value="<?php echo set_value('receipt_url'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Stripe Charge ID">Stripe Charge ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_stripe_charge_id" name="stripe_charge_id" value="<?php echo set_value('stripe_charge_id'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Stripe Invoice ID">Stripe Invoice ID </label>
<input type="text" class="form-control data-input" id="form_stripe_invoice_id" name="stripe_invoice_id" value="<?php echo set_value('stripe_invoice_id'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status </label>
<input type="text" class="form-control data-input" id="form_status" name="status" value="<?php echo set_value('status'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+103
View File
@@ -0,0 +1,103 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/refund/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id', $this->_data['view_model']->get_order_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="User ID">User ID </label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id', $this->_data['view_model']->get_user_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Amount">Amount </label>
<input type="text" class="form-control data-input" id="form_amount" name="amount" value="<?php echo set_value('amount', $this->_data['view_model']->get_amount());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Reason">Reason </label>
<input type="text" class="form-control data-input" id="form_reason" name="reason" value="<?php echo set_value('reason', $this->_data['view_model']->get_reason());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Explanation">Explanation </label>
<textarea id='form_explanation' name='explanation' class='data-input form-control' rows='5'><?php echo set_value('explanation', $this->_data['view_model']->get_explanation());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Receipt URL">Receipt URL </label>
<input type="text" class="form-control data-input" id="form_receipt_url" name="receipt_url" value="<?php echo set_value('receipt_url', $this->_data['view_model']->get_receipt_url());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Stripe Charge ID">Stripe Charge ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_stripe_charge_id" name="stripe_charge_id" value="<?php echo set_value('stripe_charge_id', $this->_data['view_model']->get_stripe_charge_id());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Stripe Invoice ID">Stripe Invoice ID </label>
<input type="text" class="form-control data-input" id="form_stripe_invoice_id" name="stripe_invoice_id" value="<?php echo set_value('stripe_invoice_id', $this->_data['view_model']->get_stripe_invoice_id());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status </label>
<input type="text" class="form-control data-input" id="form_status" name="status" value="<?php echo set_value('status', $this->_data['view_model']->get_status());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+313
View File
@@ -0,0 +1,313 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<style>
.select2-container .select2-selection--single {
height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
line-height: 34px !important;
}
</style>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="review_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/review/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Id">Id </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="order_id">order_id </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Professor ID">Users </label>
<select id="form_professor_id" name="user_id" class="form-control select2 data-input" >
<option value="">--Select--</option>
<?php
if (!empty( $this->_data['users'])):
foreach ( $this->_data['users'] as $res1): ?>
<option value='<?=$res1->id;?>' <?= $this->_data['view_model']->get_user_id()==$res1->id ? 'selected' : '' ; ?> ><?=$res1->first_name;?></option>
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Comment">Comment </label>
<input type="text" id='comment' name='comment' class='form-control' value="<?php echo $this->_data['view_model']->get_comment();?>">
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Rating">Rating </label>
<select name="rating" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->rating_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_rating() == $key && $view_model->get_rating() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<input type="text" class="form-control" id="status" name="status" value="<?php echo $this->_data['view_model']->get_status();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo ($data->status==1 ? '<a class="btn-link link-underline text-underline text-danger " href="/admin/review/reject/'.$data->id.'" >Reject</a>' : '');
echo '</td>';
echo "<td>{$data->id}</td>";
echo "<td>{$data->order_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->comment}</td>";
echo "<td>" . ucfirst($view_model->rating_mapping()[$data->rating]) ."</td>";
echo "<td>".($data->status==1 ?'Approved' : 'Rejected')."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/review/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+274
View File
@@ -0,0 +1,274 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="school_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/school/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/school/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/school/edit/' . $data->id . '">Edit</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/school/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+80
View File
@@ -0,0 +1,80 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/school/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+79
View File
@@ -0,0 +1,79 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/school/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+270
View File
@@ -0,0 +1,270 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="setting_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/setting/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Setting Field">Key </label>
<input type="text" class="form-control" id="key" name="key" value="<?php echo $this->_data['view_model']->get_key();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Setting Value"> Value </label>
<input type="text" id='value' name='value' class='form-control' value="<?php echo $this->_data['view_model']->get_value();?>">
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
if($data->key == 'fixed_paper_amount' || $data->key=='payout_percentage_seller'){
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/setting/edit/' . $data->id . '">Edit</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->key}</td>";
echo "<td>{$data->value}</td>";
echo '</tr>';
}
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/setting/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+71
View File
@@ -0,0 +1,71 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/setting/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Setting Value">Setting Value <b class="required_field"> * </b></label>
<textarea id='form_value' name='value' class='data-input form-control' rows='5'><?php echo set_value('value', $this->_data['view_model']->get_value());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+70
View File
@@ -0,0 +1,70 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12 mt-4">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-2">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/sms/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="sms_listing">
<div class="card-body">
<div class="table-responsive">
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
foreach ($view_model->get_column() as $data) {
echo "<th text-left>{$data}</th>";
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/sms/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/sms/view/' . $data->id . '">View</a>';
echo '</td>'; echo "<td>{$data->slug}</td>";
echo "<td>{$data->content}</td>";
echo "<td>{$data->tag}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
</div>
</div>
</div>
</div>
</div>
</div>
+80
View File
@@ -0,0 +1,80 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/sms" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="xyzSMS Slug">xyzSMS Slug <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_slug" name="slug" value="<?php echo set_value('slug'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="SMS Body">SMS Body <b class="required_field"> * </b></label>
<textarea id='form_content' name='content' class='form-control data-input' rows='5'><?php echo set_value('content'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Replacement Tags">Replacement Tags <b class="required_field"> * </b></label>
<textarea id='form_tag' name='tag' class='form-control data-input' rows='5'><?php echo set_value('tag'); ?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+133
View File
@@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootoast@1.0.1/dist/bootoast.min.css" crossorigin="anonymous">
<title>outlineguru</title>
<style>
.form-container {
width: 40%;
min-width: 300px;
max-width: 500px;
border: 1px solid #ccc;
height: auto;
margin: 50px auto;
}
.btn-primary {
background-color: #2C5ED6;
}
@media (max-width: 500px) {
h1 {
font-size: 24px;
}
.form-container {
margin: 10px auto;
}
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-primary mb-3">
<div class="container">
<a class="navbar-brand" href="#">
outlineguru
<!-- <img style="height:35px" src="/assets/image/logo.png"/> -->
</a>
<div class="collapse navbar-collapse" id="navbarNav">
</div>
</div>
</nav>
<div class="">
<div class='text-center'>
<h1>Verify your Number</h1>
</div>
<div class="form-container p-5">
<?php echo form_open();?>
<?php if (strlen($error ?? '') > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success ?? '') > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="alert">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="form-group text-container">
<label class='required' for="Email">Verification Code</label>
<input type="text" class="form-control site-input" id="verification_code" name="code" value="<?php echo set_value('code'); ?>" required="true" >
</div>
<div class="form-group">
<input type="hidden" class="form-control site-input" id="phone_number" disabled name="phone" value="<?php echo $phone; ?>" />
<a id='btn-verify' class='btn btn-accent-light btn-block' href="#" style='text-decoration:underline;'>Resend Verification Code</a>
</div>
<div class="form-group">
<input type="submit" name='btn-login' class="btn btn-primary btn-block" value="Login">
</div>
</form>
</div>
</div>
<div class='text-center'>&copy; <?php echo date("yy"); ?> outlineguru. All Right Reserved.</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootoast@1.0.1/dist/bootoast.min.js" crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$("#btn-verify").click(function (e) {
e.preventDefault();
var phone = $("#phone_number").val();
var url = "/admin/sent_verification";
var posting = $.post(url, { phone: phone });
posting.done(function (data) {
var data = JSON.parse(data);
if (data.error == false) {
bootoast.toast({
message: "xyzVerification sent",
type: "info",
});
return;
}
if (data.error == true) {
bootoast.toast({
message: data.message || "Error",
type: "danger",
});
return;
}
});
posting.fail(function () {
bootoast.toast({
message: "Error Sending Code",
type: "danger",
});
});
});
});
</script>
<!-- Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020 -->
</body>
</html>
+79
View File
@@ -0,0 +1,79 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/sms" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="SMS Body">SMS Body <b class="required_field"> * </b></label>
<textarea id='form_content' name='content' class='data-input form-control' rows='5'><?php echo set_value('content', $this->_data['view_model']->get_content());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Replacement Tags">Replacement Tags </label>
<textarea id='form_tag' name='tag' class='data-input form-control' rows='5'><?php echo set_value('tag', $this->_data['view_model']->get_tag());?></textarea>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="xyzSMS Slug">xyzSMS Slug </label>
<input type="text" class="form-control data-input" id="form_slug" name="slug" value="<?php echo set_value('slug', $this->_data['view_model']->get_slug());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/sms" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
xyzSMS Slug
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_slug();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Replacement Tags
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_tag();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
SMS Body
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_content();?>
</div>
</div>
</div>
</div>
</div>
</div>
+392
View File
@@ -0,0 +1,392 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="spreadsheet_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/spreadsheet/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="User Id">User Id </label>
<input type="text" class="form-control" id="user_id" name="user_id" value="<?php echo $this->_data['view_model']->get_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Created At">Created At </label>
<input type="date" class="form-control" id="created_at" name="created_at" value="<?php echo $this->_data['view_model']->get_created_at();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/spreadsheet/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/spreadsheet/edit/' . $data->id . '">Edit</a>';
$condition = (1==1)?TRUE:FALSE;
echo ($condition) ? " <a class='btn-link link-underline text-underline' target='_blank' href='/v1/api/update_spreadsheet/{$data->id}'>Spreadsheet</a>" : '';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo "<td>" . date('F d Y', strtotime($data->created_at)) . "</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/spreadsheet/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/spreadsheet/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+89
View File
@@ -0,0 +1,89 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-4 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/spreadsheet/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<br/>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open_multipart() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Value">Value </label>
<input size='50' type='file' id='form_value' name='value' class="csv_file_style">
</div>
<br>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+83
View File
@@ -0,0 +1,83 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-4 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/spreadsheet/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<br/>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+77
View File
@@ -0,0 +1,77 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-2 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/spreadsheet/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<form id="Spreadsheet_update">
<div class="pull-right">
<input type="submit" class="btn btn-primary ext-white mb-2" value="Save">
</div>
<div class="clear"></div>
<input type="hidden" id="spreadsheet_id" value="<?php echo $this->_data['view_model']->get_id();?>">
<div class="card" style="height: 1000px;width: 100%;">
<div class="card-body" >
<input type="hidden" value= '<?php echo $this->_data['view_model']->get_value(); ?>' id='value_data'>
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;">
</div>
</div>
</div>
</form>
</div>
</div>
<script>
jQuery(document).ready(function () {
var data_value = document.getElementById('value_data');
var options = {
title :'Spreadsheet',
data : JSON.parse(data_value.value),
myFolderUrl : '/admin/spreadsheet/0'
};
luckysheet.create(options);
});
</script>
+307
View File
@@ -0,0 +1,307 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="suggestion_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/suggestion/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Email">Email </label>
<input type="text" class="form-control" id="email" name="email" value="<?php echo $this->_data['view_model']->get_email();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Suggestion Type">Suggestion Type </label>
<select name="suggestion_type" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->suggestion_type_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_suggestion_type() == $key && $view_model->get_suggestion_type() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Message">Message </label>
<input type="text" id='additional_notes' name='additional_notes' class='form-control' value="<?php echo $this->_data['view_model']->get_additional_notes();?>">
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Created At">Created At </label>
<input type="date" class="form-control" id="created_at" name="created_at" value="<?php echo $this->_data['view_model']->get_created_at();?>"/>
</div>
</div>
<!-- <div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div> -->
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger " href="/admin/suggestion/delete/'.$data->id.'">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>{$data->email}</td>";
echo "<td>" . ucfirst($view_model->suggestion_type_mapping()[$data->suggestion_type]) ."</td>";
echo "<td>{$data->additional_notes}</td>";
echo "<td>{$data->created_at}</td>";
// echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/suggestion/delete/',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+31
View File
@@ -0,0 +1,31 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/suggestion/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
</div>
</div>
</div>
</div>
+217
View File
@@ -0,0 +1,217 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif;
?>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/tax/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-4"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/tax/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/tax/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->tax}</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>#tab-content{padding:0px !important;margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/tax/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+68
View File
@@ -0,0 +1,68 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/tax/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/tax/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+40
View File
@@ -0,0 +1,40 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/tax/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
</div>
</div>
</div>
</div>
+358
View File
@@ -0,0 +1,358 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="test_image_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/test_image/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Created At">Created At </label>
<input type="date" class="form-control" id="created_at" name="created_at" value="<?php echo $this->_data['view_model']->get_created_at();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/test_image/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/test_image/edit/' . $data->id . '">Edit</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>" . date('F d Y', strtotime($data->created_at)) . "</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/test_image/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/test_image/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+68
View File
@@ -0,0 +1,68 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/test_image/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+67
View File
@@ -0,0 +1,67 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/test_image/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+275
View File
@@ -0,0 +1,275 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="textbook_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/textbook/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Name">Name </label>
<input type="text" class="form-control" id="name" name="name" value="<?php echo $this->_data['view_model']->get_name();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/textbook/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/textbook/edit/' . $data->id . '">Edit</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>{$data->name}</td>";
echo "<td>{$data->isbn}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/textbook/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+84
View File
@@ -0,0 +1,84 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/textbook/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="ISBN">ISBN </label>
<input type="text" class="form-control data-input" id="form_isbn" name="isbn" value="<?php echo set_value('isbn'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+83
View File
@@ -0,0 +1,83 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/textbook/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Name">Name <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_name" name="name" value="<?php echo set_value('name', $this->_data['view_model']->get_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="ISBN">ISBN </label>
<input type="text" class="form-control data-input" id="form_isbn" name="isbn" value="<?php echo set_value('isbn', $this->_data['view_model']->get_isbn());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+278
View File
@@ -0,0 +1,278 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="ticket_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
Dispute Search
</h5>
<?= form_open('/admin/ticket/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order ID">Order ID </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Reason">Reason </label>
<input type="text" id='message' name='message' class='form-control' value="<?php echo $this->_data['view_model']->get_message();?>">
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
Dispute
<span class=""></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td>{$data->order_id}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->message}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '<td style=\'max-width: 100px;\'>';
if($data->status==0){
echo '<a class="btn-link link-underline text-underline text-danger " href="/admin/ticket/resolve/'.$data->id.'" >Resolve</a>';
}
echo '</td>';
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/ticket/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+439
View File
@@ -0,0 +1,439 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="transaction_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/transaction/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Payment Method">Payment Method </label>
<select name="payment_method" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->payment_method_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_payment_method() == $key && $view_model->get_payment_method() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Order ID">Order ID </label>
<input type="text" class="form-control" id="order_id" name="order_id" value="<?php echo $this->_data['view_model']->get_order_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Transaction Date">Transaction Date </label>
<input type="date" class="form-control" id="transaction_date" name="transaction_date" value="<?php echo $this->_data['view_model']->get_transaction_date();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Transaction Time">Transaction Time </label>
<input type="text" class="form-control" id="transaction_time" name="transaction_time" value="<?php echo $this->_data['view_model']->get_transaction_time();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="User ID">User ID </label>
<input type="text" class="form-control" id="user_id" name="user_id" value="<?php echo $this->_data['view_model']->get_user_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Tax">Tax </label>
<input type="text" class="form-control" id="tax" name="tax" value="<?php echo $this->_data['view_model']->get_tax();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Discount">Discount </label>
<input type="text" class="form-control" id="discount" name="discount" value="<?php echo $this->_data['view_model']->get_discount();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Subtotal">Subtotal </label>
<input type="text" class="form-control" id="subtotal" name="subtotal" value="<?php echo $this->_data['view_model']->get_subtotal();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Total">Total </label>
<input type="text" class="form-control" id="total" name="total" value="<?php echo $this->_data['view_model']->get_total();?>"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Status">Status </label>
<select name="status" class="form-control">
<option value="">All</option>
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/transaction/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<form id="bulk_delete_form" class="col">
<div class="col-xl-12 col-lg-6 col-md-6 col-sm-12 col-12 row">
<div class="form-group col-md-4" style="margin-left: -15px;">
<select id="bulk_option" class="form-control" style="font-size: 14px;">
<option value="">Bulk Actions</option>
<option value="1">Delete</option>
</select>
</div>
<div class="col-md-3" style="margin-left: -18px;">
<input type="submit" name="submit" class="btn btn-primary btn-lg" value="Apply" style="border-radius: 0.25rem;padding: 8px;font-size: 13px;">
</div>
</div>
</form>
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<th scope="col" class="paragraphText text-left"><input type="checkbox" id="page_no" name="page_no" value="<?php echo $this->_data['view_model']->get_page(); ?>" ></th>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo "<td><input type='checkbox' class='row_item_checkbbox' id='sn_{$i}' name='item_id' value='{$data->id}' ></td>";
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/transaction/edit/' . $data->id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/transaction/view/' . $data->id . '">View</a>';
echo ' <a data-id="'.$data->id.'" class="btn-link link-underline text-underline text-danger remove_link" href="#">Remove</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td>" . ucfirst($view_model->payment_method_mapping()[$data->payment_method]) ."</td>";
echo "<td>{$data->order_id}</td>";
echo "<td>" . date('F d Y', strtotime($data->transaction_date)) . "</td>";
echo "<td>{$data->transaction_time}</td>";
echo "<td>{$data->user_id}</td>";
echo "<td>{$data->tax}</td>";
echo "<td>{$data->discount}</td>";
echo "<td>{$data->subtotal}</td>";
echo "<td>{$data->total}</td>";
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/transaction/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
<script type="text/javascript">
jQuery("#page_no").change(function()
{
checked = jQuery("#page_no").is(":checked");
setCheckboxes(checked);
});
function setCheckboxes(checked)
{
per_page = jQuery("#per_page").val();
if(checked)
{
page_no = jQuery("#page_no").val();
// alert(page_no);
if(page_no == "")
{
page_no = 0;
}
page_no = parseInt(page_no);
page_limit = page_no + per_page;
for(i=page_no+1; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", true);
}
}else{
page_no = jQuery("#page_no").val();
if(page_no == "")
{
page_no = 0;
}
page_limit = page_no + per_page;
for(i=page_no; i<= page_limit; i++)
{
jQuery("#sn_"+i).prop("checked", false);
}
}
}
jQuery("#bulk_delete_form").submit(function(e)
{
e.preventDefault();
bulk_option = jQuery("#bulk_option").val();
if(bulk_option == "1")
{
deleteChecked()
}
else
{
alert("Please select delete option."); return false;
}
})
function deleteChecked() {
var bulk_items = [];
$.each($("input[name='item_id']:checked"), function(){
bulk_items.push($(this).val());
});
if(bulk_items == ""){
alert("Check at least one data."); return false;
}
var x = confirm("Are you sure you want to delete?");
if (x)
{
$.ajax({
url: "/v1/api/admin/transaction/bulk_delete",
type: "post",
data: { bulk_items: bulk_items },
success: function (result) {
location.reload();
alert("Checked Items Deleted Successfully!");
},
error: function (err) {
alert("error");
}
});
}
else
{
return false;
}
}
</script>
+116
View File
@@ -0,0 +1,116 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/transaction/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Payment Method">Payment Method <b class="required_field"> * </b></label>
<select id="form_payment_method" name="payment_method" class="form-control data-input">
<?php foreach ($view_model->payment_method_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Transaction Date">Transaction Date </label>
<input type="date" class="form-control data-input" id="form_transaction_date" name="transaction_date" value="<?php echo set_value('transaction_date'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Transaction Time">Transaction Time <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_transaction_time" name="transaction_time" value="<?php echo set_value('transaction_time'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="User ID">User ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id'); ?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Tax">Tax <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_tax" name="tax" value="<?php echo set_value('tax'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Discount">Discount <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_discount" name="discount" value="<?php echo set_value('discount'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Subtotal">Subtotal <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_subtotal" name="subtotal" value="<?php echo set_value('subtotal'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Total">Total <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_total" name="total" value="<?php echo set_value('total'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
</div>
+115
View File
@@ -0,0 +1,115 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start">
<!-- <li class="breadcrumb-item active" aria-current="page">
<a href="/admin/dashboard" class="breadcrumb-link">Dashboard</a>
</li> -->
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/transaction/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<?php if (validation_errors()) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="Payment Method">Payment Method <b class="required_field"> * </b></label>
<select id="form_payment_method" name="payment_method" class="form-control data-input">
<?php foreach ($view_model->payment_method_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_payment_method() == $key && $view_model->get_payment_method() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Order ID">Order ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_order_id" name="order_id" value="<?php echo set_value('order_id', $this->_data['view_model']->get_order_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Transaction Date">Transaction Date </label>
<input type="date" class="form-control data-input" id="form_transaction_date" name="transaction_date" value="<?php echo set_value('transaction_date', $this->_data['view_model']->get_transaction_date());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Transaction Time">Transaction Time <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_transaction_time" name="transaction_time" value="<?php echo set_value('transaction_time', $this->_data['view_model']->get_transaction_time());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="User ID">User ID <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_user_id" name="user_id" value="<?php echo set_value('user_id', $this->_data['view_model']->get_user_id());?>" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || (event.charCode == 45)"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Tax">Tax <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_tax" name="tax" value="<?php echo set_value('tax', $this->_data['view_model']->get_tax());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Discount">Discount <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_discount" name="discount" value="<?php echo set_value('discount', $this->_data['view_model']->get_discount());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Subtotal">Subtotal <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_subtotal" name="subtotal" value="<?php echo set_value('subtotal', $this->_data['view_model']->get_subtotal());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Total">Total <b class="required_field"> * </b></label>
<input type="text" class="form-control data-input" id="form_total" name="total" value="<?php echo set_value('total', $this->_data['view_model']->get_total());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Status">Status <b class="required_field"> * </b></label>
<select id="form_status" name="status" class="form-control data-input">
<?php foreach ($view_model->status_mapping() as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+130
View File
@@ -0,0 +1,130 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/transaction/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Payment Method
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->payment_method_mapping()[$view_model->get_payment_method()];?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Order ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_order_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Transaction Date
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_transaction_date();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Transaction Time
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_transaction_time();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
User ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_user_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Tax
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_tax();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Discount
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_discount();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Subtotal
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_subtotal();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Total
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_total();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Status
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->status_mapping()[$view_model->get_status()];?>
</div>
</div>
</div>
</div>
</div>
</div>
+264
View File
@@ -0,0 +1,264 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2020*/
?>
<div class="tab-content mx-4" id="nav-tabContent">
<br>
<div class="clear"></div>
<?php if (strlen($error) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
</div>
<?php endif; ?>
<section>
<div class="row filter-section">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card" id="user_filter_listing">
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Search
</h5>
<?= form_open('/admin/users/0', ['method' => 'get']) ?>
<div class="row">
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="ID">ID </label>
<input type="text" class="form-control" id="id" name="id" value="<?php echo $this->_data['view_model']->get_id();?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57"/>
</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<label for="Email">Email </label>
<input type="text" class="form-control" id="email" name="email" value="<?php echo $this->_data['view_model']->get_email();?>"/>
</div>
</div>
<input type="hidden" name="order_by" value="<?php echo $view_model->get_order_by();?>"/>
<input type="hidden" name="direction" value="<?php echo $view_model->get_sort();?>"/>
<div style="width:100%;height:10px;display:block;float:none;"></div>
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
<div class="form-group">
<input type="hidden" id="form_per_page" value="<?php echo $this->_data['view_model']->get_per_page() ?>" name="per_page_sort">
<input type="submit" name="submit" class="btn btn-primary" value="Search">
<a class="btn btn-danger" name="submit" type="button" href="<?php echo $view_model->get_sort_base_url().'?order_by=id&direction=DESC&per_page_sort='.$this->_data['view_model']->get_per_page(); ?>">Clear Search</a>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</section>
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
<?php echo $view_model->get_heading();?>
<span class="add-part d-flex justify-content-md-end text-white "><a class="btn btn-primary btn-sm" target="__blank" href="/admin/users/add"><i class="fas fa-plus-circle"></i></a></span>
</h5>
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style="height:auto;">
<div class="table-responsive">
<div class="row">
<div class="col p-2">
<div class="float-right mr-1"></div>
</div>
<div class="clearfix"></div>
</div>
<input type="hidden" id="per_page" value="<?php echo $this->_data['view_model']->get_per_page(); ?>" >
<div class="row">
<div class="col-sm-12 col-md-6">
<div class="dataTables_length" id="config-table_length">
<small class="d-flex align-items-baseline">Show
<select data-sorturl="<?php echo $view_model->get_sort_base_url(); ?>" id="change_per_page" name="config-table_length" aria-controls="config-table" class="form-control form-control-sm mx-2" style="width: auto;margin-bottom: 10px;">
<?php if(isset($_GET['per_page_sort'])) { ?>
<option value="10" <?php echo ($_GET['per_page_sort'] == '5' && $_GET['per_page_sort']) ? 'selected' : '';?>>5</option>
<option value="10" <?php echo ($_GET['per_page_sort'] == '10' && $_GET['per_page_sort']) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($_GET['per_page_sort'] == '25' && $_GET['per_page_sort']) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($_GET['per_page_sort'] == '50' && $_GET['per_page_sort']) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($_GET['per_page_sort'] == '100' && $_GET['per_page_sort']) ? 'selected' : '';?>>100</option>
<?php } else { ?>
<option value="10" <?php echo ($this->_data['view_model']->get_per_page() == '10' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>10</option>
<option value="25" <?php echo ($this->_data['view_model']->get_per_page() == '25' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>25</option>
<option value="50" <?php echo ($this->_data['view_model']->get_per_page() == '50' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>50</option>
<option value="100" <?php echo ($this->_data['view_model']->get_per_page() == '100' && $this->_data['view_model']->get_per_page()) ? 'selected' : '';?>>100</option>
<?php } ?>
</select>
entries</small>
</div>
</div>
</div>
<table class="display nowrap table table-hover table-striped table-bordered w-100 table-compact mb-0 mkd-table-container">
<thead class=''>
<?php
$order_by = $view_model->get_order_by();
$direction = $view_model->get_sort();
$model_base_url = $view_model->get_sort_base_url();
$field_column = $view_model->get_field_column();
$clean_mode = $view_model->get_format_layout();
$query_string = $view_model->get_query_parameter();
$per_page = $this->_data['view_model']->get_per_page();
$format_mode = '';
if ($clean_mode) {
$format_mode = '&layout_clean_mode=1';
}
foreach ($view_model->get_column() as $key => $data) {
$data_field = $field_column[$key];
if (strlen($order_by) < 1 || $data_field == '')
{
echo "<th scope='col' class='paragraphText text-center'>{$data}</th>";
}
else
{
if ($order_by === $data_field)
{
if ($direction == 'ASC')
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-asc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=DESC{$query_string}'>{$data}</a></th>";
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort sort-desc'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
else
{
echo "<th scope='col' class='paragraphText text-center theme-sort'><a href='{$model_base_url}?order_by={$data_field}{$format_mode}&direction=ASC{$query_string}'>{$data}</a></th>";
}
}
} ?>
</thead>
<tbody class="tbody-light">
<?php $i=1; foreach ($view_model->get_list() as $data) { ?>
<?php
echo '<tr>';
echo '<td style=\'max-width: 100px;\'>';
echo '<a class="btn-link link-underline text-underline" target="__blank" href="/admin/users/edit/' . $data->a_id . '">Edit</a>';
echo ' <a class="btn-link link-underline text-underline" target="__blank" href="/admin/users/view/' . $data->a_id . '">View</a>';
echo '</td>'; echo "<td>{$data->id}</td>";
echo "<td><div class='mkd-image-container'><img class='img-fluid modal-image' src='$data->image' onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/></div></td>";
echo'<td>' . $data->email . "<br/>" . $data->first_name . "<br/>" . $data->last_name . "<br/>" . $data->phone . "<br/>" . '</td>';
echo "<td>" . ucfirst($view_model->status_mapping()[$data->status]) ."</td>";
echo '</tr>';
?>
<?php $i++; } ?>
</tbody>
</table>
<small><?php echo $view_model->get_total_rows();?> results found</small>
<span class="pagination_custom">
<?php echo $view_model->get_links(); ?>
</span>
</div>
</section>
</div>
<?php
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
echo '<style>.filter-section {display: none !important;}</style>';
echo '<style>#tab-content{padding:0px !important; margin:0px !important;}</style>';
}
?>
<!-- delete modal -->
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Delete <?php echo $view_model->get_heading();?></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Are you sure you want to delete?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary text-white close_btn" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger delete_confirm_btn">Confirm</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script>
$(document).ready(function() {
$(".remove_link").click(function(e) {
// console.log('remove btn clicked');
e.preventDefault();
$('#deleteModal').modal('show');
var id = e.currentTarget.getAttribute('data-id');
if (id != 0 || id != '') {
$(".delete_confirm_btn").click(function(e) {
e.preventDefault();
$('.delete_confirm_btn').prop('disabled',true);
$('.close_btn').prop('disabled',true);
// toastr.info(id);
// return false;
$.ajax({
url: '/v1/api/admin/user/delete',
type: "POST",
data: { id: id },
dataType: 'JSON',
success: function (response) {
if (response.success) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.success(response.msg);
}
if (response.error) {
toastr.options.timeOut = 1500;
toastr.options.fadeOut = 1500;
toastr.options.onHidden = function() {
location.reload();
}
toastr.error(response.msg);
}
},
});
return false;
});
} else {
toastr.error('Data not found.');
return false;
}
});
});
</script>
+97
View File
@@ -0,0 +1,97 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-4 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/users/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Add
</li>
</ol>
</div>
<div class="row">
<?php if (validation_errors()) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left">
Add <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Email">Email</label>
<input type="email" class="form-control data-input" id="form_first_name" name="email" value="<?php echo set_value('email'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Email">Password</label>
<input type="password" class="form-control data-input" id="form_first_name" name="password" />
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="First Name">First Name </label>
<input type="text" class="form-control data-input" id="form_first_name" name="first_name" value="<?php echo set_value('first_name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Last Name">Last Name </label>
<input type="text" class="form-control data-input" id="form_last_name" name="last_name" value="<?php echo set_value('last_name'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 ">
<label for="Phone #">Phone # </label>
<input type="text" class="form-control data-input" id="form_phone" name="phone" value="<?php echo set_value('phone'); ?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Image">Image </label>
<img id="output_image" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<div class="btn btn-info btn-sm image_id_uppload_library uppload-button" data-image-url="image" data-image-id="image_id" data-image-preview="output_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class="btn btn-success" onclick="show_image_gallery('image', 'image_id')">Gallery</div>
<input type="hidden" id="image" name="image" value="<?php echo set_value('image'); ?>"/>
<input type="hidden" id="image_id" name="image_id" value="<?php echo set_value('image_id'); ?>"/>
<span id="image_complete" style="display: block;"></span>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Image">Role </label>
<select id="form_mobile_support" name="role_id" class="form-control data-input">
<?php foreach ($this->_data['view_data']['roles'] as $key => $value) {
echo "<option value='{$key}'> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary text-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+109
View File
@@ -0,0 +1,109 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-4 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/users/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
Edit
</li>
</ol>
</div>
<div class="row">
<?php if (validation_errors()) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?= validation_errors() ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($error) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<?php echo $error; ?>
</div>
</div>
<?php endif; ?>
<?php if (strlen($success) > 0) : ?>
<div class="col-md-12">
<div class="alert alert-success" role="success">
<?php echo $success; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card">
<div class="card-body">
<h5 class="primaryHeading2 mb-4 text-md-left">
Edit <?php echo $view_model->get_heading();?>
</h5>
<?= form_open() ?>
<div class="form-group col-md-5 col-sm-12">
<label for="First Name">Email </label>
<input type="email" class="form-control data-input" id="form_first_name" name="email" value="<?php echo set_value('email', $this->_data['view_model']->get_email());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Phone #">Password</label>
<input type="password" class="form-control data-input" id="password" name="password" />
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="First Name">First Name </label>
<input type="text" class="form-control data-input" id="form_first_name" name="first_name" value="<?php echo set_value('first_name', $this->_data['view_model']->get_first_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Last Name">Last Name </label>
<input type="text" class="form-control data-input" id="form_last_name" name="last_name" value="<?php echo set_value('last_name', $this->_data['view_model']->get_last_name());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Phone #">Phone # </label>
<input type="text" class="form-control data-input" id="form_phone" name="phone" value="<?php echo set_value('phone', $this->_data['view_model']->get_phone());?>"/>
</div>
<div class="form-group col-md-5 col-sm-12 mb-4">
<label for="Image">Image </label>
<img class='edit-preview-image d-block' style="max-width:150px;" id="output_image" src="<?php echo set_value('image', $this->_data['view_model']->get_image());?>" onerror=\"if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg';\"/>
<br/><div class="btn btn-info btn-sm image_id_uppload_library uppload-button" data-image-url="image" data-image-id="image_id" data-image-preview="output_image" data-view-width="250" data-view-height="250" data-boundary-width="500" data-boundary-height="500">Choose Image</div>
<div class="btn btn-success" onclick="show_image_gallery('image', 'image_id')">Gallery</div>
<input type="hidden" id="image" name="image" value="<?php echo set_value('image', $this->_data['view_model']->get_image());?>"/>
<input type="hidden" id="image_id" name="image_id" value="<?php echo set_value('image_id', $this->_data['view_model']->get_image_id());?>"/>
<span id="image_complete" style="display: block;"></span>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Image">Role </label>
<select id="form_mobile_support" name="role_id" class="form-control data-input">
<?php foreach ($this->_data['view_data']['roles'] as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_role_id() == $key && $view_model->get_role_id() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<label for="Image">Status </label>
<select id="form_mobile_support" name="status" class="form-control data-input">
<?php foreach ($this->_data['view_data']['status'] as $key => $value) {
echo "<option value='{$key}' " . (($view_model->get_status() == $key && $view_model->get_status() != '') ? 'selected' : '') . "> {$value} </option>";
}?>
</select>
</div>
<div class="form-group col-md-5 col-sm-12">
<input type="submit" class="btn btn-primary ext-white mr-4 my-4" value="Submit">
</div>
</form>
</div>
</div>
</div>
</div>
+85
View File
@@ -0,0 +1,85 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*Powered By: Manaknightdigital Inc. https://manaknightdigital.com/ Year: 2021*/
if ($layout_clean_mode) {
echo '<style>#content{padding:0px !important;}</style>';
}
?>
<div class="tab-content mx-4 mt-3" id="nav-tabContent">
<!-- Bread Crumb -->
<div aria-label="breadcrumb">
<ol class="breadcrumb pl-0 mb-1 bg-background d-flex justify-content-center justify-content-md-start" style="background-color: inherit;">
<li class="breadcrumb-item active" aria-current="page">
<a href="/admin/users/0" class="breadcrumb-link"><?php echo $view_model->get_heading();?></a>
</li>
<li class="breadcrumb-item active" aria-current="page">
View
</li>
</ol>
</div>
<div class="row mb-5">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
<div class="card pb-5" style='border-bottom:1px solid #ccc;'>
<div class="card-body">
<h5 class="primaryHeading2 text-md-left">
<?php echo $view_model->get_heading();?> Details
</h5>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
ID
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_id();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
First Name
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_first_name();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Last Name
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_last_name();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Email
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_email();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Phone
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->get_phone();?>
</div>
</div>
<div class='row mb-4'>
<div class='col-lg-3 col-12'>
Role
</div>
<div class='col-lg-9 col-12'>
<?php echo $view_model->role_id_mapping()[$view_model->get_role_id()];?>
</div>
</div>
</div>
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More