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
4c96ff66
Commit
4c96ff66
authored
Mar 13, 2020
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in admin
parent
ea081d7b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
20 deletions
+16
-20
Booking_model.php
application/models/Booking_model.php
+2
-1
Customer_model.php
application/models/Customer_model.php
+4
-2
Provider_model.php
application/models/Provider_model.php
+3
-7
Staff_model.php
application/models/Staff_model.php
+2
-3
viewProvider.php
application/views/Provider/viewProvider.php
+5
-7
No files found.
application/models/Booking_model.php
View file @
4c96ff66
...
@@ -31,7 +31,8 @@ class Booking_model extends CI_Model {
...
@@ -31,7 +31,8 @@ class Booking_model extends CI_Model {
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
INNER JOIN event_date_time AS EDT ON (EDT.id=BOK.event_date_id)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
LEFT JOIN transaction AS TRANS ON (TRANS.booking_id=BOK.bookId)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
LEFT JOIN provider AS PRV ON (PRV.provider_id=EVT.provider_id)
WHERE
$cond
"
;
WHERE
$cond
GROUP BY booking_id ORDER BY booking_id DESC"
;
$bookingData
=
$this
->
db
->
query
(
$sql
);
$bookingData
=
$this
->
db
->
query
(
$sql
);
if
(
$bookingData
->
num_rows
()
<=
0
){
if
(
$bookingData
->
num_rows
()
<=
0
){
...
...
application/models/Customer_model.php
View file @
4c96ff66
...
@@ -13,7 +13,8 @@ class Customer_model extends CI_Model {
...
@@ -13,7 +13,8 @@ class Customer_model extends CI_Model {
USR.status,CUST.profile_city AS city
USR.status,CUST.profile_city AS city
FROM customer AS CUST
FROM customer AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
WHERE
$cond
"
;
WHERE
$cond
GROUP BY CUST.customer_id ORDER BY CUST.customer_id DESC"
;
if
(
!
empty
(
$provider_id
)){
if
(
!
empty
(
$provider_id
)){
$sql
=
"SELECT CUST.customer_id,CUST.name,CUST.email,CUST.phone,CUST.email,CUST.gender,
$sql
=
"SELECT CUST.customer_id,CUST.name,CUST.email,CUST.phone,CUST.email,CUST.gender,
...
@@ -23,7 +24,8 @@ class Customer_model extends CI_Model {
...
@@ -23,7 +24,8 @@ class Customer_model extends CI_Model {
INNER JOIN users AS USR ON (USR.id=CUST.customer_id)
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 booking AS BOK ON (BOK.customer_id=CUST.customer_id)
INNER JOIN events AS EVT ON (EVT.event_id=BOK.event_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' GROUP BY CUST.customer_id"
;
WHERE
$cond
AND EVT.provider_id='
$provider_id
' AND BOK.status!='4'
GROUP BY CUST.customer_id ORDER BY CUST.customer_id DESC"
;
}
}
$customerData
=
$this
->
db
->
query
(
$sql
);
$customerData
=
$this
->
db
->
query
(
$sql
);
...
...
application/models/Provider_model.php
View file @
4c96ff66
...
@@ -10,17 +10,13 @@ class Provider_model extends CI_Model {
...
@@ -10,17 +10,13 @@ class Provider_model extends CI_Model {
return
0
;
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE
user_type IN('2','4') AND
status!='2' AND username='"
.
$provider_data
[
'username'
]
.
"'"
);
WHERE status!='2' AND username='"
.
$provider_data
[
'username'
]
.
"'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
4
;
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
4
;
$emailChk
=
$this
->
db
->
query
(
"SELECT * FROM provider AS PRV
INNER JOIN users AS USR ON (USR.id=PRV.provider_id)
WHERE USR.user_type='2' AND USR.status!='2' AND PRV.email='"
.
$provider_data
[
'email'
]
.
"'"
);
if
(
!
empty
(
$emailChk
)
&&
$emailChk
->
num_rows
()
>
0
)
return
2
;
$phoneChk
=
$this
->
db
->
query
(
"SELECT * FROM provider AS PRV
$phoneChk
=
$this
->
db
->
query
(
"SELECT * FROM provider AS PRV
INNER JOIN users AS USR ON (USR.id=PRV.provider_id)
INNER JOIN users AS USR ON (USR.id=PRV.provider_id)
WHERE USR.user_type='2' AND USR.status!='2' AND PRV.phone='"
.
$provider_data
[
'phone'
]
.
"'"
);
WHERE USR.user_type='2' AND USR.status!='2' AND
PRV.phone='"
.
$provider_data
[
'phone'
]
.
"'"
);
if
(
!
empty
(
$phoneChk
)
&&
$phoneChk
->
num_rows
()
>
0
)
return
3
;
if
(
!
empty
(
$phoneChk
)
&&
$phoneChk
->
num_rows
()
>
0
)
return
3
;
$status
=
$this
->
db
->
insert
(
'users'
,
$status
=
$this
->
db
->
insert
(
'users'
,
...
...
application/models/Staff_model.php
View file @
4c96ff66
...
@@ -21,8 +21,7 @@ class Staff_model extends CI_Model {
...
@@ -21,8 +21,7 @@ class Staff_model extends CI_Model {
return
0
;
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"'"
);
user_type IN (2,4,5)"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
2
;
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
return
2
;
$status
=
$this
->
db
->
insert
(
'users'
,
$status
=
$this
->
db
->
insert
(
'users'
,
...
@@ -39,7 +38,7 @@ class Staff_model extends CI_Model {
...
@@ -39,7 +38,7 @@ class Staff_model extends CI_Model {
return
0
;
return
0
;
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
$userNameChk
=
$this
->
db
->
query
(
"SELECT * FROM users
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
WHERE status!='2' AND username='"
.
$staff_data
[
'username'
]
.
"' AND
user_type IN (4,5) AND
id!='"
.
$staff_id
.
"'"
);
id!='"
.
$staff_id
.
"'"
);
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
{
return
2
;
}
if
(
!
empty
(
$userNameChk
)
&&
$userNameChk
->
num_rows
()
>
0
)
{
return
2
;
}
if
(
!
isset
(
$staff_data
[
'profile_image'
])
||
empty
(
$staff_data
[
'profile_image'
])){
if
(
!
isset
(
$staff_data
[
'profile_image'
])
||
empty
(
$staff_data
[
'profile_image'
])){
...
...
application/views/Provider/viewProvider.php
View file @
4c96ff66
...
@@ -39,12 +39,11 @@
...
@@ -39,12 +39,11 @@
<thead>
<thead>
<tr>
<tr>
<th
class=
"hidden"
>
ID
</th>
<th
class=
"hidden"
>
ID
</th>
<th
width=
"80px;"
>
Organizer
</th>
<th
width=
"100px;"
>
Organizer
</th>
<th
width=
"80px;"
>
User Name
</th>
<th
width=
"120px;"
>
Email (User Name)
</th>
<th
width=
"80px;"
>
Email_id
</th>
<th
width=
"100px;"
>
Phone
</th>
<th
width=
"70px;"
>
Phone
</th>
<th
width=
"80px;"
>
Status
</th>
<th
width=
"60px;"
>
Status
</th>
<th
width=
"300px;"
>
Action
</th>
<th
width=
"600px;"
>
Action
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -55,7 +54,6 @@
...
@@ -55,7 +54,6 @@
<th
class=
"hidden"
>
<?=
$provider
->
provider_id
?>
</th>
<th
class=
"hidden"
>
<?=
$provider
->
provider_id
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
name
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
name
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
username
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
username
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
email
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
phone
?>
</th>
<th
class=
"center"
>
<?=
$provider
->
phone
?>
</th>
<th
class=
"center"
id=
"statusFlag_
<?=
$provider
->
provider_id
?>
"
>
<th
class=
"center"
id=
"statusFlag_
<?=
$provider
->
provider_id
?>
"
>
<?=
(
$provider
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
<?=
(
$provider
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
...
...
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