Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apps.acj
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Franklin
apps.acj
Commits
77f192f5
Commit
77f192f5
authored
Mar 15, 2024
by
Manoj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
f2248571
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
170 additions
and
75 deletions
+170
-75
routes.php
admin/application/config/routes.php
+12
-49
AuthController.php
admin/application/controllers/AuthController.php
+67
-5
DashboardController.php
admin/application/controllers/DashboardController.php
+48
-5
Common_model.php
admin/application/models/Common_model.php
+9
-0
login.php
admin/application/views/auth/login.php
+30
-13
menu.php
admin/application/views/base/menu.php
+2
-2
home.php
admin/application/views/dashboard/home.php
+0
-0
style.css
admin/assets/css/style.css
+2
-1
asian_logo.jpg
admin/assets/images/asian_logo.jpg
+0
-0
No files found.
admin/application/config/routes.php
View file @
77f192f5
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/userguide3/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route
[
'default_controller'
]
=
'DashboardController/'
;
$route
[
'default_controller'
]
=
'AuthController/'
;
$route
[
'404_override'
]
=
''
;
$route
[
'translate_uri_dashes'
]
=
FALSE
;
//auth
$route
[
'login'
]
=
'AuthController/login'
;
$route
[
'logout'
]
=
'AuthController/logout'
;
$route
[
'recover'
]
=
'auth/forgetpassword'
;
$route
[
'verification'
]
=
'auth/recovery_verification'
;
$route
[
'privacy'
]
=
'auth/privacy_policy'
;
\ No newline at end of file
admin/application/controllers/AuthController.php
View file @
77f192f5
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
defined
(
'BASEPATH'
)
or
exit
(
'No direct script access allowed'
);
class
AuthController
extends
CI_Controller
{
class
AuthController
extends
CI_Controller
{
public
function
index
()
{
...
...
@@ -10,12 +11,60 @@ class AuthController extends CI_Controller {
$this
->
load
->
view
(
'auth/login'
,
$view_data
);
}
public
function
register
()
public
function
login
()
{
$view_data
[
''
]
=
''
;
$this
->
load
->
view
(
'auth/register'
,
$view_data
);
$email
=
$this
->
input
->
post
(
'email'
);
$password
=
$this
->
input
->
post
(
'password'
);
$user
=
$this
->
mcommon
->
specific_row
(
'users'
,
array
(
'email'
=>
$email
));
if
(
$user
[
'user_id'
]
!=
''
&&
password_verify
(
$password
,
$user
[
'passwd'
]))
{
$this
->
session
->
set_flashdata
(
'alert_success'
,
'Login successfully!'
);
$userArray
=
array
(
"user_id"
=>
$user
[
'user_id'
],
"email"
=>
$user
[
'email'
],
"mobile"
=>
$user
[
'mobile'
],
"name"
=>
$user
[
'name'
],
"auth_level"
=>
$user
[
'auth_level'
],
"logged_in"
=>
true
,
);
$this
->
session
->
set_userdata
(
$userArray
);
redirect
(
'DashboardController'
);
}
else
{
$this
->
session
->
set_flashdata
(
'alert_danger'
,
'Email or Password Wrong!'
);
redirect
(
'login'
);
}
}
// public function register()
// {
// if (isset($_POST['submit'])) {
// $user_array = array(
// 'first_name' => $first_name,
// // 'last_name' => $last_name,
// 'username' => $username,
// 'name' => $name,
// 'email' => $email,
// 'mobile' => $mobile_number,
// 'auth_level' => 1, // 1->customer,9->admin
// 'passwd' => password_hash($password, PASSWORD_DEFAULT),
// 'created_at' => date("Y-m-d h:i:s"),
// 'banned' => 0
// );
// //insert values in database
// $insert = $this->mcommon->common_insert('users', $user_array);
// } else {
// $view_data[''] = '';
// $this->load->view('auth/register', $view_data);
// }
// }
public
function
forget
()
{
...
...
@@ -23,4 +72,17 @@ class AuthController extends CI_Controller {
$this
->
load
->
view
(
'auth/forget'
,
$view_data
);
}
public
function
logout
()
{
$this
->
session
->
unset_userdata
(
'logged_in'
);
$this
->
authentication
->
logout
();
// Set redirect protocol
$redirect_protocol
=
USE_SSL
?
'https'
:
null
;
redirect
(
site_url
(
LOGIN_PAGE
.
'?logout=1'
,
$redirect_protocol
));
}
}
admin/application/controllers/DashboardController.php
View file @
77f192f5
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
defined
(
'BASEPATH'
)
or
exit
(
'No direct script access allowed'
);
class
DashboardController
extends
CI_Controller
{
class
DashboardController
extends
CI_Controller
{
public
function
index
()
{
...
...
@@ -18,17 +19,59 @@ class DashboardController extends CI_Controller {
$this
->
db
->
where
(
'payment_status'
,
2
);
$completed
=
$this
->
db
->
count_all_results
();
$currentYear
=
date
(
'Y'
);
$this
->
db
->
select
(
'MONTH(a.created_at) as month, COUNT(*) as count'
);
$this
->
db
->
from
(
'applications as a'
);
$this
->
db
->
join
(
'accomodation_info as ai'
,
'ai.application_id = a.id'
,
'left'
);
$this
->
db
->
where
(
'a.status'
,
1
);
$this
->
db
->
where
(
'YEAR(a.created_at)'
,
$currentYear
);
// Ensure filtering by the same date field used for grouping
$this
->
db
->
group_by
(
'MONTH(a.created_at)'
);
$query
=
$this
->
db
->
get
();
$monthlyCounts
=
array_fill
(
0
,
12
,
0
);
// Start indices from 0 to 11 for months Jan-Dec
foreach
(
$query
->
result
()
as
$row
)
{
$monthlyCounts
[
$row
->
month
-
1
]
=
(
int
)
$row
->
count
;
// Adjust index by 1 to match array indexing
}
$view_data
[
'monthlyCounts'
]
=
$monthlyCounts
;
// print_r($view_data['monthlyCounts']);
// exit;
$this
->
db
->
from
(
'applications as a'
);
$this
->
db
->
where
(
'a.payment_status'
,
2
);
$completed_count
=
$this
->
db
->
count_all_results
();
$total_amount
=
$completed_count
*
1260
;
$view_data
[
'courses'
]
=
$this
->
mcommon
->
records_all
(
'course'
);
$this
->
db
->
select
(
'*, applications.id as appid, applications.status as apstatus,ai.payment_mode,applications.email as appEmail'
);
$this
->
db
->
from
(
'applications'
);
$this
->
db
->
join
(
'course'
,
'course.id = applications.course_id'
,
'left'
);
$this
->
db
->
join
(
'users'
,
'users.user_id = applications.user_id'
,
'left'
);
$this
->
db
->
join
(
'accomodation_info as ai'
,
'ai.application_id = applications.id'
,
'left'
);
$this
->
db
->
join
(
'application_other_info as athinfo'
,
'athinfo.application_id = applications.id'
,
'left'
);
// $this->db->where('athinfo.tab_status', '1');
$this
->
db
->
where
(
'applications.status'
,
'1'
);
$query
=
$this
->
db
->
get
();
$view_data
[
'records'
]
=
$query
->
result
();
$view_data
[
'drafted'
]
=
$drafted
;
$view_data
[
'pending'
]
=
$pending
;
$view_data
[
'completed'
]
=
$completed
;
$view_data
[
'total_amount'
]
=
$total_amount
;
$data
=
array
(
'title'
=>
"Home"
,
'content'
=>
$this
->
load
->
view
(
'dashboard/home'
,
$view_data
,
true
),
);
$this
->
load
->
view
(
'base/base_template'
,
$data
);
}
}
admin/application/models/Common_model.php
View file @
77f192f5
...
...
@@ -416,6 +416,15 @@ class Common_model extends CI_Model
}
public
function
getUser
(
$email
){
$this
->
db
->
select
(
'*'
);
$this
->
db
->
from
(
'users'
);
$this
->
db
->
where
(
'email'
,
$email
);
$result
=
$this
->
db
->
get
()
->
row_array
();
return
$result
;
}
...
...
admin/application/views/auth/login.php
View file @
77f192f5
...
...
@@ -18,8 +18,22 @@
<link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"
<?=
base_url
(
''
)
?>
assets/images/favicon.png"
>
<link
href=
"
<?=
base_url
(
''
)
?>
assets/css/style.css"
rel=
"stylesheet"
>
<style>
.login-image
{
height
:
440px
!important
;
width
:
362px
;
margin-left
:
-65px
;
}
.tab-content
{
margin-left
:
-82px
!important
;
}
</style>
</head>
<body
class=
"body h-100"
>
<div
class=
"authincation d-flex flex-column flex-lg-row flex-column-fluid"
>
<div
class=
"login-aside text-center d-flex flex-column flex-row-auto"
>
...
...
@@ -41,28 +55,31 @@
<div
class=
"d-flex justify-content-center h-100 align-items-center"
>
<div
class=
"authincation-content style-2"
>
<div
class=
"row no-gutters"
>
<div
class=
"col-xl-12 tab-content"
>
<div
id=
"sign-up"
class=
"auth-form tab-pane fade show active form-validation"
>
<form
action=
"https://akademi.dexignlab.com/codeigniter/demo/index"
>
<div
class=
"col-xl-12 d-flex tab-content"
>
<div
class=
"col-md-8"
>
<img
src=
"
<?php
echo
base_url
();
?>
assets/images/asian_logo.jpg"
alt=
""
width=
"300px"
class=
"login-image"
>
</div>
<div
style=
" border:1px solid grey;"
id=
"sign-up"
class=
"auth-form tab-pane fade show active form-validation col-md-11 "
>
<form
action=
"
<?=
base_url
(
"login"
)
?>
"
method=
"post"
>
<div
class=
"text-center mb-4"
>
<h3
class=
"text-center mb-2 text-black"
>
Sign In
</h3>
<
span>
Your Social Campaigns
</span
>
<
!-- <span>Your Social Campaigns</span> --
>
</div>
<div
class=
"mb-3"
>
<label
for=
"exampleFormControlInput1"
class=
"form-label mb-2 fs-13 label-color font-w500"
>
Email
address
</label>
<input
type=
"email"
class=
"form-control"
id=
"exampleFormControlInput1"
value=
"hello@example.com
"
>
<label
for=
"exampleFormControlInput1"
class=
"form-label mb-2 fs-13 label-color font-w500"
>
Email
Id
</label>
<input
type=
"text"
name=
"email"
class=
"form-control"
id=
"email
"
>
</div>
<div
class=
"mb-3"
>
<label
for=
"exampleFormControlInput1"
class=
"form-label mb-2 fs-13 label-color font-w500"
>
Password
</label>
<input
type=
"password"
class=
"form-control"
id=
"exampleFormControlInput2"
value=
"P
assword"
>
<input
type=
"password"
name=
"password"
class=
"form-control"
id=
"p
assword"
>
</div>
<a
href=
"
<?=
base_url
(
'AuthController/forget'
)
?>
"
class=
"text-primary float-end mb-4"
>
Forgot Password ?
</a>
<button
class=
"btn btn-block btn-primary"
>
Sign In
</button>
</form>
<div
class=
"new-account mt-3 text-center"
>
<
p
class=
"font-w500"
>
Don't have an account?
<a
class=
"text-primary"
href=
"
<?=
base_url
(
'AuthController/register'
)
?>
"
data-toggle=
"tab"
>
Sign Up
</a></p
>
<
!-- <p class="font-w500">Don't have an account? <a class="text-primary" href="
<?=
base_url
(
'AuthController/register'
)
?>
" data-toggle="tab">Sign Up</a></p> --
>
</div>
</div>
</div>
...
...
@@ -73,13 +90,13 @@
</div>
<!--**********************************
<!--**********************************
Scripts
***********************************-->
<!-- Required vendors -->
<script
src=
"
<?=
base_url
(
''
)
?>
assets/vendor/global/global.min.js"
></script>
<script
src=
"
<?=
base_url
(
''
)
?>
assets/js/custom.min.js"
></script>
<script
src=
"
<?=
base_url
(
''
)
?>
assets/js/dlabnav-init.js"
></script>
<!-- Required vendors -->
<script
src=
"
<?=
base_url
(
''
)
?>
assets/vendor/global/global.min.js"
></script>
<script
src=
"
<?=
base_url
(
''
)
?>
assets/js/custom.min.js"
></script>
<script
src=
"
<?=
base_url
(
''
)
?>
assets/js/dlabnav-init.js"
></script>
</body>
...
...
admin/application/views/base/menu.php
View file @
77f192f5
...
...
@@ -26,11 +26,11 @@
</ul>
</li>
<li><a
href=
"
<?php
echo
base_url
();
?>
EmailTemplateController/"
aria-expanded=
"false"
>
<
!-- <
li><a href="
<?php
echo
base_url
();
?>
EmailTemplateController/" aria-expanded="false">
<i class="material-symbols-outlined">email</i>
<span class="nav-text">Email Template</span>
</a>
</li>
</li>
-->
<li><a
class=
"has-arrow "
href=
"javascript:void(0);"
aria-expanded=
"false"
>
<i
class=
"material-icons"
>
settings
</i>
...
...
admin/application/views/dashboard/home.php
View file @
77f192f5
This diff is collapsed.
Click to expand it.
admin/assets/css/style.css
View file @
77f192f5
...
...
@@ -21495,7 +21495,8 @@ Fixing Order => Base + Typography >> General Layout + Grid >> Page Layout + Comp
.input-group > .bootstrap-select:not(:last-child) .dropdown-toggle {
border-top-right-radius: 0;
border-bottom-right-radius: 0; }
border-bottom-right-radius: 0;
height : 42px ;}
:root {
--primary: #FC9003;
admin/assets/images/asian_logo.jpg
0 → 100644
View file @
77f192f5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment