Discussion 25th march Done : ps
@ -94,37 +94,8 @@ define('EVENT_PRIORITY_NORMAL', 100);
|
||||
define('EVENT_PRIORITY_HIGH', 10);
|
||||
|
||||
/**
|
||||
* Constants For Api Integration.
|
||||
* Constants For BBD
|
||||
*/
|
||||
// define('VB_APIURL', 'https://vbp.venbait.in/wp-json/wc/v3/');
|
||||
define('product','books');
|
||||
define('product_column', ["book_id","wp_api_product_id"]);
|
||||
|
||||
define('product_child','book_images');
|
||||
define('product_child_column', ["book_id","wp_api_img_id","book_img_id"]);
|
||||
|
||||
define('customer','customers');
|
||||
define('customer_column', ["customer_id","wp_api_customer_id"]);
|
||||
|
||||
define('customer_child','customer_addresses');
|
||||
define('customer_child_column', ["customer_id","","customer_address_id"]);
|
||||
|
||||
define('order','invoice');
|
||||
define('order_column', ["invoice_id","wp_api_order_id","invoice_child_id"]);
|
||||
|
||||
define('order_child','invoiceitems');
|
||||
define('order_child_column', ["invoice_id","wp_api_line_items_id","customer_id"]);
|
||||
|
||||
// define('WAAI_TOKEN', '652548474f4e4');
|
||||
// define('WAAI_INSTANCE', '65254894E4A88');
|
||||
|
||||
// UAT - for testing Purpose..
|
||||
// define('WAAI_TOKEN', '65685e954bcf6');
|
||||
// define('WAAI_INSTANCE', '656863C54F90C');
|
||||
|
||||
// LIVE - Vel given.30th Nov.
|
||||
// define('WAAI_TOKEN', '6568739969f28');
|
||||
// define('WAAI_INSTANCE', '656876690A9FD');
|
||||
|
||||
define('SEND_WAAI_URL', 'https://waai.in/api/send');
|
||||
define('SEND_WAAI_GROUP_URL', 'https://waai.in/api/send_group');
|
||||
|
||||
@ -29,6 +29,7 @@ $routes->set404Override();
|
||||
|
||||
// We get a performance increase by specifying the default
|
||||
// route since we don't have to scan directories.
|
||||
// In your routes file (e.g., app/Config/Routes.php)
|
||||
|
||||
# Authentication Routes
|
||||
$routes->get('/', 'Authentication::index');
|
||||
@ -41,78 +42,56 @@ $routes->post('auth_reset_password_save/', 'Authentication::auth_reset_password_
|
||||
$routes->get('lockscreen/', 'Authentication::lockscreen');
|
||||
$routes->get('lock/', 'Authentication::lock');
|
||||
$routes->post('unlock/', 'Authentication::unlock');
|
||||
|
||||
|
||||
$routes->post('confirm_password/', 'Authentication::confirm_password');
|
||||
$routes->post('change_password', 'Authentication::change_password');
|
||||
|
||||
# Dashboard Routes
|
||||
$routes->get('dashboard/', 'Home::index');
|
||||
$routes->post("check_existing/", "Home::check_existing/");
|
||||
|
||||
# Users Routes
|
||||
$routes->get("user_list/", "Users::index");
|
||||
$routes->get("user_page/(:any)/(:any)", "Users::user_page/$1/$2");
|
||||
$routes->post("insert_users", "Users::insert_users");
|
||||
$routes->get("delete_user/(:any)", "Users::delete_user/$1");
|
||||
$routes->get("activateUser/(:any)", "Users::activateUser/$1");
|
||||
$routes->get("activate_user/(:any)", "Users::activate_user/$1");
|
||||
$routes->get('users/get_branches/(:num)', 'Users::get_branches/$1');
|
||||
|
||||
|
||||
# Causes Routes
|
||||
$routes->get("causes_list/", "Books::index");
|
||||
$routes->get("add_causes/(:any)", "Books::add_causes/$1");
|
||||
$routes->post("insert_books", "Books::insert_books");
|
||||
$routes->get("delete_books/(:any)", "Books::delete_books/$1");
|
||||
$routes->post("insert_causes", "Books::insert_causes");
|
||||
$routes->get("delete_causes/(:any)", "Books::delete_causes/$1");
|
||||
|
||||
# Site-Setting Routes
|
||||
$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");
|
||||
|
||||
# App Site-Setting Routes(SuperAdmin)
|
||||
// $routes->get("appsetting/", "AppSettings::index");
|
||||
$routes->get("appsetting_page", "AppSettings::appsetting_page");
|
||||
$routes->post("appsetting_synchronization", "AppSettings::appsetting_synchronization");
|
||||
// $routes->get("delete_sitesetting/(:any)", "Books::delete_sitesetting/$1");
|
||||
|
||||
#Routes for Organization Routes
|
||||
#Organization Routes (also known as business)
|
||||
$routes->get("org_list/", "Business::index");
|
||||
$routes->get("new_org/(:any)", "Business::new_org/$1");
|
||||
$routes->post("insert_org/", "Business::insert_org");
|
||||
$routes->get("delete_org/(:any)", "Business::delete_org/$1");
|
||||
|
||||
#Routes for Donor Routes
|
||||
#Donor Routes (also known as contributor,customer)
|
||||
$routes->get("Contributor_list/", "Customer::index");
|
||||
$routes->get("new_Donor/(:any)", "Customer::new_Donor/$1");
|
||||
$routes->get('Customer/getReceiptDetails/(:num)', 'Customer::getReceiptDetails/$1');
|
||||
// In your routes file (e.g., app/Config/Routes.php)
|
||||
|
||||
|
||||
$routes->post("insert_donor", "Customer::insert_donor");
|
||||
$routes->post("insert_ajaxdonor", "Customer::insert_ajaxdonor");
|
||||
$routes->get("delete_donor/(:any)", "Customer::delete_donor/$1");
|
||||
|
||||
#Routes for donor group (renamed as contributor group : 20/03/2024)
|
||||
#Donor group Routes (renamed as contributor group : 20/03/2024)
|
||||
$routes->get('contributor_group/', 'Customer::donor_group');
|
||||
$routes->get('view_contributor_group/(:any)', 'Customer::view_donor_group/$1');
|
||||
$routes->get('preview_contributor_group/(:any)', 'Customer::preview_donor_group/$1');
|
||||
$routes->get('delete_contributor_group/(:any)', 'Customer::delete_donor_group/$1');
|
||||
$routes->post("insert_contributor_group", "Customer::insert_donor_group");
|
||||
|
||||
|
||||
|
||||
#adres priknt
|
||||
$routes->get('addressprint/', 'Address::index');
|
||||
$routes->post('address/generatePdf', 'Address::generatePdf');
|
||||
|
||||
#Routes for campaign
|
||||
#Campaign Routes (also known as Event)
|
||||
$routes->get("campaign_list/", "Event::index");
|
||||
$routes->get("new_campaign/(:any)", "Event::new_campaign/$1");
|
||||
$routes->post("insert_event/", "Event::insert_event");
|
||||
|
||||
$routes->get('invoice_number_format/(:any)', 'Event::invoice_number_format/$1');
|
||||
$routes->post("insert_invoice_number_format", "Event::insert_invoice_number_format");
|
||||
|
||||
#Routes for Receipt Routes
|
||||
#Receipt Routes (also known as Invoice)
|
||||
$routes->get("receipt_list/", "Invoice::index");
|
||||
$routes->get("new_receipt/(:any)", "Invoice::new_receipt/$1");
|
||||
$routes->post("donor_cash_success/", "Invoice::donor_cash_success");
|
||||
@ -121,17 +100,14 @@ $routes->get("donations_accepted/", "Invoice::donations_accepted");
|
||||
$routes->post("save_donations_accepted/", "Invoice::save_donations_accepted");
|
||||
$routes->get("audit_history", "Invoice::audit_history");
|
||||
$routes->get('generate-pdf/(:num)', 'Invoice::generatePdf/$1');
|
||||
// app/config/Routes.php
|
||||
|
||||
$routes->get('Invoice/showInvoiceModal', 'Invoice::showInvoiceModal');
|
||||
|
||||
$routes->post("get_donor_details", "Invoice::get_donor_details");
|
||||
$routes->post("save_invoice/", "Invoice::save_invoice/");
|
||||
$routes->add('approve_invoice/(:num)', 'Invoice::approve_invoice/$1');
|
||||
$routes->get('generate_invoice_pdf/(:num)', 'Invoice::generate_invoice_pdf/$1');
|
||||
$routes->get('print_address/(:num)', 'Invoice::print_address/$1');
|
||||
$routes->get('print_address/(:num)', 'Invoice::print_address/$1');
|
||||
|
||||
#Report Routes
|
||||
$routes->match(['get','post'],'/general_inv_rp','Invoice::general_inv_rp');
|
||||
$routes->match(['get','post'],'/mem_inv_rp','Invoice::general_membership_inv_rp');
|
||||
$routes->match(['get','post'],'/itemwise_report','Invoice::itemwise_report');
|
||||
@ -139,7 +115,6 @@ $routes->match(['get','post'],'/itemwise_report','Invoice::itemwise_report');
|
||||
|
||||
# Notifications Routes
|
||||
// $routes->get('controller/SubExpdetail/(:num)', 'YourController::SubExpdetail/$1');
|
||||
|
||||
$routes->cli("getExpCustomerDetail/(:num)",'Notifications::getExpCustomerDetail/$1');
|
||||
$routes->get('send_whatsapp_message/', 'Notifications::send_whatsapp_message');
|
||||
$routes->post('whatsapp_custom_notifications/', 'Notifications::whatsapp_custom_notifications');
|
||||
@ -151,24 +126,12 @@ $routes->get('template_creation/', 'Notifications::template_creation');
|
||||
$routes->get('template_creation_form/(:any)', 'Notifications::template_creation_form/$1');
|
||||
$routes->get('template_creation_delete/(:any)', 'Notifications::template_creation_delete/$1');
|
||||
$routes->post("template_creation_insert", "Notifications::template_creation_insert");
|
||||
|
||||
$routes->get('campaign_creation/', 'Notifications::campaign_creation');
|
||||
$routes->get('campaign_creation_form/(:any)', 'Notifications::campaign_creation_form/$1');
|
||||
$routes->get('campaign_creation_delete/(:any)', 'Notifications::campaign_creation_delete/$1');
|
||||
$routes->post("campaign_creation_insert", "Notifications::campaign_creation_insert");
|
||||
|
||||
|
||||
|
||||
# Api integration Routes
|
||||
$routes->post('api/(:any)', 'ApiIntegration::api_integration/$1');
|
||||
|
||||
// $routes->group("api", function ($routes) {
|
||||
// // $routes->post("create_products/", "ApiIntegration::save_book_details");
|
||||
// // $routes->match(['put', 'post', 'get', 'delete'], 'products', 'ApiIntegration::book_api_integration');
|
||||
// // $routes->match(['put', 'post', 'get', 'delete'], 'customers', 'ApiIntegration::customer_api_integration');
|
||||
// // $routes->match(['put', 'post', 'get', 'delete'], 'orders', 'ApiIntegration::sales_api_integration');
|
||||
// });
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
* Additional Routing
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\CustomerModel;
|
||||
|
||||
|
||||
|
||||
class Address extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
helper('session');
|
||||
$customerModel = new CustomerModel();
|
||||
$data['page_name'] = 'Customer Listing';
|
||||
$data['donor'] = $customerModel->findAll();
|
||||
return view('address_list', $data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// public function generatePdf()
|
||||
// {
|
||||
// $customerModel = new CustomerModel();
|
||||
|
||||
// $customer_id = $this->request->getPost('customer_id');
|
||||
// $customerData = $customerModel->find($customer_id);
|
||||
|
||||
// if ($customerData) {
|
||||
|
||||
// $options->set('isHtml5ParserEnabled', true);
|
||||
// $options->set('isPhpEnabled', true);
|
||||
// $dompdf = new Dompdf($options);
|
||||
|
||||
|
||||
// $html = view('address_list', ['customerData' => $customerData]);
|
||||
|
||||
|
||||
// $dompdf->loadHtml($html);
|
||||
|
||||
|
||||
// $dompdf->setPaper('A4', 'portrait');
|
||||
|
||||
// $dompdf->render();
|
||||
|
||||
|
||||
// $dompdf->stream('customer_information.pdf', ['Attachment' => 0]);
|
||||
// } else {
|
||||
|
||||
// return redirect()->to('index');
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@ -1,151 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
use App\Models\BusinessModel;
|
||||
use App\Models\AppSettingModel;
|
||||
|
||||
class AppSettings extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
$where = ['app_settings.isactive' => 1];
|
||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||
$where = ['app_settings.business_id' => $session_bid, 'app_settings.isactive' => 1];
|
||||
}
|
||||
|
||||
$model = new AppSettingModel();
|
||||
$model->setTable('app_settings');
|
||||
$sitesetting_details = $model->where($where)->orderBy('app_setting_id', 'DESC')->findAll();
|
||||
$data['page_name'] = 'App Settings Details';
|
||||
$data['details'] = $sitesetting_details;
|
||||
$data['session_role'] = $session_role;
|
||||
$this->render_page('app_setting_list', $data);
|
||||
}
|
||||
|
||||
## To Load Settings Add/Update page
|
||||
public function appsetting_page($id)
|
||||
{
|
||||
if ($id === '0') {
|
||||
$data['page_name'] = 'Add Site Settings';
|
||||
$data['details'] = [];
|
||||
} else if ($id !== '0') {
|
||||
$data['page_name'] = 'Edit App Settings';
|
||||
$model = new AppSettingModel();
|
||||
$model->setTable('app_settings');
|
||||
$details = $model->where(['app_setting_id' => $id, 'isactive' => 1])->first();
|
||||
$data['details'] = $details;
|
||||
|
||||
}
|
||||
$data['business_details']=$this->business_details();
|
||||
$this->render_page('app_setting_form', $data);
|
||||
}
|
||||
public function business_details()
|
||||
{
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business');
|
||||
$business_details = $model->where('business_id', 0)->orderBy('business_id', 'DESC')->findAll();
|
||||
return $business_details;
|
||||
}
|
||||
|
||||
|
||||
## To Save/Update Setting Data on DB.
|
||||
public function appsetting_synchronization()
|
||||
{
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
$session_uid = get_logged_user_id();
|
||||
|
||||
|
||||
|
||||
$img = $this->request->getFile('slogo');
|
||||
$business_id = $this->request->getPost('business_id');
|
||||
$app_setting_id = $this->request->getPost('app_setting_id');
|
||||
$filePath = 'public/uploads/' . $this->request->getPost('slogo');
|
||||
$fileName = $img->getName();
|
||||
|
||||
if($fileName !== ""){
|
||||
|
||||
if ($img->isValid() && !$img->hasMoved()) {
|
||||
|
||||
$img->move(ROOTPATH . 'public/uploads', $fileName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$favicon = $this->request->getFile('favicon');
|
||||
$faviconName = $favicon->getName();
|
||||
|
||||
if($faviconName !== ""){
|
||||
|
||||
if ($favicon->isValid() && !$favicon->hasMoved()) {
|
||||
|
||||
$favicon->move(ROOTPATH . 'public/uploads', $faviconName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$AppSettingModel = new AppSettingModel();
|
||||
$data = [
|
||||
|
||||
'site_name' => $this->request->getPost('site_name'),
|
||||
'site_title' => $this->request->getPost('site_title'),
|
||||
'terms_service' => $this->request->getPost('terms_service'),
|
||||
'footer_about' => $this->request->getPost('footer_about'),
|
||||
'admin_email' => $this->request->getPost('admin_email'),
|
||||
'mobile'=> $this->request->getPost('mobile'),
|
||||
'copyright'=> $this->request->getPost('copyright'),
|
||||
'pagination_limit'=> $this->request->getPost('pagination_limit'),
|
||||
'site_info'=> $this->request->getPost('site_info'),
|
||||
'about_info'=> $this->request->getPost('about_info'),
|
||||
'mail_protocol'=> $this->request->getPost('mail_protocol'),
|
||||
'mail_title'=> $this->request->getPost('mail_title'),
|
||||
'mail_host'=> $this->request->getPost('mail_host'),
|
||||
'mail_port'=> $this->request->getPost('mail_port'),
|
||||
'mail_encryption'=> $this->request->getPost('mail_encryption'),
|
||||
'mail_username'=> $this->request->getPost('mail_username'),
|
||||
'mail_password'=> $this->request->getPost('mail_password'),
|
||||
'currency'=> $this->request->getPost('currency'),
|
||||
'country'=> $this->request->getPost('country'),
|
||||
'business_id'=> $this->request->getPost('business_id'),
|
||||
|
||||
];
|
||||
|
||||
if($fileName !== "")
|
||||
{
|
||||
$data['logo'] = $fileName;
|
||||
}
|
||||
|
||||
if($faviconName !== "")
|
||||
{
|
||||
$data['favicon'] = $faviconName;
|
||||
}
|
||||
|
||||
|
||||
$app_setting_id = $this->request->getPost('app_setting_id'); // Get the business ID for update
|
||||
|
||||
|
||||
if (empty($app_setting_id)) {
|
||||
// It's an insert operation
|
||||
$data['isactive'] = 1;
|
||||
$data['created_by'] = $session_uid;
|
||||
|
||||
$AppSettingModel->insert($data);
|
||||
// print_r($data);die;
|
||||
} else {
|
||||
// It's an update operation
|
||||
$isactive = $this->request->getPost('isactive');
|
||||
$data['isactive'] = ($isactive == 'on') ? 1 : 0;
|
||||
$data['updated_by'] = $session_uid;
|
||||
$AppSettingModel->update($app_setting_id, $data);
|
||||
}
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -338,4 +338,65 @@ class Authentication extends BaseController
|
||||
$pwd_verify = password_verify((string)$password, $user['password']);
|
||||
return $pwd_verify ;
|
||||
}
|
||||
|
||||
#change password
|
||||
public function change_password()
|
||||
{
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
if (is_session_active()) {
|
||||
$requested = $this->request->getPost();
|
||||
// $mail_id = $requested['user_mail'];
|
||||
$old_pwd = $requested['user_old_password'];
|
||||
$new_pwd = $requested['user_new_password'];
|
||||
$conf_pwd = $requested['user_confirm_password'];
|
||||
$auth_model = new AuthenticationModel();
|
||||
$user = $auth_model->where('user_id', $session_uid)->first();
|
||||
$pwd_verify = password_verify((string)$old_pwd, $user['password']);
|
||||
|
||||
if($pwd_verify){
|
||||
|
||||
if ($old_pwd === $new_pwd) {
|
||||
$response['status'] = false;
|
||||
$response['message'] = "New password should not be the same as the old password.";
|
||||
$this->logger->error($response['message']);
|
||||
return $this->response->setJSON(['data' => $response]);
|
||||
}
|
||||
if ($new_pwd !== $conf_pwd) {
|
||||
$response['status'] = false;
|
||||
$response['message'] = "New password and confirm password do not match.";
|
||||
$this->logger->error($response['message']);
|
||||
return $this->response->setJSON(['data' => $response]);
|
||||
}
|
||||
$hash_password = password_hash($new_pwd, PASSWORD_DEFAULT);
|
||||
|
||||
$user_details = $auth_model->where(['user_id'=> $session_uid, 'isactive' => 1])->first();
|
||||
// print_r($user_details);die;
|
||||
if ($user_details) {
|
||||
$update_user_details = ['user_id', $session_uid, 'password' => $hash_password];
|
||||
$auth_model->update($user_details['user_id'], $update_user_details);
|
||||
$response['status'] = true;
|
||||
$response['message'] = "Password Updated..";
|
||||
$this->logger->error($response['message']);
|
||||
}else{
|
||||
$response['status'] = false;
|
||||
$response['message'] = "Can't able to change";
|
||||
$this->logger->error($response['message']);
|
||||
}
|
||||
} else {
|
||||
$response['status'] = false;
|
||||
$response['message'] = "Old Password Wrong";
|
||||
$this->logger->error($response['message']);
|
||||
|
||||
|
||||
}
|
||||
}else {
|
||||
$response['status'] = false;
|
||||
$response['message'] = "Something Went Wrong";
|
||||
$this->logger->error($response['message']);
|
||||
|
||||
|
||||
}
|
||||
return $this->response->setJSON(['data' => $response]);
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ use App\Models\BooksModel;
|
||||
|
||||
class Books extends BaseController
|
||||
{
|
||||
## For Book Listing
|
||||
## For Causes Listing
|
||||
public function index()
|
||||
{
|
||||
helper('session');
|
||||
@ -26,16 +26,14 @@ class Books extends BaseController
|
||||
$data['cause_list'] = $model->getData('donations_accepted',null,null);
|
||||
$data['page_name'] = 'Causes List';
|
||||
$data['details'] = $model->where('causes.business_id', $session_bid)->where('causes.isactive', 1)->findAll();
|
||||
// echo '<pre>';
|
||||
// print_r($data); die;
|
||||
$this->render_page('book_list', $data);
|
||||
} else {
|
||||
// Session is not active or user is not logged in
|
||||
return redirect()->to('login');
|
||||
}
|
||||
}
|
||||
|
||||
## To Load Book Form (Add/Update)
|
||||
|
||||
## To Load Causes Form (Add/Update)
|
||||
public function add_causes($id)
|
||||
{
|
||||
helper('session');
|
||||
@ -60,8 +58,8 @@ class Books extends BaseController
|
||||
$this->render_page('book_form', $data);
|
||||
}
|
||||
|
||||
## For inserting/updating details of book
|
||||
public function insert_books()
|
||||
## For inserting/updating details of Cause
|
||||
public function insert_causes()
|
||||
{
|
||||
try{
|
||||
helper('session');
|
||||
@ -121,8 +119,8 @@ class Books extends BaseController
|
||||
return redirect()->route('causes_list');
|
||||
}
|
||||
|
||||
## For delete the book details (Which means inactive the details)
|
||||
public function delete_books($id)
|
||||
## For delete the causes details (Which means inactive the details)
|
||||
public function delete_causes($id)
|
||||
{
|
||||
try {
|
||||
helper('session');
|
||||
@ -146,5 +144,4 @@ class Books extends BaseController
|
||||
return redirect()->route('causes_list');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ class Business extends BaseController
|
||||
}
|
||||
$BusinessModel = new BusinessModel();
|
||||
$data['page_name'] = 'Organization Details';
|
||||
$data['businesses'] = $BusinessModel->where($where)->where('business_id !=', 0)->where('isactive', 1)->findAll();
|
||||
$data['organzations'] = $BusinessModel->where($where)->where('business_id !=', 0)->where('isactive', 1)->findAll();
|
||||
// $data['lastQuery'] = $BusinessModel->getLastQuery();
|
||||
// print_r($data);die;
|
||||
$this->render_page('business_list', $data);
|
||||
@ -42,7 +42,7 @@ class Business extends BaseController
|
||||
if ($id === '0') {
|
||||
$data['page_name'] = 'Add Organization';
|
||||
$data['loged_user'] = $session_role;
|
||||
$data['businesses'] = [];
|
||||
$data['organzations'] = [];
|
||||
$data['branches'] = [];
|
||||
$data['donation']=[];
|
||||
} else if ($id !== '0') {
|
||||
@ -52,8 +52,8 @@ class Business extends BaseController
|
||||
$model->setTable('business');
|
||||
|
||||
## Fetch business details (particular business)
|
||||
$edit_business_details = $model->where(['business_id ' => $id , 'isactive' => 1])->first();
|
||||
$data['businesses'] = $edit_business_details;
|
||||
$edit_organzation_details = $model->where(['business_id ' => $id , 'isactive' => 1])->first();
|
||||
$data['organzations'] = $edit_organzation_details;
|
||||
|
||||
## Fetch branch details
|
||||
$branch_details = $model->getBranchesByBusinessId($id);
|
||||
@ -67,12 +67,12 @@ class Business extends BaseController
|
||||
|
||||
}
|
||||
|
||||
$data['master_business_details']=$this->business_details();
|
||||
$data['master_organzation_details']=$this->organzation_details();
|
||||
$data['session_bid']=$session_bid;
|
||||
$this->render_page('business_form', $data);
|
||||
}
|
||||
|
||||
public function business_details()
|
||||
public function organzation_details()
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
@ -82,13 +82,13 @@ class Business extends BaseController
|
||||
$model->setTable('business');
|
||||
if($session_role === 'sadmin'){
|
||||
|
||||
$business_details = $model->where('business_id !=', 0)->orderBy('business_id', 'DESC')->findAll();
|
||||
$organzation_details = $model->where('business_id !=', 0)->orderBy('business_id', 'DESC')->findAll();
|
||||
}
|
||||
else{
|
||||
$business_details = $model->where('business_id', $session_bid)->findAll();
|
||||
$organzation_details = $model->where('business_id', $session_bid)->findAll();
|
||||
|
||||
}
|
||||
return $business_details;
|
||||
return $organzation_details;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -40,4 +40,23 @@ class Home extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function check_existing()
|
||||
{
|
||||
$value = $this->request->getPost('value');
|
||||
$table = $this->request->getPost('module');
|
||||
$field = $this->request->getPost('field');
|
||||
$model = new HomeModel();
|
||||
// $model->setTable('customers');
|
||||
$model->setTable((string)$table);
|
||||
$where = [$field => $value];
|
||||
$check_existing = $model->where($where)->findAll();
|
||||
|
||||
$statement_string = ucfirst(str_replace('_', ' ', (string)$field));
|
||||
$data = ['status' => false, 'message' => '']; // Initialize the data array
|
||||
if (!empty($check_existing)) {
|
||||
$data['status'] = true;
|
||||
$data['message'] = $statement_string." Already existing";
|
||||
}
|
||||
return $this->response->setJSON(['data' => $data]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ class Invoice extends BaseController
|
||||
|
||||
// receipt number
|
||||
$settingData = $this->BusinessModel->select('*')->where($where)->findAll();
|
||||
$count_receipt_no = (count($receipt) > 0) ? count($receipt) + $settingData[0]['start_no'] + 1 : $settingData[0]['start_no'] + 1;
|
||||
$count_receipt_no = (count($receipt) > 0) ? count($receipt) + $settingData[0]['start_no'] : $settingData[0]['start_no'];
|
||||
|
||||
// Calculate padding based on the count of digits in count_receipt_no
|
||||
$padding_count = max(0, $settingData[0]['left_pad'] - strlen($count_receipt_no));
|
||||
@ -139,7 +139,7 @@ class Invoice extends BaseController
|
||||
$data['causes'] = $bmodel->select('*')->where('business_id', (int)get_business_id())->where('isactive',1)->get()->getResult();
|
||||
$data['campaign'] = $model->getData('campaign', $where);
|
||||
$data['invoice_number_formatting'] = $model->getData('business', $where);
|
||||
$data['receipt_type'] = "option1";
|
||||
$data['receipt_type'] = "individual";
|
||||
if ($id === '0') {
|
||||
$this->logger->info("Receipt: In Add Details");
|
||||
$data['page_name'] = 'Add Receipt Details';
|
||||
@ -515,6 +515,7 @@ class Invoice extends BaseController
|
||||
$currency_data = $model->setTable('business')->select('currency')->where($where)->findAll();
|
||||
$terms_data = $this->BusinessModel->select('terms,signature')->where($where)->findAll();
|
||||
$data = $model->getInvoiceData($id);
|
||||
// print_r($data);die;
|
||||
// Check if data is empty
|
||||
if (!$data || !$currency_data) {
|
||||
throw new \Exception('Data not found or empty');
|
||||
@ -533,13 +534,16 @@ class Invoice extends BaseController
|
||||
$dompdf = new Dompdf($options);
|
||||
|
||||
define("DOMPDF_UNICODE_ENABLED", true);
|
||||
$user = $this->UserModel->select('first_name')->where('user_id',$data[0]->created_by)->findAll();
|
||||
$logoPath = base_url()."public/uploads/".$data[0]->business_logo;
|
||||
$user = $this->UserModel->select('first_name')->where('user_id',$data[0]->created_by)->findAll();
|
||||
|
||||
clearstatcache();
|
||||
|
||||
if ($data[0]->business_logo && file_exists($logoPath)) {
|
||||
$baseurl = $logoPath;
|
||||
// var_dump(file_exists($logoPath));
|
||||
if ($data[0]->business_logo && file_exists(ROOTPATH."public/uploads/".$data[0]->business_logo)) {
|
||||
// echo "Inside: Logo exists<br>";
|
||||
$baseurl = base_url()."public/uploads/".$data[0]->business_logo;;
|
||||
} else {
|
||||
// Logo does not exist, handle this case accordingly
|
||||
// echo "Inside: Logo does not exist<br>"; die;
|
||||
$baseurl = base_url()."public/uploads/default.png";
|
||||
}
|
||||
$digits = strlen((string)$data[0]->amount);
|
||||
@ -550,7 +554,7 @@ class Invoice extends BaseController
|
||||
'currency' => $data[0]->currency,
|
||||
'currency_in_words' => $amount_in_words ,
|
||||
'baseurl' => $baseurl,
|
||||
'signature' => $terms_data[0]['signature'],
|
||||
'signature' => "",
|
||||
'staff_name' => $user[0]['first_name'],
|
||||
'Notes' => $terms_data[0]['terms']
|
||||
]);
|
||||
|
||||
@ -1,213 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
use App\Models\BusinessModel;
|
||||
use App\Models\SettingsModel;
|
||||
|
||||
class Settings extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
$where = ['settings.isactive' => 1];
|
||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||
$where = ['settings.business_id' => $session_bid, 'settings.isactive' => 1];
|
||||
}
|
||||
|
||||
$model = new SettingsModel();
|
||||
$model->setTable('settings');
|
||||
$sitesetting_details = $model->where($where)->orderBy('setting_id', 'DESC')->findAll();
|
||||
$data['page_name'] = 'Org Settings Details';
|
||||
$data['details'] = $sitesetting_details;
|
||||
$data['session_role'] = $session_role;
|
||||
$this->render_page('setting_list', $data);
|
||||
}
|
||||
|
||||
## To Load Settings Add/Update page
|
||||
public function sitesetting_page($id)
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
if ($id === '0') {
|
||||
$data['page_name'] = 'Add Org Settings';
|
||||
$data['details'] = [];
|
||||
} else if ($id !== '0') {
|
||||
$data['page_name'] = 'Edit Org Settings';
|
||||
|
||||
$model = new SettingsModel();
|
||||
$model->setTable('settings');
|
||||
if($session_role === 'sadmin'){
|
||||
|
||||
$details = $model->where(['setting_id' => $id, 'isactive' => 1])->first();
|
||||
}
|
||||
else{
|
||||
$details = $model->where(['business_id' => $session_bid, 'isactive' => 1])->first();
|
||||
|
||||
}
|
||||
$data['details'] = $details;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$data['business_details']=$this->business_details();
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($data); die;
|
||||
$this->render_page('setting_form', $data);
|
||||
}
|
||||
public function business_details()
|
||||
{
|
||||
helper('session');
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business');
|
||||
if($session_role === 'sadmin'){
|
||||
|
||||
$business_details = $model->where('business_id !=', 0)->orderBy('business_id', 'DESC')->findAll();
|
||||
}
|
||||
else{
|
||||
$business_details = $model->where('business_id', $session_bid)->findAll();
|
||||
|
||||
}
|
||||
return $business_details;
|
||||
}
|
||||
|
||||
|
||||
## To Save/Update Setting Data on DB.
|
||||
public function sitesetting_synchronization()
|
||||
{
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
$session_uid = get_logged_user_id();
|
||||
$session_role = get_user_role();
|
||||
|
||||
$img = $this->request->getFile('slogo');
|
||||
print_r($img);
|
||||
$business_id = $this->request->getPost('business_id');
|
||||
$app_setting_id = $this->request->getPost('app_setting_id');
|
||||
$filePath = 'public/uploads/' . $this->request->getPost('slogo');
|
||||
$fileName = $img->getName();
|
||||
var_dump($fileName);
|
||||
echo $fileName;
|
||||
echo $fileName !== "" && $fileName !== null ? "Yes":"No";
|
||||
// die();
|
||||
|
||||
if($fileName !== ""){
|
||||
|
||||
if ($img->isValid() && !$img->hasMoved()) {
|
||||
|
||||
$img->move(ROOTPATH . 'public/uploads', $fileName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$favicon = $this->request->getFile('favicon');
|
||||
$faviconName = $favicon->getName();
|
||||
|
||||
if($faviconName !== ""){
|
||||
|
||||
if ($favicon->isValid() && !$favicon->hasMoved()) {
|
||||
|
||||
$favicon->move(ROOTPATH . 'public/uploads', $faviconName);
|
||||
}
|
||||
}
|
||||
|
||||
$SettingsModel = new SettingsModel();
|
||||
$data = [
|
||||
|
||||
'site_name' => $this->request->getPost('site_name'),
|
||||
'site_title' => $this->request->getPost('site_title'),
|
||||
'terms_service' => $this->request->getPost('terms_service'),
|
||||
'footer_about' => $this->request->getPost('footer_about'),
|
||||
'admin_email' => $this->request->getPost('admin_email'),
|
||||
'mobile'=> $this->request->getPost('mobile'),
|
||||
'copyright'=> $this->request->getPost('copyright'),
|
||||
'pagination_limit'=> $this->request->getPost('pagination_limit'),
|
||||
'site_info'=> $this->request->getPost('site_info'),
|
||||
'about_info'=> $this->request->getPost('about_info'),
|
||||
'mail_protocol'=> $this->request->getPost('mail_protocol'),
|
||||
'mail_title'=> $this->request->getPost('mail_title'),
|
||||
'mail_host'=> $this->request->getPost('mail_host'),
|
||||
'mail_port'=> $this->request->getPost('mail_port'),
|
||||
'mail_encryption'=> $this->request->getPost('mail_encryption'),
|
||||
'mail_username'=> $this->request->getPost('mail_username'),
|
||||
'mail_password'=> $this->request->getPost('mail_password'),
|
||||
'currency'=> $this->request->getPost('currency'),
|
||||
'country'=> $this->request->getPost('country'),
|
||||
'business_id'=> $this->request->getPost('business_id'),
|
||||
'start_no'=> $this->request->getPost('start_no'),
|
||||
'left_pad'=> $this->request->getPost('left_pad'),
|
||||
'prefix_format'=> $this->request->getPost('prefix_format'),
|
||||
];
|
||||
|
||||
if($fileName !== "" && $fileName !== null)
|
||||
{
|
||||
$data['logo'] = $fileName;
|
||||
}
|
||||
|
||||
if($faviconName !== "" && $faviconName !== null)
|
||||
{
|
||||
$data['favicon'] = $faviconName;
|
||||
}
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($data); die;
|
||||
|
||||
$setting_id = $this->request->getPost('setting_id'); // Get the business ID for update
|
||||
|
||||
if (empty($setting_id)) {
|
||||
// It's an insert operation
|
||||
$data['isactive'] = 1;
|
||||
$data['created_by'] = $session_uid;
|
||||
|
||||
$SettingsModel->insert($data);
|
||||
// print_r($data);die;
|
||||
} else {
|
||||
// It's an update operation
|
||||
$isactive = $this->request->getPost('isactive');
|
||||
$data['isactive'] = ($isactive == 'on') ? 1 : 0;
|
||||
$data['updated_by'] = $session_uid;
|
||||
$SettingsModel->update($setting_id, $data);
|
||||
}
|
||||
|
||||
if($session_role === 'sadmin'){
|
||||
|
||||
return redirect()->route('sitesetting_list');
|
||||
}
|
||||
else{
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// $model = new SettingsModel();
|
||||
// $model->setTable('settings');
|
||||
// if ($this->request->is('post')) {
|
||||
// $requestData = $this->request->getVar();
|
||||
// }
|
||||
// $requestData['business_id'] = $session_bid;
|
||||
// if ($requestData['setting_id']) {
|
||||
// #edit
|
||||
// $requestData['updated_by'] = $session_uid;
|
||||
// $requestData['isactive'] = isset($requestData['isactive']) && $requestData['isactive'] == 'on' ? 1 : 0;
|
||||
// $model->saveData($requestData, $requestData['setting_id']);
|
||||
// $alert_message = "Site Settings details successfully updated.";
|
||||
// } else {
|
||||
// #add
|
||||
// $requestData['created_by'] = $session_uid;
|
||||
// $requestData['isactive'] = 1;
|
||||
// $model->saveData($requestData, null);
|
||||
// $alert_message = "Site Settings details successfully created.";
|
||||
// }
|
||||
// return redirect()->route('sitesetting_list');
|
||||
// }
|
||||
// }
|
||||
@ -1,217 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
// use App\Models\SubscriptionModel;
|
||||
use App\Models\CustomerModel;
|
||||
use App\Models\SubscriptionModel;
|
||||
use App\Models\SchemeModel;
|
||||
use App\Models\InvoiceModel;
|
||||
use Mpdf\Mpdf;
|
||||
|
||||
class Subscription extends BaseController
|
||||
{ public function index()
|
||||
{
|
||||
// echo base_url('public/uploads/vijayabharathampdf.png');die();
|
||||
helper('session');
|
||||
if (is_session_active()) {
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
|
||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||
$this->logger->info("Invoice: Listing In Admin BID = " . $session_bid);
|
||||
$where = ['I.business_id' => (int)$session_bid, 'I.isactive' => 1];
|
||||
} else {
|
||||
$this->logger->info("Invoice: Listing In the Super-Admin ");
|
||||
$where = ['I.business_id != ' => NULL, 'I.isactive != ' => NULL];
|
||||
}
|
||||
|
||||
$model = new InvoiceModel();
|
||||
$data['page_name'] = 'Subscription Invoice Details';
|
||||
$data['invoice'] = $model->getSubscriptionInvoiceDetail($where);
|
||||
|
||||
$this->logger->info("Invoice: Listing Count ." . count($data['invoice']));
|
||||
|
||||
|
||||
// $data['subscriber'] = $SubscriptionModel->where($where)->findAll();;
|
||||
|
||||
|
||||
$SubscriptionModel = new SubscriptionModel();
|
||||
$swhere = ['subscription.business_id' => (int)$session_bid];
|
||||
$data['subscriber'] = $SubscriptionModel->getAllSubscribersWithNames($swhere);
|
||||
$this->render_page('subscribers_list', $data);
|
||||
}else {
|
||||
return redirect()->to('login');
|
||||
}
|
||||
}
|
||||
public function new_subscription() {
|
||||
|
||||
helper('session');
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
$data['page_name'] = 'Subscription Details';
|
||||
$customerModel = new CustomerModel();
|
||||
$schemeModel = new SchemeModel();
|
||||
|
||||
$business_id = get_business_id();
|
||||
|
||||
// Get scheme names and durations from the SchemeModel
|
||||
$data['customers'] = $customerModel->getCustomerNamesByBusiness($business_id);
|
||||
$data['scheme_names'] = $schemeModel->getSchemeNamesAndDurationsByBusiness($business_id);
|
||||
|
||||
//print_r($data);die();
|
||||
$this->render_page('subscription_form', $data);
|
||||
}
|
||||
|
||||
// Subscription Controller (Subscription.php)
|
||||
public function add_subscription() {
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
$session_uid = get_logged_user_id();
|
||||
|
||||
$SubscriptionModel = new SubscriptionModel();
|
||||
$data = [
|
||||
'scheme_id' =>$this->request->getPost('scheme'),
|
||||
'customer_id' =>$this->request->getPost('customer'),
|
||||
'from_subscription' => $this->request->getPost('from_date'),
|
||||
'to_subscription' => $this->request->getPost('to_date'),
|
||||
// 'type' => "subscribed customer",
|
||||
'type' => "customer",
|
||||
'mode' => $this->request->getPost('mode'),
|
||||
'business_id'=>$session_bid
|
||||
];
|
||||
|
||||
$SubscriptionModel->insert($data);
|
||||
|
||||
// $data['subscriber'] = $subscriberModel->getAllSubscribersWithNames();
|
||||
// print_r($data);die();
|
||||
return redirect()->to('subscribers_list')->with('data', $data);
|
||||
}
|
||||
|
||||
// Subscription.php (Controller)
|
||||
|
||||
// public function download_details()
|
||||
// {
|
||||
// $selectedScheme = $this->request->getPost('selected_scheme');
|
||||
|
||||
// // Call the model method to get customer details for the selected scheme
|
||||
// $subscriptionModel = new SubscriptionModel();
|
||||
// $business = $subscriptionModel->getCustomerAddressesBySchemeName($selectedScheme);
|
||||
|
||||
// $shippingInfo = $subscriptionModel->getCustomerAddressesBySchemeName($selectedScheme, 2);
|
||||
// $customerName = $subscriptionModel->getCustomerNameBySchemeName($selectedScheme);
|
||||
|
||||
// // Create an HTML content string using the view file (similar to print_addresses.php)
|
||||
// if ($customerName !== 'Customer not found') {
|
||||
// $html = view('print_addresses_form', ['customerName' => $customerName, 'shippingInfo' => $shippingInfo, 'business' => $business]);
|
||||
|
||||
// // Generate a PDF from the HTML content
|
||||
// $pdf = new Mpdf();
|
||||
|
||||
// $pdf->WriteHTML($html);
|
||||
|
||||
// // Set the PDF filename
|
||||
// $filename = 'CustomerDetails_' . date('YmdHis') . '.pdf';
|
||||
|
||||
// // Output the PDF for download
|
||||
// $pdf->Output($filename, 'D');
|
||||
// } else {
|
||||
// // Handle the case where the customer is not found
|
||||
// echo 'Customer not found';
|
||||
// }
|
||||
// }
|
||||
|
||||
public function download_details()
|
||||
{
|
||||
$selectedSchemes = $this->request->getPost('selected_schemes');
|
||||
$action = $this->request->getPost('action');
|
||||
// Initialize an empty PDF with custom paper size (4x6 inches)
|
||||
$config = [
|
||||
'mode' => 'utf-8',
|
||||
'format' => [101.6, 152.4],
|
||||
'default_font_size' => 12,
|
||||
'default_font' => 'Arial',
|
||||
'margin_left' => 0,
|
||||
'margin_right' => 0,
|
||||
'margin_top' => 0,
|
||||
'margin_bottom' => 0,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
'orientation' => 'P', // Portrait
|
||||
];
|
||||
|
||||
$configA4 = [
|
||||
'mode' => 'utf-8',
|
||||
'format' => [101.6 * 2, 152.4 * 4], // 2x4 inches for each label
|
||||
'default_font_size' => 12,
|
||||
'default_font' => 'Arial',
|
||||
'margin_left' => 0,
|
||||
'margin_right' => 0,
|
||||
'margin_top' => 0,
|
||||
'margin_bottom' => 0,
|
||||
'margin_header' => 0,
|
||||
'margin_footer' => 0,
|
||||
'orientation' => 'P', // Portrait
|
||||
];
|
||||
|
||||
|
||||
if($action == 1) $pdf = new Mpdf($config);
|
||||
else $pdf = new Mpdf();
|
||||
$customerDetails = [];
|
||||
// Iterate through selected schemes
|
||||
if (!empty($selectedSchemes)) {
|
||||
foreach ($selectedSchemes as $selectedScheme) {
|
||||
// Call the model method to get customer details for each selected scheme
|
||||
$subscriptionModel = new SubscriptionModel();
|
||||
$details = $subscriptionModel->getAllCustomerDetailsBySchemeName($selectedScheme);
|
||||
$customerDetails = array_merge($customerDetails, $details);
|
||||
}
|
||||
|
||||
if (!empty($customerDetails)) {
|
||||
$html = view('print_addresses_form', ['customerDetails' => $customerDetails , 'action' => $action , 'pdf' => $pdf]);
|
||||
// Add the current scheme's details to the PDF
|
||||
// echo $html;die;
|
||||
// $pdf->AddPage();
|
||||
$pdf->WriteHTML($html);
|
||||
// Set the PDF filename
|
||||
$filename = 'CustomerDetails_' . date('YmdHis') . '.pdf';
|
||||
|
||||
// Output the PDF for download
|
||||
$pdf->Output($filename, 'D');
|
||||
$this->logger->info("Print Addresses (Scheme) : Downloaded = ".$filename);
|
||||
} else {
|
||||
echo "<script>alert('Customer Details Not Available.');</script>";
|
||||
$this->logger->info("Print Addresses (Scheme) : Details Not Available ");
|
||||
}
|
||||
} else {
|
||||
echo "<script>alert('Schemes Not Choosen.');</script>";
|
||||
$this->logger->info("Print Addresses (Scheme) : Schemes Not Choosen ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
// public function generate_pdf()
|
||||
// {
|
||||
// $schemeName = $this->request->getGet('scheme_name');
|
||||
|
||||
// // Call the model method to get the customer's name and address (billing or shipping)
|
||||
// $subscriptionModel = new SubscriptionModel();
|
||||
|
||||
// // For billing address
|
||||
// $billingInfo = $subscriptionModel->getCustomerAddressesBySchemeName($schemeName, 1);
|
||||
|
||||
// // For shipping address
|
||||
// $shippingInfo = $subscriptionModel->getCustomerAddressesBySchemeName($schemeName, 2);
|
||||
// print_r($billingInfo);
|
||||
// print_r($shippingInfo);
|
||||
|
||||
|
||||
// // Handle the PDF generation using $billingInfo['customer_name'], $billingInfo['address'] (for billing address)
|
||||
// // and $shippingInfo['customer_name'], $shippingInfo['address'] (for shipping address)
|
||||
// }
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ namespace App\Controllers;
|
||||
|
||||
use App\Models\UsersModel;
|
||||
use App\Models\BusinessModel;
|
||||
use CodeIgniter\Files\File;
|
||||
|
||||
class Users extends BaseController
|
||||
{
|
||||
@ -15,20 +14,23 @@ class Users extends BaseController
|
||||
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
$session_role = get_user_role();
|
||||
|
||||
if (!empty($session_role) && $session_role !== "sadmin") {
|
||||
$this->logger->info("Users: Listing In admin role . BID = ".$session_bid);
|
||||
$where = ['users.business_id' => (int)$session_bid, 'users.isactive' => 1];
|
||||
} else {
|
||||
|
||||
if (!empty($session_role) && $session_role === "sadmin") {
|
||||
$this->logger->info("Users: Listing In Super-admin role .");
|
||||
$where = ['users.isactive !=' => NULL];
|
||||
}else if (!empty($session_role) && $session_role === "admin") {
|
||||
$this->logger->info("Users: Listing In admin role . BID = ".$session_bid);
|
||||
$where = ['users.business_id' => (int)$session_bid];
|
||||
} else {
|
||||
$this->logger->info("Users: Listing In ".$session_role." role . BID = ".$session_bid);
|
||||
$where = ['users.business_id' => (int)$session_bid, 'users.isactive' => 1];
|
||||
}
|
||||
$model = new UsersModel();
|
||||
$model->setTable('users');
|
||||
// $user_details = $model->where($where)->orderBy('user_id', 'DESC')->findAll();
|
||||
$user_details = $model->select('users.*, business.title as org_name')
|
||||
$user_details = $model->select('users.*, business.title as org_name,business_branches.branch_name')
|
||||
->join('business', 'business.business_id = users.business_id')
|
||||
->join('business_branches', 'business_branches.id = users.branch_id','left')
|
||||
->where($where)->orderBy('user_id', 'DESC')->findAll();
|
||||
|
||||
$this->logger->info("Users: Listing Count .".count($user_details));
|
||||
@ -36,8 +38,6 @@ class Users extends BaseController
|
||||
$data['loged_user'] = $session_role;
|
||||
$data['details'] = $user_details;
|
||||
|
||||
// echo '<pre>';
|
||||
// print_r($data); die;
|
||||
$this->render_page('user_list', $data);
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ class Users extends BaseController
|
||||
$session_role = get_user_role();
|
||||
$session_bid = get_business_id();
|
||||
$session_uid = get_logged_user_id();
|
||||
$data['business_details'] = $this->business_details();
|
||||
$data['organzation_details'] = $this->organzation_details();
|
||||
$data['dummy_flag'] = $flag; // for redirect purpose.
|
||||
if ($id === '0') {
|
||||
$this->logger->info("Users: In Add page");
|
||||
@ -57,7 +57,7 @@ class Users extends BaseController
|
||||
$render_page_name = 'user_form';
|
||||
$data['details'] = [];
|
||||
$data['branches'] = $this->getOrganizationBranches($session_bid);
|
||||
// print_r($data);
|
||||
|
||||
} else {
|
||||
$this->logger->info("Users: In Edit page");
|
||||
$model = new UsersModel();
|
||||
@ -72,7 +72,6 @@ class Users extends BaseController
|
||||
$data['page_name'] = 'Edit User';
|
||||
// Fetch organization branches for the selected organization
|
||||
$data['branches'] = $this->getOrganizationBranches($edit_user_details['business_id']);
|
||||
// print_r($data);die;
|
||||
break;
|
||||
|
||||
case "admin":
|
||||
@ -81,7 +80,6 @@ class Users extends BaseController
|
||||
$render_page_name = 'user_form';
|
||||
$data['page_name'] = 'Edit User';
|
||||
$data['branches'] = $this->getOrganizationBranches($edit_user_details['business_id']);
|
||||
// print_r($branches);die;
|
||||
break;
|
||||
|
||||
case "volunteer":
|
||||
@ -90,9 +88,7 @@ class Users extends BaseController
|
||||
if ($session_uid === $id && $session_role === "volunteer") {
|
||||
$data['page_name'] = 'Edit User';
|
||||
$data['branches'] = $this->getOrganizationBranches($edit_user_details['business_id']);
|
||||
|
||||
$render_page_name = 'user_form';
|
||||
|
||||
} else {
|
||||
$data['page_name'] = 'Page Not Found';
|
||||
$render_page_name = 'pages_404';
|
||||
@ -129,7 +125,7 @@ class Users extends BaseController
|
||||
$this->render_page($render_page_name, $data);
|
||||
}
|
||||
|
||||
// Add the getOrganizationBranches method
|
||||
## Add the getOrganizationBranches method
|
||||
public function getOrganizationBranches($businessId)
|
||||
{
|
||||
$db = db_connect();
|
||||
@ -140,13 +136,12 @@ class Users extends BaseController
|
||||
return $branches;
|
||||
}
|
||||
|
||||
|
||||
## For SuperAdmin Role business Dropdown displayed on Userpage.otherwise Hidden fields
|
||||
public function business_details()
|
||||
public function organzation_details()
|
||||
{
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business');
|
||||
$business_details = $model->orderBy('business_id', 'DESC')->findAll();
|
||||
$organzation_details = $model->orderBy('business_id', 'DESC')->findAll();
|
||||
|
||||
// Fetch branches for all organizations
|
||||
$branchModel = new BusinessModel();
|
||||
@ -154,29 +149,21 @@ class Users extends BaseController
|
||||
$branches = $branchModel->findAll();
|
||||
|
||||
// Add branches to each business
|
||||
foreach ($business_details as &$business) {
|
||||
foreach ($organzation_details as &$business) {
|
||||
$business['branches'] = array_filter($branches, function ($branch) use ($business) {
|
||||
return $branch['business_id'] == $business['business_id'];
|
||||
});
|
||||
}
|
||||
|
||||
return $business_details;
|
||||
return $organzation_details;
|
||||
}
|
||||
|
||||
|
||||
## For inserting/updating details of user
|
||||
public function insert_users()
|
||||
{
|
||||
$this->logger->info("Users: Inserting/Updating Details");
|
||||
try {
|
||||
## CI validation rule for profile_picture
|
||||
$validationRule = [
|
||||
'profile_picture' => [
|
||||
'label' => 'Image File',
|
||||
'rules' => 'uploaded[profile_picture]|is_image[profile_picture]|mime_in[profile_picture,image/jpg,image/jpeg,image/gif,image/png,image/webp]'
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
## Declarions
|
||||
helper('session');
|
||||
$UsersModel = new UsersModel();
|
||||
@ -184,83 +171,20 @@ class Users extends BaseController
|
||||
$session_bid = get_business_id();
|
||||
$user_id = $this->request->getPost('user_id');
|
||||
$business_id = $this->request->getPost('business_id')?$this->request->getPost('business_id'):$session_bid;
|
||||
$img_details = $this->request->getFile('profile_picture'); // Here I Have Image details ;
|
||||
$final_img_name = NULL;//Just flag
|
||||
$existing_img_name = $this->request->getPost('existing_profile_picture_name'); // HiddenField for if have any pic name means;
|
||||
$img_path = 'public/uploads/';
|
||||
|
||||
##Step 1 : image details available
|
||||
if($img_details){
|
||||
$this->logger->info("Users: image details avaiable");
|
||||
##Step 2 : i have image details .<br/>
|
||||
if ($img_details->isValid()) {
|
||||
##Step 3 : image Name.$new_img_name."<br/>";
|
||||
$new_img_name = $img_details->getName(); // before movement name
|
||||
$this->logger->info("Users: Image Name B4 Upload".$new_img_name);
|
||||
##Step 4 : Validation Rule Apply here.if not throw the error"<br/>";
|
||||
if (!$this->validate($validationRule)) {
|
||||
if($new_img_name !== ''){
|
||||
|
||||
$error = $this->validator->getErrors();
|
||||
// echo "Error : ".(string)$error."<br/>";
|
||||
$this->logger->error("Users: Err on image upload".$error['profile_picture']);
|
||||
throw new \Exception((string)$error['profile_picture']);
|
||||
}
|
||||
}
|
||||
##Step 5 : Check Existing and New Image Name Same Or not same no use to move on target folder
|
||||
if($new_img_name !== $existing_img_name){
|
||||
$this->logger->info("Users: Image Name are Differ".$new_img_name." & ".$existing_img_name);
|
||||
## Step 6 : Different Image Name means removed on target folder using Unlink;
|
||||
if ($existing_img_name && is_file($img_path.$existing_img_name)) {
|
||||
$this->logger->info("Users: already Image Available on target Folder Path : ".$img_path.$existing_img_name." So, Deleted.");
|
||||
// echo "Deleted_file : ".(string)$img_path.$existing_img_name."<br/>";
|
||||
unlink($img_path.$existing_img_name);
|
||||
}
|
||||
## Step 7 : Moved to target;
|
||||
$img_details->move($img_path, $new_img_name);
|
||||
$final_img_name = $img_details->getName(); // after movement name
|
||||
$this->logger->info("Users: Image Name After Upload".$final_img_name);
|
||||
}else{
|
||||
$final_img_name = $existing_img_name;
|
||||
$this->logger->info("Users: Image Name are same".$new_img_name." & ".$existing_img_name." Can't Upload");
|
||||
}
|
||||
}
|
||||
else{
|
||||
## Step 8 : Not a Vaild Image File so replace Existing file name;
|
||||
$final_img_name = $existing_img_name;
|
||||
$this->logger->info("Users: Not a Vaild Image File Nothing To Update/Upload");
|
||||
// throw new \Exception("Not a Vaild Image File");
|
||||
}
|
||||
}
|
||||
else{
|
||||
## Step 9 : Testing Purpose File Details Not Available. so i can't move it.;
|
||||
$this->logger->info("Users: Testing Purpose Image Details Not Available. so i can't move it.");
|
||||
$final_img_name = $existing_img_name;
|
||||
//throw new \Exception("Testing Purpose File Details Not Available so i can't move it if you have existing filee means save it or your choice");
|
||||
}
|
||||
// $branch_id = $this->request->getPost('branch_id');
|
||||
// $business_id = $this->request->getPost('business_id');
|
||||
$data = [
|
||||
|
||||
|
||||
'profile_picture' => $final_img_name,
|
||||
'city' => $this->request->getPost('city'),
|
||||
'state' => $this->request->getPost('state'),
|
||||
'email' => $this->request->getPost('email'),
|
||||
'postal_code' => $this->request->getPost('postal_code'),
|
||||
'country' => $this->request->getPost('country'),
|
||||
'role' => $this->request->getPost('role'),
|
||||
'first_name' => $this->request->getPost('first_name'),
|
||||
'last_name' => $this->request->getPost('last_name'),
|
||||
'mobile_no' => $this->request->getPost('mobile_no'),
|
||||
'date_of_birth' => NULL,
|
||||
'address' => $this->request->getPost('address'),
|
||||
'gender' => $this->request->getPost('gender'),
|
||||
'business_id' => $business_id,
|
||||
'branch_id' => $this->request->getPost('branch_id') ?? $this->request->getPost('branch'),
|
||||
|
||||
];
|
||||
// print_r($data);die;
|
||||
|
||||
|
||||
if (empty($user_id)) {
|
||||
// It's an insert operation
|
||||
@ -290,51 +214,44 @@ class Users extends BaseController
|
||||
if($session_uid == $user_id && $data['isactive'] == 0){
|
||||
throw new \Exception("Cant able to Update Because logged-In persons can't remove. Please Contact your Admin!....");
|
||||
}
|
||||
if ($UsersModel->update($user_id, $data)) {
|
||||
|
||||
session()->setFlashdata('success', 'User has been updated successfully.');
|
||||
}
|
||||
}
|
||||
}catch (\Exception $e) {
|
||||
if ($UsersModel->update($user_id, $data)) {
|
||||
session()->setFlashdata('success', 'User has been updated successfully.');
|
||||
}
|
||||
}
|
||||
}catch (\Exception $e) {
|
||||
$this->logger->error("Users: Err Occur =" . $e->getMessage());
|
||||
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// Redirect back to the user_page function or any other appropriate page
|
||||
if($this->request->getPost('dummy_flag') == 1){
|
||||
return redirect()->to(base_url("user_page/{$user_id}/1"));
|
||||
}else{
|
||||
return redirect()->route('user_list');
|
||||
// Redirect back to the user_page function or any other appropriate page
|
||||
if($this->request->getPost('dummy_flag') == 1){
|
||||
return redirect()->to(base_url("user_page/{$user_id}/1"));
|
||||
}else{
|
||||
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();
|
||||
try {
|
||||
if($id == $session_uid){
|
||||
throw new \Exception("Your Logged-In, Can't able delete");
|
||||
}
|
||||
// if($id == $session_uid){
|
||||
// throw new \Exception("Your Not Logged-In, Can't able delete");
|
||||
// }
|
||||
$model = new UsersModel();
|
||||
$where = ['users.user_id' => $id, 'users.isactive =' => 1];
|
||||
$existingUser = $model->where($where)->find($id);
|
||||
$this->logger->Info("Users: Going to Inactive ID = ".$id);
|
||||
// print_r($existingUser);die;
|
||||
|
||||
if ($existingUser) {
|
||||
$data['isactive'] = 0;
|
||||
$data['updated_by'] = $session_uid;
|
||||
if(!empty($existingUser['profile_picture']) && file_exists(FCPATH."public/uploads/".$existingUser['profile_picture'])){
|
||||
unlink('public/uploads/'.$existingUser['profile_picture']);
|
||||
$data['profile_picture'] = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($model->update($id, $data)) {
|
||||
session()->setFlashdata('success', 'User Deactivated successfully.');
|
||||
$this->logger->info("Users: has been Inactived successfully. Inactived ID = ".$id);
|
||||
return $this->response->setJSON(['status' => true, 'message' => "User Deactivated successfully."]);
|
||||
} else {
|
||||
$this->logger->error("Users: Not able to Inactive ID =".$id);
|
||||
throw new \Exception("Data Not able to Deleted");
|
||||
@ -344,20 +261,20 @@ class Users extends BaseController
|
||||
$this->logger->error("Users: Does Not Exist To Inactive, ID = ".$id);
|
||||
throw new \Exception("User Already Deleted");
|
||||
}
|
||||
}catch(\Exception $e) {
|
||||
} catch(\Exception $e) {
|
||||
$this->logger->error("Users: Err Occur = ".$e->getMessage());
|
||||
session()->setFlashdata('error', 'Message: ' .$e->getMessage());
|
||||
return $this->response->setJSON(['status' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
return redirect()->route('user_list');
|
||||
}
|
||||
|
||||
public function activateUser($user_id){
|
||||
## For delete user make as active user
|
||||
public function activate_user($user_id){
|
||||
helper('session');
|
||||
$session_uid = get_logged_user_id();
|
||||
try {
|
||||
if($user_id == $session_uid){
|
||||
throw new \Exception("Your Logged-In, Can't able delete");
|
||||
}
|
||||
// if($user_id == $session_uid){
|
||||
// throw new \Exception("Your Logged-In, Can't able delete");
|
||||
// }
|
||||
$model = new UsersModel();
|
||||
$where = ['users.user_id' => $user_id, 'users.isactive =' => 0];
|
||||
$existingUser = $model->where($where)->find($user_id);
|
||||
@ -386,16 +303,16 @@ class Users extends BaseController
|
||||
return redirect()->route('user_list');
|
||||
|
||||
}
|
||||
// Add a method to fetch organization branches based on the selected organization
|
||||
public function get_branches($business_id)
|
||||
{
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business_branches');
|
||||
|
||||
## Add a method to fetch organization branches based on the selected organization
|
||||
public function get_branches($business_id)
|
||||
{
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business_branches');
|
||||
|
||||
$branches = $model->where('business_id', $business_id)->findAll();
|
||||
$branches = $model->where('business_id', $business_id)->findAll();
|
||||
|
||||
return json_encode($branches);
|
||||
}
|
||||
return json_encode($branches);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
<?php
|
||||
|
||||
function perform_whatsapp_request($url,$method,$data){
|
||||
// log_message('INFO',"PerformWhatsappRequest : request url = ".$url);
|
||||
// log_message('INFO',"PerformWhatsappRequest : request data type = ".$data);
|
||||
// log_message('INFO',"PerformWhatsappRequest : method = ".$method);
|
||||
|
||||
}
|
||||
|
||||
function perform_http_request_old($method, $url, $data = false) {
|
||||
$username = "ck_935889d13267b63c2341168e42ffafe3c1ee831a";
|
||||
$password = "cs_6ce1321c3f08049dfb3c8098ea21137796446bc4";
|
||||
$encodekey = base64_encode($username.':'.$password);
|
||||
$headers = array(
|
||||
'Content-Type:application/json',
|
||||
'Authorization: Basic '. $encodekey
|
||||
);
|
||||
try{
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
switch ($method) {
|
||||
case "POST":
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
if ($data) {
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
break;
|
||||
case "PUT":
|
||||
curl_setopt($curl, CURLOPT_PUT, 1);
|
||||
break;
|
||||
default:
|
||||
if ($data) {
|
||||
// print_r($data);die();
|
||||
$url = sprintf("%s?%s", $url, http_build_query((array)$data));
|
||||
}
|
||||
}
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
// curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); //If SSL Certificate Not Available, for example, I am calling from http://localhost URL
|
||||
curl_setopt( $curl,CURLOPT_SSL_VERIFYPEER, true );
|
||||
curl_setopt($curl, CURLOPT_FAILONERROR, true);
|
||||
$result = curl_exec($curl);
|
||||
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
$curl_errno= curl_errno($curl);
|
||||
if($curl_errno){
|
||||
if ($http_status==503){
|
||||
$error = "HTTP Status == 503 <br/> Curl Errno returned $curl_errno <br/>";
|
||||
}
|
||||
else{ $error = "Curl Errno returned $curl_errno <br/>"; }
|
||||
$error_msg = curl_error($curl);
|
||||
}else{
|
||||
$error = "";
|
||||
$error_msg = "";
|
||||
}
|
||||
curl_close($curl);
|
||||
$response = (array) json_decode($result);
|
||||
}catch (Exception $e) {
|
||||
$error = "Exception Errno returned".$e->getCode()." <br/>";
|
||||
$error_msg = $e->getMessage();
|
||||
$response = array();
|
||||
|
||||
}
|
||||
$final = array( "response"=>$response,"error"=>$error,"error_msg"=>$error_msg);
|
||||
return $final;
|
||||
}
|
||||
?>
|
||||
@ -1,113 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class ApiIntegrationModel extends Model
|
||||
{
|
||||
protected $table;
|
||||
public function setTable($tableName)
|
||||
{
|
||||
$this->table = $tableName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function insertData($table, $data)
|
||||
{
|
||||
try {
|
||||
$this->db->table($table)->insert($data);
|
||||
$last_insert_id = $this->db->insertID();
|
||||
return ["info"=>$last_insert_id,"err"=>""];
|
||||
} catch (\CodeIgniter\Database\Exceptions\DatabaseException $e) {
|
||||
return ["info"=>"","err"=>'Database operation failed: ' . $e->getMessage()];
|
||||
} catch (\Exception $e) {
|
||||
return ["info"=>"","err"=>'An error occurred: ' . $e->getMessage()];
|
||||
}
|
||||
}
|
||||
|
||||
public function updateData($table, $data, $where)
|
||||
{
|
||||
try {
|
||||
$this->db->table($table)->update($data, $where);
|
||||
$affected_rows = $this->db->affectedRows();
|
||||
return ["info"=>$affected_rows." Affected","err"=>""];
|
||||
} catch (\CodeIgniter\Database\Exceptions\DatabaseException $e) {
|
||||
return ["info"=>"","err"=>'Database operation failed: ' . $e->getMessage()];
|
||||
} catch (\Exception $e) {
|
||||
return ["info"=>"","err"=>'Database operation failed: ' . $e->getMessage()];
|
||||
}
|
||||
}
|
||||
|
||||
public function countAll($table, $where = null)
|
||||
{
|
||||
$query = $this->db->table($table);
|
||||
if ($where) {
|
||||
$query->where($where);
|
||||
}
|
||||
return $query->countAllResults();
|
||||
}
|
||||
|
||||
|
||||
public function getData($table, $where = null,$whereIn = null)
|
||||
{
|
||||
$query = $this->db->table($table);
|
||||
if ($where) {
|
||||
$query->where($where);
|
||||
}
|
||||
if($whereIn){
|
||||
// $query->whereIn($column_name,$missingValues)
|
||||
$query->whereIn($whereIn[0],$whereIn[1]);
|
||||
}
|
||||
return $query->get()->getResult();
|
||||
}
|
||||
|
||||
public function insertAndUpdateChildDetails($data,$table_name,$column_name){
|
||||
$i = 1;
|
||||
$text = ' Child-table Name = '.str_replace("_", " ",ucwords($table_name)) .', Column = '.str_replace("_", " ",ucwords($column_name)) .'. ';
|
||||
foreach ($data as $row) {
|
||||
$id = isset($row[$column_name]) ? $row[$column_name] : "";
|
||||
if($id != ''){
|
||||
unset($row[$column_name]); // Remove the primary Id from the data to avoid updating it.
|
||||
$where = [$column_name=>$id,'isactive'=>1];
|
||||
$child_affected_rows = $this->updateData($table_name, $row, $where);
|
||||
$text .= $child_affected_rows["info"] ? $i.') Id = '.$id.', '.$child_affected_rows["info"].'. '
|
||||
: $i.') Id = '.$id.', Err = '.$child_affected_rows["err"].'. ';
|
||||
}else{
|
||||
$child_insert_id = $this->insertData($table_name, $row);
|
||||
$text .= $child_insert_id["info"] ? $i.') Inserted ID = '.$child_insert_id["info"].'. '
|
||||
: $i.') Err = '.$child_insert_id["err"].'. ' ;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
// public function inactiveMissingDetails($table_name,$where,$whereIn){
|
||||
// $dataToUpdate = ['isactive' => 0];
|
||||
// $this->db->table($table_name)->where($where)->whereIn($whereIn[0],$whereIn[1])->update($dataToUpdate);
|
||||
// }
|
||||
public function inactiveMissingDetails($table_name,$dataToUpdate,$where = null,$whereIn = null)
|
||||
{
|
||||
$this->db->table($table_name);
|
||||
$query = $this->db->table($table_name);
|
||||
if ($where) {
|
||||
$query->where($where);
|
||||
}
|
||||
if ($whereIn) {
|
||||
$query->whereIn($whereIn[0], $whereIn[1]);
|
||||
}
|
||||
$query->update($dataToUpdate);
|
||||
}
|
||||
|
||||
public function getBookCategories($product_id){
|
||||
return $this->db->table('book_categories as BC')
|
||||
->join('category as C', 'C.id = BC.category_id', 'left')
|
||||
->join('books as B', 'B.book_id = BC.book_id', 'left')
|
||||
->select('BC.id,BC.book_id,BC.category_id,C.wp_api_category_id,C.name as category_name,B.title as book_name,B.sku,B.duration')
|
||||
->where(['BC.isactive'=>1,'B.wp_api_product_id'=>$product_id])
|
||||
->get()
|
||||
->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
use CodeIgniter\Model;
|
||||
class AppSettingModel extends Model
|
||||
{
|
||||
protected $table = 'app_settings';
|
||||
protected $primaryKey = 'app_setting_id';
|
||||
protected $allowedFields = ['app_setting_id','site_name','site_title','favicon','logo','terms_service','footer_about','admin_email','mobile','copyright','pagination_limit','site_info','about_info','mail_protocol','mail_title','mail_host','mail_port','mail_encryption','mail_username','mail_password','currency','country','isactive','business_id'];
|
||||
|
||||
public function saveData($data, $id = null)
|
||||
{
|
||||
if ($id === null) {
|
||||
// Insert new record
|
||||
return $this->insert($data);
|
||||
} else {
|
||||
// Update existing record
|
||||
return $this->update($id, $data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ public function updateData($table, $data, $where)
|
||||
->join('donor as C','C.donor_id= receipt.donor_id','left')
|
||||
->join('causes as D','D.causes_id= receipt.causes_id','left')
|
||||
->join('business as B','B.business_id = receipt.business_id','left')
|
||||
->select('receipt.*,concat(C.first_name," ",C.last_name) as customer_name,C.address, C.postal_code,C.city, C.state,C.mobile_no as customer_mobile, C.pan_no as cust_pan_no, D.name as cause_name')
|
||||
->select('receipt.*,CONCAT(C.first_name, IFNULL(CONCAT(" ", C.last_name), "")) as customer_name,C.address, C.postal_code,C.city, C.state,C.mobile_no as customer_mobile, C.pan_no as cust_pan_no, D.name as cause_name,C.org_name as cust_org_name')
|
||||
->select('B.title ,B.business_logo,B.terms,B.address as org_address ,B.city as org_city,B.state as org_state,B.postal_code as org_zip,B.email as org_email,B.mobile_no as org_mobile, B.pan_no as org_pan, B.org_reg_no, B.signature')
|
||||
->get()
|
||||
->getResult();
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
use CodeIgniter\Model;
|
||||
class SettingsModel extends Model
|
||||
{
|
||||
protected $table = 'settings';
|
||||
protected $primaryKey = 'setting_id';
|
||||
protected $allowedFields = ['setting_id','site_name','site_title','favicon','logo','terms_service','footer_about','admin_email','mobile','copyright','pagination_limit','site_info','about_info','mail_protocol','mail_title','mail_host','mail_port','mail_encryption','mail_username','mail_password','currency','country','isactive','business_id','start_no','left_pad','prefix_format'];
|
||||
|
||||
public function saveData($data, $id = null)
|
||||
{
|
||||
if ($id === null) {
|
||||
// Insert new record
|
||||
return $this->insert($data);
|
||||
} else {
|
||||
// Update existing record
|
||||
return $this->update($id, $data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
<!-- plugin css -->
|
||||
<link href="<?= base_url()."public/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" ?>" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- third party css -->
|
||||
<link href="<?= base_url()."public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url()."public/assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url()."public/assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url()."public/assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<!-- third party css end -->
|
||||
|
||||
<!-- App css -->
|
||||
<link href="<?= base_url()."public/assets/css/bootstrap.min.css" ?>" rel="stylesheet" type="text/css" id="bs-default-stylesheet" />
|
||||
<link href="<?= base_url()."public/assets/css/app.min.css" ?>" rel="stylesheet" type="text/css" id="app-default-stylesheet" />
|
||||
|
||||
<link href="<?= base_url()."public/assets/css/bootstrap-dark.min.css" ?>" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" />
|
||||
<link href="<?= base_url()."public/assets/css/app-dark.min.css" ?>" rel="stylesheet" type="text/css" id="app-dark-stylesheet" />
|
||||
|
||||
<!-- icons -->
|
||||
<link href="<?= base_url()."public/assets/css/icons.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
|
||||
</head>
|
||||
|
||||
<body class="loading">
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper"> <!-- close div on footer.php -->
|
||||
|
||||
<!-- ========== Left Sidebar Start ========== -->
|
||||
<div class="left-side-menu">
|
||||
|
||||
<!-- LOGO -->
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="float-right">
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
|
||||
<div class="table-responsive">
|
||||
<!-- <table id="basic-datatable" class="table dt-responsive w-100"> -->
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Author</th>
|
||||
<th>Category</th>
|
||||
<th>Language</th>
|
||||
<th>Year Of Release</th>
|
||||
<th>Price of the Book</th>
|
||||
<th>Description</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
@ -1,248 +0,0 @@
|
||||
<html>
|
||||
|
||||
<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 */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title"><?= $page_name; ?></h4>
|
||||
<p class="sub-header"> </p>
|
||||
|
||||
<?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()."appsetting_synchronization"; ?>">
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="postal_code" class="col-form-label">Organization</label>
|
||||
<select id="business_id" name="business_id" class="form-control">
|
||||
<?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>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_name" class="col-form-label">Site Name</label>
|
||||
<input type="text" class="form-control" id="site_name" name="site_name"
|
||||
value="<?= isset($details['site_name']) ? $details['site_name'] : '' ?>"
|
||||
placeholder="Site Name" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_title" class="col-form-label">Site Title</label>
|
||||
<input type="text" class="form-control" id="site_title" name="site_title"
|
||||
placeholder="Site Title"
|
||||
value="<?= isset($details['site_title']) ? $details['site_title'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="site_color" class="col-form-label">Site Color</label>
|
||||
<input class="form-control" type="color" id="site_color" value="#3bafda">
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_info" class="col-form-label">Site Information</label>
|
||||
<textarea class="form-control" id="site_info" name="site_info"
|
||||
placeholder="Site Information"><?= isset($details['site_info']) ? $details['site_info'] : '' ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="about_info" class="col-form-label">About Information</label>
|
||||
<textarea class="form-control" id="about_info" name="about_info"
|
||||
placeholder="About info"><?= isset($details['about_info']) ? $details['about_info'] : '' ?></textarea>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="terms_service" class="col-form-label">Terms Service</label>
|
||||
<textarea class="form-control" id="terms_service" name="terms_service"
|
||||
placeholder="Terms Service"
|
||||
rows="5"><?= isset($details['terms_service']) ? $details['terms_service'] : '' ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="footer_about" class="col-form-label">Footer about</label>
|
||||
<textarea class="form-control" id="footer_about" name="footer_about"
|
||||
placeholder="Footer about"
|
||||
rows="5"><?= isset($details['footer_about']) ? $details['footer_about'] : '' ?></textarea>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="admin_email" class="col-form-label">Admin Email</label>
|
||||
<input type="email" class="form-control" id="admin_email" name="admin_email"
|
||||
placeholder="Admin Email"
|
||||
value="<?= isset($details['admin_email']) ? $details['admin_email'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile" class="col-form-label">Mobile Number</label>
|
||||
<input type="text" class="form-control" id="mobile" name="mobile"
|
||||
placeholder="Mobile Number (Enter only numbers)" data-parsley-type="number"
|
||||
value="<?= isset($details['mobile']) ? $details['mobile'] : '' ?>" maxlength="10" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="copyright" class="col-form-label">Copyright</label>
|
||||
<input type="text" class="form-control" id="copyright" name="copyright"
|
||||
placeholder="Copy Right"
|
||||
value="<?= isset($details['copyright']) ? $details['copyright'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="pagination_limit" class="col-form-label">Pagination Limit</label>
|
||||
<input type="text" class="form-control" id="pagination_limit" name="pagination_limit"
|
||||
placeholder="Pagination Limit"
|
||||
value="<?= isset($details['pagination_limit']) ? $details['pagination_limit'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="logo" class="col-form-label">Logo Image</label>
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo"
|
||||
name="slogo" placeholder="Logo Name"
|
||||
value="<?= isset($details['logo']) ? $details['logo'] : '' ?>" />
|
||||
</div>
|
||||
<?php if (!empty($details['logo'])) { ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="slogo" class="col-form-label"> Logo</label>
|
||||
<img src="<?= base_url('public/uploads/'. $details['logo']) ?>" alt="Logo"
|
||||
class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="favicon" class="col-form-label">Favicon</label>
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="favic"
|
||||
name="favicon" placeholder="Fav-icon Name"
|
||||
value="<?= isset($details['favicon']) ? $details['favicon'] : '' ?>" />
|
||||
</div>
|
||||
<?php if (!empty($details['favicon'])) { ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="favicon" class="col-form-label">Icon</label>
|
||||
<img src="<?= base_url('public/uploads/'. $details['favicon']) ?>" alt="Icon"
|
||||
class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="currency" class="col-form-label">Currency</label>
|
||||
<input type="text" class="form-control" id="currency" name="currency"
|
||||
placeholder="currency (eg : Rupees,Dollar,Euro)"
|
||||
value="<?= isset($details['currency']) ? $details['currency'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="country" class="col-form-label">Country</label>
|
||||
<input type="text" class="form-control" id="country" name="country"
|
||||
placeholder="Country"
|
||||
value="<?= isset($details['country']) ? $details['country'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_protocol" class="col-form-label">Mail Protocol</label>
|
||||
<input type="text" class="form-control" id="mail_protocol" name="mail_protocol"
|
||||
placeholder="Mail Protocol (eg : zoho,gmail)"
|
||||
value="<?= isset($details['mail_protocol']) ? $details['mail_protocol'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_title" class="col-form-label">Mail Title</label>
|
||||
<input type="text" class="form-control" id="mail_title" name="mail_title"
|
||||
placeholder="Mail Title"
|
||||
value="<?= isset($details['mail_title']) ? $details['mail_title'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_host" class="col-form-label">Mail Host</label>
|
||||
<input type="text" class="form-control" id="mail_host" name="mail_host"
|
||||
placeholder="Mail Host"
|
||||
value="<?= isset($details['mail_host']) ? $details['mail_host'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_port" class="col-form-label">Mail Port</label>
|
||||
<input type="text" class="form-control" id="mail_port" name="mail_port"
|
||||
placeholder="Mail Port"
|
||||
value="<?= isset($details['mail_port']) ? $details['mail_port'] : '' ?>" />
|
||||
</div>
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label for="mail_encryption" class="col-form-label">Mail Encryption</label>
|
||||
<input type="text" class="form-control" id="mail_encryption" name="mail_encryption"
|
||||
placeholder="Mail Encryption"
|
||||
value="<?= isset($details['mail_encryption']) ? $details['mail_encryption'] : '' ?>" />
|
||||
</div> -->
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_username" class="col-form-label">Mail Username</label>
|
||||
<input type="text" class="form-control" id="mail_username" name="mail_username"
|
||||
placeholder="Mail Username"
|
||||
value="<?= isset($details['mail_username']) ? $details['mail_username'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mail_password" class="col-form-label">Mail Password</label>
|
||||
<input type="text" class="form-control" id="mail_password" name="mail_password"
|
||||
placeholder="Mail Password"
|
||||
value="<?= isset($details['mail_password']) ? $details['mail_password'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="app_setting_id" name="app_setting_id" placeholder="hidden for setting id" value="<?= isset($details['app_setting_id']) ? $details['app_setting_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' : '' ?>>
|
||||
<label for="isactive"> Is Active</label>
|
||||
</div>
|
||||
<br>
|
||||
<?php } ?>
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button type="submit" class="btn btn-success waves-effect waves-light mr-1" id="submitBtn">Submit</button>
|
||||
<button type="reset" class="btn btn-primary waves-effect mr-1">Reset</button>
|
||||
<button 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 -->
|
||||
<script>
|
||||
document.getElementById('myForm').addEventListener('submit', function(event) {
|
||||
var form = event.target;
|
||||
|
||||
if (form.checkValidity() === false) {
|
||||
|
||||
form.reportValidity(); // Display validation error messages
|
||||
event.preventDefault(); // Prevent form submission if it's not valid
|
||||
$('#submitBtn').prop('disabled', false);
|
||||
} else {
|
||||
|
||||
$('#submitBtn').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -30,7 +30,7 @@
|
||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||
<?php endif; ?>
|
||||
<form class="needs-validation" id="myForm" novalidate method="post" enctype="multipart/form-data"
|
||||
action="<?= base_url() . "insert_books"; ?>">
|
||||
action="<?= base_url() . "insert_causes"; ?>">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<a href="<?php echo $edit_page_route; ?>" class="edit-button"> <i class="ri-pencil-line"></i></a>
|
||||
<?php if(get_user_role() != 'auditor') { ?>
|
||||
<a href="<?= base_url() . "delete_books/" . $row['causes_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="<?= base_url() . "delete_causes/" . $row['causes_id']; ?>" class="delete-button"><i class="ri-delete-bin-line"></i></a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
|
||||
@ -56,60 +56,60 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="bname" class="col-form-label">Organization Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="bname" name="bname" value="<?= isset($businesses['title']) ? $businesses['title'] : '' ?>" placeholder="Organization Name" required />
|
||||
<input type="text" class="form-control" id="bname" name="bname" value="<?= isset($organzations['title']) ? $organzations['title'] : '' ?>" placeholder="Organization Name" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="bmail" class="col-form-label">Organization 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($organzations['email']) ? $organzations['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">Organization PAN Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="pan_no" value="<?= isset($businesses['pan_no']) ? $businesses['pan_no'] : '' ?>" placeholder="PAN Number" required pattern="[A-Z]{5}[0-9]{4}[A-Z]{1}" title="Enter a valid PAN number" />
|
||||
<input type="text" class="form-control" name="pan_no" value="<?= isset($organzations['pan_no']) ? $organzations['pan_no'] : '' ?>" placeholder="PAN Number" required pattern="[A-Z]{5}[0-9]{4}[A-Z]{1}" title="Enter a valid PAN number" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="baddress" class="col-form-label">Organization Reg Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="org_reg_no" value="<?= isset($businesses['org_reg_no']) ? $businesses['org_reg_no'] : '' ?>" placeholder="Organization Register Number" required />
|
||||
<input type="text" class="form-control" name="org_reg_no" value="<?= isset($organzations['org_reg_no']) ? $organzations['org_reg_no'] : '' ?>" placeholder="Organization Register Number" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="bmobile" class="col-form-label">Organization Mobile Number<span class="text-danger">*</span></label>
|
||||
<input type="tel" class="form-control" name="bmobile" value="<?= isset($businesses['mobile_no']) ? $businesses['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required pattern="\d{10}" title="Please enter a 10-digit mobile number" oninput="this.value = this.value.replace(/[^0-9]/g, '')" maxlength="10" />
|
||||
<input type="tel" class="form-control" name="bmobile" value="<?= isset($organzations['mobile_no']) ? $organzations['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required pattern="\d{10}" title="Please enter a 10-digit mobile number" oninput="this.value = this.value.replace(/[^0-9]/g, '')" maxlength="10" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="baddress" class="col-form-label">Organization 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($organzations['address']) ? $organzations['address'] : '' ?>" placeholder="Address (eg : 1234 Main St)" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
|
||||
<?php if (isset($businesses['loged_user'])) { ?>
|
||||
<?php if (isset($organzations['loged_user'])) { ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="baddress" class="col-form-label">80G</label>
|
||||
<input type="text" class="form-control" name="80G" value="<?= isset($businesses['80G']) ? $businesses['80G'] : '' ?>" placeholder="80G Tax Free" />
|
||||
<input type="text" class="form-control" name="80G" value="<?= isset($organzations['80G']) ? $organzations['80G'] : '' ?>" placeholder="80G Tax Free" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</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 pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||
<input type="text" class="form-control" name="bcity" value="<?= isset($organzations['city']) ? $organzations['city'] : '' ?>" placeholder="City" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||
<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 pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||
<input type="text" class="form-control" name="bstate" value="<?= isset($organzations['state']) ? $organzations['state'] : '' ?>" placeholder="State" required pattern="[A-Za-z\s]+" title="Please enter alphabets only" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<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)" pattern="[0-9]{6}" maxlength="6" required />
|
||||
<input type="text" class="form-control" name="bzip" value="<?= isset($organzations['postal_code']) ? $organzations['postal_code'] : '' ?>" placeholder="Postal Code (Eg: Pincode)" pattern="[0-9]{6}" maxlength="6" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
@ -130,7 +130,7 @@
|
||||
<option value="null"><?php if (!isset($details['business_id'])) {
|
||||
echo 'Choose Organization';
|
||||
} ?></option>
|
||||
<?php foreach ($master_business_details as $value) { ?>
|
||||
<?php foreach ($master_organzation_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>
|
||||
<?php } ?>
|
||||
@ -141,32 +141,32 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_name" class="col-form-label">Site Name</label>
|
||||
<input type="text" class="form-control" id="site_name" name="site_name" value="<?= isset($businesses['site_name']) ? $businesses['site_name'] : '' ?>" placeholder="Site Name" />
|
||||
<input type="text" class="form-control" id="site_name" name="site_name" value="<?= isset($organzations['site_name']) ? $organzations['site_name'] : '' ?>" placeholder="Site Name" />
|
||||
<?php if ($loged_user === 'sadmin') : ?> <span class="help-block"><small>Auto-Text Copied from Buiness title field (First time only)</small></span> <?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_title" class="col-form-label">Site Title</label>
|
||||
<input type="text" class="form-control" id="site_title" name="site_title" placeholder="Site Title" value="<?= isset($businesses['site_title']) ? $businesses['site_title'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="site_title" name="site_title" placeholder="Site Title" value="<?= isset($organzations['site_title']) ? $organzations['site_title'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="admin_email" class="col-form-label">Admin Email</label>
|
||||
<input type="email" class="form-control" id="admin_email" name="admin_email" placeholder="Admin Email" value="<?= isset($businesses['admin_email']) ? $businesses['admin_email'] : '' ?>" />
|
||||
<input type="email" class="form-control" id="admin_email" name="admin_email" placeholder="Admin Email" value="<?= isset($organzations['admin_email']) ? $organzations['admin_email'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_mobile" class="col-form-label">Mobile Number</label>
|
||||
<input type="text" class="form-control" id="site_mobile" name="site_mobile" placeholder="Mobile Number (Enter only numbers)" data-parsley-type="number" value="<?= isset($businesses['site_mobile']) ? $businesses['site_mobile'] : '' ?>" pattern="\d{10}" title="Please enter a 10-digit mobile number" maxlength="10" />
|
||||
<input type="text" class="form-control" id="site_mobile" name="site_mobile" placeholder="Mobile Number (Enter only numbers)" data-parsley-type="number" value="<?= isset($organzations['site_mobile']) ? $organzations['site_mobile'] : '' ?>" pattern="\d{10}" title="Please enter a 10-digit mobile number" maxlength="10" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="copyright" class="col-form-label">Copyright</label>
|
||||
<input type="text" class="form-control" id="copyright" name="copyright" placeholder="Copy Right" value="<?= isset($businesses['copyright']) ? $businesses['copyright'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="copyright" name="copyright" placeholder="Copy Right" value="<?= isset($organzations['copyright']) ? $organzations['copyright'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="currency" class="col-form-label">Currency</label>
|
||||
<input type="text" class="form-control" id="currency" name="currency" placeholder="Currency (eg : Rupees,Dollar,Euro)" value="<?= isset($businesses['currency']) ? $businesses['currency'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="currency" name="currency" placeholder="Currency (eg : Rupees,Dollar,Euro)" value="<?= isset($organzations['currency']) ? $organzations['currency'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -174,7 +174,7 @@
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="country" class="col-form-label">Country</label>
|
||||
<input type="text" class="form-control" id="country" name="country" placeholder="Country" value="<?= isset($businesses['country']) ? $businesses['country'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="country" name="country" placeholder="Country" value="<?= isset($organzations['country']) ? $organzations['country'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -270,26 +270,26 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="logo" class="col-form-label">Logo</label>
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo" name="business_logo" placeholder="Logo Name" accept=".png, .jpg, .jpeg" value="<?= isset($businesses['business_logo']) ? $businesses['business_logo'] : '' ?>" />
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo" name="business_logo" placeholder="Logo Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['business_logo']) ? $organzations['business_logo'] : '' ?>" />
|
||||
<p id="logo-error-message" style="color: red;"></p>
|
||||
|
||||
</div>
|
||||
<?php if (!empty($businesses['business_logo'])) { ?>
|
||||
<?php if (!empty($organzations['business_logo'])) { ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="business_logo" class="col-form-label"> Logo <?= '('.$businesses['business_logo'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $businesses['business_logo']) ?>" alt="Logo" class="preview-image" />
|
||||
<label for="business_logo" class="col-form-label"> Logo <?= '('.$organzations['business_logo'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $organzations['business_logo']) ?>" alt="Logo" class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="favicon" class="col-form-label">Favicon</label>
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="favic" name="favicon" placeholder="Fav-icon Name" accept=".png, .jpg, .jpeg" value="<?= isset($businesses['favicon']) ? $businesses['favicon'] : '' ?>" />
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="favic" name="favicon" placeholder="Fav-icon Name" accept=".png, .jpg, .jpeg" value="<?= isset($organzations['favicon']) ? $organzations['favicon'] : '' ?>" />
|
||||
<p id="favic-error-message" style="color: red;"></p>
|
||||
|
||||
</div>
|
||||
<?php if (!empty($businesses['favicon'])) { ?>
|
||||
<?php if (!empty($organzations['favicon'])) { ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="favicon" class="col-form-label">Favicon <?= '('.$businesses['favicon'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $businesses['favicon']) ?>" alt="Icon" class="preview-image" />
|
||||
<label for="favicon" class="col-form-label">Favicon <?= '('.$organzations['favicon'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $organzations['favicon']) ?>" alt="Icon" class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -299,19 +299,19 @@
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="bfile" class="col-form-label">Signature</label>
|
||||
<input type="file" onchange="validateImage(this)" class="form-control" style="border: 0px !important;" id="signature" name="signature" value="<?= isset($businesses['signature']) ? $businesses['signature'] : null ?>" multiple />
|
||||
<input type="file" onchange="validateImage(this)" class="form-control" style="border: 0px !important;" id="signature" name="signature" value="<?= isset($organzations['signature']) ? $organzations['signature'] : null ?>" multiple />
|
||||
<p id="error-message"></p>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($businesses['signature'])) { ?>
|
||||
<?php if (!empty($organzations['signature'])) { ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="bfile" class="col-form-label">Current Signature <?= '('.$businesses['signature'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $businesses['signature']) ?>" alt="Signature" class="preview-image" />
|
||||
<label for="bfile" class="col-form-label">Current Signature <?= '('.$organzations['signature'].')'; ?></label>
|
||||
<img src="<?= base_url('public/uploads/' . $organzations['signature']) ?>" alt="Signature" class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for Organization id" value="<?= isset($businesses['business_id']) ? $businesses['business_id'] : '' ?>" />
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for Organization id" value="<?= isset($organzations['business_id']) ? $organzations['business_id'] : '' ?>" />
|
||||
</div>
|
||||
<div class="after-add-more">
|
||||
<hr />
|
||||
@ -325,20 +325,20 @@
|
||||
<div class="form-group col-md-4">
|
||||
<div>
|
||||
<label for="prefix_format" class="col-form-label">Prefix</label>
|
||||
<input type="text" class="form-control" id="prefix_format" name="prefix_format" placeholder="Receipt Number Format" value="<?= isset($businesses['prefix_format']) ? $businesses['prefix_format'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="prefix_format" name="prefix_format" placeholder="Receipt Number Format" value="<?= isset($organzations['prefix_format']) ? $organzations['prefix_format'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="left_pad" class="col-form-label">Left Padding</label>
|
||||
<input type="text" class="form-control" id="left_pad" name="left_pad" placeholder="Left Padding Number" value="<?= isset($businesses['left_pad']) ? $businesses['left_pad'] : '' ?>" />
|
||||
<input type="text" class="form-control" id="left_pad" name="left_pad" placeholder="Left Padding Number" value="<?= isset($organzations['left_pad']) ? $organzations['left_pad'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="start_no" class="col-form-label">Start Number</label>
|
||||
<input type="text" class="form-control" id="start_no" name="start_no" value="<?= isset($businesses['start_no']) ? $businesses['start_no'] : '1' ?>" placeholder="Start Number" />
|
||||
<input type="text" class="form-control" id="start_no" name="start_no" value="<?= isset($organzations['start_no']) ? $organzations['start_no'] : '1' ?>" placeholder="Start Number" />
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="bterms" class="col-form-label">Receipt Note</label>
|
||||
<textarea class="form-control" id="terms" name="bterms" rows="5" cols="50"><?= isset($businesses['terms']) ? $businesses['terms'] : '' ?></textarea>
|
||||
<textarea class="form-control" id="terms" name="bterms" rows="5" cols="50"><?= isset($organzations['terms']) ? $organzations['terms'] : '' ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -353,9 +353,9 @@
|
||||
|
||||
|
||||
<input type="hidden" id="setting_id" name="setting_id" placeholder="hidden for setting id" value="<?= isset($details['setting_id']) ? $details['setting_id'] : '' ?>" />
|
||||
<?php if (!empty($businesses) && ($loggedin_person_role === 'sadmin')) { ?>
|
||||
<?php if (!empty($organzations) && ($loggedin_person_role === 'sadmin')) { ?>
|
||||
<div class="form-group text-right m-b-0 checkbox checkbox-purple" style="display: none;">
|
||||
<input type="checkbox" id="bcheckbox" name="bcheckbox" class="form-control" <?= isset($businesses) && $businesses['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<input type="checkbox" id="bcheckbox" name="bcheckbox" class="form-control" <?= isset($organzations) && $organzations['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<label for="bcheckbox"> Is Active</label>
|
||||
</div>
|
||||
<br>
|
||||
@ -363,8 +363,8 @@
|
||||
<div class="form-group text-right m-b-0">
|
||||
<button class="btn btn-success waves-effect waves-light mr-1" type="submit" id="submitBtn">Save</button>
|
||||
<?php
|
||||
// $business_id=$businesses['business_id'];
|
||||
$business_id = isset($businesses['business_id']) ? $businesses['business_id'] : null;
|
||||
// $business_id=$organzations['business_id'];
|
||||
$business_id = isset($organzations['business_id']) ? $organzations['business_id'] : null;
|
||||
// Check if the logged-in user's ID matches the user's ID
|
||||
if ($session_bid == $business_id) {
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($businesses as $business) : ?>
|
||||
<?php foreach ($organzations as $business) : ?>
|
||||
<tr>
|
||||
<td><?= $business['title']; ?></td>
|
||||
<td><?= $business['email']; ?></td>
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
<label for="DonorType" class="col-form-label">Contributor Type<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="DonorType" name="DonorType" required disabled>
|
||||
<option value="" disabled>--Select--</option>
|
||||
<option value="option1" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option1' ? 'selected' : '' ?>>Individual</option>
|
||||
<option value="option2" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option2' ? 'selected' : '' ?>>Organization</option>
|
||||
<option value="individual" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'individual' ? 'selected' : '' ?>>Individual</option>
|
||||
<option value="organization" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'organization' ? 'selected' : '' ?>>Organization</option>
|
||||
|
||||
</select>
|
||||
<div class="invalid-feedback">Please provide.</div>
|
||||
@ -250,7 +250,7 @@
|
||||
let DonorType = $('#DonorType').val();
|
||||
|
||||
// Organization type selected
|
||||
if (DonorType === 'option2') {
|
||||
if (DonorType === 'organization') {
|
||||
$('#org_name').show();
|
||||
$('#org_reg').show();
|
||||
$('.contactPerson').show();
|
||||
|
||||
@ -39,16 +39,16 @@
|
||||
<?php foreach ($customer as $value) :?>
|
||||
<tr>
|
||||
<td hidden><?$value['donor_id'];?></td>
|
||||
<?php if($value['donor_type'] == 'option2') { ?>
|
||||
<?php if($value['donor_type'] == 'organization') { ?>
|
||||
<td><?= $value['org_name']; ?></td>
|
||||
<?php } else { ?>
|
||||
<td><?= $value['first_name'].' '.$value['last_name'] ; ?></td>
|
||||
<?php } ?>
|
||||
<td><?= $value['mobile_no']; ?></td>
|
||||
<td>
|
||||
<?php if ($value['donor_type'] == 'option1'): ?>
|
||||
<?php if ($value['donor_type'] == 'individual'): ?>
|
||||
<?= 'Individual'; ?>
|
||||
<?php elseif ($value['donor_type'] == 'option2'): ?>
|
||||
<?php elseif ($value['donor_type'] == 'organization'): ?>
|
||||
<?= 'Organization'; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<div class="row">
|
||||
<?php if ($loggedin_person_role !== 'sadmin') : ?>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-3 col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@ -9,19 +10,16 @@
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['active']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'Available ' . $customer['label']; ?></p>
|
||||
<br>
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['total']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'Total ' . $customer['label']; ?></p>
|
||||
<br>
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['today']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'New ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add missing closing div tags -->
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['total']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'Total ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<h3 class="mb-1 mt-0"> <span data-plugin="counterup"><?= $customer['today']; ?></span> </h3>
|
||||
<p class="text-muted mb-0"><?= 'New ' . $customer['label']; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
@ -19,25 +19,17 @@
|
||||
|
||||
</div>
|
||||
<br>
|
||||
<form method="POST" enctype="multipart/form-data" action="<?= base_url() . "save_invoice"; ?>" class="main-form" id="myForm">
|
||||
<form method="POST" enctype="multipart/form-data" action="<?= base_url() . "save_invoice"; ?>" class="main-form" id="recepitForm">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="receipt_type" class="col-form-label">Type</label>
|
||||
|
||||
<input type="radio" class="receipt_type" name="receipt_type" value="option1" <?php if ($receipt_type == "option1") echo "checked"; ?> onchange="get_donor_details(this.value);">
|
||||
<input type="radio" class="receipt_type" name="receipt_type" value="individual" <?php if ($receipt_type == "individual") echo "checked"; ?> onchange="get_donor_details(this.value);">
|
||||
Individual
|
||||
|
||||
<input type="radio" class="receipt_type" name="receipt_type" value="option2" <?php if ($receipt_type == "option2") echo "checked"; ?> onchange="get_donor_details(this.value);">
|
||||
<input type="radio" class="receipt_type" name="receipt_type" value="organization" <?php if ($receipt_type == "organization") echo "checked"; ?> onchange="get_donor_details(this.value);">
|
||||
Organization
|
||||
<!-- <select class="form-control" id="receipt_type" onchange="get_donor_details(this.value);">
|
||||
<option value="option1" <?php if ($receipt_type == "option1") {
|
||||
echo "selected";
|
||||
} ?> >Individual</option>
|
||||
<option value="option2" <?php if ($receipt_type == "option2") {
|
||||
echo "selected";
|
||||
} ?> >Organization</option>
|
||||
</select> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -58,13 +50,16 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="donor_first_name" class="col-form-label">Donor Name<span class="text-danger"> *</span></label>
|
||||
<label for="donor_first_name" class="col-form-label dfn_label">Donor Name<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="donor_first_name" name="donor_id" required data-toggle="select2">
|
||||
<option value="">--Select--</option>
|
||||
<?php if (get_user_role() != 'accounts') { ?> <option class="blueText" value="0"> + Add a donor</option><?php } ?>
|
||||
<?php foreach ($typebaseddonors as $customer) : ?>
|
||||
<option value="<?= $customer->donor_id ?>" <?php if (isset($receipt_details['donor_id']) && ($receipt_details['donor_id'] == $customer->donor_id)) echo "selected"; ?>> <?= $customer->first_name ?> </option>
|
||||
<?php endforeach; ?>
|
||||
<option value="<?= $customer->donor_id ?>" <?php if (isset($receipt_details['donor_id']) && ($receipt_details['donor_id'] == $customer->donor_id)) echo "selected"; ?>>
|
||||
<?php if ($receipt_type == "individual") : echo $customer->first_name; endif; ?>
|
||||
<?php if ($receipt_type == "organization") : echo $customer->org_name.' - '.$customer->pan_no; endif; ?>
|
||||
</option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -104,7 +99,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="invoiceDate" class="col-form-label">Receipt Date<span class="text-danger"> *</span></label>
|
||||
<input type="date" class="form-control" id="invoiceDate" name="receipt_date" value="<?= isset($receipt_details['receipt_date']) ? $receipt_details['receipt_date'] : '' ?>" required>
|
||||
<input type="date" class="form-control" id="invoiceDate" name="receipt_date" value="<?= empty($receipt_details['receipt_date']) ? date('Y-m-d') : $receipt_details['receipt_date'] ?>" required max="<?= date('Y-m-d') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -152,8 +147,8 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="invoiceDate" class="col-form-label">Payment Reference No</label>
|
||||
<input type="text" class="form-control" id="invoiceDate" name="payment_ref_no" value="<?= isset($receipt_details['payment_ref_no']) ? $receipt_details['payment_ref_no'] : '' ?>" placeholder="Payment Reference No">
|
||||
<label for="payment" class="col-form-label">Payment Reference No</label>
|
||||
<input type="text" class="form-control" id="payment" name="payment_ref_no" value="<?= isset($receipt_details['payment_ref_no']) ? $receipt_details['payment_ref_no'] : '' ?>" placeholder="Payment Reference No">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -200,7 +195,7 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#myForm').submit(function(e) {
|
||||
$('#recepitForm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
@ -226,23 +221,27 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var role = "<?php echo get_user_role() ?>";
|
||||
var data = <?php echo json_encode($typebaseddonors); ?>;
|
||||
var alldonors = <?php echo json_encode($alldonors); ?>;
|
||||
var editdata = <?php echo json_encode($receipt_details); ?>;
|
||||
var Rt = <?php echo json_encode($receipt_type); ?>;
|
||||
$(function() {
|
||||
|
||||
if (Rt == 'option2') {
|
||||
if (Rt == 'organization') {
|
||||
$('#donor_mobile').prop('disabled', true).removeAttr('required');
|
||||
$('.dfn_label').html('Organization Name - PAN Number<span class="text-danger"> *</span>');
|
||||
$('.dm_label').find('.text-danger').remove();
|
||||
} else {
|
||||
$('#donor_mobile').prop('disabled', false).attr('required', true);
|
||||
$('.dfn_label').html('Donor Name<span class="text-danger"> *</span>');
|
||||
if ($('.dm_label').find('.text-danger').length == 0) {
|
||||
$('.dm_label').append('<span class="text-danger"> *</span>');
|
||||
}
|
||||
}
|
||||
|
||||
$('#donor_mobile').on('change', function() {
|
||||
var type = $('.receipt_type:checked').val();
|
||||
if ($(this).val()) {
|
||||
if ($(this).val() == '0') {
|
||||
$('#standard-modal').modal('show');
|
||||
@ -253,11 +252,19 @@
|
||||
if ($(this).val() != '0') {
|
||||
var selectedMobile = $(this).val();
|
||||
var options = '<option value="">--Select--</option>';
|
||||
if(role != 'accounts'){
|
||||
options += '<option value="0">+ Add a donor</option>';
|
||||
}
|
||||
|
||||
// Assuming `data` is an array of objects containing donor information
|
||||
for (const donor of data) {
|
||||
if (selectedMobile == donor.mobile_no) {
|
||||
options += `<option value="${donor.donor_id}" ${editdata && editdata.donor_id == donor.donor_id ? 'selected' : ''}>${donor.first_name}</option>`;
|
||||
if (type == "organization") {
|
||||
options += `<option value="${donor.donor_id}" ${editdata && editdata.donor_id == donor.donor_id ? 'selected' : ''}>${donor.org_name} - ${donor.pan_no}</option>`;
|
||||
}else{
|
||||
options += `<option value="${donor.donor_id}" ${editdata && editdata.donor_id == donor.donor_id ? 'selected' : ''}>${donor.first_name}</option>`;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,11 +273,21 @@
|
||||
}
|
||||
} else {
|
||||
var selectedMobile = $(this).val();
|
||||
var type = $('.receipt_type:checked').val();
|
||||
var options = '<option value="">--Select--</option>';
|
||||
options += '<option value="0">+ Add a donor</option>';
|
||||
if(role != 'accounts'){
|
||||
options += '<option value="0">+ Add a donor</option>';
|
||||
}
|
||||
// Assuming `data` is an array of objects containing donor information
|
||||
console.log(donor);
|
||||
for (const donor of data) {
|
||||
options += `<option value="${donor.donor_id}">${donor.first_name}</option>`;
|
||||
if (type == "organization") {
|
||||
options += `<option value="${donor.donor_id}">${donor.org_name} - ${donor.pan_no}</option>`;
|
||||
}else{
|
||||
options += `<option value="${donor.donor_id}">${donor.first_name}</option>`;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Assuming you have a select element with the id `#donor_select`
|
||||
@ -285,11 +302,12 @@
|
||||
} else {
|
||||
$('#standard-modal').modal('hide');
|
||||
$('#donor-form-submit').prop('disabled', false);
|
||||
if (type == "option2") {
|
||||
|
||||
if (type == "organization") {
|
||||
var selectedID = $(this).val();
|
||||
var options = '<option value="">--Select--</option>';
|
||||
options += '<option value="0">+ Add a donor</option>';
|
||||
if(role != 'accounts'){
|
||||
options += '<option value="0">+ Add a donor</option>';
|
||||
}
|
||||
// Filter the donors array based on the selectedID
|
||||
var filter_array = alldonors.filter(function(d) {
|
||||
return d.donor_id === selectedID;
|
||||
@ -312,11 +330,13 @@
|
||||
|
||||
$(function() {
|
||||
$('#donor-form-submit').on('click', function() {
|
||||
// Disable the button to prevent multiple clicks
|
||||
if ($('.donorForm')[0].checkValidity()) {
|
||||
this.disabled = true;
|
||||
}
|
||||
// $('#submitBtn').click();
|
||||
var form = $('#donorForm');
|
||||
var isValid = form[0].checkValidity();
|
||||
var type = $('.receipt_type:checked').val();
|
||||
|
||||
if (isValid) {
|
||||
// If the form is valid, disable the button to prevent multiple clicks
|
||||
$(this).prop('disabled', true);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'insert_ajaxdonor' ?>",
|
||||
@ -325,50 +345,58 @@
|
||||
console.log(response);
|
||||
if (response['data']['status']) {
|
||||
dropdown = response['data']['donor'];
|
||||
alert(response['data']['message']);
|
||||
Swal.fire("Saved!", response['data']['message'], "success");
|
||||
if (dropdown.length > 0) {
|
||||
$('#donor_mobile').empty().append($('<option>', {
|
||||
value: "",
|
||||
text: "--Select--"
|
||||
}));
|
||||
$('#donor_mobile').append($('<option>', {
|
||||
value: "0",
|
||||
text: "+ Add a donor"
|
||||
value: "",text: "--Select--"
|
||||
}));
|
||||
$('#donor_first_name').empty().append($('<option>', {
|
||||
value: "",
|
||||
text: "--Select--"
|
||||
value: "",text: "--Select--"
|
||||
}));
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: "0",
|
||||
text: "+ Add a donor"
|
||||
}));
|
||||
$.each(dropdown, function(k, v) {
|
||||
if(role != 'accounts'){
|
||||
$('#donor_mobile').append($('<option>', {
|
||||
value: v.mobile_no,
|
||||
text: v.mobile_no,
|
||||
selected: (v.donor_id == response['data']['donor_id']) ? true : false
|
||||
value: "0",text: "+ Add a donor"
|
||||
}));
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: v.donor_id,
|
||||
text: v.first_name,
|
||||
value: "0",text: "+ Add a donor"
|
||||
}));
|
||||
}
|
||||
|
||||
$.each(dropdown, function(k, v) {
|
||||
$('#donor_mobile').append($('<option>', {
|
||||
value: v.mobile_no,text: v.mobile_no,
|
||||
selected: (v.donor_id == response['data']['donor_id']) ? true : false
|
||||
}));
|
||||
var dynamic = (type == 'organization') ? v.org_name+' - '+v.pan_no : v.first_name;
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: v.donor_id,text: dynamic,
|
||||
selected: (v.donor_id == response['data']['donor_id']) ? true : false
|
||||
}));
|
||||
});
|
||||
}
|
||||
} else {
|
||||
alert(response['data']['message']);
|
||||
Swal.fire("Oh...", response['data']['message'], "error");
|
||||
}
|
||||
$('#standard-modal').modal('hide');
|
||||
// Reset the form
|
||||
$('#donorForm').get(0).reset();
|
||||
$('#donor-form-submit').prop('disabled', false);
|
||||
form[0].reset();
|
||||
$(this).prop('disabled', false);
|
||||
},
|
||||
error: function() {
|
||||
alert("Error occur.");
|
||||
$('#donor-form-submit').prop('disabled', false);
|
||||
Swal.fire("Oh...", "Error occur. try later", "error");
|
||||
$(this).prop('disabled', false);
|
||||
},
|
||||
complete: function() {
|
||||
form[0].reset();
|
||||
$(this).prop('disabled', false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
form.find(':input').each(function() {
|
||||
if (!this.checkValidity()) {
|
||||
$(this).addClass('is-invalid');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
@ -392,12 +420,12 @@
|
||||
console.log(role);
|
||||
if (role == "accounts" || role == "auditor") {
|
||||
// for input
|
||||
var formElements = document.querySelectorAll('#myForm input, #myForm textarea');
|
||||
var formElements = document.querySelectorAll('#recepitForm input, #recepitForm textarea');
|
||||
formElements.forEach(function(element) {
|
||||
element.setAttribute('readonly', true);
|
||||
});
|
||||
// for select
|
||||
var formElements = document.querySelectorAll('#myForm select');
|
||||
var formElements = document.querySelectorAll('#recepitForm select');
|
||||
formElements.forEach(function(element) {
|
||||
element.setAttribute('disabled', true);
|
||||
});
|
||||
@ -435,7 +463,7 @@
|
||||
|
||||
let DonorType = $(this).val();
|
||||
|
||||
if (DonorType === 'option2') {
|
||||
if (DonorType === 'organization') {
|
||||
$('#org_details_form').show();
|
||||
$('#org_name_fie').prop('required', true);
|
||||
$('#pan_no_org').prop('required', true);
|
||||
@ -473,9 +501,13 @@
|
||||
<div class="form-group col-md-12">
|
||||
<label for="DonorType" class="col-form-label">Donor Type<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="DonorType" name="DonorType" required>
|
||||
<option value="<?= isset($receipt_details['donor_type']) ? $receipt_details['donor_type'] : '' ?>"><?= isset($receipt_details['donor_type']) ? ($receipt_details['donor_type'] === 'option1' ? 'Individual' : ($receipt_details['donor_type'] === 'option2' ? 'Organization' : '--Select--')) : '--Select--'; ?></option>
|
||||
<option value="option1">Individual</option>
|
||||
<option value="option2">Organization</option>
|
||||
<option value="">--Select--</option>
|
||||
<?php $typeArr = array('individual', 'organization');
|
||||
foreach ($typeArr as $value) {
|
||||
$selected = (isset($receipt_details['donor_type']) && $receipt_details['donor_type'] === $value) ? "selected" : "";
|
||||
?>
|
||||
<option value="<?php echo $value; ?>" <?php echo $selected; ?>><?php echo ucfirst($value); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<div class="invalid-feedback">Please provide.</div>
|
||||
</div>
|
||||
@ -530,7 +562,6 @@
|
||||
<label for="pan_no" class="col-form-label">PAN Number<span class="text-danger"> *</span></label>
|
||||
<input type="text" class="form-control" id="pan_no" name="pan_no" value="<?= isset($receipt_details['pan_no']) ? $receipt_details['pan_no'] : '' ?>" placeholder="PAN Number" oninput="validatePANFormat(this)" required />
|
||||
<div id="panNoError" style="display: none; color: red;">Invalid PAN format</div>
|
||||
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
@ -542,7 +573,6 @@
|
||||
<div class="input-group-text">+91</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="mobile" value="<?= isset($receipt_details['mobile_no']) ? $receipt_details['mobile_no'] : '' ?>" placeholder="Mobile Number (Enter only numbers)" required minlength="10" maxlength="10" onkeypress="return restriction(event)" />
|
||||
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
@ -562,7 +592,7 @@
|
||||
var emailPattern = /^(.+)@(gmail\.com|yahoo\.com|hotmail\.com|[^@]+\.com\.org)$/i;
|
||||
|
||||
if (!emailPattern.test(email)) {
|
||||
alert("Please provide a valid email addres");
|
||||
// alert("Please provide a valid email addres");
|
||||
// You can also update the UI to indicate the error, e.g., by adding a class to the input field.
|
||||
// Example: $('#cmail').addClass('is-invalid');
|
||||
}
|
||||
@ -597,11 +627,13 @@
|
||||
});
|
||||
|
||||
function get_donor_details(option) {
|
||||
if (option == 'option2') {
|
||||
if (option == 'organization') {
|
||||
$('#donor_mobile').prop('disabled', true).removeAttr('required');
|
||||
$('.dfn_label').html('Organization Name - PAN Number<span class="text-danger"> *</span>');
|
||||
$('.dm_label').find('.text-danger').remove();
|
||||
} else {
|
||||
$('#donor_mobile').prop('disabled', false).attr('required', true);
|
||||
$('.dfn_label').html('Donor Name<span class="text-danger"> *</span>');
|
||||
if ($('.dm_label').find('.text-danger').length == 0) {
|
||||
$('.dm_label').append('<span class="text-danger"> *</span>');
|
||||
}
|
||||
@ -638,14 +670,21 @@
|
||||
value: v.mobile_no,
|
||||
text: v.mobile_no
|
||||
}));
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: v.donor_id,
|
||||
text: v.first_name
|
||||
}));
|
||||
if (option == 'organization') {
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: v.donor_id,text: v.org_name+' - '+v.pan_no
|
||||
}));
|
||||
}else{
|
||||
$('#donor_first_name').append($('<option>', {
|
||||
value: v.donor_id,text: v.first_name
|
||||
}));
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
Swal.fire("Oh...", "Error occur. try later", "error");
|
||||
alert("Error Occur.");
|
||||
}
|
||||
});
|
||||
|
||||
@ -93,15 +93,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td style="width: 30.5118%; height: 18px; text-align: left;border: none;"><strong>Receipt:</strong> <?=$data->receipt_number?></td>
|
||||
<td style="width: 69.4882%; height: 18px; text-align: right;border: none;"><strong>Date:</strong> <?=date("d-m-Y", strtotime($data->receipt_date));?></td>
|
||||
<td style="width: 50% !important; height: 18px; text-align: left;border: none;"><strong>Receipt:</strong> <?=$data->receipt_number?></td>
|
||||
<td style="width: 49% !important; height: 18px; text-align: right;border: none;"><strong>Date:</strong> <?=date("d-m-Y", strtotime($data->receipt_date));?></td>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td style="width: 100%; height: 18px; text-align: justify;border: none;padding:30px;" colspan="2"><p>Received with thanks from <b><?= $data->customer_name ?></b> <?php if($data->cust_pan_no) { echo ', PAN <b>'.$data->cust_pan_no.'</b>'; } ?>, a sum of (<?= $currency ?>.<?= $data->amount ?>) <b><?= $currency ?> <?= $currency_in_words ?></b> , towards <b><?= $data->cause_name ?></b>.</td>
|
||||
<td style="width: 100%; height: 18px; text-align: justify;border: none;padding:30px;" colspan="2"><p>Received with thanks from <b><?= $data->customer_name ?></b> <?php if($data->cust_pan_no) { echo ', PAN <b>'.$data->cust_pan_no.'</b>'; } ?>, a sum of (<?= $currency ?>.<?= $data->amount ?>) <b><?= $currency ?> <?= $currency_in_words ? $currency_in_words.' Only' :'' ?></b>, towards <b><?= $data->cause_name ?></b>.</td>
|
||||
</tr>
|
||||
<tr style="height: 18px;">
|
||||
<td style="width: 30.5118%; height: 18px;border: none;"><strong>Collected by:</strong> <?= $staff_name ?></td>
|
||||
<td style="width: 69.4882%; height: 18px;text-align: right;border: none;"><img src="<?= base_url()."public/uploads/".$signature ?>" width="100px" alt="Signature"></td>
|
||||
<td style="width: 69.4882%; height: 18px;text-align: right;border: none;"> <?php if($signature && file_exists(ROOTPATH."public/uploads/".$signature)) { ?><img src="<?= base_url()."public/uploads/".$signature ?>" width="100px" alt="Signature"><?php }else { echo "Signature"; } ?></td>
|
||||
<tr>
|
||||
</tr><td style="width: 30.5118%; height: 18px;"></td></tr>
|
||||
<tr style="height: 18px;">
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<label for="postal_code" class="col-form-label">Organization</label>
|
||||
<select id="business_id" name="business_id" class="form-control">
|
||||
<option value="null"><?php if(!isset($details['business_id'])){ echo 'Choose Organization'; } ?></option>
|
||||
<?php foreach ($business_details as $value) { ?>
|
||||
<?php foreach ($organzation_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>
|
||||
|
||||
@ -6,314 +6,21 @@
|
||||
|
||||
<!-- Footer Start -->
|
||||
<footer class="footer">
|
||||
<!-- about us modal content -->
|
||||
<div class="modal fade" id="about-us" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scrollableModalTitle">ABOUT US</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><strong><?= $company_name; ?></strong> is a prominent publication house in South India based at Chennai with its presence spread across the world among the Tamil speaking masses.</p><br>
|
||||
<p>Having been in publication domain for quite some years and have published many books of national interest and social importance, <strong><?= $company_name; ?></strong> is determined to reach out everyone with an objective of bringing out publications which will build and strengthen our National unity and integrity on the basis of our ancient Dharma, Samskriti and Traditions of our Motherland Bharath.</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- contact us modal content -->
|
||||
<div class="modal fade" id="contact-us" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scrollableModalTitle">CONTACT US</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="social-list list-inline" style="text-align:left; line-height : 25px;">
|
||||
<li><a href="javascript: void(0);" class="border-purple text-purple"><i class="mdi mdi-cellphone-android"></i> +91 <?= $company_mobile_no; ?></a></li>
|
||||
<li><a href="javascript: void(0);" class="border-danger text-danger"><i class="mdi mdi-email-variant"></i> <?= $company_email; ?> </a></li>
|
||||
<li><a href="javascript: void(0);" class="border-secondary text-secondary"><i class="mdi mdi-badge-account-horizontal"><span class="text-center"> <?= $company_address; ?> </span></i></a></li>
|
||||
</ul>
|
||||
<?php if ((int)$bid == 1) : ?>
|
||||
<div class="text-center">
|
||||
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d1943.2153606988807!2d80.24498103526862!3d13.071866380546599!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x7dfd98350be12c35!2sVijayabharatham%20Prasuram!5e0!3m2!1sen!2sin!4v1640691535042!5m2!1sen!2sin" width="450" height="350" style="border:0;" allowfullscreen="" loading="lazy"></iframe>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ((int)$bid == 1) : ?>
|
||||
<div class="text-center mb-1">
|
||||
<ul class="social-list list-inline mb-0">
|
||||
<li class="list-inline-item">
|
||||
<a href="https://www.facebook.com/VijayabharathamPrasuram" target="_blank" class="social-list-item border-purple text-purple"><i class="mdi mdi-facebook"></i></a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="https://twitter.com/VPrasuram" target="_blank" class="social-list-item border-info text-info"><i class="mdi mdi-twitter"></i></a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a href="https://www.youtube.com/channel/UC-TRVAGrjSNMFgQU3sJSGdA" target="_blank" class="social-list-item border-danger text-danger"><i class="mdi mdi-youtube"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div><!-- end -->
|
||||
<?php endif; ?>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- privacy policy modal content -->
|
||||
<div class="modal fade" id="privacy-policy" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scrollableModalTitle">Privacy Policy</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>All transactions and transmission of information on vijayabharathambooks.com is secured using Secure Socket Layer (SSL), the Internet’s standard – and best – technology for secure shopping.
|
||||
We are committed to protecting your privacy. We do not sell, trade, or rent your personal information to others. We will not disclose collected information to any government agency without your consent, except where authorised or required by law.
|
||||
Furthermore, all of customer data collected (your account information for example) is protected against unauthorised access by means of 256-bit encryption.</p>
|
||||
<p>What Do We Do With Your Information?
|
||||
When you purchase something from our store, as part of the buying and selling process, we collect the personal information you give us such as your name, address and email address.
|
||||
When you browse our store, we also automatically receive your computer’s internet protocol (IP) address in order to provide us with information that helps us learn about your browser and operating system.
|
||||
Email marketing: With your permission, we may send you emails about our store, new products and other updates.</p>
|
||||
<p><strong>Consent</strong></p>
|
||||
<p>How do you get my consent?
|
||||
When you provide us with personal information to complete a transaction, verify your credit card, place an order, arrange for a delivery or return a purchase, we imply that you consent to our collecting it and using it for that specific reason only.
|
||||
If we ask for your personal information for a secondary reason, like marketing, we will either ask you directly for your expressed consent, or provide you with an opportunity to say no.</p>
|
||||
<p><strong>Disclosure</strong></p>
|
||||
<p>We may disclose your personal information if we are required by law to do so or if you violate our Terms of Service.</p>
|
||||
<p><strong>Payment</strong></p>
|
||||
<p>We use secured payment gateway for processing payments. We/third party payment gateways do not store your card data on their servers. The data is encrypted through the Payment Card Industry Data Security Standard (PCI-DSS) when processing payment. Your purchase transaction data is only used as long as is necessary to complete your purchase transaction. After that is complete, your purchase transaction information is not saved.
|
||||
Our payment gateway adheres to the standards set by PCI-DSS as managed by the PCI Security Standards Council, which is a joint effort of brands like Visa, MasterCard, American Express and Discover.
|
||||
PCI-DSS requirements help ensure the secure handling of credit card information by our store and its service providers.</p>
|
||||
<p><strong>Third-Party Services</strong></p>
|
||||
<p>In general, the third-party providers used by us will only collect, use and disclose your information to the extent necessary to allow them to perform the services they provide to us.
|
||||
However, certain third-party service providers, such as payment gateways and other payment transaction processors, have their own privacy policies in respect to the information we are required to provide to them for your purchase-related transactions.
|
||||
For these providers, we recommend that you read their privacy policies so you can understand the manner in which your personal information will be handled by these providers.
|
||||
In particular, remember that certain providers may be located in or have facilities that are located a different jurisdiction than either you or us. So if you elect to proceed with a transaction that involves the services of a third-party service provider, then your information may become subject to the laws of the jurisdiction(s) in which that service provider or its facilities are located.
|
||||
Once you leave our store’s website or are redirected to a third-party website or application, you are no longer governed by this Privacy Policy or our website’s Terms of Service.</p>
|
||||
<p><strong>Links</strong></p>
|
||||
<p>When you click on links on our store, they may direct you away from our site. We are not responsible for the privacy practices of other sites and encourage you to read their privacy statements.</p>
|
||||
<p><strong>Security</strong></p>
|
||||
<p>To protect your personal information, we take reasonable precautions and follow industry best practices to make sure it is not inappropriately lost, misused, accessed, disclosed, altered or destroyed.</p>
|
||||
<p><strong>Cookies</strong></p>
|
||||
<p>We use cookies to maintain session of your user. It is not used to personally identify you on other websites.</p>
|
||||
<p><strong>Age Of Consent</strong></p>
|
||||
<p>By using this site, you represent that you are at least the age of majority in your state or province of residence, or that you are the age of majority in your state or province of residence and you have given us your consent to allow any of your minor dependents to use this site.</p>
|
||||
<p><strong>Changes To This Privacy Policy</strong></p>
|
||||
<p>We reserve the right to modify this privacy policy at any time, so please review it frequently. Changes and clarifications will take effect immediately upon their posting on the website. If we make material changes to this policy, we will notify you here that it has been updated, so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we use and/or disclose it.
|
||||
If our store is acquired or merged with another company, your information may be transferred to the new owners so that we may continue to sell products to you.</p>
|
||||
<p><strong>Questions And Contact Information</strong></p>
|
||||
<p>If you would like to: access, correct, amend or delete any personal information we have about you, register a complaint, or simply want more information contact our Privacy Compliance Officer at <?= $company_email; ?>.</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- terms conditions modal content -->
|
||||
<div class="modal fade" id="terms-conditions" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scrollableModalTitle">Terms & Conditions</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><strong>Overview</strong></p>
|
||||
<p>This website – <?= $footer_about; ?> – is operated by Vijayabharatham Prasuram Trust Throughout the site, the terms “we”, “us” and “our” refer to Vijayabharatham Prasuram Trust. We offer this website, including all information, tools and services available from this site to you, the user, conditioned upon your acceptance of all terms, conditions, policies and notices stated here.</p>
|
||||
<p>By visiting our site and / or purchasing something from us, you engage in our “Service” and agree to be bound by the following terms and conditions (“Terms of Service”, “Terms”), including those additional terms and conditions and policies referenced herein and / or available by hyperlink. These Terms of Service apply to all users of the site, including without limitation users who are browsers, vendors, customers, merchants, and/ or contributors of content.</p>
|
||||
<p>Please read these Terms of Service carefully before accessing or using our website. By accessing or using any part of the site, you agree to be bound by these Terms of Service. If you do not agree to all the terms and conditions of this agreement, then you may not access the website or use any services. If these Terms of Service are considered an offer, acceptance is expressly limited to these Terms of Service.</p>
|
||||
<p>Any new features or tools which are added to the current store shall also be subject to the Terms of Service. You can review the most current version of the Terms of Service at any time on this page. We reserve the right to update, change or replace any part of these Terms of Service by posting updates and/or changes to our website. It is your responsibility to check this page periodically for changes. Your continued use of or access to the website following the posting of any changes constitutes acceptance of those changes.</p>
|
||||
<p><strong>Section 1 – Online Store Terms</strong></p>
|
||||
<ul>
|
||||
<li>By agreeing to these Terms of Service, you represent that you are at least the age of majority in your state or province of residence, or that you are the age of majority in your state or province of residence and you have given us your consent to allow any of your minor dependents to use this site.</li>
|
||||
<li>You may not use our products for any illegal or unauthorized purpose nor may you, in the use of the Service, violate any laws in your jurisdiction (including but not limited to copyright laws).</li>
|
||||
<li>You must not transmit any worms or viruses or any code of a destructive nature.</li>
|
||||
<li>A breach or violation of any of the Terms will result in an immediate termination of your Services.</li>
|
||||
</ul>
|
||||
<p><strong>Section 2 – General Conditions</strong></p>
|
||||
<ul>
|
||||
<li>We reserve the right to refuse service to anyone for any reason at any time.</li>
|
||||
<li>You understand that your content (not including credit card information), may be transferred unencrypted and involve (a) transmissions over various networks; and (b) changes to conform and adapt to technical requirements of connecting networks or devices. Credit card information is always encrypted during transfer over networks.</li>
|
||||
<li>You agree not to reproduce, duplicate, copy, sell, resell or exploit any portion of the Service, use of the Service, or access to the Service or any contact on the website through which the service is provided, without express written permission by us.</li>
|
||||
<li>The headings used in this agreement are included for convenience only and will not limit or otherwise affect these Terms.</li>
|
||||
</ul>
|
||||
<p><strong>Section 3 – Accuracy, Completeness And Time Of Information</strong></p>
|
||||
<ul>
|
||||
<li>We are not responsible if information made available on this site is not accurate, complete or current. The material on this site is provided for general information only and should not be relied upon or used as the sole basis for making decisions without consulting primary, more accurate, more complete or more timely sources of information. Any reliance on the material on this site is at your own risk.</li>
|
||||
<li>This site may contain certain historical information. Historical information, necessarily, is not current and is provided for your reference only. We reserve the right to modify the contents of this site at any time, but we have no obligation to update any information on our site. You agree that it is your responsibility to monitor changes to our site.</li>
|
||||
</ul>
|
||||
<p><strong>Section 4 – Modifications To The Service And Prices</strong></p>
|
||||
<ul>
|
||||
<li>Prices for our products are subject to change without notice.</li>
|
||||
<li>We reserve the right at any time to modify or discontinue the Service (or any part or content thereof) without notice at any time.</li>
|
||||
<li>We shall not be liable to you or to any third-party for any modification, price change, suspension or discontinuance of the Service.</li>
|
||||
</ul>
|
||||
<p><strong>Section 5 – Products Or Services</strong></p>
|
||||
<ul>
|
||||
<li>Certain products or services may be available exclusively online through the website. These products or services may have limited quantities and are subject to return or exchange only according to our Return Policy.</li>
|
||||
<li>We have made every effort to display as accurately as possible the colors and images of our products that appear at the store. We cannot guarantee that your computer monitor’s display of any color will be accurate.</li>
|
||||
<li>We reserve the right, but are not obligated, to limit the sales of our products or Services to any person, geographic region or jurisdiction. We may exercise this right on a case-by-case basis. We reserve the right to limit the quantities of any products or services that we offer. All descriptions of products or product pricing are subject to change at anytime without notice, at the sole discretion of us. We reserve the right to discontinue any product at any time. Any offer for any product or service made on this site is void where prohibited.</li>
|
||||
<li>We do not warrant that the quality of any products, services, information, or other material purchased or obtained by you will meet your expectations, or that any errors in the Service will be corrected.</li>
|
||||
</ul>
|
||||
<p><strong>Section 6 – Accuracy Of Billing And Account Information</strong></p>
|
||||
<ul>
|
||||
<li>We reserve the right to refuse any order you place with us. We may, in our sole discretion, limit or cancel quantities purchased per person, per household or per order. These restrictions may include orders placed by or under the same customer account, the same credit card, and/or orders that use the same billing and/or shipping address. In the event that we make a change to or cancel an order, we may attempt to notify you by contacting the e-mail and/or billing address/phone number provided at the time the order was made. We reserve the right to limit or prohibit orders that, in our sole judgment, appear to be placed by dealers, resellers or distributors.</li>
|
||||
<li>You agree to provide current, complete and accurate purchase and account information for all purchases made at our store. You agree to promptly update your account and other information, including your email address and credit card numbers and expiration dates, so that we can complete your transactions and contact you as needed.</li>
|
||||
</ul>
|
||||
<p>For more detail, please review our Return Policy.</p>
|
||||
<p><strong>Section 7 – Optional Tools</strong></p>
|
||||
<ul>
|
||||
<li>We may provide you with access to third-party tools over which we neither monitor nor have any control nor input.</li>
|
||||
<li>You acknowledge and agree that we provide access to such tools “as is” and “as available” without any warranties, representations or conditions of any kind and without any endorsement. We shall have no liability whatsoever arising from or relating to your use of optional third-party tools.</li>
|
||||
<li>Any use by you of optional tools offered through the site is entirely at your own risk and discretion and you should ensure that you are familiar with and approve of the terms on which tools are provided by the relevant third-party provider(s).</li>
|
||||
<li>We may also, in the future, offer new services and/or features through the website (including, the release of new tools and resources). Such new features and/or services shall also be subject to these Terms of Service.</li>
|
||||
</ul>
|
||||
<p><strong>Section 8 – Third-Party Links</strong></p>
|
||||
<ul>
|
||||
<li>Certain content, products and services available via our Service may include materials from third-parties.</li>
|
||||
<li>Third-party links on this site may direct you to third-party websites that are not affiliated with us. We are not responsible for examining or evaluating the content or accuracy and we do not warrant and will not have any liability or responsibility for any third-party materials or websites, or for any other materials, products, or services of third-parties.</li>
|
||||
<li>We are not liable for any harm or damages related to the purchase or use of goods, services, resources, content, or any other transactions made in connection with any third-party websites. Please review carefully the third-party’s policies and practices and make sure you understand them before you engage in any transaction. Complaints, claims, concerns, or questions regarding third-party products should be directed to the third-party.</li>
|
||||
</ul>
|
||||
<p><strong>Section 9 – User Comments, Feedback And Other Submissions</strong></p>
|
||||
<ul>
|
||||
<li>If, at our request, you send certain specific submissions (for example contest entries) or without a request from us you send creative ideas, suggestions, proposals, plans, or other materials, whether online, by email, by postal mail, or otherwise (collectively, ‘comments’), you agree that we may, at any time, without restriction, edit, copy, publish, distribute, translate and otherwise use in any medium any comments that you forward to us. We are and shall be under no obligation (1) to maintain any comments in confidence; (2) to pay compensation for any comments; or (3) to respond to any comments.</li>
|
||||
<li>We may, but have no obligation to, monitor, edit or remove content that we determine in our sole discretion are unlawful, offensive, threatening, libelous, defamatory, pornographic, obscene or otherwise objectionable or violates any party’s intellectual property or these Terms of Service.</li>
|
||||
<li>You agree that your comments will not violate any right of any third-party, including copyright, trademark, privacy, personality or other personal or proprietary right. You further agree that your comments will not contain libelous or otherwise unlawful, abusive or obscene material, or contain any computer virus or other malware that could in any way affect the operation of the Service or any related website. You may not use a false e-mail address, pretend to be someone other than yourself, or otherwise mislead us or third-parties as to the origin of any comments. You are solely responsible for any comments you make and their accuracy. We take no responsibility and assume no liability for any comments posted by you or any third-party.</li>
|
||||
</ul>
|
||||
<p><strong>Section 10 – Personal Information</strong></p>
|
||||
<p>Your submission of personal information through the store is governed by our Privacy Policy.</p>
|
||||
|
||||
<p><strong>Section 11 – Errors, Inaccuracies And Omissions</strong></p>
|
||||
<ul>
|
||||
<li>Occasionally there may be information on our site or in the Service that contains typographical errors, inaccuracies or omissions that may relate to product descriptions, pricing, promotions, offers, product shipping charges, transit times and availability. We reserve the right to correct any errors, inaccuracies or omissions, and to change or update information or cancel orders if any information in the Service or on any related website is inaccurate at any time without prior notice (including after you have submitted your order).</li>
|
||||
<li>We undertake no obligation to update, amend or clarify information in the Service or on any related website, including without limitation, pricing information, except as required by law. No specified update or refresh date applied in the Service or on any related website, should be taken to indicate that all information in the Service or on any related website has been modified or updated.</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>Section 12 – Prohibited Uses</strong></p>
|
||||
<ul>
|
||||
<li>In addition to other prohibitions as set forth in the Terms of Service, you are prohibited from using the site or its content: (a) for any unlawful purpose; (b) to solicit others to perform or participate in any unlawful acts; (c) to violate any international, federal, provincial or state regulations, rules, laws, or local ordinances; (d) to infringe upon or violate our intellectual property rights or the intellectual property rights of others; (e) to harass, abuse, insult, harm, defame, slander, disparage, intimidate, or discriminate based on gender, sexual orientation, religion, ethnicity, race, age, national origin, or disability; (f) to submit false or misleading information; (g) to upload or transmit viruses or any other type of malicious code that will or may be used in any way that will affect the functionality or operation of the Service or of any related website, other websites, or the Internet; (h) to collect or track the personal information of others; (i) to spam, phish, pharm, pretext, spider, crawl, or scrape; (j) for any obscene or immoral purpose; or (k) to interfere with or circumvent the security features of the Service or any related website, other websites, or the Internet. We reserve the right to terminate your use of the Service or any related website for violating any of the prohibited uses.</li>
|
||||
</ul>
|
||||
<p><strong>Section 13 – Disclaimer Of Warranties; Limition Of Liability</strong></p>
|
||||
<ul>
|
||||
<li>We do not guarantee, represent or warrant that your use of our service will be uninterrupted, timely, secure or error-free.</li>
|
||||
<li>We do not warrant that the results that may be obtained from the use of the service will be accurate or reliable.</li>
|
||||
<li>You agree that from time to time we may remove the service for indefinite periods of time or cancel the service at any time, without notice to you.</li>
|
||||
<li>You expressly agree that your use of, or inability to use, the service is at your sole risk. The service and all products and services delivered to you through the service are (except as expressly stated by us) provided ‘as is’ and ‘as available’ for your use, without any representation, warranties or conditions of any kind, either express or implied, including all implied warranties or conditions of merchantability, merchantable quality, fitness for a particular purpose, durability, title, and non-infringement.</li>
|
||||
<li>In no case shall Vijayabharatham Prasuram Trust, our directors, officers, employees, affiliates, agents, contractors, interns, suppliers, service providers or licensors be liable for any injury, loss, claim, or any direct, indirect, incidental, punitive, special, or consequential damages of any kind, including, without limitation lost profits, lost revenue, lost savings, loss of data, replacement costs, or any similar damages, whether based in contract, tort (including negligence), strict liability or otherwise, arising from your use of any of the service or any products procured using the service, or for any other claim related in any way to your use of the service or any product, including, but not limited to, any errors or omissions in any content, or any loss or damage of any kind incurred as a result of the use of the service or any content (or product) posted, transmitted, or otherwise made available via the service, even if advised of their possibility. Because some states or jurisdictions do not allow the exclusion or the limitation of liability for consequential or incidental damages, in such states or jurisdictions, our liability shall be limited to the maximum extent permitted by law.</li>
|
||||
</ul>
|
||||
<p><strong>Section 14 – Indemnification</strong></p>
|
||||
<p>You agree to indemnify, defend and hold harmless Vijayabharatham Prasuram Trust and our parent, subsidiaries, affiliates, partners, officers, directors, agents, contractors, licensors, service providers, subcontractors, suppliers, interns and employees, harmless from any claim or demand, including reasonable attorneys’ fees, made by any third-party due to or arising out of your breach of these Terms of Service or the documents they incorporate by reference, or your violation of any law or the rights of a third-party.</p>
|
||||
|
||||
<p><strong>Section 15 – Severability</strong></p>
|
||||
<p>In the event that any provision of these Terms of Service is determined to be unlawful, void or unenforceable, such provision shall nonetheless be enforceable to the fullest extent permitted by applicable law, and the unenforceable portion shall be deemed to be severed from these Terms of Service, such determination shall not affect the validity and enforceability of any other remaining provisions.</p>
|
||||
|
||||
<p><strong>Section 16 – Termination</strong></p>
|
||||
<ul>
|
||||
<li>The obligations and liabilities of the parties incurred prior to the termination date shall survive the termination of this agreement for all purposes.</li>
|
||||
<li>These Terms of Service are effective unless and until terminated by either you or us. You may terminate these Terms of Service at any time by notifying us that you no longer wish to use our Services, or when you cease using our site.</li>
|
||||
<li>If in our sole judgment you fail, or we suspect that you have failed, to comply with any term or provision of these Terms of Service, we also may terminate this agreement at any time without notice and you will remain liable for all amounts due up to and including the date of termination; and/or accordingly may deny you access to our Services (or any part thereof).</li>
|
||||
</ul>
|
||||
|
||||
<p><strong>Section 17 – Entire Agreement</strong></p>
|
||||
<ul>
|
||||
<li>The failure of us to exercise or enforce any right or provision of these Terms of Service shall not constitute a waiver of such right or provision.</li>
|
||||
<li>These Terms of Service and any policies or operating rules posted by us on this site or in respect to The Service constitutes the entire agreement and understanding between you and us and govern your use of the Service, superseding any prior or contemporaneous agreements, communications and proposals, whether oral or written, between you and us (including, but not limited to, any prior versions of the Terms of Service).</li>
|
||||
<li>Any ambiguities in the interpretation of these Terms of Service shall not be construed against the drafting party.</li>
|
||||
</ul>
|
||||
<p><strong>Section 18 – Governing Law</strong></p>
|
||||
<p>These Terms of Service and any separate agreements whereby we provide you Services shall be governed by and construed in accordance with the laws of India and jurisdiction of Chennai.
|
||||
|
||||
<p><strong>Section 19 – Changes To Terms Of Service</strong></p>
|
||||
<ul>
|
||||
<li>You can review the most current version of the Terms of Service at any time at this page.</li>
|
||||
<li>We reserve the right, at our sole discretion, to update, change or replace any part of these Terms of Service by posting updates and changes to our website. It is your responsibility to check our website periodically for changes. Your continued use of or access to our website or the Service following the posting of any changes to these Terms of Service constitutes acceptance of those changes.</li>
|
||||
</ul>
|
||||
<p><strong>Section 20 – Contact Information</strong></p>
|
||||
<p>Questions about the Terms of Service should be sent to us at <?= $company_email; ?>.</p>
|
||||
</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- delivery-payments-refunds modal content -->
|
||||
<div class="modal fade" id="delivery-payments-refunds" tabindex="-1" role="dialog" aria-labelledby="scrollableModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="scrollableModalTitle">Delivery, Payments & Refunds</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
<p><strong>Processing your order</strong></p>
|
||||
<p>Please allow 5 working days to process your order before shipping it. Please note that we must have your full name, your correct and complete address, email address and telephone number. If something is unclear with your order we will send you an email asking you to confirm.</p>
|
||||
<p><strong>Payment Method</strong></p>
|
||||
<ul>
|
||||
<li>We accept the payment through secured payment gateways only. You can pay using Paypal, Credit Card, Debit Card or Net banking.</li>
|
||||
<li>We also give you the possibility to pay by money order; we will have to wait to ship your order until our bank has received your money. In the worst case this can take 21 to 28 business days and therefore your order will be delivered much later than if you would pay with credit card. For your convenience and security we advice you to pay through secured online payment gateways.</li>
|
||||
</ul>
|
||||
<p><strong>Order Status</strong></p>
|
||||
<p>On your account page you can see the status of your order. You must have a shop account to view the status of your orders. As soon as your order is shipped, you will receive an acknowledgement by e-mail.</p>
|
||||
<p><strong>Returns</strong></p>
|
||||
<ul>
|
||||
<li>Our policy lasts 30 days. If 30 days have gone by since your purchase, unfortunately we can’t offer you a refund or exchange.</li>
|
||||
<li>To be eligible for a return, your item must be unused and in the same condition that you received it. It must also be in the original packaging.</li>
|
||||
<li>To complete your return, we require a receipt or proof of purchase.</li>
|
||||
<li>Please do not send your purchase back to the manufacturer.</li>
|
||||
<li>Any item not in its original condition is damaged or missing parts for reasons not due to our error is not eligible for return.</li>
|
||||
<li>To process a return please write an email to <?= $company_email; ?> with order ID or invoice in attachment. Consequently you can also fill in return form at</li>
|
||||
</ul>
|
||||
<p><strong>Refunds (if applicable)</strong></p>
|
||||
<ul>
|
||||
<li>Once your return is received and inspected, we will send you an email to notify you that we have received your returned item. We will also notify you of the approval or rejection of your refund.</li>
|
||||
<li>If you are approved, then your refund will be processed within 48 business hours, and a credit will automatically be applied to your credit card or original method of payment, which will reflect in your account in 7-10 working days.</li>
|
||||
<li>Shipping charges are not eligible for refunds, in case return is for no fault of ours.</li>
|
||||
</ul>
|
||||
<p><strong>Late or missing refunds (if applicable)</strong></p>
|
||||
<ul>
|
||||
<li>If you haven’t received a refund yet, first check your bank account again.</li>
|
||||
<li>Then contact your credit card company, it may take some time before your refund is officially posted.</li>
|
||||
<li>Next contact your bank. There is often some processing time before a refund is posted.</li>
|
||||
<li>If you’ve done all of this and you still have not received your refund yet, please contact us at <?= $company_email; ?>.</li>
|
||||
</ul>
|
||||
<p><strong>Sale items (if applicable)</strong></p>
|
||||
<p>Only regular priced items may be refunded, unfortunately sale items cannot be refunded.</p>
|
||||
|
||||
<p><strong>Exchanges (if applicable)</strong></p>
|
||||
<p>We only replace items if they are defective or damaged. If you need to exchange it for the same item, send us an email at <?= $company_email; ?>.</p>
|
||||
|
||||
<p><strong>Return/Exchange Shipping</strong></p>
|
||||
<ul>
|
||||
<li>To return your product, you should mail your product to: Vijayabharatham Prasuram, Sri Kasi, 12, M.V. Naidu Street, Chetpet, Chennai.</li>
|
||||
<li>You will be responsible for paying for your own shipping costs for returning your item. Shipping costs are non-refundable. If you receive a refund, the cost of return shipping will be deducted from your refund.</li>
|
||||
<li>Depending on where you live, the time it may take for your exchanged product to reach you, may vary.</li>
|
||||
</ul>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<img src="<?= $favicon; ?>" alt="company fav icon for footer" width="25" height="25">
|
||||
<!-- <script>document.write(new Date().getFullYear())</script> © <?= $company_name; ?> -->
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © <?= "<a href=".$footer_about." target='_blank' >".$company_name."</a>"; ?>
|
||||
var appStartedYear = "2024";
|
||||
var currentYear = new Date().getFullYear();
|
||||
if (appStartedYear == currentYear) {
|
||||
document.write(appStartedYear);
|
||||
} else {
|
||||
document.write(appStartedYear + " - " + currentYear);
|
||||
}
|
||||
</script>
|
||||
© <a href="<?= $footer_about ?>" target="_blank"><?= $company_name ?></a>
|
||||
<!-- <p> <?= date('Y') ?> © <?= $company_name; ?>.</p>
|
||||
<p> <?= date('Y') ?> © <?= $company_name; ?>. Page rendered in {elapsed_time} seconds</p> -->
|
||||
|
||||
@ -359,363 +66,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content pt-0">
|
||||
<div class="tab-pane" id="chat-tab" role="tabpanel">
|
||||
|
||||
<form class="search-bar p-3">
|
||||
<div class="position-relative">
|
||||
<input type="text" class="form-control" placeholder="Search...">
|
||||
<span class="mdi mdi-magnify"></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h6 class="font-weight-medium px-3 mt-2 text-uppercase">Group Chats</h6>
|
||||
|
||||
<div class="p-2">
|
||||
<a href="javascript: void(0);" class="text-reset notification-item pl-3 mb-2 d-block">
|
||||
<i class="mdi mdi-checkbox-blank-circle-outline mr-1 text-success"></i>
|
||||
<span class="mb-0 mt-1">App Development</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item pl-3 mb-2 d-block">
|
||||
<i class="mdi mdi-checkbox-blank-circle-outline mr-1 text-warning"></i>
|
||||
<span class="mb-0 mt-1">Office Work</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item pl-3 mb-2 d-block">
|
||||
<i class="mdi mdi-checkbox-blank-circle-outline mr-1 text-danger"></i>
|
||||
<span class="mb-0 mt-1">Personal Group</span>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item pl-3 d-block">
|
||||
<i class="mdi mdi-checkbox-blank-circle-outline mr-1"></i>
|
||||
<span class="mb-0 mt-1">Freelance</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h6 class="font-weight-medium px-3 mt-3 text-uppercase">Favourites <a href="javascript: void(0);" class="font-18 text-danger"><i class="float-right mdi mdi-plus-circle"></i></a></h6>
|
||||
|
||||
<div class="p-2">
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-10.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Andrew Mackie</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">It will seem like simplified English.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-1.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Rory Dalyell</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">To an English person, it will seem like simplified</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status busy"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-9.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Jaxon Dunhill</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">To achieve this, it would be necessary.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h6 class="font-weight-medium px-3 mt-3 text-uppercase">Other Chats <a href="javascript: void(0);" class="font-18 text-danger"><i class="float-right mdi mdi-plus-circle"></i></a></h6>
|
||||
|
||||
<div class="p-2 pb-4">
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status online"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-2.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Jackson Therry</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">Everyone realizes why a new common language.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status away"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-4.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Charles Deakin</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">The languages only differ in their grammar.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status online"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-5.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Ryan Salting</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">If several languages coalesce the grammar of the resulting.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status online"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-6.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Sean Howse</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">It will seem like simplified English.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status busy"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-7.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Dean Coward</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">The new common language will be more simple.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset notification-item">
|
||||
<div class="media">
|
||||
<div class="position-relative mr-2">
|
||||
<span class="user-status away"></span>
|
||||
<img src="<?= base_url() . "public/assets/images/users/avatar-8.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
|
||||
</div>
|
||||
<div class="media-body overflow-hidden">
|
||||
<h6 class="mt-0 mb-1 font-14">Hayley East</h6>
|
||||
<div class="font-13 text-muted">
|
||||
<p class="mb-0 text-truncate">One could refuse to pay expensive translators.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="text-center mt-3">
|
||||
<a href="javascript:void(0);" class="btn btn-sm btn-white">
|
||||
<i class="mdi mdi-spin mdi-loading mr-2"></i>
|
||||
Load more
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="tasks-tab" role="tabpanel">
|
||||
<h6 class="font-weight-medium p-3 m-0 text-uppercase">Working Tasks</h6>
|
||||
<div class="px-2">
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">App Development<span class="float-right">75%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-success" role="progressbar" style="width: 75%" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">Database Repair<span class="float-right">37%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-info" role="progressbar" style="width: 37%" aria-valuenow="37" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">Backup Create<span class="float-right">52%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-warning" role="progressbar" style="width: 52%" aria-valuenow="52" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h6 class="font-weight-medium px-3 mb-0 mt-4 text-uppercase">Upcoming Tasks</h6>
|
||||
|
||||
<div class="p-2">
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">Sales Reporting<span class="float-right">12%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-danger" role="progressbar" style="width: 12%" aria-valuenow="12" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">Redesign Website<span class="float-right">67%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-primary" role="progressbar" style="width: 67%" aria-valuenow="67" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="javascript: void(0);" class="text-reset item-hovered d-block p-2">
|
||||
<p class="text-muted mb-0">New Admin Design<span class="float-right">84%</span></p>
|
||||
<div class="progress mt-2" style="height: 4px;">
|
||||
<div class="progress-bar bg-success" role="progressbar" style="width: 84%" aria-valuenow="84" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="p-3 mt-2">
|
||||
<a href="javascript: void(0);" class="btn btn-success btn-block waves-effect waves-light">Create Task</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane active" id="settings-tab" role="tabpanel">
|
||||
<h6 class="font-weight-medium px-3 m-0 py-2 font-13 text-uppercase bg-light">
|
||||
<span class="d-block py-1">Theme Settings</span>
|
||||
</h6>
|
||||
|
||||
<div class="p-3">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Customize </strong> the overall color scheme, sidebar menu, etc.
|
||||
</div>
|
||||
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Color Scheme</h6>
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="color-scheme-mode" value="light" id="light-mode-check" checked />
|
||||
<label class="custom-control-label" for="light-mode-check">Light Mode</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="color-scheme-mode" value="dark" id="dark-mode-check" />
|
||||
<label class="custom-control-label" for="dark-mode-check">Dark Mode</label>
|
||||
</div>
|
||||
|
||||
<!-- Width -->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Width</h6>
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="width" value="fluid" id="fluid-check" checked />
|
||||
<label class="custom-control-label" for="fluid-check">Fluid</label>
|
||||
</div>
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="width" value="boxed" id="boxed-check" />
|
||||
<label class="custom-control-label" for="boxed-check">Boxed</label>
|
||||
</div>
|
||||
|
||||
<!-- Topbar -->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Topbar</h6>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="topbar-color" value="dark" id="darktopbar-check" checked />
|
||||
<label class="custom-control-label" for="darktopbar-check">Dark</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="topbar-color" value="light" id="lighttopbar-check" />
|
||||
<label class="custom-control-label" for="lighttopbar-check">Light</label>
|
||||
</div>
|
||||
|
||||
<!-- Menu positions -->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Menus Positon <small>(Leftsidebar and Topbar)</small></h6>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="menus-position" value="fixed" id="fixed-check" checked />
|
||||
<label class="custom-control-label" for="fixed-check">Fixed</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="menus-position" value="scrollable" id="scrollable-check" />
|
||||
<label class="custom-control-label" for="scrollable-check">Scrollable</label>
|
||||
</div>
|
||||
|
||||
<!-- Left Sidebar-->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Left Sidebar Color</h6>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-color" value="light" id="light-check" checked />
|
||||
<label class="custom-control-label" for="light-check">Light</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-color" value="dark" id="dark-check" />
|
||||
<label class="custom-control-label" for="dark-check">Dark</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-color" value="brand" id="brand-check" />
|
||||
<label class="custom-control-label" for="brand-check">Brand</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-3">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-color" value="gradient" id="gradient-check" />
|
||||
<label class="custom-control-label" for="gradient-check">Gradient</label>
|
||||
</div>
|
||||
|
||||
<!-- size -->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Left Sidebar Size</h6>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-size" value="default" id="default-size-check" checked />
|
||||
<label class="custom-control-label" for="default-size-check">Default</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-size" value="condensed" id="condensed-check" />
|
||||
<label class="custom-control-label" for="condensed-check">Condensed <small>(Extra Small size)</small></label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="radio" class="custom-control-input" name="leftsidebar-size" value="compact" id="compact-check" />
|
||||
<label class="custom-control-label" for="compact-check">Compact <small>(Small size)</small></label>
|
||||
</div>
|
||||
|
||||
<!-- User info -->
|
||||
<h6 class="font-weight-medium font-14 mt-4 mb-2 pb-1">Sidebar User Info</h6>
|
||||
|
||||
<div class="custom-control custom-switch mb-1">
|
||||
<input type="checkbox" class="custom-control-input" name="leftsidebar-user" value="fixed" id="sidebaruser-check" />
|
||||
<label class="custom-control-label" for="sidebaruser-check">Enable</label>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn btn-primary btn-block mt-4" id="resetBtn">Reset to Default</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- end slimscroll-menu-->
|
||||
</div>
|
||||
<!-- /Right-bar -->
|
||||
@ -786,6 +136,10 @@
|
||||
|
||||
<!-- Init js-->
|
||||
<script src="<?= base_url() . "public/assets/js/pages/form-pickers.init.js" ?>"></script>
|
||||
<!-- Sweet Alerts js -->
|
||||
<script src="<?= base_url() . "public/assets/libs/sweetalert2/sweetalert2.min.js" ?>"></script>
|
||||
<!-- Sweet alert init js-->
|
||||
<script src="<?= base_url() . "public/assets/js/pages/sweet-alerts.init.js" ?>"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<!-- plugin css -->
|
||||
<link href="<?= base_url()."public/assets/libs/multiselect/css/multi-select.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?= base_url()."public/assets/libs/select2/css/select2.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
<!-- <link href="<?= base_url()."public/assets/libs/selectize/css/selectize.bootstrap3.css" ?>" rel="stylesheet" type="text/css" /> -->
|
||||
<link href="<?= base_url() . "public//assets/libs/sweetalert2/sweetalert2.min.css" ?>" rel="stylesheet" type="text/css" /> <!-- <link href="<?= base_url()."public/assets/libs/selectize/css/selectize.bootstrap3.css" ?>" rel="stylesheet" type="text/css" /> -->
|
||||
|
||||
<!-- third party css -->
|
||||
<link href="<?= base_url()."public/assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" ?>" rel="stylesheet" type="text/css" />
|
||||
|
||||
@ -81,13 +81,11 @@
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- <?php if ($loggedin_person_role !== 'manager' && $loggedin_person_role !== 'sadmin') : ?>
|
||||
<a href="<?= base_url()."sitesetting_page/".$bid; ?>"class="dropdown-item notify-item">
|
||||
<i class="ri-briefcase-4-fill"></i><span> Org Setting </span>
|
||||
<a href="javascript: void(0);" class="dropdown-item notify-item" data-toggle="modal" data-target="#changepwd-modal">
|
||||
<i class=" ri-lock-password-line"></i>
|
||||
<span>Change Password</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
|
||||
|
||||
<a href="<?= base_url()."lock"; ?>" class="dropdown-item notify-item">
|
||||
<i class="ri-lock-line"></i>
|
||||
<span>Lock Screen</span>
|
||||
@ -161,7 +159,114 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- end Topbar -->
|
||||
<div id="changepwd-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header mt-1">
|
||||
<h5 class="modal-title text-center">Change Password</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="message-container"></div>
|
||||
<form id="passwordChangeForm" class="px-3 parsley-examples" data-parsley-validate>
|
||||
<!-- <div class="form-group">
|
||||
<label for="emailaddress1">Email address</label>
|
||||
<input class="form-control" type="text" readonly="" id="emailaddress1" name="user_mail" value="email@example.com">
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input class="form-control" type="password" required="" id="password0" name="user_old_password" placeholder="Enter your password" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password1">New Password</label>
|
||||
<input class="form-control" type="password" required="" id="password1" name="user_new_password" placeholder="Enter your new password" data-parsley-not-equal-to-old-password="" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password2">Confirm Password</label>
|
||||
<input class="form-control" type="password" required="" id="password2" name="user_confirm_password" placeholder="Enter your confirm password" data-parsley-equal-to-new-password="" autocomplete="off">
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center mt-1">
|
||||
<button type="submit" class="btn btn-rounded btn-primary">Update</button>
|
||||
</div>
|
||||
<!-- <div class="form-group text-center"> -->
|
||||
<!-- <button class="btn btn-rounded btn-primary" onclick="changePassword()">Update</button> -->
|
||||
<!-- <button class="btn btn-rounded btn-primary" onclick="changePassword(event)">Update</button> -->
|
||||
<!-- </div> -->
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#passwordChangeForm').parsley();
|
||||
|
||||
window.Parsley.addValidator('notEqualToOldPassword', {
|
||||
validateString: function(value, requirement) {
|
||||
var oldPassword = $('#password0').val();
|
||||
return value !== oldPassword;
|
||||
},
|
||||
messages: {
|
||||
en: 'New password must not be the same as the old password.'
|
||||
}
|
||||
});
|
||||
|
||||
window.Parsley.addValidator('equalToNewPassword', {
|
||||
validateString: function(value, requirement) {
|
||||
var newPassword = $('#password1').val();
|
||||
return value === newPassword;
|
||||
},
|
||||
messages: {
|
||||
en: 'Confirm password must match the new password.'
|
||||
}
|
||||
});
|
||||
|
||||
$('#passwordChangeForm').on('submit', function(event) {
|
||||
event.preventDefault(); // Prevent default form submission
|
||||
|
||||
if ($(this).parsley().isValid()) {
|
||||
var formData = $(this).serialize();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'change_password' ?>",
|
||||
data: formData,
|
||||
success: function(response) {
|
||||
if (response['data']['status']) {
|
||||
// setTimeout(function() {
|
||||
$('#message-container').html('<div class="alert alert-success alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+response['data']['message']+'</div>');
|
||||
// $('#changepwd-modal').modal('hide');
|
||||
$("#passwordChangeForm")[0].reset();
|
||||
// }, 6000);
|
||||
} else {
|
||||
// setTimeout(function() {
|
||||
$('#message-container').html('<div class="alert alert-warning alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+response['data']['message']+'</div>');
|
||||
// $('#changepwd-modal').modal('hide');
|
||||
$("#passwordChangeForm")[0].reset();
|
||||
// }, 6000);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
// setTimeout(function() {
|
||||
$('#message-container').html('<div class="alert alert-danger alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> Error Occur : '+xhr.responseText+'</div>');
|
||||
// }, 6000);
|
||||
console.error(xhr.responseText);
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid"> <!-- close div on footer.php -->
|
||||
|
||||
|
||||
@ -15,30 +15,33 @@
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="first_name" class="col-form-label">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">Name <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_name" name="first_name" placeholder="Name" value="<?= isset($details['first_name']) ? $details['first_name'] : '' ?>" required />
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile_no" class="col-form-label">Phone Number<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mobile_no" name="mobile_no" placeholder="Phone Number (Enter only numbers)" data-toggle="input-mask" data-mask-format="0000000000" value="<?= isset($details['mobile_no']) ? $details['mobile_no'] : '' ?>" autofocus required>
|
||||
<label for="mobile_no" class="col-form-label">Phone Number <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mobile_no" name="mobile_no" placeholder="Phone Number (Enter only numbers)" data-toggle="input-mask" data-mask-format="0000000000" value="<?= isset($details['mobile_no']) ? $details['mobile_no'] : '' ?>" autofocus required onchange="checkExisting(this.value,'mobile_no','mobile_no')">
|
||||
<span id="mobileValidationMessage"></span>
|
||||
</div>
|
||||
<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>
|
||||
<select id="role" name="role" class="form-control" required>
|
||||
<option value="">--Select--</option>
|
||||
<option value="admin" <?= isset($details['role']) && $details['role'] === 'admin' ? 'selected' : '' ?>>Admin</option>
|
||||
<option value="volunteer" <?= isset($details['role']) && $details['role'] === 'volunteer' ? 'selected' : '' ?>>Volunteer</option>
|
||||
<option value="accounts" <?= isset($details['role']) && $details['role'] === 'accounts' ? 'selected' : '' ?>>Accounts Staff</option>
|
||||
<option value="auditor" <?= isset($details['role']) && $details['role'] === 'auditor' ? 'selected' : '' ?>>Auditor</option>
|
||||
<?php $roleArr = array('admin', 'accounts', 'auditor','donor','volunteer');
|
||||
foreach ($roleArr as $value) {
|
||||
$selected = (isset($details['role']) && $details['role'] === $value) ? "selected" : "";
|
||||
?>
|
||||
<option value="<?php echo $value; ?>" <?php echo $selected; ?>><?php echo ucfirst($value); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($loggedin_person_role === 'sadmin') { ?>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="business_id" class="col-form-label">Organization<span class="text-danger">*</span></label>
|
||||
<label for="business_id" class="col-form-label">Organization <span class="text-danger">*</span></label>
|
||||
<select id="business_id" name="business_id" class="form-control" required>
|
||||
<?php foreach ($business_details as $business) { ?>
|
||||
<?php foreach ($organzation_details as $business) { ?>
|
||||
<option value="<?= $business['business_id']; ?>" <?= isset($details['business_id']) && ($details['business_id'] == $business['business_id']) ? 'selected' : '' ?>>
|
||||
<?= $business['title']; ?>
|
||||
</option>
|
||||
@ -46,7 +49,7 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="F" class="col-form-label">Organization Branches<span class="text-danger">*</span></label>
|
||||
<label for="branch_id" class="col-form-label" id="branch_id_label">Organization Branches</label>
|
||||
<select id="branch_id" name="branch_id" class="form-control" required>
|
||||
<?php if (!empty($branches)) { ?>
|
||||
<?php foreach ($branches as $branch) { ?>
|
||||
@ -63,18 +66,19 @@
|
||||
<?php } ?>
|
||||
<div class="form-row">
|
||||
<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 onchange="checkExisting(this.value,'email','email')"/>
|
||||
<span id="emailValidationMessage"></span>
|
||||
</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>
|
||||
<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>
|
||||
<?php } ?>
|
||||
<?php if ($loggedin_person_role !== 'sadmin') : ?>
|
||||
<div class="form-group col-md-4">
|
||||
<label for="branch" class="col-form-label">Branch<span class="text-danger"></span></label>
|
||||
<label for="branch" class="col-form-label" id="branch_label">Branch</label>
|
||||
<select id="branch" name="branch" class="form-control">
|
||||
<option value="">--Select--</option>
|
||||
<?php if (!empty($branches)) {
|
||||
@ -90,36 +94,22 @@
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="address" class="col-form-label">Address<span class="text-danger"></span></label>
|
||||
<label for="address" class="col-form-label">Address </label>
|
||||
<input type="text" class="form-control" id="address" name="address" placeholder="Address (eg : 1234 Main St)" value="<?= isset($details['address']) ? $details['address'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="city" class="col-form-label">City<span class="text-danger"></span></label>
|
||||
<label for="city" class="col-form-label">City </label>
|
||||
<input type="text" class="form-control" id="city" name="city" placeholder="City" value="<?= isset($details['city']) ? $details['city'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="state" class="col-form-label">State<span class="text-danger"></span></label>
|
||||
<label for="state" class="col-form-label">State </label>
|
||||
<input type="text" class="form-control" id="state" name="state" placeholder="State" value="<?= isset($details['state']) ? $details['state'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="postal_code" class="col-form-label">Postal Code<span class="text-danger"></span></label>
|
||||
<label for="postal_code" class="col-form-label">Postal Code </label>
|
||||
<input data-parsley-type="number" type="text" class="form-control" id="postal_code" name="postal_code" placeholder="Postal Code (PIN)" value="<?= isset($details['postal_code']) ? $details['postal_code'] : '' ?>" pattern="[0-9]{6}" maxlength="6" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<?php if (!empty($details['profile_picture'])) { ?>
|
||||
<div class="form-group col-md-4 mt-3">
|
||||
<div class="media">
|
||||
|
||||
<div class="media-body">
|
||||
<!-- <h5 class="mt-0">Existing Profile Picture</h5> -->
|
||||
<!-- <p class="mb-1"><?= $details['profile_picture']; ?></p> -->
|
||||
<input type="hidden" id="existing_profile_picture_name" name="existing_profile_picture_name" placeholder="hidden Field for profile picture name" readonly value="<?= $details['profile_picture']; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<input type="hidden" id="user_id" name="user_id" placeholder="hidden for user id" value="<?= isset($details['user_id']) ? $details['user_id'] : '' ?>" />
|
||||
<input type="hidden" id="dummy_flag" name="dummy_flag" placeholder="hidden for dummy flag redirect purpose" value="<?= isset($dummy_flag) ? $dummy_flag : '' ?>" />
|
||||
<?php if (!empty($details) && $loggedin_person_role !== 'volunteer') { ?>
|
||||
@ -139,26 +129,11 @@
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if ($loggedin_person_role !== 'volunteer') : ?>
|
||||
<?php
|
||||
// Assuming $session_uid holds the ID of the logged-in user
|
||||
// Assuming $details['user_id'] holds the ID of the user being edited
|
||||
$user_id = isset($details['user_id']) ? $details['user_id'] : null;
|
||||
|
||||
// Check if the logged-in user's ID matches the user's ID
|
||||
if ($session_uid == $user_id) {
|
||||
// Redirect to the dashboard with logged_user_id parameter
|
||||
$redirect_url = base_url() . "dashboard";
|
||||
} else {
|
||||
// Redirect to the user list
|
||||
$redirect_url = base_url() . "user_list";
|
||||
}
|
||||
?>
|
||||
<a href="<?= $redirect_url; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||
|
||||
<!-- -->
|
||||
|
||||
|
||||
<?php if ($loggedin_person_role !== 'volunteer') :
|
||||
$user_id = isset($details['user_id']) ? $details['user_id'] : null;
|
||||
$redirect_url = ($session_uid == $user_id) ? base_url() . "dashboard" : $redirect_url = base_url() . "user_list";
|
||||
?>
|
||||
<a href="<?= $redirect_url; ?>" class="btn btn-secondary waves-effect">Cancel</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -189,48 +164,7 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Get the current date in "yyyy-mm-dd" format
|
||||
function getCurrentDate() {
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
let month = today.getMonth() + 1;
|
||||
let day = today.getDate();
|
||||
|
||||
// Add leading zeros if month or day is less than 10
|
||||
if (month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
|
||||
if (day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
// Set the max attribute of the date input field to the current date
|
||||
document.getElementById('date_of_birth').setAttribute('max', getCurrentDate());
|
||||
|
||||
// Set the min attribute of the date input field to "1965-01-01"
|
||||
document.getElementById('date_of_birth').setAttribute('min', '1965-01-01');
|
||||
|
||||
function validateFile(input) {
|
||||
const file = input.files[0];
|
||||
const errorMessage = document.getElementById("error_message");
|
||||
|
||||
if (file) {
|
||||
if (file.type.startsWith("image/")) {
|
||||
// It's an image file, no error
|
||||
errorMessage.textContent = "";
|
||||
} else {
|
||||
// Invalid file type
|
||||
errorMessage.textContent = "Invalid file type. Please select an image.";
|
||||
input.value = ""; // Clear the input field
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
document.getElementById('myForm').addEventListener('submit', function(event) {
|
||||
var form = event.target;
|
||||
@ -245,6 +179,27 @@
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
var logged_person_role = "<?php echo get_user_role() ?>";
|
||||
var dropdown_choosen_role = "<?= isset($details['role']) ? $details['role'] : ""; ?>";
|
||||
if (dropdown_choosen_role && logged_person_role === 'sadmin') {
|
||||
if (dropdown_choosen_role === 'volunteer' || dropdown_choosen_role === 'donor') {
|
||||
$('#branch_id').prop('required', true);
|
||||
$('#branch_id_label').html('Organization Branches<span class="text-danger">*</span>');
|
||||
} else {
|
||||
$('#branch_id').prop('required', false);
|
||||
$('#branch_id_label').html('Organization Branches');
|
||||
}
|
||||
}else if(dropdown_choosen_role && logged_person_role === 'admin'){
|
||||
if (dropdown_choosen_role === 'volunteer' || dropdown_choosen_role === 'donor') {
|
||||
$('#branch').prop('required', true);
|
||||
$('#branch_label').html('Branch <span class="text-danger">*</span>');
|
||||
} else {
|
||||
$('#branch').prop('required', false);
|
||||
$('#branch_label').html('Branch');
|
||||
}
|
||||
}
|
||||
|
||||
// Function to fetch branches based on selected organization
|
||||
function fetchBranches(selectedBusinessId, preSelectedBranchId) {
|
||||
var businessBranchDropdown = $('#branch_id');
|
||||
@ -297,6 +252,28 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#role').change(function() {
|
||||
|
||||
var selectedOption = $(this).val();
|
||||
if(logged_person_role === 'sadmin'){
|
||||
if (selectedOption === 'volunteer' || selectedOption === 'donor') {
|
||||
$('#branch_id').prop('required', true);
|
||||
$('#branch_id_label').html('Organization Branches<span class="text-danger">*</span>');
|
||||
} else {
|
||||
$('#branch_id').prop('required', false);
|
||||
$('#branch_id_label').html('Organization Branches');
|
||||
}
|
||||
}else if(logged_person_role === 'admin'){
|
||||
if (selectedOption === 'volunteer' || selectedOption === 'donor') {
|
||||
$('#branch').prop('required', true);
|
||||
$('#branch_label').html('Branch <span class="text-danger">*</span>');
|
||||
} else {
|
||||
$('#branch').prop('required', false);
|
||||
$('#branch_label').html('Branch');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger the change event if the organization is pre-selected (e.g., during edit)
|
||||
var preSelectedBusinessId = $('#business_id').val();
|
||||
if (preSelectedBusinessId) {
|
||||
@ -315,41 +292,30 @@
|
||||
formGroup.style.display = 'none';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
function checkExisting(inputvalue,fieldname,elementid){
|
||||
spanid = elementid == 'email' ? "emailValidationMessage" : "mobileValidationMessage";
|
||||
var validationMessage = document.getElementById(spanid);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?= base_url() . 'check_existing' ?>",
|
||||
data: {
|
||||
value: inputvalue,
|
||||
module: 'users',
|
||||
field: fieldname
|
||||
},
|
||||
success: function(response) {
|
||||
if (response['data']['status']) {
|
||||
validationMessage.textContent = response['data']['message'];
|
||||
validationMessage.style.color = "red";
|
||||
document.getElementById(elementid).value = "";
|
||||
} else {
|
||||
validationMessage.textContent = "";
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
alert("Error occur.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
<!-- <script>
|
||||
// JavaScript to show/hide branches based on selected business
|
||||
$(document).ready(function () {
|
||||
var branchDropdown = $('#branch');
|
||||
var branches = <?= json_encode($branches); ?>; // Assuming $branches is available
|
||||
|
||||
// Initial branches
|
||||
var initialBranches = branches.filter(branch => branch.business_id == '<?= $details['business_id'] ?? '' ?>');
|
||||
|
||||
// Populate the dropdown with initial branches
|
||||
populateBranchDropdown(initialBranches);
|
||||
|
||||
// Change event handler for the business dropdown
|
||||
$('#business_id').change(function () {
|
||||
var selectedBusinessId = $(this).val();
|
||||
|
||||
// Filter branches based on selected business
|
||||
var filteredBranches = branches.filter(branch => branch.business_id == selectedBusinessId);
|
||||
|
||||
// Populate the dropdown with filtered branches
|
||||
populateBranchDropdown(filteredBranches);
|
||||
});
|
||||
|
||||
// Function to populate the branch dropdown
|
||||
function populateBranchDropdown(branchesToDisplay) {
|
||||
branchDropdown.empty().append('<option value="">Select Branch</option>');
|
||||
|
||||
if (branchesToDisplay.length > 0) {
|
||||
branchesToDisplay.forEach(branch => {
|
||||
var option = $('<option></option>').attr('value', branch.id).text(branch.branch_name);
|
||||
branchDropdown.append(option);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script> -
|
||||
</script>
|
||||
@ -36,6 +36,7 @@
|
||||
<?php if($loged_user === 'sadmin'){ ?>
|
||||
<th>Org Name</th>
|
||||
<?php } ?>
|
||||
<th>Branch</th>
|
||||
<th>Email</th>
|
||||
<th>Mobile Number</th>
|
||||
<th>Role</th>
|
||||
@ -58,8 +59,7 @@
|
||||
$addressParts = array(
|
||||
$row['address'],
|
||||
$row['city'],
|
||||
$row['state'].($row['postal_code'] ? "-".$row['postal_code'] : ""),
|
||||
$row['country']
|
||||
$row['state'].($row['postal_code'] ? "-".$row['postal_code'] : "")
|
||||
);
|
||||
// echo implode(', ', array_filter($addressParts)) . '.';
|
||||
?>
|
||||
@ -69,9 +69,10 @@
|
||||
<?php if($loged_user === 'sadmin'){ ?>
|
||||
<td><?php echo $row['org_name'] ; ?></td>
|
||||
<?php } ?>
|
||||
<td><?php echo $row['branch_name'] ; ?></td>
|
||||
<td><?php echo $row['email'] ; ?></td>
|
||||
<td><?php echo $row['mobile_no'] ; ?></td>
|
||||
<td><?php echo $row['role'] ; ?></td>
|
||||
<td><?php echo ucfirst($row['role']) ; ?></td>
|
||||
<td>
|
||||
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
||||
</td>
|
||||
@ -79,9 +80,9 @@
|
||||
<a href="<?= $edit_page_route; ?>" class="edit-button" title="Click to Edit User" ><i class="ri-pencil-line"></i></a>
|
||||
<?php if(get_user_role() != 'auditor') {
|
||||
if($row['isactive'] == 1) { ?>
|
||||
<a href="<?php echo "delete_user/".$row['user_id']; ?>" class="delete-button" title="Click to In-Active User" ><i class="ri-delete-bin-line"></i></a>
|
||||
<a href="#" class="delete-button" title="Click to In-Active User"><i class="ri-delete-bin-line"></i></a>
|
||||
<?php } else {?>
|
||||
<a href="<?php echo "activateUser/".$row['user_id']; ?>" class="fe-user-check" title="Click to Active User" ></a>
|
||||
<a href="<?php echo "activate_user/".$row['user_id']; ?>" class="fe-user-check" title="Click to Active User" ></a>
|
||||
<?php }
|
||||
}?>
|
||||
</td>
|
||||
@ -102,4 +103,41 @@ $(document).ready(function() {
|
||||
// Other DataTables configuration options
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.delete-button').click(function(event) {
|
||||
event.preventDefault();
|
||||
var user_id = <?php echo $row['user_id']; ?>;
|
||||
Swal.fire({
|
||||
title: "Are you sure?",
|
||||
text: "You won't be able to revert this!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
confirmButtonText: "Yes, delete it!"
|
||||
}).then(function(result) {
|
||||
if (result.value) {
|
||||
$.ajax({
|
||||
url: "<?= base_url('delete_user/') ?>" + user_id,
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
console.log(response);
|
||||
if(response && response.status){
|
||||
Swal.fire("Deleted!", response.message, "success");
|
||||
location.reload();
|
||||
} else {
|
||||
Swal.fire("Error!", response ? response.message : "An error occurred while deleting the file.", "error");
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr, status, error);
|
||||
Swal.fire("Error!", "An error occurred while deleting the file.", "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |