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
8cce08d9
Commit
8cce08d9
authored
Dec 15, 2018
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
daily commit
parent
6d5e4a04
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
57 additions
and
104 deletions
+57
-104
Vehicle.php
application/controllers/Vehicle.php
+24
-12
add-customer-user.php
application/views/Customer/add-customer-user.php
+0
-79
list-customer-users.php
application/views/Customer/list-customer-users.php
+0
-0
viewIssues.php
application/views/Issue/viewIssues.php
+1
-1
viewMappedIssues.php
application/views/Issue/viewMappedIssues.php
+2
-2
viewMechanic.php
application/views/Mechanic/viewMechanic.php
+4
-4
viewSettings.php
application/views/Settings/viewSettings.php
+0
-4
viewShops.php
application/views/Shop/viewShops.php
+1
-1
custom-style.css
assets/css/custom-style.css
+24
-0
custom-script.js
assets/js/custom-script.js
+0
-0
tobin_dcarfixers.sql
sql/tobin_dcarfixers.sql
+1
-1
No files found.
application/controllers/Vehicle.php
View file @
8cce08d9
<?php
defined
(
'BASEPATH'
)
OR
exit
(
'No direct script access allowed'
);
class
Ve
c
hicle
extends
CI_Controller
{
class
Vehicle
extends
CI_Controller
{
public
function
__construct
()
{
parent
::
__construct
();
...
...
@@ -13,29 +13,41 @@ class Vechicle extends CI_Controller {
}
}
public
function
vechicleSearch
(){
pr
(
$_POST
);
public
function
vehicleSearch
(){
$return_arr
=
array
(
'status'
=>
'0'
);
if
(
!
isset
(
$_POST
)
||
empty
(
$_POST
)
||
!
isset
(
$_POST
[
'searchType'
])
||
empty
(
$_POST
[
'searchType'
])){
echo
json_encode
(
$return_arr
);
exit
;
}
$param
=
""
;
$searchType
=
$_POST
[
'searchType'
];
$this
->
load
->
model
(
'Settings_model'
);
$settings
=
$this
->
Settings_model
->
settings_viewing
();
if
(
$searchType
==
1
&&
isset
(
$_POST
[
'vehYear'
])
&&
!
empty
(
$_POST
[
'vehYear'
])
&&
isset
(
$_POST
[
'vehModel'
])
&&
!
empty
(
$_POST
[
'vehModel'
])
&&
isset
(
$_POST
[
'vehMaker'
])
&&
!
empty
(
$_POST
[
'vehMaker'
])){
$return_arr
[
'status'
]
=
1
;
$return_arr
[
'customer_data'
]
=
$customer_data
;
$param
=
"?format=json&key="
.
urlencode
(
$settings
[
'vin_audit_api'
])
.
"&year="
.
urlencode
(
$_POST
[
'vehYear'
])
.
"&make="
.
urlencode
(
$_POST
[
'vehMaker'
])
.
"&model="
.
urlencode
(
$_POST
[
'vehModel'
]);
}
else
if
(
$searchType
==
2
&&
isset
(
$_POST
[
'vehVin'
])
&&
!
empty
(
$_POST
[
'vehVin'
])){
$return_arr
[
'status'
]
=
1
;
$return_arr
[
'customer_data'
]
=
$customer_data
;
$param
=
"?format=json&key="
.
urlencode
(
$settings
[
'vin_audit_api'
])
.
"&vin="
.
urlencode
(
$_POST
[
'vehVin'
]);
}
if
(
!
empty
(
$param
)){
$vehData
=
file_get_contents
(
"https://specifications.vinaudit.com/getspecifications.php"
.
$param
);
if
(
empty
(
$vehData
)
||
empty
(
$vehData
=
json_decode
(
$vehData
,
true
))){
echo
json_encode
(
$return_arr
);
exit
;
}
if
(
!
isset
(
$vehData
[
'success'
])
||
empty
(
$vehData
[
'success'
])
||
$vehData
[
'success'
]
==
false
){
$return_arr
[
'status'
]
=
2
;
echo
json_encode
(
$return_arr
);
exit
;
}
$return_arr
[
'status'
]
=
'1'
;
$return_arr
[
'veh_data'
]
=
$vehData
;
}
echo
json_encode
(
$return_arr
);
exit
;
}
...
...
application/views/Customer/add-customer-user.php
View file @
8cce08d9
...
...
@@ -95,85 +95,6 @@
</div>
</div>
</div>
<!-- Vehicle Details START -->
<br>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
Vehicle Details
</h3>
</div>
<br>
<div
class=
"col-md-12"
>
<div
class=
"col-md-3"
>
<label>
<input
type=
"radio"
name=
"search_key_type"
value=
'1'
checked
>
<span
class=
"padAll-20"
>
Vechile Details
</span>
</label>
</div>
<div
class=
"col-md-9"
>
<label>
<input
type=
"radio"
name=
"search_key_type"
value=
'2'
>
<span
class=
"padAll-20"
>
VIN Number
</span>
</label>
</div>
</div>
</form>
<form
name=
"vechile_add"
data-parsley-validate=
""
required
>
<!-- Search Box START -->
<div
class=
"col-md-12 padAll-20"
>
<div
class=
"col-md-8"
>
<!-- Vehicle Details Search START -->
<div
id=
"searchTyp_1"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<label>
Vehicle Model
</label>
<input
type=
"text"
class=
"form-control required"
name=
"vehModel"
placeholder=
"Enter Vehicle Model"
required=
""
>
</div>
</div>
<div
class=
"col-md-12 padTop10"
>
<div
class=
"col-md-6"
>
<label>
Vehicle Maker
</label>
<input
type=
"text"
class=
"form-control required"
name=
"vehMaker"
placeholder=
"Enter Vehicle Maker"
required
>
</div>
<div
class=
"col-md-6"
>
<label>
Year of Manufactured
</label>
<select
name=
"vehYear"
class=
"form-control required"
data-parsley-trigger=
"change"
required=
""
>
<option
selected
disabled
value=
""
>
Choose Vehicle Purchase Year
</option>
<?php
for
(
$year
=
date
(
'Y'
);
$year
>=
1950
;
$year
--
){
$cond
=
(
isset
(
$vehicle_data
)
&&
isset
(
$vehicle_data
->
model
)
&&
!
empty
(
$vehicle_data
->
model
)
&&
$vehicle_data
->
model
==
$year
)
?
'selected'
:
''
;
echo
'<option '
.
$cond
.
' value="'
.
$year
.
'">'
.
$year
.
'</option>'
;
}
?>
</select>
</div>
</div>
</div>
<!-- Vehicle Details Search END -->
<!-- Vehicle Vin Search START -->
<div
id=
"searchTyp_2"
class=
"hide"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<label>
Vehicle VIN Number
</label>
<input
type=
"text"
class=
"form-control"
name=
"vehVin"
placeholder=
"Enter Vehicle VIN Number"
>
</div>
</div>
</div>
<!-- Vehicle Vin Search END -->
</div>
<!-- Search Box END -->
<div
class=
"col-md-4"
>
<button
id=
"searchVechile"
type=
"submit"
class=
"btn btn-info"
style=
"margin-top:22px;"
>
Search
</button>
</div>
</div>
<!-- Vehicle Details END -->
</form>
<div
class=
"col-md-12"
>
<div
class=
"box-footer"
>
...
...
application/views/Customer/list-customer-users.php
View file @
8cce08d9
This diff is collapsed.
Click to expand it.
application/views/Issue/viewIssues.php
View file @
8cce08d9
...
...
@@ -53,7 +53,7 @@
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Issue/editIssue/'
.
encode_param
(
$issue
->
issue_id
))
?>
"
>
<i
class=
"fa fa-fw fa-
trash
"
></i>
Edit
<i
class=
"fa fa-fw fa-
edit
"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Issue/changeStatus/"
.
encode_param
(
$issue
->
issue_id
))
.
"/2"
?>
"
...
...
application/views/Issue/viewMappedIssues.php
View file @
8cce08d9
...
...
@@ -93,10 +93,10 @@
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Issue/editMechanicIssues/'
.
encode_param
(
$customData
->
mechanic_id
)
.
'/'
.
encode_param
(
$customData
->
issue_id
)
.
'/2'
)
?>
"
>
<i
class=
"fa fa-fw fa-
trash
"
></i>
Edit
<i
class=
"fa fa-fw fa-
edit
"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Issue/changeMappedIssueStatus/"
.
encode_param
(
$customData
->
mechanic_id
)
.
"/"
.
encode_param
(
$customData
->
issue_id
)
.
"/2"
)
?>
"
href=
"
<?=
base_url
(
"Issue/changeMappedIssueStatus/"
.
encode_param
(
$customData
->
mechanic_id
)
.
"/"
.
encode_param
(
$customData
->
issue_id
)
.
"/2"
)
?>
"
onClick=
"return doconfirm()"
>
<i
class=
"fa fa-fw fa-trash"
></i>
Delete
</a>
...
...
application/views/Mechanic/viewMechanic.php
View file @
8cce08d9
...
...
@@ -57,12 +57,12 @@
<th
class=
"center"
>
<?=
$user
->
phone
?>
</th>
<th
class=
"center"
>
<?=
(
$user
->
status
==
1
)
?
'Active'
:
'De-activate'
?>
</th>
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-
primary
"
id=
"viewMechanic"
mechanic_id=
"
<?=
encode_param
(
$user
->
mechanic_id
)
?>
"
>
<i
class=
"fa fa-fw fa-e
dit
"
></i>
View
<a
class=
"btn btn-sm btn-
info
"
id=
"viewMechanic"
mechanic_id=
"
<?=
encode_param
(
$user
->
mechanic_id
)
?>
"
>
<i
class=
"fa fa-fw fa-e
ye
"
></i>
View
</a>
<a
class=
"btn btn-sm btn-
info
"
<a
class=
"btn btn-sm btn-
primary
"
href=
"
<?=
base_url
(
'Mechanic/editMechanics/'
.
encode_param
(
$user
->
mechanic_id
))
?>
"
>
<i
class=
"fa fa-fw fa-
trash
"
></i>
Edit
<i
class=
"fa fa-fw fa-
edit
"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Mechanic/changeStatus/"
.
encode_param
(
$user
->
mechanic_id
))
.
"/2"
?>
"
...
...
application/views/Settings/viewSettings.php
View file @
8cce08d9
...
...
@@ -92,10 +92,6 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"form-group col-xs-4"
>
<label>
Vin Audit URL
</label>
<input
type=
"text"
name=
"vin_audit_url"
class=
"form-control required"
placeholder=
"Enter Vin Audit URL"
value=
"
<?=
$data
[
'vin_audit_url'
]
?>
"
>
</div>
<div
class=
"form-group col-xs-3"
>
<label>
Vin Audit API
</label>
<input
type=
"text"
name=
"vin_audit_api"
class=
"form-control required"
placeholder=
"Enter Vin Audit API"
value=
"
<?=
$data
[
'vin_audit_api'
]
?>
"
>
...
...
application/views/Shop/viewShops.php
View file @
8cce08d9
...
...
@@ -59,7 +59,7 @@
<td
class=
"center"
>
<a
class=
"btn btn-sm btn-primary"
href=
"
<?=
base_url
(
'Shop/editShop/'
.
encode_param
(
$shop
->
shop_id
))
?>
"
>
<i
class=
"fa fa-fw fa-
trash
"
></i>
Edit
<i
class=
"fa fa-fw fa-
edit
"
></i>
Edit
</a>
<a
class=
"btn btn-sm btn-danger"
href=
"
<?=
base_url
(
"Shop/changeStatus/"
.
encode_param
(
$shop
->
shop_id
))
.
"/2"
?>
"
...
...
assets/css/custom-style.css
View file @
8cce08d9
...
...
@@ -316,6 +316,10 @@
padding-top
:
10px
!important
;
}
.marginTop10
{
margin-top
:
10px
!important
;
}
.padRight20
{
padding-right
:
20px
!important
;
}
...
...
@@ -343,3 +347,22 @@
.padAll-20
{
padding
:
20px
;
}
.vechile-body
{
background-color
:
#f7f7f7
;
font-size
:
18px
;
padding
:
7px
10px
;
margin-top
:
0
;
}
.border
{
border
:
1px
solid
#e2e2e2
;
}
.float-right
{
float
:
right
;
}
.disp-block
{
display
:
block
!important
;
}
\ No newline at end of file
assets/js/custom-script.js
View file @
8cce08d9
This diff is collapsed.
Click to expand it.
sql/tobin_dcarfixers.sql
View file @
8cce08d9
...
...
@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: db
-- Generation Time: Dec 1
0, 2018 at 12:52
PM
-- Generation Time: Dec 1
5, 2018 at 12:21
PM
-- Server version: 5.6.41
-- PHP Version: 7.2.8
...
...
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