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
0b2007f1
Commit
0b2007f1
authored
5 years ago
by
Tobin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 'dev_production'
Master See merge request
!272
parents
4b5e408e
3b29bc59
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
OrganizerServices.php
application/controllers/OrganizerServices.php
+4
-2
Organizer_model.php
application/models/Organizer_model.php
+3
-3
No files found.
application/controllers/OrganizerServices.php
View file @
0b2007f1
...
...
@@ -28,7 +28,9 @@ class OrganizerServices extends CI_Controller {
$this
->
load
->
model
(
'Validation_organizer_model'
);
$method
=
$this
->
router
->
fetch_method
();
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
if
(
$method
==
'addEvent'
||
$method
==
'addCategory'
||
$method
==
'addCity'
||
$method
==
'editOrganizerCityDetails'
||
$method
==
'editOrganizerCategoryDetails'
||
$method
==
"AddVenue"
||
$method
==
'editOrganizerVenueDetails'
)
{
if
(
$method
==
'addEvent'
||
$method
==
'addCategory'
||
$method
==
'addCity'
||
$method
==
'editOrganizerCityDetails'
||
$method
==
'editOrganizerCategoryDetails'
||
$method
==
'editOrganizerVenueDetails'
)
{
$data
=
$_POST
;
}
if
(
isset
(
apache_request_headers
()[
'Auth'
]))
{
...
...
@@ -605,7 +607,7 @@ class OrganizerServices extends CI_Controller {
}
public
function
AddVenue
(){
$data
=
$_POST
;
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
))
;
$res
=
$this
->
Organizer_model
->
AddVenue
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
successResponse
(
$res
);
...
...
This diff is collapsed.
Click to expand it.
application/models/Organizer_model.php
View file @
0b2007f1
...
...
@@ -1564,7 +1564,7 @@ class Organizer_model extends CI_Model {
if
(
!
$this
->
upload
->
do_upload
(
'layout_image'
)){
$err
=
1
;
return
array
(
'status'
=>
0
,
'code'
=>
'ER980'
,
'message'
=>
$this
->
upload
->
display_errors
());
exit
;
}
else
{
}
else
{
$upload_data
=
$this
->
upload
->
data
();
$data
[
'layout'
]
=
$config
[
'upload_path'
]
.
"/"
.
$upload_data
[
'file_name'
];
}
...
...
@@ -1586,7 +1586,7 @@ class Organizer_model extends CI_Model {
return
array
(
'status'
=>
0
,
'code'
=>
'ER958'
,
'message'
=>
'Provide a valid Location'
);
exit
;
}
if
(
isset
(
$data
[
'locality_name'
])
&&
(
!
empty
(
$data
[
'locality_name'
])
||
count
(
$data
[
'locality_name'
])
>
0
)){
$locArr
=
json_decode
(
json_encode
(
json_decode
(
$data
[
'locality_name'
])
),
true
);
$locArr
=
json_decode
(
json_encode
(
$data
[
'locality_name'
]
),
true
);
$key
=
array_search
(
'EN'
,
array_column
(
$locArr
,
'lang'
));
$status
=
$this
->
db
->
insert
(
'locality'
,
array
(
'locality'
=>
$locArr
[
$key
][
'locality_name'
],
'region_id'
=>
$data
[
'region_id'
]));
...
...
@@ -1618,7 +1618,7 @@ class Organizer_model extends CI_Model {
if
(
$status
){
$venue_id
=
$this
->
db
->
insert_id
();
$insertArr
=
array
();
foreach
(
json_decode
(
$data
[
'venue_name'
])
AS
$key
=>
$value
)
{
foreach
(
$data
[
'venue_name'
]
AS
$key
=>
$value
)
{
$insertArr
[]
=
array
(
'venue_id'
=>
$venue_id
,
'venue_name'
=>
$value
->
venue_name
,
'language_code'
=>
$value
->
lang
);
...
...
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