diff --git a/.gitignore b/.gitignore
index d2d320a4..20d1c153 100755
--- a/.gitignore
+++ b/.gitignore
@@ -86,6 +86,8 @@ writable/**/*.sqlite
php_errors.log
+public/uploads/*
+# !public/uploads/index.html
#-------------------------
# Composer
diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php
index e9ee6613..e311db51 100644
--- a/app/Config/Autoload.php
+++ b/app/Config/Autoload.php
@@ -45,6 +45,7 @@ class Autoload extends AutoloadConfig
public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
'Config' => APPPATH . 'Config',
+ 'App\Libraries' => APPPATH . 'Libraries',
];
/**
diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index 47b92f83..bae5eb9e 100644
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -92,3 +92,13 @@ define('EVENT_PRIORITY_NORMAL', 100);
* @deprecated Use \CodeIgniter\Events\Events::PRIORITY_HIGH instead.
*/
define('EVENT_PRIORITY_HIGH', 10);
+
+/**
+ * Dummy Constants For Api Integration.
+ */
+define('WPBOOK_DETAILS', 'https://reqres.in/api/users?page=2');
+define('WPBOOK_DETAILS_GET_PARAMETER', 'https://reqres.in/api/users?page=2');
+define('WPBOOK_DETAILS_GET_STRAIGHTFORWARD', 'https://reqres.in/api/users');
+define('WPBOOK_DETAILS_GET_SEGMENT', 'https://reqres.in/api/users/2');
+define('WPBOOK_DETAILS_POST', 'https://reqres.in/api/users');
+define('WPBOOK_DETAILS_PUT', 'https://reqres.in/api/users/707');
diff --git a/app/Config/Logger.php b/app/Config/Logger.php
index 568c5da6..ae803360 100644
--- a/app/Config/Logger.php
+++ b/app/Config/Logger.php
@@ -115,7 +115,7 @@ class Logger extends BaseConfig
* By default, logs are written to WRITEPATH . 'logs/'
* Specify a different destination here, if desired.
*/
- 'path' => '',
+ 'path' => WRITEPATH . 'logs/',
],
/*
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 6aaa781f..2dd7720b 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -60,12 +60,6 @@ $routes->get("new_bussiness/(:any)", "Business::new_bussiness/$1");
$routes->post("insert_business/", "Business::insert_business");
$routes->get("delete_business/(:any)", "Business::delete_business/$1");
-
-
-$routes->get("subscribers_list/", "Home::subscribers_list");
-$routes->get("add_subscribers/", "Home::add_subscribers");
-$routes->get("edit_subscribers/", "Home::edit_subscribers");
-
#custome routes
$routes->get("customer_list/", "Customer::index");
$routes->get("new_customer/(:any)", "Customer::new_customer/$1");
@@ -75,6 +69,9 @@ $routes->get("delete_customer/(:any)", "Customer::delete_customer/$1");
$routes->get("scheme_list/", "Scheme::index");
$routes->get("new_scheme/(:any)", "Scheme::new_scheme/$1");
$routes->post("insert_scheme/", "Scheme::insert_scheme");
+
+# Api integration
+$routes->get("apiintegration", "Home::apiintegration");
/*
* --------------------------------------------------------------------
* Additional Routing
diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php
index 81174cc5..743c7294 100644
--- a/app/Controllers/BaseController.php
+++ b/app/Controllers/BaseController.php
@@ -59,8 +59,8 @@ abstract class BaseController extends Controller
public function render_page($viewpage, $data){
helper('session');
- $session_uid = get_logged_user_id('user_id');
- $session_uname = get_logged_name('user_name');
+ $session_uid = get_logged_user_id();
+ $session_uname = get_logged_name();
if(!is_session_active()) {
$route = base_url()."login";
return redirect()->route($route);
@@ -81,7 +81,7 @@ abstract class BaseController extends Controller
echo view('template/topbar.php', $data);
echo view($viewpage, $data);
echo view('template/footer.php', $data);
-
+
// $header = view('template/header.php', $data);
// $topbar = view('template/topbar.php', $data);
// $content = view($viewpage, $data);
diff --git a/app/Controllers/Books.php b/app/Controllers/Books.php
index 5cffec7f..f5ef9fb7 100755
--- a/app/Controllers/Books.php
+++ b/app/Controllers/Books.php
@@ -10,8 +10,8 @@ class Books extends BaseController
{
helper('session');
if (is_session_active()) {
- $session_role = get_user_role('user_role');
- $session_bid = get_business_id('business_id');
+ $session_role = get_user_role();
+ $session_bid = get_business_id();
$where = ['books.isactive' => 1];
if (!empty($session_role) && $session_role !== "sadmin") {
diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php
index 3373fde0..653315f3 100644
--- a/app/Controllers/Home.php
+++ b/app/Controllers/Home.php
@@ -11,4 +11,28 @@ class Home extends BaseController
$this->render_page('dashboard', $data);
}
+
+ ## ApiIntegration. Dummy
+ public function apiintegration() {
+ helper('apiIntegration');
+
+ // GET - list of books
+ $response_1 = perform_http_request('GET', WPBOOK_DETAILS,false);
+ $data['books'] = $response_1;
+ $response_2 = perform_http_request('GET', WPBOOK_DETAILS_GET_STRAIGHTFORWARD,false);
+ $data['books_ps'] = $response_2;
+ $response_3 = perform_http_request('GET', WPBOOK_DETAILS_GET_SEGMENT,false);
+ $data['book'] = $response_3;
+ //POST - create new book
+ $request_data = json_encode(array("name" => "Soumitra", "job" => "Blog Author", "avatar" => "https://roytuts.com/about/"));
+ $response_4 = perform_http_request('POST', WPBOOK_DETAILS_POST, $request_data);
+ $data['new_book'] = $response_4;
+ //PUT - update book
+ $request_data = json_encode(array("name" => "Soumitra", "job" => "Roy Tutorials Author", "avatar" => "https://roytuts.com/about/"));
+ $response_5 = perform_http_request('PUT', WPBOOK_DETAILS_PUT, $request_data);
+ $data['update_book'] = $response_5;
+ //View
+ // print_r($data);
+ return view('api_list', $data);
+ }
}
diff --git a/app/Controllers/Settings.php b/app/Controllers/Settings.php
index 794cc99c..e34dd252 100755
--- a/app/Controllers/Settings.php
+++ b/app/Controllers/Settings.php
@@ -9,8 +9,8 @@ class Settings extends BaseController
public function index()
{
helper('session');
- $session_role = get_user_role('user_role');
- $session_bid = get_business_id('business_id');
+ $session_role = get_user_role();
+ $session_bid = get_business_id();
$where = ['settings.isactive' => 1];
if (!empty($session_role) && $session_role !== "sadmin") {
@@ -47,7 +47,7 @@ class Settings extends BaseController
public function sitesetting_synchronization()
{
helper('session');
- $session_bid = get_business_id('business_id');
+ $session_bid = get_business_id();
$session_uid = get_logged_user_id();
$model = new SettingsModel();
diff --git a/app/Helpers/apiIntegration_helper.php b/app/Helpers/apiIntegration_helper.php
new file mode 100644
index 00000000..3c3e2a09
--- /dev/null
+++ b/app/Helpers/apiIntegration_helper.php
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/app/Views/api_list.php b/app/Views/api_list.php
new file mode 100644
index 00000000..c183b4fd
--- /dev/null
+++ b/app/Views/api_list.php
@@ -0,0 +1,26 @@
+
+
+
+ Dummy API Integration
+
+ GET - List Of Books
+
+
+ GET - Single Book
+
+
+ POST - Create New Book
+
+
+ PUT - Update Book
+
+
+
diff --git a/app/Views/auth_logout.php b/app/Views/auth_logout.php
new file mode 100755
index 00000000..3938b9af
--- /dev/null
+++ b/app/Views/auth_logout.php
@@ -0,0 +1,105 @@
+
+
+
+
+ Logout | Minton - Responsive Admin Dashboard Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
See you again !
+
+
You are now successfully sign out.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/auth_signup.php b/app/Views/auth_signup.php
new file mode 100755
index 00000000..74b12fa1
--- /dev/null
+++ b/app/Views/auth_signup.php
@@ -0,0 +1,188 @@
+
+
+
+
+ Auth Pages | Create Account | Sign In 2 | Minton - Responsive Admin Dashboard Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Very elegant & impressive!
+
I've been using this theme for a while and I must say that whenever I am looking for a design - I refer to this theme for specifics & implementation. With wide arrays of components, designs, charts - I would highly recommend this theme for anyone using it for dashboard or project management usage..
+
+
+ - Admin User
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/book_list.php b/app/Views/book_list.php
index 52213954..2ba4871a 100644
--- a/app/Views/book_list.php
+++ b/app/Views/book_list.php
@@ -4,6 +4,7 @@
diff --git a/app/Views/user_form.php b/app/Views/user_form.php
index 97214ea5..5ba8b552 100644
--- a/app/Views/user_form.php
+++ b/app/Views/user_form.php
@@ -38,6 +38,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ Is Active
+
+
+
+
+>>>>>>> ee8a2ba619d361191bbd1f7670242697a47ecea7
+<<<<<<< HEAD
+=======
+
+
+>>>>>>> ee8a2ba619d361191bbd1f7670242697a47ecea7
diff --git a/public/uploads/1693203788_5939497d95031acba789.png b/public/uploads/1693203788_5939497d95031acba789.png
deleted file mode 100644
index 804bcfd5..00000000
Binary files a/public/uploads/1693203788_5939497d95031acba789.png and /dev/null differ
diff --git a/public/uploads/1693204048_927cac1f0d5a7277dbe0.png b/public/uploads/1693204048_927cac1f0d5a7277dbe0.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/1693204048_927cac1f0d5a7277dbe0.png and /dev/null differ
diff --git a/public/uploads/1693204080_cfd45864443e51f665c9.png b/public/uploads/1693204080_cfd45864443e51f665c9.png
deleted file mode 100644
index 804bcfd5..00000000
Binary files a/public/uploads/1693204080_cfd45864443e51f665c9.png and /dev/null differ
diff --git a/public/uploads/1693215642_9587976d52c1854d0419.png b/public/uploads/1693215642_9587976d52c1854d0419.png
deleted file mode 100644
index be3745d8..00000000
Binary files a/public/uploads/1693215642_9587976d52c1854d0419.png and /dev/null differ
diff --git a/public/uploads/2023-05-19 (1).png b/public/uploads/2023-05-19 (1).png
deleted file mode 100644
index 51eb9327..00000000
Binary files a/public/uploads/2023-05-19 (1).png and /dev/null differ
diff --git a/public/uploads/2023-05-19 (1)_1.png b/public/uploads/2023-05-19 (1)_1.png
deleted file mode 100644
index 51eb9327..00000000
Binary files a/public/uploads/2023-05-19 (1)_1.png and /dev/null differ
diff --git a/public/uploads/2023-05-19 (1)_2.png b/public/uploads/2023-05-19 (1)_2.png
deleted file mode 100644
index 51eb9327..00000000
Binary files a/public/uploads/2023-05-19 (1)_2.png and /dev/null differ
diff --git a/public/uploads/2023-05-19 (1)_3.png b/public/uploads/2023-05-19 (1)_3.png
deleted file mode 100644
index 51eb9327..00000000
Binary files a/public/uploads/2023-05-19 (1)_3.png and /dev/null differ
diff --git a/public/uploads/2023-05-19 (1)_4.png b/public/uploads/2023-05-19 (1)_4.png
deleted file mode 100644
index 51eb9327..00000000
Binary files a/public/uploads/2023-05-19 (1)_4.png and /dev/null differ
diff --git a/public/uploads/2023-06-17.png b/public/uploads/2023-06-17.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_1.png b/public/uploads/2023-06-17_1.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_1.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_10.png b/public/uploads/2023-06-17_10.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_10.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_11.png b/public/uploads/2023-06-17_11.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_11.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_12.png b/public/uploads/2023-06-17_12.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_12.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_13.png b/public/uploads/2023-06-17_13.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_13.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_2.png b/public/uploads/2023-06-17_2.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_2.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_3.png b/public/uploads/2023-06-17_3.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_3.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_4.png b/public/uploads/2023-06-17_4.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_4.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_5.png b/public/uploads/2023-06-17_5.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_5.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_6.png b/public/uploads/2023-06-17_6.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_6.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_7.png b/public/uploads/2023-06-17_7.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_7.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_8.png b/public/uploads/2023-06-17_8.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_8.png and /dev/null differ
diff --git a/public/uploads/2023-06-17_9.png b/public/uploads/2023-06-17_9.png
deleted file mode 100644
index 32a11680..00000000
Binary files a/public/uploads/2023-06-17_9.png and /dev/null differ
diff --git a/public/uploads/2023-07-01.png b/public/uploads/2023-07-01.png
deleted file mode 100644
index 2537bc08..00000000
Binary files a/public/uploads/2023-07-01.png and /dev/null differ
diff --git a/public/uploads/2023-07-01_1.png b/public/uploads/2023-07-01_1.png
deleted file mode 100644
index 2537bc08..00000000
Binary files a/public/uploads/2023-07-01_1.png and /dev/null differ
diff --git a/public/uploads/2023-07-01_2.png b/public/uploads/2023-07-01_2.png
deleted file mode 100644
index 2537bc08..00000000
Binary files a/public/uploads/2023-07-01_2.png and /dev/null differ
diff --git a/public/uploads/2023-07-01_3.png b/public/uploads/2023-07-01_3.png
deleted file mode 100644
index 2537bc08..00000000
Binary files a/public/uploads/2023-07-01_3.png and /dev/null differ
diff --git a/public/uploads/2023-07-01_4.png b/public/uploads/2023-07-01_4.png
deleted file mode 100644
index 2537bc08..00000000
Binary files a/public/uploads/2023-07-01_4.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426.png b/public/uploads/Screenshot 2023-07-19 170426.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426_1.png b/public/uploads/Screenshot 2023-07-19 170426_1.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426_1.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426_2.png b/public/uploads/Screenshot 2023-07-19 170426_2.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426_2.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426_3.png b/public/uploads/Screenshot 2023-07-19 170426_3.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426_3.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426_4.png b/public/uploads/Screenshot 2023-07-19 170426_4.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426_4.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-19 170426_5.png b/public/uploads/Screenshot 2023-07-19 170426_5.png
deleted file mode 100644
index 2b1ed5ff..00000000
Binary files a/public/uploads/Screenshot 2023-07-19 170426_5.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-20 170514.png b/public/uploads/Screenshot 2023-07-20 170514.png
deleted file mode 100644
index d79a0464..00000000
Binary files a/public/uploads/Screenshot 2023-07-20 170514.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-21 100328.png b/public/uploads/Screenshot 2023-07-21 100328.png
deleted file mode 100644
index 44a42fb3..00000000
Binary files a/public/uploads/Screenshot 2023-07-21 100328.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-21 115438.png b/public/uploads/Screenshot 2023-07-21 115438.png
deleted file mode 100644
index 98663831..00000000
Binary files a/public/uploads/Screenshot 2023-07-21 115438.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-07-21 115438_1.png b/public/uploads/Screenshot 2023-07-21 115438_1.png
deleted file mode 100644
index 98663831..00000000
Binary files a/public/uploads/Screenshot 2023-07-21 115438_1.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-08-03 152103.png b/public/uploads/Screenshot 2023-08-03 152103.png
deleted file mode 100644
index 017d2d61..00000000
Binary files a/public/uploads/Screenshot 2023-08-03 152103.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-08-18 125558.png b/public/uploads/Screenshot 2023-08-18 125558.png
deleted file mode 100644
index a82f8baa..00000000
Binary files a/public/uploads/Screenshot 2023-08-18 125558.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-08-18 125558_1.png b/public/uploads/Screenshot 2023-08-18 125558_1.png
deleted file mode 100644
index a82f8baa..00000000
Binary files a/public/uploads/Screenshot 2023-08-18 125558_1.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-08-28 143009.png b/public/uploads/Screenshot 2023-08-28 143009.png
deleted file mode 100644
index fa93c3c9..00000000
Binary files a/public/uploads/Screenshot 2023-08-28 143009.png and /dev/null differ
diff --git a/public/uploads/Screenshot 2023-08-28 143009_1.png b/public/uploads/Screenshot 2023-08-28 143009_1.png
deleted file mode 100644
index fa93c3c9..00000000
Binary files a/public/uploads/Screenshot 2023-08-28 143009_1.png and /dev/null differ
diff --git a/writable/uploads/20230821/index.html b/writable/uploads/20230821/index.html
deleted file mode 100644
index e69de29b..00000000