Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
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
TimeOut
TimeOutAdmin
Commits
ea081d7b
Commit
ea081d7b
authored
Mar 12, 2020
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
staff customer and provider usertype check
parent
e97971e1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
Api.php
application/controllers/Api.php
+1
-0
Customer_model.php
application/models/Customer_model.php
+1
-1
Provider_model.php
application/models/Provider_model.php
+1
-1
Staff_model.php
application/models/Staff_model.php
+1
-1
No files found.
application/controllers/Api.php
View file @
ea081d7b
...
...
@@ -767,6 +767,7 @@ class Api extends CI_Controller {
!
isset
(
$reqData
[
'auth_token'
])
||
empty
(
$reqData
[
'auth_token'
])){
redirect
(
$redUrl
.
'failure'
);
}
$reqData
[
'cardNumber'
]
=
str_replace
(
' '
,
''
,
$reqData
[
'cardNumber'
]);
$payData
=
array
(
'auth_token'
=>
$reqData
[
'auth_token'
],
'amount'
=>
'1'
,
'booking_id'
=>
'ADD_CARD'
);
$res
=
$this
->
Api_model
->
payNow
(
$payData
);
...
...
application/models/Customer_model.php
View file @
ea081d7b
...
...
@@ -23,7 +23,7 @@ class Customer_model extends CI_Model {
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN booking AS BOK ON (BOK.customer_id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_id)
WHERE
$cond
AND EVT.provider_id='
$provider_id
' AND BOK.status!='4'"
;
WHERE
$cond
AND EVT.provider_id='
$provider_id
' AND BOK.status!='4'
GROUP BY CUST.customer_id
"
;
}
$customerData
=
$this
->
db
->
query
(
$sql
);
...
...
application/models/Provider_model.php
View file @
ea081d7b
...
...
@@ -10,7 +10,7 @@ class Provider_model extends CI_Model {
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE user_type
='2'
AND status!='2' AND username='"
.
$provider_data
[
'username'
]
.
"'"
);
WHERE user_type
IN('2','4')
AND status!='2' AND username='"
.
$provider_data
[
'username'
]
.
"'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
4
;
$emailChk
=
$this
->
db
->
query
(
"SELECT * FROM provider AS PRV
...
...
application/models/Staff_model.php
View file @
ea081d7b
...
...
@@ -22,7 +22,7 @@ class Staff_model extends CI_Model {
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
user_type IN (4,5)"
);
user_type IN (
2,
4,5)"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
2
;
$status
=
$this
->
db
->
insert
(
'users'
,
...
...
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