Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
Tobin
dcarfixers
Commits
16c7e692
Commit
16c7e692
authored
Jan 04, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
e1d52bec
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
Webservices.php
application/controllers/Webservices.php
+18
-1
Issue_model.php
application/models/Issue_model.php
+37
-0
car_ac.jpg
assets/uploads/services/car_ac.jpg
+0
-0
No files found.
application/controllers/Webservices.php
View file @
16c7e692
...
@@ -105,7 +105,7 @@ class Webservices extends CI_Controller {
...
@@ -105,7 +105,7 @@ class Webservices extends CI_Controller {
if
(
$custResp
[
'status'
]
==
'1'
){
if
(
$custResp
[
'status'
]
==
'1'
){
/*
/*
MAIL SENT CONFIGARATION
MAIL SENT CONFIGARATION
-- TODO
*/
*/
$respArr
[
'status'
]
=
'1'
;
$respArr
[
'status'
]
=
'1'
;
...
@@ -181,5 +181,22 @@ class Webservices extends CI_Controller {
...
@@ -181,5 +181,22 @@ class Webservices extends CI_Controller {
}
}
echo
json_encode
(
$respArr
);
exit
;
echo
json_encode
(
$respArr
);
exit
;
}
}
// customer_registration
public
function
getGeneralIssues
(){
header
(
'Content-type: application/json'
);
$respArr
=
array
(
'status'
=>
'0'
,
'message'
=>
'Something went wrong.'
);
$this
->
load
->
model
(
'Issue_model'
);
$issue_data
=
$this
->
Issue_model
->
getGeneralIssues
();
if
(
!
empty
(
$issue_data
)){
$respArr
[
'status'
]
=
'1'
;
$respArr
[
'message'
]
=
'Success'
;
$respArr
[
'issue_data'
]
=
$issue_data
;
}
echo
json_encode
(
$respArr
);
exit
;
}
}
}
?>
?>
application/models/Issue_model.php
View file @
16c7e692
...
@@ -196,5 +196,41 @@ class Issue_model extends CI_Model {
...
@@ -196,5 +196,41 @@ class Issue_model extends CI_Model {
return
$this
->
addMechIssue
(
$custom_issue
);
return
$this
->
addMechIssue
(
$custom_issue
);
}
}
function
getGeneralIssues
(
$issue_id
=
''
,
$view_all
=
'0'
){
$cond
=
(
$view_all
!=
0
)
?
' ISS.status IN (0,1) '
:
' ISS.status IN (1) '
;
$cond
.=
(
!
empty
(
$issue_id
))
?
" AND ISS.issue_id='"
.
$issue_id
.
"' "
:
''
;
$sql
=
"SELECT ISS.*, IC.*
FROM issues AS ISS
LEFT JOIN issues_category AS IC ON (IC.issue_id=ISS.issue_id AND IC.status='1')
WHERE "
.
$cond
;
if
(
empty
(
$issueData
=
$this
->
db
->
query
(
$sql
))
||
empty
(
$issueData
=
$issueData
->
result_array
()))
return
0
;
$genIssueData
=
array
();
foreach
(
$issueData
AS
$issueData
){
$issue_id
=
$issueData
[
'issue_id'
];
if
(
!
isset
(
$genIssueData
[
$issue_id
])){
$genIssueData
[
$issue_id
]
=
array
(
'issue'
=>
$issueData
[
'issue'
],
'issue_id'
=>
$issue_id
,
'issue_image'
=>
$issueData
[
'issue_image'
]);
}
if
(
isset
(
$issueData
[
'issue_cat_id'
])
&&
!
empty
(
$issueData
[
'issue_cat_id'
])){
$sIssueId
=
$issueData
[
'issue_cat_id'
];
$genIssueData
[
$issue_id
][
'sub_categories'
][
$sIssueId
]
=
array
(
'issue_cat_id'
=>
$issueData
[
'issue_cat_id'
],
'issue_category'
=>
$issueData
[
'issue_category'
],
'issue_cat_image'
=>
$issueData
[
'issue_cat_image'
],
'default_service_fee'
=>
$issueData
[
'default_service_fee'
],
'default_description'
=>
$issueData
[
'default_description'
]);
}
}
return
$genIssueData
;
}
}
}
?>
?>
\ No newline at end of file
assets/uploads/services/car_ac.jpg
deleted
100644 → 0
View file @
e1d52bec
84.2 KB
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