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