Field Vaildations fixes : ps
This commit is contained in:
parent
aa93c57e30
commit
38b65866fe
@ -42,7 +42,8 @@ $routes->get('dashboard/', 'Home::index');
|
|||||||
# Users Routes
|
# Users Routes
|
||||||
$routes->get("user_list/", "Users::index");
|
$routes->get("user_list/", "Users::index");
|
||||||
$routes->get("user_page/(:any)", "Users::user_page/$1");
|
$routes->get("user_page/(:any)", "Users::user_page/$1");
|
||||||
$routes->post("user_synchronization", "Users::user_synchronization");
|
$routes->post("insert_users", "Users::insert_users");
|
||||||
|
$routes->get("delete_user/(:any)", "Users::delete_user/$1");
|
||||||
|
|
||||||
# Books Routes
|
# Books Routes
|
||||||
$routes->get("book_list/", "Books::index");
|
$routes->get("book_list/", "Books::index");
|
||||||
@ -54,6 +55,7 @@ $routes->get("delete_books/(:any)", "Books::delete_books/$1");
|
|||||||
$routes->get("sitesetting_list/", "Settings::index");
|
$routes->get("sitesetting_list/", "Settings::index");
|
||||||
$routes->get("sitesetting_page/(:any)", "Settings::sitesetting_page/$1");
|
$routes->get("sitesetting_page/(:any)", "Settings::sitesetting_page/$1");
|
||||||
$routes->post("sitesetting_synchronization", "Settings::sitesetting_synchronization");
|
$routes->post("sitesetting_synchronization", "Settings::sitesetting_synchronization");
|
||||||
|
$routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
|
||||||
|
|
||||||
# Business Routes
|
# Business Routes
|
||||||
$routes->get("business_list/", "Business::index");
|
$routes->get("business_list/", "Business::index");
|
||||||
@ -61,18 +63,19 @@ $routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1");
|
|||||||
$routes->post("insert_business/", "Business::insert_business");
|
$routes->post("insert_business/", "Business::insert_business");
|
||||||
$routes->get("delete_business/(:any)", "Business::delete_business/$1");
|
$routes->get("delete_business/(:any)", "Business::delete_business/$1");
|
||||||
|
|
||||||
#custome routes
|
# Custome Routes
|
||||||
$routes->get("customer_list/", "Customer::index");
|
$routes->get("customer_list/", "Customer::index");
|
||||||
$routes->get("new_customer/(:any)", "Customer::new_customer/$1");
|
$routes->get("new_customer/(:any)", "Customer::new_customer/$1");
|
||||||
$routes->post("insert_customer/", "Customer::insert_customer");
|
$routes->post("insert_customer", "Customer::insert_customer");
|
||||||
$routes->get("delete_customer/(:any)", "Customer::delete_customer/$1");
|
$routes->get("delete_customer/(:any)", "Customer::delete_customer/$1");
|
||||||
#scheme routes
|
|
||||||
|
# Scheme Routes
|
||||||
$routes->get("scheme_list/", "Scheme::index");
|
$routes->get("scheme_list/", "Scheme::index");
|
||||||
$routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1");
|
$routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1");
|
||||||
$routes->post("insert_scheme/", "Scheme::insert_scheme");
|
$routes->post("insert_scheme/", "Scheme::insert_scheme");
|
||||||
$routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1");
|
$routes->get("delete_scheme/(:any)", "Scheme::delete_scheme/$1");
|
||||||
|
|
||||||
# Api integration
|
# Api integration Routes
|
||||||
$routes->get("apiintegration", "Home::apiintegration");
|
$routes->get("apiintegration", "Home::apiintegration");
|
||||||
/*
|
/*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
|
|||||||
@ -4,8 +4,10 @@ namespace App\Controllers;
|
|||||||
|
|
||||||
use App\Models\BooksModel;
|
use App\Models\BooksModel;
|
||||||
|
|
||||||
|
|
||||||
class Books extends BaseController
|
class Books extends BaseController
|
||||||
{
|
{
|
||||||
|
## For Book Listing
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -15,9 +17,8 @@ class Books extends BaseController
|
|||||||
|
|
||||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||||
$where = ['books.business_id' => $session_bid, 'books.isactive' => 1];
|
$where = ['books.business_id' => $session_bid, 'books.isactive' => 1];
|
||||||
}else{
|
} else {
|
||||||
$where = ['books.isactive !=' => NULL];
|
$where = ['books.isactive !=' => NULL];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$model = new BooksModel();
|
$model = new BooksModel();
|
||||||
@ -32,7 +33,7 @@ class Books extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## To Load Book Add/Update page
|
## To Load Book Form (Add/Update)
|
||||||
public function book_page($id)
|
public function book_page($id)
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -42,23 +43,21 @@ class Books extends BaseController
|
|||||||
$data['details'] = [];
|
$data['details'] = [];
|
||||||
} else if ($id !== '0') {
|
} else if ($id !== '0') {
|
||||||
$data['page_name'] = 'Edit Book';
|
$data['page_name'] = 'Edit Book';
|
||||||
$model = new UsersModel();
|
$model = new BooksModel();
|
||||||
$model->setTable('users');
|
$model->setTable('books');
|
||||||
$details = $model->where(['user_id' => $id, 'isactive' => 1])->first();
|
$details = $model->where(['book_id' => $id, 'isactive' => 1])->first();
|
||||||
$data['details'] = $details;
|
$data['details'] = $details;
|
||||||
}
|
}
|
||||||
$this->render_page('user_form', $data);
|
$this->render_page('book_form', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For inserting/updating details of book
|
||||||
## To Save/Update Book Data on DB.
|
|
||||||
public function insert_books()
|
public function insert_books()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
$session_bid = get_business_id();
|
$session_bid = get_business_id();
|
||||||
|
|
||||||
// print_r($_FILES);die();
|
|
||||||
$validationRule = [
|
$validationRule = [
|
||||||
'userfile' => [
|
'userfile' => [
|
||||||
'label' => 'Image File',
|
'label' => 'Image File',
|
||||||
@ -79,7 +78,7 @@ class Books extends BaseController
|
|||||||
$img = $this->request->getFile('coverpicture');
|
$img = $this->request->getFile('coverpicture');
|
||||||
$book_id = $this->request->getPost('book_id');
|
$book_id = $this->request->getPost('book_id');
|
||||||
$business_id = $this->request->getPost('business_id');
|
$business_id = $this->request->getPost('business_id');
|
||||||
$filePath ='public/uploads/' . $this->request->getPost('coverpicture');
|
$filePath = 'public/uploads/' . $this->request->getPost('coverpicture');
|
||||||
|
|
||||||
## File Already Existing or not
|
## File Already Existing or not
|
||||||
if ($img->isValid() && !$img->hasMoved()) {
|
if ($img->isValid() && !$img->hasMoved()) {
|
||||||
@ -109,17 +108,16 @@ class Books extends BaseController
|
|||||||
'genre' => $this->request->getPost('genre'),
|
'genre' => $this->request->getPost('genre'),
|
||||||
'language' => $this->request->getPost('language'),
|
'language' => $this->request->getPost('language'),
|
||||||
'description' => $this->request->getPost('description'),
|
'description' => $this->request->getPost('description'),
|
||||||
'page_count'=> $this->request->getPost('page_count'),
|
'page_count' => $this->request->getPost('page_count'),
|
||||||
'price'=> $this->request->getPost('price'),
|
'price' => $this->request->getPost('price'),
|
||||||
'business_id'=>$business_id
|
'business_id' => $business_id
|
||||||
];
|
];
|
||||||
$book_id = $this->request->getPost('book_id'); // Get the business ID for update
|
$book_id = $this->request->getPost('book_id'); // Get the book ID for update purpose
|
||||||
|
|
||||||
if (empty($book_id)) {
|
if (empty($book_id)) {
|
||||||
// It's an insert operation
|
// It's an insert operation
|
||||||
$data['isactive'] = 1;
|
$data['isactive'] = 1;
|
||||||
$data['created_by'] = $session_uid;
|
$data['created_by'] = $session_uid;
|
||||||
//print_r($data);die;
|
|
||||||
$BooksModel->insert($data);
|
$BooksModel->insert($data);
|
||||||
} else {
|
} else {
|
||||||
// It's an update operation
|
// It's an update operation
|
||||||
@ -130,26 +128,24 @@ class Books extends BaseController
|
|||||||
}
|
}
|
||||||
return redirect()->route('book_list');
|
return redirect()->route('book_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For delete the book details (Which means inactive the details)
|
||||||
public function delete_books($id)
|
public function delete_books($id)
|
||||||
{
|
{
|
||||||
$BooksModel = new BooksModel();
|
|
||||||
|
|
||||||
// Check if the business ID exists
|
|
||||||
$existingBook = $BooksModel->find($id);
|
|
||||||
if (!$existingBook) {
|
|
||||||
// return redirect()->to(base_url('Business/index'))->with('error', 'Business not found.');
|
|
||||||
return redirect()->route('book_list');
|
|
||||||
}
|
|
||||||
|
|
||||||
helper('session');
|
helper('session');
|
||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
// Delete the business record
|
|
||||||
|
$BooksModel = new BooksModel();
|
||||||
|
|
||||||
|
$existingBook = $BooksModel->find($id);
|
||||||
|
if (!$existingBook) {
|
||||||
|
return redirect()->route('book_list');
|
||||||
|
}
|
||||||
|
|
||||||
$data['isactive'] = 0;
|
$data['isactive'] = 0;
|
||||||
$data['updated_by'] = $session_uid;
|
$data['updated_by'] = $session_uid;
|
||||||
$BooksModel->update($id, $data);
|
$BooksModel->update($id, $data);
|
||||||
//$BusinessModel->delete($id);
|
|
||||||
|
|
||||||
// return redirect()->to(base_url('Business/index'))->with('success', 'Business deleted successfully.');
|
|
||||||
return redirect()->route('book_list');
|
return redirect()->route('book_list');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,20 +12,16 @@ class Business extends BaseController
|
|||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
if (is_session_active()) {
|
if (is_session_active()) {
|
||||||
$session_role = get_user_role('user_role');
|
|
||||||
$session_bid = get_business_id('business_id');
|
|
||||||
|
|
||||||
$BusinessModel = new BusinessModel();
|
$BusinessModel = new BusinessModel();
|
||||||
$data['page_name'] = 'Buiness Listing';
|
$data['page_name'] = 'Buiness Listing';
|
||||||
$data['businesses'] = $BusinessModel->where(['isactive'=>1])->findAll();
|
$data['businesses'] = $BusinessModel->where(['isactive' => 1])->findAll();
|
||||||
$this->render_page('business_list', $data);
|
$this->render_page('business_list', $data);
|
||||||
} else {
|
} else {
|
||||||
// Session is not active or user is not logged in
|
|
||||||
return redirect()->to('login');
|
return redirect()->to('login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## For Business page load add and Update
|
## To Load Business Form (Add/Update)
|
||||||
public function new_bussiness($id)
|
public function new_bussiness($id)
|
||||||
{
|
{
|
||||||
if ($id === '0') {
|
if ($id === '0') {
|
||||||
@ -48,7 +44,6 @@ class Business extends BaseController
|
|||||||
helper('session');
|
helper('session');
|
||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
|
|
||||||
// print_r($_FILES);die();
|
|
||||||
$validationRule = [
|
$validationRule = [
|
||||||
'user' => [
|
'user' => [
|
||||||
'label' => 'Image File',
|
'label' => 'Image File',
|
||||||
@ -68,7 +63,7 @@ class Business extends BaseController
|
|||||||
}
|
}
|
||||||
$img = $this->request->getFile('bfile');
|
$img = $this->request->getFile('bfile');
|
||||||
$business_id = $this->request->getPost('business_id');
|
$business_id = $this->request->getPost('business_id');
|
||||||
$filePath ='public/uploads/' . $this->request->getPost('bfile');
|
$filePath = 'public/uploads/' . $this->request->getPost('bfile');
|
||||||
|
|
||||||
## File Already Existing or not
|
## File Already Existing or not
|
||||||
if ($img->isValid() && !$img->hasMoved()) {
|
if ($img->isValid() && !$img->hasMoved()) {
|
||||||
@ -116,26 +111,25 @@ class Business extends BaseController
|
|||||||
return redirect()->route('business_list');
|
return redirect()->route('business_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For delete the business details (Which means inactive the details)
|
||||||
public function delete_business($id)
|
public function delete_business($id)
|
||||||
{
|
{
|
||||||
|
helper('session');
|
||||||
|
$session_uid = get_logged_user_id();
|
||||||
$BusinessModel = new BusinessModel();
|
$BusinessModel = new BusinessModel();
|
||||||
|
|
||||||
// Check if the business ID exists
|
// Check if the business ID exists
|
||||||
$existingBusiness = $BusinessModel->find($id);
|
$existingBusiness = $BusinessModel->find($id);
|
||||||
if (!$existingBusiness) {
|
if (!$existingBusiness) {
|
||||||
// return redirect()->to(base_url('Business/index'))->with('error', 'Business not found.');
|
|
||||||
return redirect()->route('business_list');
|
return redirect()->route('business_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
helper('session');
|
|
||||||
$session_uid = get_logged_user_id();
|
|
||||||
// Delete the business record
|
// Delete the business record
|
||||||
$data['isactive'] = 0;
|
$data['isactive'] = 0;
|
||||||
$data['updated_by'] = $session_uid;
|
$data['updated_by'] = $session_uid;
|
||||||
$BusinessModel->update($id, $data);
|
$BusinessModel->update($id, $data);
|
||||||
//$BusinessModel->delete($id);
|
//$BusinessModel->delete($id);
|
||||||
|
|
||||||
// return redirect()->to(base_url('Business/index'))->with('success', 'Business deleted successfully.');
|
|
||||||
return redirect()->route('business_list');
|
return redirect()->route('business_list');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,8 @@ class Customer extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
## load Customer page
|
|
||||||
|
## To Load Customer Form (Add/Update)
|
||||||
public function new_customer($id)
|
public function new_customer($id)
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -50,7 +51,8 @@ class Customer extends BaseController
|
|||||||
$data['session_bid'] = $session_bid;
|
$data['session_bid'] = $session_bid;
|
||||||
$this->render_page('customer_form', $data);
|
$this->render_page('customer_form', $data);
|
||||||
}
|
}
|
||||||
## insert and updation for customer
|
|
||||||
|
## For inserting/updating details of customer
|
||||||
public function insert_customer()
|
public function insert_customer()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -94,7 +96,7 @@ class Customer extends BaseController
|
|||||||
return redirect()->route('customer_list');
|
return redirect()->route('customer_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
## delete for customer
|
## For delete the customer details (Which means inactive the details)
|
||||||
public function delete_customer($id)
|
public function delete_customer($id)
|
||||||
{
|
{
|
||||||
$CustomerModel = new CustomerModel();
|
$CustomerModel = new CustomerModel();
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use App\Models\SchemeModel;
|
|||||||
class Scheme extends BaseController
|
class Scheme extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
## For Business Listing
|
## For Scheme Listing
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -16,19 +16,22 @@ class Scheme extends BaseController
|
|||||||
$session_bid = get_business_id();
|
$session_bid = get_business_id();
|
||||||
$session_role = get_user_role();
|
$session_role = get_user_role();
|
||||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||||
$where = ['isactive'=>1,'business_id'=>(int)$session_bid];
|
$where = ['isactive' => 1, 'business_id' => (int)$session_bid];
|
||||||
}else{ $where = ['isactive != '=>NULL];}
|
} else {
|
||||||
$SchemeModel =new SchemeModel();
|
$where = ['isactive != ' => NULL];
|
||||||
|
}
|
||||||
|
$SchemeModel = new SchemeModel();
|
||||||
|
|
||||||
$data['page_name'] = 'Scheme Listing';
|
$data['page_name'] = 'Scheme Listing';
|
||||||
$data['scheme'] = $SchemeModel->where($where)->findAll();
|
$data['scheme'] = $SchemeModel->where($where)->findAll();
|
||||||
|
|
||||||
$this->render_page('scheme_list', $data);}
|
$this->render_page('scheme_list', $data);
|
||||||
else{
|
} else {
|
||||||
return redirect()->to('login');
|
return redirect()->to('login');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## To Load Scheme Form (Add/Update)
|
||||||
public function new_scheme($id)
|
public function new_scheme($id)
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
@ -49,14 +52,14 @@ class Scheme extends BaseController
|
|||||||
$this->render_page('scheme_form', $data);
|
$this->render_page('scheme_form', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For inserting/updating details of scheme
|
||||||
public function insert_scheme()
|
public function insert_scheme()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
$session_bid = get_business_id();
|
$session_bid = get_business_id();
|
||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
|
|
||||||
$SchemeModel =new SchemeModel();
|
$SchemeModel = new SchemeModel();
|
||||||
$data = [
|
$data = [
|
||||||
'scheme_name' => $this->request->getPost('sname'),
|
'scheme_name' => $this->request->getPost('sname'),
|
||||||
'description' => $this->request->getPost('sdescription'),
|
'description' => $this->request->getPost('sdescription'),
|
||||||
@ -81,6 +84,8 @@ class Scheme extends BaseController
|
|||||||
}
|
}
|
||||||
return redirect()->route('scheme_list');
|
return redirect()->route('scheme_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For delete the Scheme details (Which means inactive the details)
|
||||||
public function delete_scheme($id)
|
public function delete_scheme($id)
|
||||||
{
|
{
|
||||||
$SchemeModel = new SchemeModel();
|
$SchemeModel = new SchemeModel();
|
||||||
@ -108,5 +113,4 @@ class Scheme extends BaseController
|
|||||||
// return redirect()->to(base_url('Business/index'))->with('success', 'Business deleted successfully.');
|
// return redirect()->to(base_url('Business/index'))->with('success', 'Business deleted successfully.');
|
||||||
return redirect()->route('scheme_list');
|
return redirect()->route('scheme_list');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,6 +54,7 @@ class Users extends BaseController
|
|||||||
$data['session_bid'] = $session_bid;
|
$data['session_bid'] = $session_bid;
|
||||||
$this->render_page('user_form', $data);
|
$this->render_page('user_form', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
## For SuperAdmin Role business Dropdown displayed on Userpage.otherwise Hidden fields
|
## For SuperAdmin Role business Dropdown displayed on Userpage.otherwise Hidden fields
|
||||||
public function business_details()
|
public function business_details()
|
||||||
{
|
{
|
||||||
@ -63,8 +64,8 @@ class Users extends BaseController
|
|||||||
return $business_details;
|
return $business_details;
|
||||||
}
|
}
|
||||||
|
|
||||||
## To Save/Update User Data on DB.
|
## For inserting/updating details of user
|
||||||
public function user_synchronization()
|
public function insert_users()
|
||||||
{
|
{
|
||||||
helper('session');
|
helper('session');
|
||||||
$session_uid = get_logged_user_id();
|
$session_uid = get_logged_user_id();
|
||||||
@ -148,4 +149,24 @@ class Users extends BaseController
|
|||||||
}
|
}
|
||||||
return redirect()->route('user_list');
|
return redirect()->route('user_list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## For delete the user details (Which means inactive the details)
|
||||||
|
public function delete_user($id)
|
||||||
|
{
|
||||||
|
|
||||||
|
helper('session');
|
||||||
|
$session_uid = get_logged_user_id();
|
||||||
|
|
||||||
|
$model = new UsersModel();
|
||||||
|
|
||||||
|
$existingBook = $model->find($id);
|
||||||
|
if (!$existingBook) {
|
||||||
|
return redirect()->route('user_list');
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['isactive'] = 0;
|
||||||
|
$data['updated_by'] = $session_uid;
|
||||||
|
$model->update($id, $data);
|
||||||
|
return redirect()->route('user_list');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,28 +7,32 @@
|
|||||||
<?php if (session()->getFlashdata('success')) : ?>
|
<?php if (session()->getFlashdata('success')) : ?>
|
||||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<form method="post" enctype="multipart/form-data" action="<?= base_url() . "insert_books"; ?>">
|
<form class="needs-validation" novalidate method="post" enctype="multipart/form-data" action="<?= base_url() . "insert_books"; ?>">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="title" class="col-form-label">Book Name<span class="text-danger">*</span></label>
|
<label for="title" class="col-form-label">Book Name<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="title" name="title" value="<?= isset($details['title']) ? $details['title'] : '' ?>" placeholder="Title" required />
|
<input type="text" class="form-control" id="title" name="title" value="<?= isset($details['title']) ? $details['title'] : '' ?>" placeholder="Title" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="publisher" class="col-form-label">Book Publisher Name<span class="text-danger">*</span></label>
|
<label for="publisher" class="col-form-label">Book Publisher Name<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="publisher" name="publisher" placeholder="Book Publisher (Authors)" value="<?= isset($details['publisher']) ? $details['publisher'] : '' ?>" required />
|
<input type="text" class="form-control" id="publisher" name="publisher" placeholder="Book Publisher (Authors)" value="<?= isset($details['publisher']) ? $details['publisher'] : '' ?>" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="language" class="col-form-label">Language<span class="text-danger">*</span></label>
|
<label for="language" class="col-form-label">Language<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="language" name="language" placeholder="Language" value="<?= isset($details['language']) ? $details['language'] : '' ?>" required />
|
<input type="text" class="form-control" id="language" name="language" placeholder="Language" value="<?= isset($details['language']) ? $details['language'] : '' ?>" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="publication_date" class="col-form-label">Publication Date<span class="text-danger">*</span></label>
|
<label for="publication_date" class="col-form-label">Publication Date<span class="text-danger">*</span></label>
|
||||||
<input type="date" class="form-control" id="publication_date" name="publication_date" placeholder="Publication Date (format : DD/MM/YYYY)" required data-toggle="input-mask" data-mask-format="00/00/0000" value="<?= isset($details['publication_date']) ? $details['publication_date'] : '' ?>" />
|
<input type="date" class="form-control" id="publication_date" name="publication_date" placeholder="Publication Date (format : DD/MM/YYYY)" required data-toggle="input-mask" data-mask-format="00/00/0000" value="<?= isset($details['publication_date']) ? $details['publication_date'] : '' ?>" />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($details['cover_picture'])) { ?>
|
<?php if (!empty($details['cover_picture'])) { ?>
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
@ -54,6 +58,7 @@
|
|||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="description" class="col-form-label">Description<span class="text-danger">*</span></label>
|
<label for="description" class="col-form-label">Description<span class="text-danger">*</span></label>
|
||||||
<textarea class="form-control" id="description" name="description" placeholder="Description" rows="5" required><?= isset($details['description']) ? $details['description'] : '' ?></textarea>
|
<textarea class="form-control" id="description" name="description" placeholder="Description" rows="5" required><?= isset($details['description']) ? $details['description'] : '' ?></textarea>
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
<!-- <input type="text" class="form-control" id="description" name="description" placeholder="Description" required value="<?= isset($details['description']) ? $details['description'] : '' ?>" /> -->
|
<!-- <input type="text" class="form-control" id="description" name="description" placeholder="Description" required value="<?= isset($details['description']) ? $details['description'] : '' ?>" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -61,10 +66,12 @@
|
|||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="price" class="col-form-label">Book Price<span class="text-danger">*</span></label>
|
<label for="price" class="col-form-label">Book Price<span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control" id="price" name="price" placeholder="Book Price" required value="<?= isset($details['price']) ? $details['price'] : '' ?>" />
|
<input type="number" class="form-control" id="price" name="price" placeholder="Book Price" required value="<?= isset($details['price']) ? $details['price'] : '' ?>" />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="page_count" class="col-form-label">Page Count<span class="text-danger">*</span></label>
|
<label for="page_count" class="col-form-label">Page Count<span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control" id="page_count" name="page_count" placeholder="Page Count" required value="<?= isset($details['page_count']) ? $details['page_count'] : '' ?>" />
|
<input type="number" class="form-control" id="page_count" name="page_count" placeholder="Page Count" required value="<?= isset($details['page_count']) ? $details['page_count'] : '' ?>" />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="book_id" name="book_id" placeholder="hidden for book id" value="<?= isset($details['book_id']) ? $details['book_id'] : '' ?>" />
|
<input type="hidden" id="book_id" name="book_id" placeholder="hidden for book id" value="<?= isset($details['book_id']) ? $details['book_id'] : '' ?>" />
|
||||||
@ -83,12 +90,11 @@
|
|||||||
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect">Cancel</button>
|
<a href="<?= base_url() . "book_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div> <!-- end card-body-->
|
</div> <!-- end card-body-->
|
||||||
</div> <!-- end card-->
|
</div> <!-- end card-->
|
||||||
</div> <!-- end col-->
|
</div> <!-- end col-->
|
||||||
</div>
|
</div><!-- end row -->
|
||||||
<!-- end row -->
|
|
||||||
@ -3,17 +3,12 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="<?= base_url()."book_page/0"; ?>" class="btn btn-primary waves-effect"> <span> <i
|
<a href="<?= base_url() . "book_page/0"; ?>" class="btn btn-primary waves-effect"> <span> <i class="mdi mdi-book-plus"></i></span> Add New </a>
|
||||||
class="mdi mdi-book-plus"></i></span> Add New </a>
|
<a href="<?= base_url() . "apiintegration"; ?>" class="btn btn-primary waves-effect"> <span> <i class="mdi mdi-gesture-swipe-down"></i></span> Api integration </a>
|
||||||
<a href="<?= base_url()."apiintegration"; ?>" class="btn btn-primary waves-effect"> <span> <i
|
|
||||||
class="mdi mdi-gesture-swipe-down"></i></span> Api integration </a>
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
|
|
||||||
<!-- <table id="alternative-page-datatable" class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table id="basic-datatable" class="table dt-responsive w-100"> -->
|
<!-- <table id="basic-datatable" class="table dt-responsive w-100"> -->
|
||||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
@ -30,7 +25,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($details as $row):
|
<?php foreach ($details as $row) :
|
||||||
if ($row['isactive']) {
|
if ($row['isactive']) {
|
||||||
$class = 'badge badge-soft-success';
|
$class = 'badge badge-soft-success';
|
||||||
$message = 'Active';
|
$message = 'Active';
|
||||||
@ -38,25 +33,23 @@
|
|||||||
$class = 'badge badge-soft-danger';
|
$class = 'badge badge-soft-danger';
|
||||||
$message = 'In-Active';
|
$message = 'In-Active';
|
||||||
}
|
}
|
||||||
$edit_page_route = base_url()."book_page/".$row['book_id'];
|
$edit_page_route = base_url() . "book_page/" . $row['book_id'];
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $row['title'] ; ?></td>
|
<td><?php echo $row['title']; ?></td>
|
||||||
<td><?php echo $row['publisher'] ; ?></td>
|
<td><?php echo $row['publisher']; ?></td>
|
||||||
<td><?php echo $row['genre'] ; ?></td>
|
<td><?php echo $row['genre']; ?></td>
|
||||||
<td><?php echo $row['language'] ; ?></td>
|
<td><?php echo $row['language']; ?></td>
|
||||||
<td><?php echo date('Y', strtotime($row['publication_date'])); ?></td>
|
<td><?php echo date('Y', strtotime($row['publication_date'])); ?></td>
|
||||||
<td>₹ <span data-plugin="counterup"><?php echo $row['price'] ; ?></span></td>
|
<td>₹ <span data-plugin="counterup"><?php echo $row['price']; ?></span></td>
|
||||||
<td><?php echo $row['description'] ; ?></td>
|
<td><?php echo $row['description']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<a href="<?php echo $edit_page_route; ?>" class="edit-button"> <i
|
<a href="<?php echo $edit_page_route; ?>" class="edit-button"> <i class="ri-pencil-line"></i></a>
|
||||||
class="ri-pencil-line"></i></a>
|
<a href="<?php echo "delete_books/" . $row['book_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
<a href="<?php echo "delete_books/".$row['book_id']; ?>"
|
|
||||||
class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,20 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
</head>
|
</head>
|
||||||
<style>
|
<style>
|
||||||
/* CSS for the preview image */
|
/* CSS for the preview image */
|
||||||
.preview-image {
|
.preview-image {
|
||||||
display: block; /* Ensure the image is displayed as a block element */
|
display: block;
|
||||||
width: 120px; /* Set the desired width for passport size */
|
/* Ensure the image is displayed as a block element */
|
||||||
height: 160px; /* Set the desired height for passport size */
|
width: 120px;
|
||||||
object-fit: cover; /* Maintain the aspect ratio and fill the container */
|
/* Set the desired width for passport size */
|
||||||
margin-top: 10px; /* Add a top margin for spacing */
|
height: 160px;
|
||||||
|
/* Set the desired height for passport size */
|
||||||
|
object-fit: cover;
|
||||||
|
/* Maintain the aspect ratio and fill the container */
|
||||||
|
margin-top: 10px;
|
||||||
|
/* Add a top margin for spacing */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -25,36 +31,42 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_business">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_business">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="bname" class="col-form-label">Business Name<span class="text-danger">*</span></label>
|
<label for="bname" class="col-form-label">Business Name<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="bname" name="bname" value="<?= isset($businesses['title']) ? $businesses['title'] : '' ?>" placeholder="Business Name" required />
|
<input type="text" class="form-control" id="bname" name="bname" value="<?= isset($businesses['title']) ? $businesses['title'] : '' ?>" placeholder="Business Name" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="bmail" class="col-form-label">Email<span class="text-danger">*</span></label>
|
<label for="bmail" class="col-form-label">Email<span class="text-danger">*</span></label>
|
||||||
<input type="email" class="form-control" name="bmail" value="<?= isset($businesses['email']) ? $businesses['email'] : '' ?>" placeholder="Email" required />
|
<input type="email" class="form-control" name="bmail" value="<?= isset($businesses['email']) ? $businesses['email'] : '' ?>" placeholder="Email" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="bmobile" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
|
<label for="bmobile" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control" name="bmobile" value="<?= isset($businesses['mobile_no']) ? $businesses['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number" />
|
<input type="number" class="form-control" name="bmobile" value="<?= isset($businesses['mobile_no']) ? $businesses['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number" />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="baddress" class="col-form-label">Address<span class="text-danger">*</span></label>
|
<label for="baddress" class="col-form-label">Address<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="baddress" value="<?= isset($businesses['address']) ? $businesses['address'] : '' ?>" placeholder="Address (eg : 1234 Main St)" required />
|
<input type="text" class="form-control" name="baddress" value="<?= isset($businesses['address']) ? $businesses['address'] : '' ?>" placeholder="Address (eg : 1234 Main St)" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="bcity" class="col-form-label">City<span class="text-danger">*</span></label>
|
<label for="bcity" class="col-form-label">City<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bcity" value="<?= isset($businesses['city']) ? $businesses['city'] : '' ?>" placeholder="City" required />
|
<input type="text" class="form-control" name="bcity" value="<?= isset($businesses['city']) ? $businesses['city'] : '' ?>" placeholder="City" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
|
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bstate" value="<?= isset($businesses['state']) ? $businesses['state'] : '' ?>" placeholder="State" required />
|
<input type="text" class="form-control" name="bstate" value="<?= isset($businesses['state']) ? $businesses['state'] : '' ?>" placeholder="State" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
<!-- <select name="bstate"value="<?= isset($businesses['state']) ? $businesses['state'] : '' ?>" class="form-control" required >
|
<!-- <select name="bstate"value="<?= isset($businesses['state']) ? $businesses['state'] : '' ?>" class="form-control" required >
|
||||||
<option>Choose</option>
|
<option>Choose</option>
|
||||||
<option> 1</option>
|
<option> 1</option>
|
||||||
@ -65,12 +77,13 @@
|
|||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="bzip" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
<label for="bzip" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="bzip" value="<?= isset($businesses['postal_code']) ? $businesses['postal_code'] : '' ?>" placeholder="Postal Code (Eg: Pincode)" required />
|
<input type="text" class="form-control" name="bzip" value="<?= isset($businesses['postal_code']) ? $businesses['postal_code'] : '' ?>" placeholder="Postal Code (Eg: Pincode)" required />
|
||||||
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!empty($businesses['business_logo'])) { ?>
|
<?php if (!empty($businesses['business_logo'])) { ?>
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="bfile" class="col-form-label">Current Business Logo</label>
|
<label for="bfile" class="col-form-label">Current Business Logo</label>
|
||||||
<img src="<?= base_url('public/uploads/'. $businesses['business_logo']) ?>" alt="Business Logo" class="preview-image" />
|
<img src="<?= base_url('public/uploads/' . $businesses['business_logo']) ?>" alt="Business Logo" class="preview-image" />
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -96,7 +109,7 @@
|
|||||||
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect">Cancel</button>
|
<a href="<?= base_url() . "business_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -8,10 +8,6 @@
|
|||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<!-- <table class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table id="alternative-page-datatable" class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table id="alternative-page-datatable" class="table dt-responsive nowrap w-100"> -->
|
|
||||||
<!-- <table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"> -->
|
|
||||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -4,131 +4,104 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_customer">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_customer">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="cfname" class="col-form-label">First Name<span
|
<label for="cfname" class="col-form-label">First Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="cfname" name="cfname" value="<?= isset($customer['first_name']) ? $customer['first_name'] : '' ?>" placeholder="First Name" required />
|
||||||
<input type="text" class="form-control" id="cfname" name="cfname"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['first_name']) ? $customer['first_name'] : '' ?>"
|
|
||||||
placeholder=" Name" required />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="csname" class="col-form-label">Last Name<span
|
<label for="csname" class="col-form-label">Last Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="csname" value="<?= isset($customer['last_name']) ? $customer['last_name'] : '' ?>" placeholder="Last Name" required />
|
||||||
<input type="text" class="form-control" name="csname"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['last_name']) ? $customer['last_name'] : '' ?>"
|
|
||||||
placeholder="" required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="cmail" class="col-form-label">Email<span
|
<label for="cmail" class="col-form-label">Email<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="cmail" value="<?= isset($customer['email']) ? $customer['email'] : '' ?>" placeholder="Email" required />
|
||||||
<input type="text" class="form-control" name="cmail"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['email']) ? $customer['email'] : '' ?>" placeholder=""
|
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="cmobile" class="col-form-label">Mobile<span
|
<label for="cmobile" class="col-form-label">Mobile<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="number" class="form-control" name="cmobile" value="<?= isset($customer['mobile_no']) ? $customer['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required />
|
||||||
<input type="number" class="form-control" name="cmobile"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['mobile_no']) ? $customer['mobile_no'] : '' ?>"
|
|
||||||
placeholder="" required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="dob" class="col-form-label">D.O.B<span class="text-danger">*</span></label>
|
<label for="dob" class="col-form-label">Date Of Birth<span class="text-danger">*</span></label>
|
||||||
<input type="date" class="form-control" name="dob"
|
<input type="date" class="form-control" name="dob" value="<?= isset($customer['date_of_birth']) ? $customer['date_of_birth'] : '' ?>" placeholder="Date Of Birth" required />
|
||||||
value="<?= isset($customer['date_of_birth']) ? $customer['date_of_birth'] : '' ?>"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
placeholder="" required />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="gen" class="col-form-label">Gender<span class="text-danger">*</span></label>
|
<label for="gen" class="col-form-label">Gender<span class="text-danger">*</span></label>
|
||||||
<input type="rad" class="form-control" name="gen"
|
<input type="rad" class="form-control" name="gen" value="<?= isset($customer['gender']) ? $customer['gender'] : '' ?>" placeholder="Gender" required />
|
||||||
value="<?= isset($customer['gender']) ? $customer['gender'] : '' ?>" placeholder=""
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="caddress" class="col-form-label">Address<span
|
<label for="caddress" class="col-form-label">Address<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="address" value="<?= isset($customer['address']) ? $customer['address'] : '' ?>" placeholder="Address (eg : 1234 Main St)" required />
|
||||||
<input type="text" class="form-control" name="address"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['address']) ? $customer['address'] : '' ?>"
|
|
||||||
placeholder="1234 Main St" required />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="ccountry" class="col-form-label">Country<span
|
<label for="ccountry" class="col-form-label">Country<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="ccountry" value="<?= isset($customer['country']) ? $customer['country'] : '' ?>" placeholder="Country" required />
|
||||||
<input type="text" class="form-control" name="ccountry"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['country']) ? $customer['country'] : '' ?>"
|
|
||||||
placeholder="country" required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="ccity" class="col-form-label">City<span class="text-danger">*</span></label>
|
<label for="ccity" class="col-form-label">City<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="ccity"
|
<input type="text" class="form-control" name="ccity" value="<?= isset($customer['city']) ? $customer['city'] : '' ?>" placeholder="City" required />
|
||||||
value="<?= isset($customer['city']) ? $customer['city'] : '' ?>" placeholder="city"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="cstate" class="col-form-label">State<span
|
<label for="cstate" class="col-form-label">State<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="cstate" value="<?= isset($customer['state']) ? $customer['state'] : '' ?>" placeholder="State" required />
|
||||||
<select name="cstate" class="form-control"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($customer['state']) ? $customer['state'] : '' ?>" required>
|
|
||||||
<option>Choose</option>
|
|
||||||
<option> 1</option>
|
|
||||||
<option> 2</option>
|
|
||||||
<option> 3</option>
|
|
||||||
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="czip" class="col-form-label">Zip<span class="text-danger">*</span></label>
|
<label for="czip" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="czip"
|
<input type="text" class="form-control" name="czip" value="<?= isset($customer['postal_code']) ? $customer['postal_code'] : '' ?>" placeholder="Postal Code (PIN)" required />
|
||||||
value="<?= isset($customer['postal_code']) ? $customer['postal_code'] : '' ?>"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
placeholder="Zip" required />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="ctype" class="col-form-label">Type<span class="text-danger">*</span></label>
|
<label for="ctype" class="col-form-label">Type<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="ctype"
|
<input type="text" class="form-control" name="ctype" value="<?= isset($customer['type']) ? $customer['type'] : '' ?>" placeholder="Customer/Subscriebr" required />
|
||||||
value="<?= isset($customer['type']) ? $customer['type'] : '' ?>"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
placeholder="customer/subscriebr" required />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="cmode" class="col-form-label">Mode<span class="text-danger">*</span></label>
|
<label for="cmode" class="col-form-label">Mode<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="cmode"
|
<input type="text" class="form-control" name="cmode" value="<?= isset($customer['mode']) ? $customer['mode'] : '' ?>" placeholder="Mode (Online/Offline)" required />
|
||||||
value="<?= isset($customer['mode']) ? $customer['mode'] : '' ?>" placeholder=""
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="customer_id" name="customer_id" placeholder="hidden for book id"
|
<input type="hidden" id="customer_id" name="customer_id" placeholder="hidden for book id" value="<?= isset($customer['customer_id']) ? $customer['customer_id'] : '' ?>" />
|
||||||
value="<?= isset($customer['customer_id']) ? $customer['customer_id'] : '' ?>" />
|
|
||||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
||||||
<?php if (!empty($customer)) { ?>
|
<?php if (!empty($customer)) { ?>
|
||||||
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
||||||
<input type="checkbox" id="isactive" name="isactive" class="form-control"
|
<input type="checkbox" id="isactive" name="isactive" class="form-control" <?= isset($customer) && $customer['isactive'] == 1 ? 'checked' : '' ?>>
|
||||||
<?= isset($customer) && $customer['isactive'] == 1 ? 'checked' : '' ?>>
|
|
||||||
<label for="isactive"> Is Active</label>
|
<label for="isactive"> Is Active</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@ -140,7 +113,7 @@
|
|||||||
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect">Cancel</button>
|
<a href="<?= base_url() . "customer_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -1,29 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_customer/0" class="btn btn-primary"><i class="ri-map-pin-user-fill"></i> Add New </a>
|
<a href="new_customer/0" class="btn btn-primary"><i class="ri-map-pin-user-fill"></i> Add New </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<!-- <table class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table id="alternative-page-datatable" class="table table-borderless table-hover table-centered m-0"> -->
|
|
||||||
<!-- <table id="alternative-page-datatable" class="table dt-responsive nowrap w-100"> -->
|
|
||||||
<!-- <table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"> -->
|
|
||||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
<th>Last Name</th>
|
<th>Last Name</th>
|
||||||
<th>Mobile Number</th>
|
<th>Mobile Number</th>
|
||||||
@ -35,19 +22,14 @@
|
|||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th>Mode</th>
|
<th>Mode</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<?php foreach ($customer as $value):
|
<?php foreach ($customer as $value) :?>
|
||||||
// $edit_page_route = "new_bussiness/".$row['business_id'];
|
|
||||||
?>
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td><?= $value['first_name']; ?></td>
|
<td><?= $value['first_name']; ?></td>
|
||||||
<td><?= $value['last_name']; ?></td>
|
<td><?= $value['last_name']; ?></td>
|
||||||
<td><?= $value['mobile_no']; ?></td>
|
<td><?= $value['mobile_no']; ?></td>
|
||||||
<td><?= $value['email'] ; ?></td>
|
<td><?= $value['email']; ?></td>
|
||||||
<td><?= $value['address']; ?></td>
|
<td><?= $value['address']; ?></td>
|
||||||
<td><?= $value['country']; ?></td>
|
<td><?= $value['country']; ?></td>
|
||||||
<td><?= $value['state']; ?></td>
|
<td><?= $value['state']; ?></td>
|
||||||
@ -58,12 +40,9 @@
|
|||||||
<a href="<?= "new_customer/" . $value['customer_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
<a href="<?= "new_customer/" . $value['customer_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||||
<a href="<?= "delete_customer/" . $value['customer_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
<a href="<?= "delete_customer/" . $value['customer_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
|
|||||||
@ -4,45 +4,36 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||||
<p class="sub-header"> </p>
|
<p class="sub-header"> </p>
|
||||||
<form method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_scheme">
|
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_scheme">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="sname" class="col-form-label">Scheme Name<span
|
<label for="sname" class="col-form-label">Scheme Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="sname" name="sname" value="<?= isset($scheme['scheme_name']) ? $scheme['scheme_name'] : '' ?>" placeholder=" Name" required />
|
||||||
<input type="text" class="form-control" id="sname" name="sname"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($scheme['scheme_name']) ? $scheme['scheme_name'] : '' ?>"
|
|
||||||
placeholder=" Name" required />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="sprice" class="col-form-label">Price<span
|
<label for="sprice" class="col-form-label">Price<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="number" class="form-control" name="sprice" value="<?= isset($scheme['price']) ? $scheme['price'] : '' ?>" placeholder="Price" required />
|
||||||
<input type="text" class="form-control" name="sprice"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($scheme['price']) ? $scheme['price'] : '' ?>" placeholder=""
|
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="sduration" class="col-form-label">Duration<span
|
<label for="sduration" class="col-form-label">Duration<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" name="sduration" value="<?= isset($scheme['duration']) ? $scheme['duration'] : '' ?>" placeholder="Duration (eg: 1 Month / 3 months / 1 Year ... )" required />
|
||||||
<input type="text" class="form-control" name="sduration"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($scheme['duration']) ? $scheme['duration'] : '' ?>" placeholder=""
|
|
||||||
required />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="sdescription" class="col-form-label">Description<span
|
<label for="sdescription" class="col-form-label">Description<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<textarea class="form-control" name="sdescription" placeholder="Description" required ><?= isset($details['description']) ? $details['description'] : '' ?></textarea>
|
||||||
<input type="number" class="form-control" name="sdescription"
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
value="<?= isset($scheme['description']) ? $scheme['description'] : '' ?>"
|
|
||||||
placeholder="" required />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="scheme_id" name="scheme_id" placeholder="hidden for scheme id"
|
<input type="hidden" id="scheme_id" name="scheme_id" placeholder="hidden for scheme id" value="<?= isset($scheme['scheme_id']) ? $scheme['scheme_id'] : '' ?>" />
|
||||||
value="<?= isset($scheme['scheme_id']) ? $scheme['scheme_id'] : '' ?>" />
|
|
||||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
||||||
<?php if (!empty($scheme)) { ?>
|
<?php if (!empty($scheme)) { ?>
|
||||||
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
||||||
@ -60,7 +51,7 @@
|
|||||||
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
<button type="reset" class="btn btn-primary waves-effect mr-1">
|
||||||
Reset
|
Reset
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-secondary waves-effect">Cancel</button>
|
<a href="<?= base_url() . "scheme_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -2,51 +2,33 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="float-right">
|
<div class="float-right">
|
||||||
<a href="new_scheme/0" class="btn btn-primary"><i class="ri-currency-line"></i> Add New </a>
|
<a href="new_scheme/0" class="btn btn-primary"><i class="ri-currency-line"></i> Add New </a>
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
<br>
|
<br>
|
||||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<!-- <table class="table table-borderless table-hover table-centered m-0"> -->
|
<!-- <table id="datatable-buttons" class="table dt-responsive w-100"> -->
|
||||||
<!-- <table id="alternative-page-datatable" class="table table-borderless table-hover table-centered m-0"> -->
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<!-- <table id="alternative-page-datatable" class="table dt-responsive nowrap w-100"> -->
|
|
||||||
<!-- <table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"> -->
|
|
||||||
<table id="datatable-buttons" class="table dt-responsive w-100">
|
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Scheme Name</th>
|
<th>Scheme Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Price</th>
|
<th>Price</th>
|
||||||
<th>Duration</th>
|
<th>Duration</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<?php foreach ($scheme as $value):
|
<?php foreach ($scheme as $value) :?>
|
||||||
// $edit_page_route = "new_bussiness/".$row['business_id'];
|
|
||||||
?>
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td><?= $value['scheme_name']; ?></td>
|
<td><?= $value['scheme_name']; ?></td>
|
||||||
<td><?= $value['description']; ?></td>
|
<td><?= $value['description']; ?></td>
|
||||||
<td><?= $value['price']; ?></td>
|
<td><?= $value['price']; ?></td>
|
||||||
<td><?= $value['duration'] ; ?></td>
|
<td><?= $value['duration']; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?= "new_scheme/" . $value['scheme_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
<a href="<?= "new_scheme/" . $value['scheme_id']; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||||
<a href="<?php echo "delete_scheme/".$value['scheme_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
<a href="<?php echo "delete_scheme/" . $value['scheme_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -55,6 +37,4 @@
|
|||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
</div>
|
</div><!-- end row-->
|
||||||
|
|
||||||
<!-- end row-->
|
|
||||||
@ -6,84 +6,59 @@
|
|||||||
<!-- <?php if (session()->getFlashdata('success')) : ?>
|
<!-- <?php if (session()->getFlashdata('success')) : ?>
|
||||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||||
<?php endif; ?> -->
|
<?php endif; ?> -->
|
||||||
<form class="needs-validation" novalidate action="<?= base_url() . "user_synchronization"; ?>"
|
<form class="needs-validation" novalidate action="<?= base_url() . "insert_users"; ?>" method="post" enctype="multipart/form-data">
|
||||||
method="post" enctype="multipart/form-data">
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="user_name" class="col-form-label">User Name<span
|
<label for="user_name" class="col-form-label">User Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="user_name" name="user_name" value="<?= isset($details['user_name']) ? $details['user_name'] : '' ?>" placeholder="User Name" required />
|
||||||
<input type="text" class="form-control" id="user_name" name="user_name"
|
|
||||||
value="<?= isset($details['user_name']) ? $details['user_name'] : '' ?>"
|
|
||||||
placeholder="User Name" required />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="email" class="col-form-label">Email<span
|
<label for="email" class="col-form-label">Email<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="email" class="form-control" id="email" name="email" placeholder="Email" value="<?= isset($details['email']) ? $details['email'] : '' ?>" required />
|
||||||
<input type="email" class="form-control" id="email" name="email" placeholder="Email"
|
|
||||||
value="<?= isset($details['email']) ? $details['email'] : '' ?>" required />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<?php if (empty($details)) { ?>
|
<?php if (empty($details)) { ?>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="password" class="col-form-label">Password<span
|
<label for="password" class="col-form-label">Password<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="password" name="password" placeholder="Password" value="<?= isset($details['password']) ? $details['password'] : '' ?>" required />
|
||||||
<input type="text" class="form-control" id="password" name="password"
|
|
||||||
placeholder="Password"
|
|
||||||
value="<?= isset($details['password']) ? $details['password'] : '' ?>" required />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="first_name" class="col-form-label">First Name<span
|
<label for="first_name" class="col-form-label">First Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="first_name" name="first_name" placeholder="First Name" value="<?= isset($details['first_name']) ? $details['first_name'] : '' ?>" required />
|
||||||
<input type="text" class="form-control" id="first_name" name="first_name"
|
|
||||||
placeholder="First Name"
|
|
||||||
value="<?= isset($details['first_name']) ? $details['first_name'] : '' ?>"
|
|
||||||
required />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="last_name" class="col-form-label">Last Name<span
|
<label for="last_name" class="col-form-label">Last Name<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="last_name" name="last_name" placeholder="Last Name" value="<?= isset($details['last_name']) ? $details['last_name'] : '' ?>" required />
|
||||||
<input type="text" class="form-control" id="last_name" name="last_name"
|
|
||||||
placeholder="Last Name"
|
|
||||||
value="<?= isset($details['last_name']) ? $details['last_name'] : '' ?>" required />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="date_of_birth" class="col-form-label">Date Of Birth<span
|
<label for="date_of_birth" class="col-form-label">Date Of Birth<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="date" class="form-control" id="date_of_birth" name="date_of_birth" placeholder="Date Of birth (format : DD/MM/YYYY)" required data-toggle="input-mask" data-mask-format="00/00/0000" value="<?= isset($details['date_of_birth']) ? $details['date_of_birth'] : '' ?>" />
|
||||||
<input type="date" class="form-control" id="date_of_birth" name="date_of_birth"
|
|
||||||
placeholder="Date Of birth (format : DD/MM/YYYY)" required data-toggle="input-mask"
|
|
||||||
data-mask-format="00/00/0000"
|
|
||||||
value="<?= isset($details['date_of_birth']) ? $details['date_of_birth'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="mobile_no" class="col-form-label">Mobile Number<span
|
<label for="mobile_no" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="number" class="form-control" id="mobile_no" name="mobile_no" placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number" value="<?= isset($details['mobile_no']) ? $details['mobile_no'] : '' ?>" />
|
||||||
<input type="number" class="form-control" id="mobile_no" name="mobile_no"
|
|
||||||
placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number"
|
|
||||||
value="<?= isset($details['mobile_no']) ? $details['mobile_no'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="gender" class="col-form-label">Gender</label>
|
<label for="gender" class="col-form-label">Gender</label>
|
||||||
<input type="text" class="form-control" id="gender" name="gender" placeholder="Gender"
|
<input type="text" class="form-control" id="gender" name="gender" placeholder="Gender" value="<?= isset($details['gender']) ? $details['gender'] : '' ?>" />
|
||||||
value="<?= isset($details['gender']) ? $details['gender'] : '' ?>" />
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="role" class="col-form-label">Role<span class="text-danger">*</span></label>
|
<label for="role" class="col-form-label">Role<span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" id="role" name="role" placeholder="Role"
|
<input type="text" class="form-control" id="role" name="role" placeholder="Role" required value="<?= isset($details['role']) ? $details['role'] : '' ?>" />
|
||||||
required value="<?= isset($details['role']) ? $details['role'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -91,83 +66,63 @@
|
|||||||
<?php if (!empty($details['profile_picture'])) { ?>
|
<?php if (!empty($details['profile_picture'])) { ?>
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="profile_picture" class="col-form-label">Current Business Logo</label>
|
<label for="profile_picture" class="col-form-label">Current Business Logo</label>
|
||||||
<img src="<?= base_url('public/uploads/'. $details['profile_picture']) ?>"
|
<img src="<?= base_url('public/uploads/' . $details['profile_picture']) ?>" alt="Business Logo" class="preview-image" />
|
||||||
alt="Business Logo" class="preview-image" />
|
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="profile_picture" class="col-form-label">Profile Picture<span
|
<label for="profile_picture" class="col-form-label">Profile Picture<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
|
|
||||||
<!-- <input type="text" class="form-control" id="profile_picture" name="profile_picture" placeholder="Profile picture Name" readonly value="<?= isset($details['profile_picture']) ? $details['profile_picture'] : '' ?>" /> -->
|
<!-- <input type="text" class="form-control" id="profile_picture" name="profile_picture" placeholder="Profile picture Name" readonly value="<?= isset($details['profile_picture']) ? $details['profile_picture'] : '' ?>" /> -->
|
||||||
|
|
||||||
<input type="file" name="profile_picture" placeholder="hidden Field for profile picture"
|
<input type="file" name="profile_picture" placeholder="hidden Field for profile picture" readonly value="<?= isset($details['profile_picture']) ? $details['profile_picture'] : '' ?>" />
|
||||||
readonly
|
|
||||||
value="<?= isset($details['profile_picture']) ? $details['profile_picture'] : '' ?>" />
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="address" class="col-form-label">Address<span
|
<label for="address" class="col-form-label">Address<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="address" name="address" placeholder="Address (eg : 1234 Main St)" required value="<?= isset($details['address']) ? $details['address'] : '' ?>" />
|
||||||
<input type="text" class="form-control" id="address" name="address"
|
|
||||||
placeholder="Address (eg : 1234 Main St)" required
|
|
||||||
value="<?= isset($details['address']) ? $details['address'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="city" class="col-form-label">City<span
|
<label for="city" class="col-form-label">City<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="city" name="city" placeholder="City" required value="<?= isset($details['city']) ? $details['city'] : '' ?>" />
|
||||||
<input type="text" class="form-control" id="city" name="city" placeholder="City"
|
|
||||||
required value="<?= isset($details['city']) ? $details['city'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="state" class="col-form-label">State<span
|
<label for="state" class="col-form-label">State<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="state" name="state" placeholder="State" required value="<?= isset($details['state']) ? $details['state'] : '' ?>" />
|
||||||
<input type="text" class="form-control" id="state" name="state" placeholder="State"
|
|
||||||
required value="<?= isset($details['state']) ? $details['state'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-2">
|
<div class="form-group col-md-2">
|
||||||
<label for="postal_code" class="col-form-label">Postal Code<span
|
<label for="postal_code" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
<input type="text" class="form-control" id="postal_code" name="postal_code" placeholder="Postal Code (PIN)" required value="<?= isset($details['postal_code']) ? $details['postal_code'] : '' ?>" />
|
||||||
<input type="text" class="form-control" id="postal_code" name="postal_code"
|
|
||||||
placeholder="Postal Code (PIN)" required
|
|
||||||
value="<?= isset($details['postal_code']) ? $details['postal_code'] : '' ?>" />
|
|
||||||
<div class="invalid-feedback"> Please provide. </div>
|
<div class="invalid-feedback"> Please provide. </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if($loggedin_person_role === 'sadmin'){ ?>
|
<?php if ($loggedin_person_role === 'sadmin') { ?>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="postal_code" class="col-form-label">Buiness<span
|
<label for="postal_code" class="col-form-label">Buiness<span class="text-danger">*</span></label>
|
||||||
class="text-danger">*</span></label>
|
|
||||||
<select id="business_id" name="business_id" class="form-control">
|
<select id="business_id" name="business_id" class="form-control">
|
||||||
<option value=null>Choose your Buiness</option>
|
<option value=null>Choose your Buiness</option>
|
||||||
<?php foreach ($business_details as $value) { ?>
|
<?php foreach ($business_details as $value) { ?>
|
||||||
<option value="<?php echo $value['business_id']; ?>"
|
<option value="<?php echo $value['business_id']; ?>" <?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
||||||
<?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
|
||||||
<?php echo $value['title']; ?></option>
|
<?php echo $value['title']; ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }else{ ?>
|
<?php } else { ?>
|
||||||
<input type="hidden" id="business_id" name="business_id"
|
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= isset($details['business_id']) ? $details['business_id'] : $session_bid ?>" />
|
||||||
placeholder="hidden for business id"
|
|
||||||
value="<?= isset($details['business_id']) ? $details['business_id'] : $session_bid ?>" />
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<input type="hidden" id="user_id" name="user_id" placeholder="hidden for user id"
|
<input type="hidden" id="user_id" name="user_id" placeholder="hidden for user id" value="<?= isset($details['user_id']) ? $details['user_id'] : '' ?>" />
|
||||||
value="<?= isset($details['user_id']) ? $details['user_id'] : '' ?>" />
|
|
||||||
<?php if (!empty($details)) { ?>
|
<?php if (!empty($details)) { ?>
|
||||||
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
||||||
<input type="checkbox" id="isactive" name="isactive" class="form-control"
|
<input type="checkbox" id="isactive" name="isactive" class="form-control" <?= isset($details) && $details['isactive'] == 1 ? 'checked' : '' ?>>
|
||||||
<?= isset($details) && $details['isactive'] == 1 ? 'checked' : '' ?>>
|
|
||||||
<label for="isactive"> Is Active</label>
|
<label for="isactive"> Is Active</label>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -11,11 +11,8 @@
|
|||||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<!-- <table class="table table-borderless table-hover table-centered m-0"> -->
|
<!-- <table id="datatable-buttons" class="table dt-responsive w-100"> -->
|
||||||
<!-- <table id="alternative-page-datatable" class="table table-borderless table-hover table-centered m-0"> -->
|
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||||
<!-- <table id="alternative-page-datatable" class="table dt-responsive nowrap w-100"> -->
|
|
||||||
<!-- <table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100"> -->
|
|
||||||
<table id="datatable-buttons" class="table dt-responsive w-100">
|
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
@ -24,7 +21,6 @@
|
|||||||
<th>Mobile Number</th>
|
<th>Mobile Number</th>
|
||||||
<th>File</th>
|
<th>File</th>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
|
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -55,11 +51,8 @@
|
|||||||
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul class="list-inline table-action m-0">
|
<a href="<?= $edit_page_route; ?>" class="edit-button"><i class="ri-pencil-line"></i></a>
|
||||||
<li class="list-inline-item">
|
<a href="<?php echo "delete_user/".$row['user_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||||
<a href="<?php echo $edit_page_route; ?>" class="action-icon px-1"> <i class="ri ri-edit-box-fill"></i></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user