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
fd75db61
Commit
fd75db61
authored
5 years ago
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checker delete
parent
734aac41
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
OrganizerServices.php
application/controllers/OrganizerServices.php
+10
-0
Organizer_model.php
application/models/Organizer_model.php
+16
-1
Validation_organizer_model.php
application/models/Validation_organizer_model.php
+14
-0
No files found.
application/controllers/OrganizerServices.php
View file @
fd75db61
...
...
@@ -210,6 +210,16 @@ class OrganizerServices extends CI_Controller {
}
}
public
function
checkerDelete
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$res
=
$this
->
Organizer_model
->
checkerDelete
(
$data
);
if
(
$res
[
'status'
]
!=
0
){
$this
->
successResponse
(
$res
);
}
else
{
$this
->
errorResponse
(
$res
[
'code'
],
$res
[
'message'
]);
}
}
public
function
getTagList
(){
$data
=
(
array
)
json_decode
(
file_get_contents
(
'php://input'
));
$res
=
$this
->
Organizer_model
->
getTagList
(
$data
);
...
...
This diff is collapsed.
Click to expand it.
application/models/Organizer_model.php
View file @
fd75db61
...
...
@@ -222,7 +222,7 @@ class Organizer_model extends CI_Model {
$this
->
db
->
insert_batch
(
'event_tags'
,
$insertTag
);
}
}
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Event
Add
ed Successfully'
);
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Event
Updat
ed Successfully'
);
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South!!'
,
'code'
=>
'ER08'
);
}
...
...
@@ -947,6 +947,21 @@ class Organizer_model extends CI_Model {
return
$res
;
}
public
function
checkerDelete
(
$data
){
try
{
$count
=
$this
->
db
->
get_where
(
'checker'
,
array
(
'id'
=>
$data
[
'checker_id'
],
'provider_id'
=>
$data
[
'organiser_id'
]))
->
num_rows
();
if
(
$count
<
1
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'No Data Found'
,
'code'
=>
'ER06'
);
return
$res
;
}
$this
->
db
->
update
(
'checker'
,
array
(
'status'
=>
2
),
array
(
'id'
=>
$data
[
'checker_id'
],
'provider_id'
=>
$data
[
'organiser_id'
]));
$res
=
array
(
'status'
=>
1
,
'message'
=>
'Checker Deleted Successfully'
);
}
catch
(
Exception
$e
){
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Ohh No!! Something Went South!!'
,
'code'
=>
'ER08'
);
}
return
$res
;
}
}
?>
This diff is collapsed.
Click to expand it.
application/models/Validation_organizer_model.php
View file @
fd75db61
...
...
@@ -363,6 +363,20 @@ class Validation_organizer_model extends CI_Model {
)
),
),
'checkerDelete'
=>
array
(
'organiser_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER30'
,
'message'
=>
'Organizer Id is null or empty'
)
),
'checker_id'
=>
array
(
'required'
=>
array
(
'code'
=>
'ER30'
,
'message'
=>
'Checker Id is null or empty'
)
),
),
);
public
function
_consruct
(){
...
...
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