This commit is contained in:
heama 2023-08-21 15:09:11 +05:30
commit 3b6a2df728
34 changed files with 1094 additions and 5 deletions

57
.gitignore vendored Normal file → Executable file
View File

@ -23,17 +23,24 @@ dist/
target/
dist/
# JetBrains IDE
# IDE and editor files
.idea/
*.sublime-*
*.swp
.vscode/
# Unit test reports
TEST*.xml
# Generated by MacOS
# OS X
.DS_Store
.AppleDouble
.LSOverride
# Generated by Windows
# Windows image file caches
Thumbs.db
ehthumbs.db
Desktop.ini
# Applications
*.app
@ -48,3 +55,47 @@ Thumbs.db
*.mov
*.wmv
#-------------------------
# Environment Files
#-------------------------
# These should never be under version control,
# as it poses a security risk.
.env
.vagrant
#-------------------------
# Temporary Files
#-------------------------
writable/cache/*
!writable/cache/index.html
writable/logs/*
!writable/logs/index.html
writable/session/*
!writable/session/index.html
writable/uploads/*
!writable/uploads/index.html
writable/debugbar/*
!writable/debugbar/.gitkeep
writable/**/*.db
writable/**/*.sqlite
php_errors.log
#-------------------------
# Composer
#-------------------------
vendor/
composer.lock
tests
# Don't save phpunit under version control.
phpunit
phpunit*.xml
/.phpunit.*.cache

49
.htaccess Executable file
View File

@ -0,0 +1,49 @@
# Disable directory browsing
Options -Indexes
# ----------------------------------------------------------------------
# Rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need.
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
# RewriteBase /
# Redirect Trailing Slashes...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Rewrite "www.example.com -> example.com"
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]
# Ensure Authorization header is passed along
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 index.php
</IfModule>
# Disable server signature start
ServerSignature Off
# Disable server signature end

View File

@ -17,7 +17,13 @@ class App extends BaseConfig
*
* http://example.com/
*/
<<<<<<< HEAD
public string $baseURL = 'http://localhost/vb_book/public/';
=======
// public string $baseURL = 'http://localhost:8080/';
public string $baseURL = 'http://localhost/vb_book/';
// public string $baseURL = 'http://localhost/vb_book/public/';
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
/**
* Allowed Hostnames in the Site URL other than the hostname in the baseURL.
@ -42,7 +48,12 @@ class App extends BaseConfig
* something else. If you are using mod_rewrite to remove the page set this
* variable so that it is blank.
*/
<<<<<<< HEAD
public string $indexPage = 'index.php';
=======
// public string $indexPage = 'index.php';
public string $indexPage = '';
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
/**
* --------------------------------------------------------------------------
@ -59,7 +70,13 @@ class App extends BaseConfig
*
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
<<<<<<< HEAD
public string $uriProtocol = 'REQUEST_URI';
=======
// public string $uriProtocol = 'REQUEST_URI';
public $uriProtocol = 'PATH_INFO';
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
/**
* --------------------------------------------------------------------------

View File

@ -26,7 +26,11 @@ class Database extends Config
*/
public array $default = [
'DSN' => '',
<<<<<<< HEAD
'hostname' => '',
=======
'hostname' => 'localhost',
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
'username' => '',
'password' => '',
'database' => '',

View File

@ -11,7 +11,11 @@ $routes = Services::routes();
* --------------------------------------------------------------------
*/
$routes->setDefaultNamespace('App\Controllers');
<<<<<<< HEAD
$routes->setDefaultController('Home');
=======
$routes->setDefaultController('Authentication');
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
$routes->setDefaultMethod('index');
$routes->setTranslateURIDashes(false);
$routes->set404Override();
@ -29,6 +33,7 @@ $routes->set404Override();
// We get a performance increase by specifying the default
// route since we don't have to scan directories.
<<<<<<< HEAD
$routes->get('/', 'Home::index');
$routes->get('dashboard/', 'Home::index');
$routes->get("user_list/", "Home::user_list");
@ -37,12 +42,37 @@ $routes->get("edit_user/", "Home::edit_user");
$routes->get("book_list/", "Home::book_list");
$routes->get("add_book/", "Home::add_book");
$routes->get("edit_book/", "Home::edit_book");
=======
# Authentication Routes
$routes->get('/', 'Authentication::index');
$routes->get('login/', 'Authentication::index');
$routes->post('authenticate/', 'Authentication::authenticate');
$routes->get('logout/', 'Authentication::logout');
# Dashboard Routes
$routes->get('dashboard/', 'Home::index');
# Users Routes
$routes->get("user_list/", "Users::index");
$routes->get("user_page/(:any)", "Users::user_page/$1");
$routes->post("user_synchronization", "Users::user_synchronization");
# Books Routes
$routes->get("book_list/", "Books::index");
$routes->get("add_book/", "Books::add_book");
$routes->get("edit_book/", "Books::edit_book");
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
$routes->get("subscribers_list/", "Home::subscribers_list");
$routes->get("add_subscribers/", "Home::add_subscribers");
$routes->get("edit_subscribers/", "Home::edit_subscribers");
$routes->get("business_list/", "Business::add_bussiness");
$routes->get("new_bussiness/", "Business::new_bussiness");
<<<<<<< HEAD
$routes->post("insert_business/", "Business::insert_business");
=======
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815

View File

@ -0,0 +1,142 @@
<?php
namespace App\Controllers;
use App\Models\AuthenticationModel;
## Authentication Controllers only for Login,Logout,Signup,forgotpassword,confirmationpassword,resetpassword,session,cookie Modules
class Authentication extends BaseController
{
public function index()
{
// Load the view
$data['company_name'] = 'Publishing';
$data['company_short_name'] = 'P';
$data['page_name'] = 'Login';
// $data['browser_title'] = $data['company_name'].' | '.$data['company_short_name'] .' '. $data['page_name'];
echo view('auth_login');
}
public function authenticate()
{
$validation = \Config\Services::validation();
$auth_model = new AuthenticationModel();
$rules = [
'username' => 'required',
'password' => 'required',
];
if ($this->validate($rules)) {
$username = $this->request->getPost('username');
$password = $this->request->getPost('password');
$user = $auth_model->where('email', $username)->first();
if(is_null($user)) {
return redirect()->back()->with('error', 'Invalid username or password.');
}
$pwd_verify = password_verify((string)$password, $user['password']);
if(!$pwd_verify) {
return redirect()->back()->with('error', 'Invalid username or password.');
}
// You can implement your authentication logic here
// For example, check against a database, validate credentials, etc.
if ($username === $user['email'] && $pwd_verify) {
// Redirect to a dashboard or other protected area
$session = \Config\Services::session();
$session->set('user_id', $user['user_id']);
$session->set('user_name', $user['first_name']." ".$user['last_name']);
$session->set('user_role', $user['role']);
$session->set('business_id', $user['business_id']);
// $cookie = \Config\Services::cookie();
// $cookie->setCookie('remember_username', 'Sri Harsha', 3600); // Cookie expires in 1 hour
return redirect()->to('dashboard');
} else {
// Invalid credentials, display error message
return redirect()->back()->with('error', 'Invalid username or password.');
}
}else {
// Validation failed, display errors
return redirect()->back()->withInput()->with('validation', $validation);
}
}
public function logout()
{
// Clear session and cookies
$session = \Config\Services::session();
$session->remove('user_id');
$session->destroy();
// $cookie = \Config\Services::cookie();
// $remembered_username = $cookie->getCookie('remember_username');
// $cookie->delete('remember_username');
// Redirect to a logout confirmation page or login page
return redirect()->to('/login'); // Replace with your login route
}
public function lockscreen()
{
// Load the session library
$session = \Config\Services::session();
// Check if the session is locked
if ($session->get('session_locked')) {
// Load the lock screen view
return view('lock_screen');
} else {
// Redirect the user to their previous page or dashboard
return redirect()->to('dashboard'); // Replace with appropriate URL
}
}
public function lock()
{
// Load the session library
$session = \Config\Services::session();
// Set the session_locked flag
$session->set('session_locked', true);
// Redirect the user to the lock screen
return redirect()->to('lockscreen'); // Replace with your lock screen URL
}
public function unlock()
{
// Load the session library
$session = \Config\Services::session();
// Check password logic
$password = $this->request->getPost('password');
if ($this->checkPassword($password)) {
// Unlock the session
$session->remove('session_locked');
return redirect()->to('dashboard'); // Redirect to dashboard
} else {
// Incorrect password, show error
return redirect()->back()->with('error', 'Incorrect password.');
}
}
// Replace with your password checking logic
private function checkPassword($password)
{
// Implement your password validation logic here
// For example, compare against a stored hash
return $password === 'correct_password';
}
}

View File

@ -8,6 +8,10 @@ use CodeIgniter\HTTP\IncomingRequest;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
<<<<<<< HEAD
=======
use App\Models\AuthenticationModel;
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
/**
* Class BaseController
@ -58,6 +62,7 @@ abstract class BaseController extends Controller
public function render_page($viewpage, $data)
{
<<<<<<< HEAD
$data['company_name'] = 'publishing';
$data['company_short_name'] = 'VBP';
@ -65,9 +70,40 @@ abstract class BaseController extends Controller
$data['loggedin_person_role'] = 'VBP CEO';
$data['browser_title'] = $data['company_name'].' | '.$data['company_short_name'] .' '. $data['page_name'];
$data['heading'] = $data['page_name'] == "Dashboard" ? 'Welcome to VijayabharathamPublishing.com' : "";
=======
$session = \Config\Services::session();
$session_uid = $session->get('user_id');
$session_uname = $session->get('user_name');
$session_role = $session->get('user_role');
$auth_model = new AuthenticationModel();
$details = $auth_model->getheringDetailsForHeader($session_uid);
$data['company_name'] = $details[0]['site_name'];
$data['company_short_name'] = $details[0]['site_title'];
$data['loggedin_person'] = $session_uname;
$data['loggedin_person_role'] = $details[0]['role'];
$data['favicon'] = $details[0]['favicon'];
$data['profile_picture'] = $details[0]['profile_picture'];
$data['browser_title'] = $data['company_name'].' | '.$data['company_short_name'] .' '. $data['page_name'];
$data['heading'] = $data['page_name'] == "Dashboard" ? 'Welcome to '.$data['company_name'] : "";
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
echo view('template/header.php', $data);
echo view('template/topbar.php', $data);
echo view($viewpage, $data);
echo view('template/footer.php', $data);
<<<<<<< HEAD
=======
// $header = view('template/header.php', $data);
// $topbar = view('template/topbar.php', $data);
// $content = view($viewpage, $data);
// $footer = view('template/footer.php', $data);
// return $header . $topbar. $content . $footer;
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
}
}

25
app/Controllers/Books.php Executable file
View File

@ -0,0 +1,25 @@
<?php
namespace App\Controllers;
use App\Models\BooksModel;
class Books extends BaseController
{
public function index()
{
$session = \Config\Services::session();
$session_role = $session->get('user_role');
$session_bid = $session->get('business_id');
$where = ['books.isactive' => 1];
if (!empty($session_role) && $session_role !== "sadmin" ) {
$where = ['books.business_id' => $session_bid,'books.isactive' => 1];
}
$model = new BooksModel();
$model->setTable('books');
$book_details = $model->where($where)->orderBy('book_id', 'DESC')->findAll();
$data['page_name'] = 'Book Details';
$data['details'] = $book_details;
$this->render_page('book_list', $data);
}
}

View File

@ -2,21 +2,29 @@
namespace App\Controllers;
<<<<<<< HEAD
use App\Models\BusinessModel;
=======
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
class Business extends BaseController
{
public function add_bussiness()
{
<<<<<<< HEAD
$BusinessModel = new BusinessModel();
$data['page_name']='SAME ';
$data['businesses'] = $BusinessModel->findAll();
=======
$data['page_name']='Bussiness Details';
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
$this->render_page('business_list',$data);
}
public function new_bussiness()
{
$data['page_name']= 'Add Business';
<<<<<<< HEAD
$data['busi_name']= 'sample';
$this->render_page('business', $data);
}
@ -82,4 +90,9 @@ class Business extends BaseController
=======
$this->render_page('business', $data);
}
}
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815

View File

@ -1,7 +1,11 @@
<?php
namespace App\Controllers;
<<<<<<< HEAD
=======
## Home Controllers only for Dashboards,Report Modules
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
class Home extends BaseController
{
public function index()
@ -15,6 +19,7 @@ class Home extends BaseController
// return view('template');
// }
<<<<<<< HEAD
public function render_page($viewpage, $data)
{
@ -66,6 +71,8 @@ class Home extends BaseController
$this->render_page('book', $data);
}
=======
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
public function subscribers_list()
{
$data['page_name'] = 'Subscribers Details';

74
app/Controllers/Users.php Executable file
View File

@ -0,0 +1,74 @@
<?php
namespace App\Controllers;
use App\Models\UsersModel;
class Users extends BaseController
{
## For User Listing
public function index()
{
$session = \Config\Services::session();
$session_role = $session->get('user_role');
$session_bid = $session->get('business_id');
$where = ['users.isactive' => 1];
if (!empty($session_role) && $session_role !== "sadmin" ) {
$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();
$data['page_name'] = 'User Details';
$data['details'] = $user_details;
$this->render_page('user_list', $data);
}
## To Load User Add/Update page
public function user_page($id)
{
if($id === '0') {
$data['page_name'] = 'Add User';
$data['details'] = [];
}
else if($id !== '0') {
$data['page_name'] = 'Edit User';
$model = new UsersModel();
$model->setTable('users');
$edit_user_details = $model->where(['user_id'=>$id,'isactive' => 1])->first();
$data['details'] = $edit_user_details;
}
$this->render_page('user', $data);
}
## To Save/Update User Data on DB.
public function user_synchronization()
{
$session = \Config\Services::session();
$model = new UsersModel();
$model->setTable('users');
if($this->request->is('post')){
$requestData = $this->request->getVar();
}
$requestData['business_id'] = $session->get('business_id');
if($requestData['user_id']){
#edit
$requestData['updated_by'] = $session->get('user_id');
$requestData['isactive'] = isset($requestData['isactive']) && $requestData['isactive'] == 'on' ? 1 : 0;
unset($requestData['password']);
$model->saveData($requestData, $requestData['user_id']);
}else{
#add
$hash_password = password_hash($requestData['password'], PASSWORD_DEFAULT);
$requestData['password'] = $hash_password;
$requestData['created_by'] = $session->get('user_id');
$requestData['isactive'] = 1 ;
$model->saveData($requestData, null);
}
return redirect()->route('user_list');
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class AuthenticationModel extends Model
{
protected $table = 'users';
protected $primaryKey = 'user_id';
protected $allowedFields = ['user_id','user_name','email','first_name','last_name','password','mobile_no','date_of_birth','address','gender','profile_picture','city','state','postal_code','country','role','isactive'];
public function getheringDetailsForHeader($user_id)
{
$builder = $this->db->table('users');
$builder->select('user_id,user_name,email,first_name,last_name,password,mobile_no,date_of_birth,address,gender,profile_picture,city,state,postal_code,users.country,role,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,settings.country');
$builder->join('settings', 'settings.admin_email = users.email', 'left');
$builder->where('user_id', $user_id);
//$template_mapping_details['fk_entity_id'];
$query = $builder->get();
return $query->getResultArray();
}
}

10
app/Models/BooksModel.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class BooksModel extends Model
{
protected $table = 'books';
protected $primaryKey = 'book_id';
protected $allowedFields = ['book_id','title','cover_picture','publication_date','publisher','genre','language','description','page_count','price','created_on','created_by','updated_on','updated_by','isactive','business_id'];
}

22
app/Models/UsersModel.php Normal file
View File

@ -0,0 +1,22 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class UsersModel extends Model
{
protected $table = 'users';
protected $primaryKey = 'user_id';
protected $allowedFields = ['user_id','user_name','email','first_name','last_name','password','mobile_no','date_of_birth','address','gender','profile_picture','city','state','postal_code','country','role','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);
}
}
}

118
app/Views/auth_login.php Executable file
View File

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>BigBambooBookPublish | BBBP </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="A fully featured admin theme which can be used to build CRM, CMS, etc." name="description" />
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<link rel="shortcut icon" href="<?= base_url()."public/assets/images/company/default.ico"?>">
<!-- 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">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-5">
<div class="card">
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<div class="auth-logo">
<a href="javascript: void(0);" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="<?= base_url()."public/assets/images/company/default.png" ?>" alt="" height="80">
</span>
</a>
<a href="javascript: void(0);" class="logo logo-light text-center">
<span class="logo-lg">
<img src="<?= base_url()."public/assets/images/company/default.png" ?>" alt="" height="80">
</span>
</a>
</div>
<p class="text-muted mb-4 mt-3"><span>BigBambooBookPublish</br></br></span>Enter your email address and password to access admin panel.</p>
</div>
<!-- <form action=""> -->
<form action="<?= base_url()."authenticate" ?>" method="post">
<div class="form-group mb-3">
<label for="emailaddress">Email address</label>
<input class="form-control" type="email" name="username" id="emailaddress" required="" placeholder="Enter your email">
</div>
<div class="form-group mb-3">
<label for="password">Password</label>
<div class="input-group input-group-merge">
<input type="password" name="password" id="password" class="form-control" placeholder="Enter your password">
<div class="input-group-append" data-password="false">
<div class="input-group-text">
<span class="password-eye"></span>
</div>
</div>
</div>
</div>
<div class="form-group mb-3">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="checkbox-signin" checked>
<label class="custom-control-label" for="checkbox-signin">Remember me</label>
</div>
</div>
<div class="form-group mb-0 text-center">
<button class="btn btn-primary btn-block" type="submit"> Log In </button>
</div>
</form>
</div> <!-- end card-body -->
</div>
<!-- end card -->
<div class="row mt-3">
<div class="col-12 text-center">
<p> <a href="auth-recoverpw.html" class="text-muted ml-1">Forgot your password?</a></p>
<p class="text-muted">Don't have an account? <a href="auth-register.html" class="text-primary font-weight-medium ml-1">Sign Up</a></p>
</div> <!-- end col -->
</div>
<!-- end row -->
</div> <!-- end col -->
</div>
<!-- end row -->
</div>
<!-- end container -->
</div>
<!-- end page -->
<footer class="footer footer-alt">
<p> <?= date('Y') ?> &copy; <?= "bigbamboobookpublish"; ?>.</p>
</footer>
<!-- Vendor js -->
<script src="<?= base_url()."public/assets/js/vendor.min.js" ?>"></script>
<!-- App js -->
<script src="<?= base_url()."public/assets/js/app.min.js" ?>"></script>
</body>
</html>

View File

@ -17,15 +17,24 @@
<tr>
<th>Name</th>
<th>Author</th>
<<<<<<< HEAD
<th>Edition/Language</th>
<th>Year Of Release</th>
<th>State/Country</th>
<th>Price of the Book</th>
<th>Book Avaialble Count</th>
=======
<th>Category</th>
<th>Language</th>
<th>Year Of Release</th>
<th>Price of the Book</th>
<th>Description</th>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<th>Status</th>
</tr>
</thead>
<tbody>
<<<<<<< HEAD
<tr>
<td>Cyber Crime</td>
<td>Tiger Nixon</td>
@ -56,6 +65,31 @@
<td> <span data-plugin="counterup">150</span> Copies </td>
<td> <span class="badge badge-soft-success">Active</span> </td>
</tr>
=======
<?php foreach ($details as $row):
if ($row['isactive']) {
$class = 'badge badge-soft-success';
$message = 'Active';
} else {
$class = 'badge badge-soft-danger';
$message = 'In-Active';
}
?>
<tr>
<td><?php echo $row['title'] ; ?></td>
<td><?php echo $row['publisher'] ; ?></td>
<td><?php echo $row['genre'] ; ?></td>
<td><?php echo $row['language'] ; ?></td>
<td><?php echo date('Y', strtotime($row['publication_date'])); ?></td>
<td> <span data-plugin="counterup"><?php echo $row['price'] ; ?></span></td>
<td><?php echo $row['description'] ; ?></td>
<td>
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
</td>
</tr>
<?php endforeach; ?>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</tbody>
</table>
</div>

View File

@ -4,6 +4,7 @@
<div class="card-body">
<h4 class="header-title"><?= $page_name; ?></h4>
<p class="sub-header"> </p>
<<<<<<< HEAD
<form method="POST" enctype="multipart/form-data" action="<?php echo base_url(); ?>insert_business">
<div class="form-group">
<div class="form-row">
@ -14,28 +15,56 @@
<div class="form-group col-md-6">
<label for="bmail" class="col-form-label">Email<span class="text-danger">*</span></label>
<input type="email" class="form-control" name="bmail" placeholder="Email" required />
=======
<form>
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-6">
<label for="bname" class="col-form-label">Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="bname" placeholder="Name" required />
</div>
<div class="form-group col-md-6">
<label for="bmail" class="col-form-label">Email<span class="text-danger">*</span></label>
<input type="email" class="form-control" id="bmail" placeholder="Email" required />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="bmobile" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
<<<<<<< HEAD
<input type="text" class="form-control" name="bmobile" placeholder="Enter only numbers" required data-parsley-type="number" />
=======
<input type="text" class="form-control" id="bmobile" placeholder="Enter only numbers" required data-parsley-type="number" />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="form-group col-md-6">
<label for="baddress" class="col-form-label">Address<span class="text-danger">*</span></label>
<<<<<<< HEAD
<input type="text" class="form-control" name="baddress" placeholder="1234 Main St" required />
=======
<input type="text" class="form-control" id="baddress" placeholder="1234 Main St" required />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="bcity" class="col-form-label">City<span class="text-danger">*</span></label>
<<<<<<< HEAD
<input type="text" class="form-control" name="bcity" placeholder="city" required />
</div>
<div class="form-group col-md-6">
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
<select name="bstate" class="form-control" required >
=======
<input type="text" class="form-control" id="bcity" placeholder="city" required />
</div>
<div class="form-group col-md-6">
<label for="bstate" class="col-form-label">State<span class="text-danger">*</span></label>
<select id="bstate" class="form-control" required >
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<option>Choose</option>
<option> 1</option>
<option> 2</option>
@ -46,14 +75,28 @@
<div class="form-group col-md-6">
<label for="bzip" class="col-form-label">Zip<span class="text-danger">*</span></label>
<<<<<<< HEAD
<input type="text" class="form-control" name="bzip" placeholder="Zip" required />
=======
<input type="text" class="form-control" id="bzip" placeholder="Zip" required />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="form-group col-md-6">
<label for="bfile" class="col-form-label">File<span class="text-danger">*</span></label>
<<<<<<< HEAD
<div class="form-control">
<input type="file" name="bfile" multiple />
=======
<form action="/" method="post" class="form-control" id="myAwesomeDropzone" data-plugin="dropzone" data-previews-container="#file-previews"
data-upload-preview-template="#uploadPreviewTemplate">
<div class="form-control">
<input name="file" type="file" multiple />
</div>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</form>
@ -68,7 +111,11 @@
<div class="form-group text-right m-b-0">
<<<<<<< HEAD
<button class="btn btn-primary waves-effect waves-light mr-1" id="bsubmit"type="submit">
=======
<button class="btn btn-primary waves-effect waves-light mr-1" type="submit">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
Submit
</button>
<button type="reset" class="btn btn-secondary waves-effect">
@ -87,7 +134,14 @@
<script src="../assets/js/vendor.min.js"></script>
<!-- Plugins js -->
<<<<<<< HEAD
=======
<script src="../assets/libs/dropzone/min/dropzone.min.js"></script>
<!-- Init js-->
<script src="../assets/js/pages/form-fileuploads.init.js"></script>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<!-- App js -->
<script src="../assets/js/app.min.js"></script>

View File

@ -2,6 +2,7 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<<<<<<< HEAD
<form>
@ -67,4 +68,30 @@ $(document).ready(function() {
// Once the form is submitted, you can send the updated data to the server.
});
});
</script>
</script>
=======
<div class="float-right">
<a href="new_bussiness" class="btn btn-primary"><i class="ri-user-add-line"></i> Add New </a>
</div>
<br>
<div class="table-responsive">
<table id="datatable-buttons" class="table dt-responsive w-100">
<thead class="thead-light">
<tr>
<th>Business Name</th>
<th>Business ID</th>
<th>Contact</th>
<th>Email</th>
<th>Address</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815

View File

@ -100,7 +100,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-10.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-10.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Andrew Mackie</h6>
@ -115,7 +119,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-1.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-1.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Rory Dalyell</h6>
@ -130,7 +138,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status busy"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-9.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-9.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Jaxon Dunhill</h6>
@ -149,7 +161,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status online"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-2.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-2.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Jackson Therry</h6>
@ -164,7 +180,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status away"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-4.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-4.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Charles Deakin</h6>
@ -179,7 +199,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status online"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-5.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-5.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Ryan Salting</h6>
@ -194,7 +218,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status online"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-6.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-6.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Sean Howse</h6>
@ -209,7 +237,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status busy"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-7.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-7.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Dean Coward</h6>
@ -224,7 +256,11 @@
<div class="media">
<div class="position-relative mr-2">
<span class="user-status away"></span>
<<<<<<< HEAD
<img src="./assets/images/users/avatar-8.jpg" class="rounded-circle avatar-sm" alt="user-pic">
=======
<img src="<?= base_url()."public/assets/images/users/avatar-8.jpg" ?>" class="rounded-circle avatar-sm" alt="user-pic">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<div class="media-body overflow-hidden">
<h6 class="mt-0 mb-1 font-14">Hayley East</h6>
@ -431,6 +467,7 @@
<div class="rightbar-overlay"></div>
<!-- Vendor js -->
<<<<<<< HEAD
<script src="./assets/js/vendor.min.js"></script>
<!-- KNOB JS -->
@ -466,6 +503,43 @@
<!-- App js -->
<script src="./assets/js/app.min.js"></script>
=======
<script src="<?= base_url()."public/assets/js/vendor.min.js" ?>"></script>
<!-- KNOB JS -->
<script src="<?= base_url()."public/assets/libs/jquery-knob/jquery.knob.min.js" ?>"></script>
<!-- Apex js-->
<script src="<?= base_url()."public/assets/libs/apexcharts/apexcharts.min.js" ?>"></script>
<!-- Plugins js-->
<script src="<?= base_url()."public/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-world-mill-en.js" ?>"></script>
<!-- Dashboard init-->
<script src="<?= base_url()."public/assets/js/pages/dashboard-sales.init.js" ?>"></script>
<!-- third party js -->
<script src="<?= base_url()."public/assets/libs/datatables.net/js/jquery.dataTables.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-buttons/js/buttons.html5.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-buttons/js/buttons.flash.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-buttons/js/buttons.print.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/datatables.net-select/js/dataTables.select.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/pdfmake/build/pdfmake.min.js" ?>"></script>
<script src="<?= base_url()."public/assets/libs/pdfmake/build/vfs_fonts.js" ?>"></script>
<!-- third party js ends -->
<!-- Datatables init -->
<script src="<?= base_url()."public/assets/js/pages/datatables.init.js" ?>"></script>
<!-- App js -->
<script src="<?= base_url()."public/assets/js/app.min.js" ?>"></script>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</body>
</html>

View File

@ -8,6 +8,7 @@
<meta content="Coderthemes" name="author" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- App favicon -->
<<<<<<< HEAD
<link rel="shortcut icon" type="image/png" href="/favicon.ico">
<!-- plugin css -->
@ -29,6 +30,29 @@
<!-- icons -->
<link href="./assets/css/icons.min.css" rel="stylesheet" type="text/css" />
=======
<link rel="shortcut icon" href="<?= base_url()."public/assets/images/company/".$favicon ?>" >
<!-- 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" />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</head>
@ -71,7 +95,11 @@
<!-- User box -->
<div class="user-box text-center">
<<<<<<< HEAD
<img src="./assets/images/users/avatar-1.jpg" alt="user-img" title="Mat Helme"
=======
<img src="<?= base_url()."public/assets/images/users/".$profile_picture; ?>" alt="user-img" title="Mat Helme"
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
class="rounded-circle avatar-md">
<div class="dropdown">
<a href="javascript: void(0);" class="text-reset dropdown-toggle h5 mt-2 mb-1 d-block"
@ -97,7 +125,11 @@
</a>
<!-- item-->
<<<<<<< HEAD
<a href="javascript:void(0);" class="dropdown-item notify-item">
=======
<a href="logout" class="dropdown-item notify-item">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<i class="fe-log-out mr-1"></i>
<span>Logout</span>
</a>
@ -132,8 +164,14 @@
</li>
<li>
<a href="business_list">
<<<<<<< HEAD
<i class="fa fa-industry"></i>
<span> Business </span>
=======
<i class="fa fa-industry"></i>
<span> Business </span>
</a>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<li>
<a href="#sidebarIcons" data-toggle="collapse">
<i class="ri-shield-user-line"></i>

View File

@ -48,7 +48,11 @@
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<<<<<<< HEAD
<img class="d-flex mr-2 rounded-circle" src="./assets/images/users/avatar-2.jpg" alt="Generic placeholder image" height="32">
=======
<img class="d-flex mr-2 rounded-circle" src="<?= base_url()."public/assets/images/users/avatar-2.jpg" ?>" alt="Generic placeholder image" height="32">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<div class="media-body">
<h5 class="m-0 font-14">Erwin E. Brown</h5>
cat<span class="font-12 mb-0">UI Designer</span>
@ -59,7 +63,11 @@
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="media">
<<<<<<< HEAD
<img class="d-flex mr-2 rounded-circle" src="./assets/images/users/avatar-5.jpg" alt="Generic placeholder image" height="32">
=======
<img class="d-flex mr-2 rounded-circle" src="<?= base_url()."public/assets/images/users/avatar-5.jpg" ?>" alt="Generic placeholder image" height="32">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<div class="media-body">
<h5 class="m-0 font-14">Jacob Deo</h5>
<span class="font-12 mb-0">Developer</span>
@ -100,21 +108,33 @@
<div class="row no-gutters">
<div class="col">
<a class="dropdown-icon-item" href="https://web.whatsapp.com/" target="_blank">
<<<<<<< HEAD
<img src="./assets/images/brands/whatsapp.png" alt="whatsapp">
=======
<img src="<?= base_url()."public/assets/images/brands/whatsapp.png" ?>" alt="whatsapp">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<span>Whatsapp</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="https://meet.google.com" target="_blank">
<<<<<<< HEAD
<img src="./assets/images/brands/meet.png" alt="G meet">
=======
<img src="<?= base_url()."public/assets/images/brands/meet.png" ?>" alt="G meet">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<span>G Meet</span>
</a>
</div>
<div class="col">
<a class="dropdown-icon-item" href="https://mail.google.com" target="_blank">
<!-- <img src="https://ssl.gstatic.com/ui/v1/icons/mail/rfr/logo_gmail_lockup_default_1x_r5.png" alt="G Suite"> -->
<<<<<<< HEAD
<img src="./assets/images/brands/gmail.png" alt="G mail">
=======
<img src="<?= base_url()."public/assets/images/brands/gmail.png" ?>" alt="G mail">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<span>G Mail</span>
</a>
</div>
@ -158,7 +178,11 @@
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<<<<<<< HEAD
<img src="./assets/images/users/avatar-2.jpg" class="img-fluid rounded-circle" alt="" />
=======
<img src="<?= base_url()."public/assets/images/users/avatar-2.jpg" ?>" class="img-fluid rounded-circle" alt="" />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<p class="notify-details">Mario Drummond</p>
<p class="text-muted mb-0 user-msg">
@ -169,7 +193,11 @@
<!-- item-->
<a href="javascript:void(0);" class="dropdown-item notify-item">
<div class="notify-icon">
<<<<<<< HEAD
<img src="./assets/images/users/avatar-4.jpg" class="img-fluid rounded-circle" alt="" />
=======
<img src="<?= base_url()."public/assets/images/users/avatar-4.jpg" ?>" class="img-fluid rounded-circle" alt="" />
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div>
<p class="notify-details">Rory Dalyell</p>
<p class="text-muted mb-0 user-msg">
@ -221,7 +249,11 @@
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<<<<<<< HEAD
<img src="./assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
=======
<img src="<?= base_url()."public/assets/images/users/".$profile_picture; ?>" alt="user-image" class="rounded-circle">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<span class="pro-user-name ml-1"><?= $loggedin_person; ?><i class="mdi mdi-chevron-down"></i>
</span>
</a>
@ -252,7 +284,11 @@
<div class="dropdown-divider"></div>
<!-- item-->
<<<<<<< HEAD
<a href="javascript:void(0);" class="dropdown-item notify-item">
=======
<a href="logout" class="dropdown-item notify-item">
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<i class="ri-logout-box-line"></i>
<span>Logout</span>
</a>

View File

@ -4,6 +4,7 @@
<div class="card-body">
<h4 class="header-title"><?= $page_name; ?></h4>
<p class="sub-header"> </p>
<<<<<<< HEAD
<form>
<div class="form-group">
<div class="form-row">
@ -133,6 +134,101 @@
<button class="btn btn-primary" type="submit">Submit form</button>
</form> -->
=======
<form action="<?= base_url()."user_synchronization"; ?>" method="post">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-4">
<label for="user_name" class="col-form-label">User Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="user_name" name="user_name" value="<?= isset($details['user_name']) ? $details['user_name'] : '' ?>" placeholder="User Name" required />
</div>
<div class="form-group col-md-4">
<label for="email" class="col-form-label">Email<span class="text-danger">*</span></label>
<input type="email" class="form-control" id="email" name="email" placeholder="Email" value="<?= isset($details['email']) ? $details['email'] : '' ?>" required />
</div>
<?php if(empty($details)){ ?>
<div class="form-group col-md-4">
<label for="password" class="col-form-label">Password<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="password" name="password" placeholder="Password" value="<?= isset($details['password']) ? $details['password'] : '' ?>" required />
</div>
<?php } ?>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="first_name" class="col-form-label">First Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="first_name" name="first_name" placeholder="First Name" value="<?= isset($details['first_name']) ? $details['first_name'] : '' ?>" required />
</div>
<div class="form-group col-md-6">
<label for="last_name" class="col-form-label">Last Name<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="last_name" name="last_name" placeholder="Last Name" value="<?= isset($details['last_name']) ? $details['last_name'] : '' ?>" required />
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="date_of_birth" class="col-form-label">Date Of Birth<span class="text-danger">*</span></label>
<input type="date" class="form-control" id="date_of_birth" name="date_of_birth" placeholder="Date Of birth (format : DD/MM/YYYY)" required data-toggle="input-mask" data-mask-format="00/00/0000" value="<?= isset($details['date_of_birth']) ? $details['date_of_birth'] : '' ?>" />
</div>
<div class="form-group col-md-6">
<label for="mobile_no" class="col-form-label">Mobile Number<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="mobile_no" name="mobile_no" placeholder="Mobile Number (Enter only numbers)" required data-parsley-type="number" value="<?= isset($details['mobile_no']) ? $details['mobile_no'] : '' ?>" />
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="gender" class="col-form-label">Gender</label>
<input type="text" class="form-control" id="gender" name="gender" placeholder="Gender" value="<?= isset($details['gender']) ? $details['gender'] : '' ?>" />
</div>
<div class="form-group col-md-3">
<label for="role" class="col-form-label">Role<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="role" name="role" placeholder="Role" required value="<?= isset($details['role']) ? $details['role'] : '' ?>" />
</div>
<div class="form-group col-md-3">
<label for="profile_picture" class="col-form-label">Profile Picture<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="profile_picture" name="profile_picture" placeholder="Profile picture Name" required value="<?= isset($details['profile_picture']) ? $details['profile_picture'] : '' ?>" />
</div>
</div>
<div class="form-group">
<label for="address" class="col-form-label">Address<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="address" name="address" placeholder="Address (eg : 1234 Main St)" required value="<?= isset($details['address']) ? $details['address'] : '' ?>" />
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="city" class="col-form-label">City<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="city" name="city" placeholder="City" required value="<?= isset($details['city']) ? $details['city'] : '' ?>" />
</div>
<div class="form-group col-md-4">
<label for="state" class="col-form-label">State<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="state" name="state" placeholder="State" required value="<?= isset($details['state']) ? $details['state'] : '' ?>" />
</div>
<div class="form-group col-md-2">
<label for="postal_code" class="col-form-label">Postal Code<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="postal_code" name="postal_code" placeholder="Postal Code (PIN)" required value="<?= isset($details['postal_code']) ? $details['postal_code'] : '' ?>" />
</div>
</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="business_id" name="business_id" placeholder="hidden for business id" value="<?= isset($details['business_id']) ? $details['business_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 class="btn btn-success waves-effect waves-light mr-1" type="submit">
Submit
</button>
<button type="reset" class="btn btn-primary waves-effect mr-1">
Reset
</button>
<button type="button" class="btn btn-secondary waves-effect">Cancel</button>
</div>
</div>
</form>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div> <!-- end card-body-->
</div> <!-- end card-->
</div> <!-- end col-->

View File

@ -2,9 +2,14 @@
<div class="col-12">
<div class="card">
<div class="card-body">
<<<<<<< HEAD
<div class="float-right">
<a href="add_user" class="btn btn-primary"><i class="ri-user-add-line"></i> Add New </a>
=======
<div class="float-right">
<a href="user_page/0" class="btn btn-primary"><i class="ri-user-add-line"></i> Add New </a>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</div><!-- end col-->
<br>
<h4 class="header-title mb-3"><?= $page_name; ?></h4>
@ -17,15 +22,23 @@
<thead class="thead-light">
<tr>
<th>Name</th>
<<<<<<< HEAD
<th>Address</th>
<th>State</th>
<th>City</th>
<th>Pincode</th>
=======
<th>Email</th>
<th>Role</th>
<th>Mobile Number</th>
<th>Address</th>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<<<<<<< HEAD
<tbody>
<tr>
@ -55,6 +68,34 @@
</td>
</tr>
=======
<tbody>
<?php foreach ($details as $row):
if ($row['isactive']) {
$class = 'badge badge-soft-success';
$message = 'Active';
} else {
$class = 'badge badge-soft-danger';
$message = 'In-Active';
}
$edit_page_route = "user_page/".$row['user_id'];
?>
<tr>
<td><?php echo $row['first_name'].' '.$row['last_name'] ; ?></td>
<td><?php echo $row['email'] ; ?></td>
<td><?php echo $row['role'] ; ?></td>
<td><?php echo $row['mobile_no'] ; ?></td>
<td><?php echo $row['address'].', '.$row['city'].', '.$row['state'].'- '.$row['postal_code'].'. '.$row['country'] ; ?></td>
<td>
<span class="<?php echo $class; ?>"><?php echo $message; ?></span>
</td>
<td>
<a href="<?php echo $edit_page_route; ?>" class="btn btn-xs btn-secondary"><i class="ri-pencil-line"></i></a>
</td>
</tr>
<?php endforeach; ?>
>>>>>>> 4ea78124915fbe2bb19a0c3355584ce7f2dfc815
</tbody>
</table>
</div>

69
index.php Executable file
View File

@ -0,0 +1,69 @@
<?php
// Check PHP version.
$minPhpVersion = '7.4'; // If you update this, don't forget to update `spark`.
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s',
$minPhpVersion,
PHP_VERSION
);
exit($message);
}
// Path to the front controller (this file)
define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR);
// Ensure the current directory is pointing to the front controller's directory
chdir(FCPATH);
/*
*---------------------------------------------------------------
* BOOTSTRAP THE APPLICATION
*---------------------------------------------------------------
* This process sets up the path constants, loads and registers
* our autoloader, along with Composer's, loads our constants
* and fires up an environment-specific bootstrapping.
*/
// Load our paths config file
// This is the line that might need to be changed, depending on your folder structure.
// require FCPATH . '../app/Config/Paths.php';
$pathsPath = FCPATH . 'app/Config/Paths.php';
require $pathsPath;
// ^^^ Change this line if you move your application folder
$paths = new Config\Paths();
// Location of the framework bootstrap file.
require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php';
// Load environment settings from .env files into $_SERVER and $_ENV
require_once SYSTEMPATH . 'Config/DotEnv.php';
(new CodeIgniter\Config\DotEnv(ROOTPATH))->load();
/*
* ---------------------------------------------------------------
* GRAB OUR CODEIGNITER INSTANCE
* ---------------------------------------------------------------
*
* The CodeIgniter class contains the core functionality to make
* the application run, and does all the dirty work to get
* the pieces all working together.
*/
$app = Config\Services::codeigniter();
$app->initialize();
$context = is_cli() ? 'php-cli' : 'web';
$app->setContext($context);
/*
*---------------------------------------------------------------
* LAUNCH THE APPLICATION
*---------------------------------------------------------------
* Now that everything is set up, it's time to actually fire
* up the engines and make this app do its thang.
*/
$app->run();

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB