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
43fa8d28
Commit
43fa8d28
authored
Mar 20, 2020
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
b5ae7325
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
OrganizerServices.php
application/controllers/OrganizerServices.php
+10
-0
Booking_model.php
application/models/Booking_model.php
+1
-1
Organizer_model.php
application/models/Organizer_model.php
+3
-3
No files found.
application/controllers/OrganizerServices.php
View file @
43fa8d28
...
@@ -247,6 +247,16 @@ class OrganizerServices extends CI_Controller {
...
@@ -247,6 +247,16 @@ class OrganizerServices extends CI_Controller {
$data
=
$_POST
;
$data
=
$_POST
;
$res
=
$this
->
Organizer_model
->
addEvent
(
$data
);
$res
=
$this
->
Organizer_model
->
addEvent
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
if
(
$res
[
'status'
]
!=
0
){
$settings
=
getSettings
();
$this
->
load
->
model
(
'Api_model'
);
$rtlData
=
langTranslator
(
$res
[
'event_id'
],
'EVT'
,
'EN'
);
$subject
=
"TimeOut, New Event Created"
;
$message
=
"<html><body>
New Event Created, event name: <strong>"
.
$rtlData
[
'event_name'
]
.
"</strong>. Event URL : "
.
base_url
()
.
"Event/listEvents
</body></html>"
;
$this
->
Api_model
->
send_mail
(
$subject
,
$settings
[
'admin_mail_id'
],
$message
);
$this
->
successResponse
(
$res
);
$this
->
successResponse
(
$res
);
}
else
{
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
...
...
application/models/Booking_model.php
View file @
43fa8d28
...
@@ -32,7 +32,7 @@ class Booking_model extends CI_Model {
...
@@ -32,7 +32,7 @@ class Booking_model extends CI_Model {
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"
;
GROUP BY
BOK.id ORDER BY BOK.
id DESC"
;
$bookingData
=
$this
->
db
->
query
(
$sql
);
$bookingData
=
$this
->
db
->
query
(
$sql
);
if
(
$bookingData
->
num_rows
()
<=
0
){
if
(
$bookingData
->
num_rows
()
<=
0
){
...
...
application/models/Organizer_model.php
View file @
43fa8d28
...
@@ -400,7 +400,7 @@ class Organizer_model extends CI_Model {
...
@@ -400,7 +400,7 @@ class Organizer_model extends CI_Model {
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
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)
WHERE BOK.status IN (0,1,2,3,5,6) AND EVT.provider_id='
$provider_id
'
WHERE BOK.status IN (0,1,2,3,5,6) AND EVT.provider_id='
$provider_id
'
GROUP BY
booking_
id"
;
GROUP BY
BOK.
id"
;
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
$count
=
$this
->
db
->
query
(
$sql
)
->
num_rows
();
if
(
$count
>
0
)
{
if
(
$count
>
0
)
{
$perPage
=
10
;
$perPage
=
10
;
...
@@ -420,7 +420,7 @@ class Organizer_model extends CI_Model {
...
@@ -420,7 +420,7 @@ class Organizer_model extends CI_Model {
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
INNER JOIN host_categories AS HCAT ON (HCAT.host_cat_id=VEN.host_cat_id)
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)
WHERE EVT.provider_id ='
$provider_id
' AND BOK.status != 4
WHERE EVT.provider_id ='
$provider_id
' AND BOK.status != 4
GROUP BY
booking_id ORDER BY booking_
id DESC
GROUP BY
BOK.id ORDER BY BOK.
id DESC
LIMIT
$limit
,
$perPage
"
;
LIMIT
$limit
,
$perPage
"
;
$bookingData
=
$this
->
db
->
query
(
$sql
)
->
result_array
();
$bookingData
=
$this
->
db
->
query
(
$sql
)
->
result_array
();
...
@@ -686,7 +686,7 @@ class Organizer_model extends CI_Model {
...
@@ -686,7 +686,7 @@ class Organizer_model extends CI_Model {
$this
->
db
->
insert_batch
(
'event_gallery'
,
$evtMediaData
);
$this
->
db
->
insert_batch
(
'event_gallery'
,
$evtMediaData
);
}
}
}
}
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Event Added Successfully'
);
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Event Added Successfully'
,
'event_id'
=>
$event_id
);
}
catch
(
Exception
$e
){
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South!!'
,
'code'
=>
'ER08'
);
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South!!'
,
'code'
=>
'ER08'
);
}
}
...
...
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