Merge branch 'uat' of bitbucket.org:venbainformationtechnology/vb_book into uat
This commit is contained in:
commit
9129e672b2
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\BusinessModel;
|
||||
use App\Models\SettingsModel;
|
||||
|
||||
class Settings extends BaseController
|
||||
@ -38,9 +38,18 @@ class Settings extends BaseController
|
||||
$model->setTable('settings');
|
||||
$details = $model->where(['setting_id' => $id, 'isactive' => 1])->first();
|
||||
$data['details'] = $details;
|
||||
|
||||
}
|
||||
$data['business_details']=$this->business_details();
|
||||
$this->render_page('setting_form', $data);
|
||||
}
|
||||
public function business_details()
|
||||
{
|
||||
$model = new BusinessModel();
|
||||
$model->setTable('business');
|
||||
$business_details = $model->orderBy('business_id', 'DESC')->findAll();
|
||||
return $business_details;
|
||||
}
|
||||
|
||||
|
||||
## To Save/Update Setting Data on DB.
|
||||
@ -49,26 +58,144 @@ class Settings extends BaseController
|
||||
helper('session');
|
||||
$session_bid = get_business_id();
|
||||
$session_uid = get_logged_user_id();
|
||||
|
||||
$validationRule = [
|
||||
'usersetiing' => [
|
||||
'label' => 'Image File',
|
||||
'rules' => [
|
||||
'uploaded[slogo]',
|
||||
'is_image[slogo]',
|
||||
'mime_in[slogo,image/jpg,image/jpeg,image/gif,image/png,image/webp]',
|
||||
|
||||
$model = new SettingsModel();
|
||||
$model->setTable('settings');
|
||||
if ($this->request->is('post')) {
|
||||
$requestData = $this->request->getVar();
|
||||
],
|
||||
],
|
||||
|
||||
'favicon' => [
|
||||
'label' => 'Favicon',
|
||||
'rules' => [
|
||||
'uploaded[favicon]',
|
||||
'is_image[favicon]',
|
||||
'mime_in[favicon,image/ico,image/x-icon]',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if (!$this->validate($validationRule)) {
|
||||
// Validation failed, return to the form with errors
|
||||
$data['validation_errors'] = $this->validator->getErrors();
|
||||
$this->render_page('setting_form', $data);
|
||||
return;
|
||||
}
|
||||
$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.";
|
||||
$img = $this->request->getFile('slogo');
|
||||
$setting_id = $this->request->getPost('setting_id');
|
||||
$business_id = $this->request->getPost('business_id');
|
||||
|
||||
|
||||
$filePath ='public/uploads/' . $this->request->getPost('slogo');
|
||||
|
||||
|
||||
## File Already Existing or not
|
||||
|
||||
if ($img->isValid() && !$img->hasMoved()) {
|
||||
$fileName = $img->getName();
|
||||
$img->move('public/uploads/', $fileName);
|
||||
|
||||
|
||||
// Delete the previous image file if it exists
|
||||
if ($setting_id) {
|
||||
$previousFileName = $this->request->getPost('previous_sfile');
|
||||
if ($previousFileName && is_file('public/uploads/' . $previousFileName)) {
|
||||
unlink('public/uploads/' . $previousFileName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#add
|
||||
$requestData['created_by'] = $session_uid;
|
||||
$requestData['isactive'] = 1;
|
||||
$model->saveData($requestData, null);
|
||||
$alert_message = "Site Settings details successfully created.";
|
||||
$fileName = $this->request->getPost('previous_sfile', ''); // Use the previous filename if no new image is provided
|
||||
}
|
||||
$favicon = $this->request->getFile('favicon');
|
||||
if ($favicon->isValid() && !$favicon->hasMoved()) {
|
||||
$faviconName = $favicon->getName();
|
||||
$favicon->move('public/uploads/', $faviconName);
|
||||
|
||||
// Delete the previous favicon file if it exists
|
||||
if ($setting_id) {
|
||||
$previousFaviconName = $this->request->getPost('previous_favicon');
|
||||
if ($previousFaviconName && is_file('public/uploads/' . $previousFaviconName)) {
|
||||
unlink('public/uploads/' . $previousFaviconName);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$faviconName = $this->request->getPost('previous_favicon', ''); // Use the previous favicon filename if no new favicon is provided
|
||||
}
|
||||
|
||||
$SettingsModel = new SettingsModel();
|
||||
$data = [
|
||||
|
||||
'site_name' => $this->request->getPost('site_name'),
|
||||
'site_title' => $this->request->getPost('site_title'),
|
||||
'favicon' => $this->request->getPost('favicon'),
|
||||
'logo' => $this->request->getPost('logo'),
|
||||
'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'),
|
||||
'logo'=>$fileName,
|
||||
'favicon'=>$faviconName
|
||||
];
|
||||
$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);
|
||||
}
|
||||
return redirect()->route('sitesetting_list');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// $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');
|
||||
// }
|
||||
// }
|
||||
|
||||
@ -18,7 +18,7 @@ if (!function_exists('get_logged_user_id')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('set_logged_user')) {
|
||||
if (!function_exists('set_logged_user_id')) {
|
||||
function set_logged_user_id($userId)
|
||||
{
|
||||
$session = \Config\Services::session();
|
||||
|
||||
@ -1,3 +1,25 @@
|
||||
<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">
|
||||
@ -10,70 +32,84 @@
|
||||
<form class="needs-validation" novalidate method="post" enctype="multipart/form-data" action="<?= base_url() . "insert_books"; ?>">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="title" class="col-form-label">Book Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="title" name="title" value="<?= isset($details['title']) ? $details['title'] : '' ?>" placeholder="Title" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="publisher" class="col-form-label">Book Publisher Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="publisher" name="publisher" placeholder="Book Publisher (Authors)" value="<?= isset($details['publisher']) ? $details['publisher'] : '' ?>" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="language" class="col-form-label">Language<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="language" name="language" placeholder="Language" value="<?= isset($details['language']) ? $details['language'] : '' ?>" required />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="publication_date" class="col-form-label">Publication Date<span class="text-danger">*</span></label>
|
||||
<input type="date" class="form-control" id="publication_date" name="publication_date" placeholder="Publication Date (format : DD/MM/YYYY)" required data-toggle="input-mask" data-mask-format="00/00/0000" value="<?= isset($details['publication_date']) ? $details['publication_date'] : '' ?>" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<?php if (!empty($details['cover_picture'])) { ?>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="cover_picture" class="col-form-label">Logo</label>
|
||||
<img src="<?= base_url('public/uploads/' . $details['cover_picture']) ?>" alt="coverpicture" class="preview-image" />
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="coverpicture" class="col-form-label">Book Cover Picture<span class="text-danger">*</span></label>
|
||||
<br />
|
||||
<input type="file" id="cover_picture" name="coverpicture" placeholder="Book Cover picture Name" required value="<?= isset($details['cover_picture']) ? $details['cover_picture'] : '' ?>" />
|
||||
<!-- <input type="text" class="form-control" id="cover_picture" name="cover_picture" placeholder="Book Cover picture Name" required value="<?= isset($details['cover_picture']) ? $details['cover_picture'] : '' ?>" /> -->
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="page_count" class="col-form-label">Page Count<span class="text-danger">*</span></label>
|
||||
<input type="number" class="form-control" id="page_count" name="page_count" placeholder="Page Count" required value="<?= isset($details['page_count']) ? $details['page_count'] : '' ?>" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="genre" class="col-form-label">Genre</label>
|
||||
<textarea class="form-control" id="genre" name="genre" placeholder="Genre" rows="5"><?= isset($details['genre']) ? $details['genre'] : '' ?></textarea>
|
||||
<input type="text" class="form-control" id="genre" name="genre" placeholder="Genre" rows="5"><?= isset($details['genre']) ? $details['genre'] : '' ?></textarea>
|
||||
<!-- <input type="text" class="form-control" id="genre" name="genre" placeholder="Genre" value="<?= isset($details['genre']) ? $details['genre'] : '' ?>" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="description" class="col-form-label">Description<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="description" name="description" placeholder="Description" rows="5" required><?= isset($details['description']) ? $details['description'] : '' ?></textarea>
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
<!-- <input type="text" class="form-control" id="description" name="description" placeholder="Description" required value="<?= isset($details['description']) ? $details['description'] : '' ?>" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="price" class="col-form-label">Book Price<span class="text-danger">*</span></label>
|
||||
<input type="number" class="form-control" id="price" name="price" placeholder="Book Price" required value="<?= isset($details['price']) ? $details['price'] : '' ?>" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="page_count" class="col-form-label">Page Count<span class="text-danger">*</span></label>
|
||||
<input type="number" class="form-control" id="page_count" name="page_count" placeholder="Page Count" required value="<?= isset($details['page_count']) ? $details['page_count'] : '' ?>" />
|
||||
<label for="description" class="col-form-label">Description<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="description" name="description" placeholder="Description" rows="5" required><?= isset($details['description']) ? $details['description'] : '' ?></textarea>
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="image-previews mt-4"></div>
|
||||
<label for="coverpicture" class="col-form-label">Book Cover Picture<span class="text-danger">*</span></label>
|
||||
<br />
|
||||
<input type="file" id="cover_picture" name="coverpicture[]" multiple required />
|
||||
<!-- <input type="text" class="form-control" id="cover_picture" name="cover_picture" placeholder="Book Cover picture Name" required value="<?= isset($details['cover_picture']) ? $details['cover_picture'] : '' ?>" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
<input type="hidden" id="book_id" name="book_id" placeholder="hidden for book id" value="<?= isset($details['book_id']) ? $details['book_id'] : '' ?>" />
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= $session_bid ?>" />
|
||||
<?php if (!empty($details)) { ?>
|
||||
@ -97,4 +133,40 @@
|
||||
</div> <!-- end card-body-->
|
||||
</div> <!-- end card-->
|
||||
</div> <!-- end col-->
|
||||
</div><!-- end row -->
|
||||
</div><!-- end row -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const coverPictureInput = documenxt.getElementById("cover_picture");
|
||||
const imagePreviewContainer = document.querySelector(".image-previews");
|
||||
|
||||
coverPictureInput.addEventListener("change", function (event) {
|
||||
// imagePreviewContainer.innerHTML = ""; // Clear previous previews
|
||||
|
||||
const selectedImages = Array.from(event.target.files);
|
||||
|
||||
selectedImages.forEach(function (image, index) {
|
||||
const imageWrapper = document.createElement("div");
|
||||
imageWrapper.classList.add("mr-3");
|
||||
|
||||
const imagePreview = document.createElement("img");
|
||||
imagePreview.src = URL.createObjectURL(image);
|
||||
imagePreview.classList.add("preview-image");
|
||||
imagePreview.style.width = "120px"; // Set width as needed
|
||||
|
||||
const checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.classList.add("image-checkbox");
|
||||
checkbox.checked = false; // Set default as unchecked
|
||||
|
||||
imageWrapper.appendChild(checkbox);
|
||||
imageWrapper.appendChild(imagePreview);
|
||||
imagePreviewContainer.appendChild(imageWrapper);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
<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">
|
||||
@ -6,18 +22,26 @@
|
||||
<p class="sub-header"> </p>
|
||||
|
||||
<?php if (session()->getFlashdata('success')): ?>
|
||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||
<?php endif; ?>
|
||||
<form action="<?= base_url()."sitesetting_synchronization"; ?>" method="post">
|
||||
<form method="post" enctype="multipart/form-data"
|
||||
action="<?= base_url()."sitesetting_synchronization"; ?>">
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_name" class="col-form-label">Site Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="site_name" name="site_name" value="<?= isset($details['site_name']) ? $details['site_name'] : '' ?>" placeholder="Site Name" required />
|
||||
<label for="site_name" class="col-form-label">Site Name<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="site_name" name="site_name"
|
||||
value="<?= isset($details['site_name']) ? $details['site_name'] : '' ?>"
|
||||
placeholder="Site Name" required />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_title" class="col-form-label">Site Title<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="site_title" name="site_title" placeholder="Site Title" value="<?= isset($details['site_title']) ? $details['site_title'] : '' ?>" required />
|
||||
<label for="site_title" class="col-form-label">Site Title<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="site_title" name="site_title"
|
||||
placeholder="Site Title"
|
||||
value="<?= isset($details['site_title']) ? $details['site_title'] : '' ?>"
|
||||
required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
@ -27,102 +51,187 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_info" class="col-form-label">Site Information<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="site_info" name="site_info" placeholder="Site Information" required ><?= isset($details['site_info']) ? $details['site_info'] : '' ?></textarea>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="site_info" class="col-form-label">Site Information<span
|
||||
class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="site_info" name="site_info"
|
||||
placeholder="Site Information"
|
||||
required><?= 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<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="about_info" name="about_info" placeholder="About info" required ><?= isset($details['about_info']) ? $details['about_info'] : '' ?></textarea>
|
||||
<label for="about_info" class="col-form-label">About Information<span
|
||||
class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="about_info" name="about_info"
|
||||
placeholder="About info"
|
||||
required><?= 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<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="terms_service" name="terms_service" placeholder="Terms Service" required rows="5"><?= isset($details['terms_service']) ? $details['terms_service'] : '' ?></textarea>
|
||||
<label for="terms_service" class="col-form-label">Terms Service<span
|
||||
class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="terms_service" name="terms_service"
|
||||
placeholder="Terms Service" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="footer_about" name="footer_about" placeholder="Footer about" required rows="5"><?= isset($details['footer_about']) ? $details['footer_about'] : '' ?></textarea>
|
||||
<label for="footer_about" class="col-form-label">Footer about<span
|
||||
class="text-danger">*</span></label>
|
||||
<textarea class="form-control" id="footer_about" name="footer_about"
|
||||
placeholder="Footer about" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="email" class="form-control" id="admin_email" name="admin_email" placeholder="Admin Email" value="<?= isset($details['admin_email']) ? $details['admin_email'] : '' ?>" required />
|
||||
<label for="admin_email" class="col-form-label">Admin Email<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="email" class="form-control" id="admin_email" name="admin_email"
|
||||
placeholder="Admin Email"
|
||||
value="<?= isset($details['admin_email']) ? $details['admin_email'] : '' ?>"
|
||||
required />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
|
||||
<input type="number" class="form-control" id="mobile" name="mobile" placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number" value="<?= isset($details['mobile']) ? $details['mobile'] : '' ?>" />
|
||||
<label for="mobile" class="col-form-label">Mobile Number<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="number" class="form-control" id="mobile" name="mobile"
|
||||
placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number"
|
||||
value="<?= isset($details['mobile']) ? $details['mobile'] : '' ?>" />
|
||||
</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'] : '' ?>" />
|
||||
<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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pagination_limit" name="pagination_limit" placeholder="Pagination Limit" required value="<?= isset($details['pagination_limit']) ? $details['pagination_limit'] : '' ?>" />
|
||||
<label for="pagination_limit" class="col-form-label">Pagination Limit<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="pagination_limit" name="pagination_limit"
|
||||
placeholder="Pagination Limit" required
|
||||
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 name</label>
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo" name="logo" placeholder="Logo Name" required value="<?= isset($details['logo']) ? $details['logo'] : '' ?>" />
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="logo"
|
||||
name="slogo" placeholder="Logo Name" required
|
||||
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="cover_picture" id="favicon" name="favicon" placeholder="Fav-icon Name" required value="<?= isset($details['favicon']) ? $details['favicon'] : '' ?>" />
|
||||
<input type="file" class="form-control" style="border: 0px !important; " id="favic"
|
||||
name="favicon" placeholder="Fav-icon Name" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="currency" name="currency" placeholder="currency (eg : Rupees,Dollar,Euro)" required value="<?= isset($details['currency']) ? $details['currency'] : '' ?>" />
|
||||
<label for="currency" class="col-form-label">Currency<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="currency" name="currency"
|
||||
placeholder="currency (eg : Rupees,Dollar,Euro)" required
|
||||
value="<?= isset($details['currency']) ? $details['currency'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="country" class="col-form-label">Country<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="country" name="country" placeholder="Country" required value="<?= isset($details['country']) ? $details['country'] : '' ?>" />
|
||||
<label for="country" class="col-form-label">Country<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="country" name="country"
|
||||
placeholder="Country" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_protocol" name="mail_protocol" placeholder="Mail Protocol (eg : zoho,gmail)" required value="<?= isset($details['mail_protocol']) ? $details['mail_protocol'] : '' ?>" />
|
||||
<label for="mail_protocol" class="col-form-label">Mail Protocol<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_protocol" name="mail_protocol"
|
||||
placeholder="Mail Protocol (eg : zoho,gmail)" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_title" name="mail_title" placeholder="Mail Title" required value="<?= isset($details['mail_title']) ? $details['mail_title'] : '' ?>" />
|
||||
<label for="mail_title" class="col-form-label">Mail Title<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_title" name="mail_title"
|
||||
placeholder="Mail Title" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_host" name="mail_host" placeholder="Mail Host" required value="<?= isset($details['mail_host']) ? $details['mail_host'] : '' ?>" />
|
||||
<label for="mail_host" class="col-form-label">Mail Host<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_host" name="mail_host"
|
||||
placeholder="Mail Host" required
|
||||
value="<?= isset($details['mail_host']) ? $details['mail_host'] : '' ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mail_port" class="col-form-label">Mail Port<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_port" name="mail_port" placeholder="Mail Port" required value="<?= isset($details['mail_port']) ? $details['mail_port'] : '' ?>" />
|
||||
<label for="mail_port" class="col-form-label">Mail Port<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_port" name="mail_port"
|
||||
placeholder="Mail Port" required
|
||||
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<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_encryption" name="mail_encryption" placeholder="Mail Encryption" required value="<?= isset($details['mail_encryption']) ? $details['mail_encryption'] : '' ?>" />
|
||||
<label for="mail_encryption" class="col-form-label">Mail Encryption<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_encryption" name="mail_encryption"
|
||||
placeholder="Mail Encryption" required
|
||||
value="<?= isset($details['mail_encryption']) ? $details['mail_encryption'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mail_username" class="col-form-label">Mail Username<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_username" name="mail_username" placeholder="Mail Username" required value="<?= isset($details['mail_username']) ? $details['mail_username'] : '' ?>" />
|
||||
<label for="mail_username" class="col-form-label">Mail Username<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_username" name="mail_username"
|
||||
placeholder="Mail Username" required
|
||||
value="<?= isset($details['mail_username']) ? $details['mail_username'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="mail_password" class="col-form-label">Mail Password<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_password" name="mail_password" placeholder="Mail Password" required value="<?= isset($details['mail_password']) ? $details['mail_password'] : '' ?>" />
|
||||
<label for="mail_password" class="col-form-label">Mail Password<span
|
||||
class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="mail_password" name="mail_password"
|
||||
placeholder="Mail Password" required
|
||||
value="<?= isset($details['mail_password']) ? $details['mail_password'] : '' ?>" />
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="postal_code" class="col-form-label">Buiness<span
|
||||
class="text-danger">*</span></label>
|
||||
<select id="business_id" name="business_id" class="form-control">
|
||||
<option value=null>Choose your Buiness</option>
|
||||
<?php foreach ($business_details as $value) { ?>
|
||||
<option value="<?php echo $value['business_id']; ?>"
|
||||
<?php if (isset($details['business_id']) && ($details['business_id'] === $value['business_id'])) echo "selected"; ?>>
|
||||
<?php echo $value['title']; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="setting_id" name="setting_id" placeholder="hidden for setting id" value="<?= isset($details['setting_id']) ? $details['setting_id'] : '' ?>" />
|
||||
<input type="hidden" id="business_id" name="business_id" placeholder="hidden for business id" value="<?= isset($details['business_id']) ? $details['business_id'] : '' ?>" />
|
||||
<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($details)){ ?>
|
||||
<div class="form-group text-right m-b-0 checkbox checkbox-purple">
|
||||
<input type="checkbox" id="isactive" name="isactive" class="form-control" <?= isset($details) && $details['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<input type="checkbox" id="isactive" name="isactive" class="form-control"
|
||||
<?= isset($details) && $details['isactive'] == 1 ? 'checked' : '' ?>>
|
||||
<label for="isactive"> Is Active</label>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<div class="alert alert-success"><?= session()->getFlashdata('success') ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="table-responsive">
|
||||
<table id="datatable-buttons" class="table dt-responsive w-100">
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<thead class="thead-light">
|
||||
<tr>
|
||||
<th>Site Name</th>
|
||||
@ -19,6 +19,8 @@
|
||||
<th>Admin email</th>
|
||||
<th>Mobile Number</th>
|
||||
<th>Copyright</th>
|
||||
<th>Logo</th>
|
||||
<th>Icon</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@ -40,6 +42,8 @@
|
||||
<td><?php echo $row['admin_email'] ; ?></td>
|
||||
<td><?php echo $row['mobile'] ; ?></td>
|
||||
<td><?php echo $row['copyright'] ; ?></td>
|
||||
<td><?php echo $row['logo'] ; ?></td>
|
||||
<td><?php echo $row['favicon'] ; ?></td>
|
||||
<td>
|
||||
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user