Commit ccc55f07 by Tobin

Merge branch 'master' into 'dev_production'

Master See merge request !4
parents 59dea100 66ad8d20
...@@ -186,39 +186,37 @@ class Issue extends CI_Controller { ...@@ -186,39 +186,37 @@ class Issue extends CI_Controller {
$err = 1; $err = 1;
$errMsg = 'Provide Issue Short Discription'; $errMsg = 'Provide Issue Short Discription';
} }
else if($err == 0 && (!isset($_POST['extSubTypes']) || empty($_POST['extSubTypes']))){
$err = 1;
}
$insertSubTyp = array(); $insertSubTyp = array();
$updateSubTyp = array(); $updateSubTyp = array();
$issue_data = array('issue'=>$_POST['issue']); $issue_data = array('issue'=>$_POST['issue']);
if($err == 0){ if($err == 0){
foreach ($_POST['extSubTypes'] AS $typ_id) { if(isset($_POST['extSubTypes']) && !empty($_POST['extSubTypes'])){
if(isset($_POST['issue_category_'.$typ_id]) && foreach ($_POST['extSubTypes'] AS $typ_id) {
!empty($_POST['issue_category_'.$typ_id])){ if(isset($_POST['issue_category_'.$typ_id]) &&
$issue_category = $_POST['issue_category_'.$typ_id]; !empty($_POST['issue_category_'.$typ_id])){
$updateSubTyp[$typ_id]['issue_category'] = $issue_category; $issue_category = $_POST['issue_category_'.$typ_id];
} $updateSubTyp[$typ_id]['issue_category'] = $issue_category;
if(isset($_POST['default_description_'.$typ_id]) && }
!empty($_POST['default_description_'.$typ_id])){ if(isset($_POST['default_description_'.$typ_id]) &&
$default_description = $_POST['default_description_'.$typ_id]; !empty($_POST['default_description_'.$typ_id])){
$updateSubTyp[$typ_id]['default_description'] = $default_description; $default_description = $_POST['default_description_'.$typ_id];
} $updateSubTyp[$typ_id]['default_description'] = $default_description;
if(isset($_POST['default_service_fee_'.$typ_id]) && }
!empty($_POST['default_service_fee_'.$typ_id])){ if(isset($_POST['default_service_fee_'.$typ_id]) &&
$default_service_fee = $_POST['default_service_fee_'.$typ_id]; !empty($_POST['default_service_fee_'.$typ_id])){
$updateSubTyp[$typ_id]['default_service_fee'] = $default_service_fee; $default_service_fee = $_POST['default_service_fee_'.$typ_id];
} $updateSubTyp[$typ_id]['default_service_fee'] = $default_service_fee;
if(isset($_FILES['issue_cat_image_'.$typ_id]) && }
isset($_FILES['issue_cat_image_'.$typ_id]['name']) && if(isset($_FILES['issue_cat_image_'.$typ_id]) &&
!empty($_FILES['issue_cat_image_'.$typ_id]['name']) && isset($_FILES['issue_cat_image_'.$typ_id]['name']) &&
$this->upload->do_upload('issue_cat_image_'.$typ_id)){ !empty($_FILES['issue_cat_image_'.$typ_id]['name']) &&
$imgData = $this->upload->data(); $this->upload->do_upload('issue_cat_image_'.$typ_id)){
$issue_cat_image = "assets/uploads/services/".$imgData['file_name']; $imgData = $this->upload->data();
$updateSubTyp[$typ_id]['issue_cat_image'] = $issue_cat_image; $issue_cat_image = "assets/uploads/services/".$imgData['file_name'];
$updateSubTyp[$typ_id]['issue_cat_image'] = $issue_cat_image;
}
} }
} }
if(isset($_POST['issue_category']) && count($_POST['issue_category']) > 0 && if(isset($_POST['issue_category']) && count($_POST['issue_category']) > 0 &&
...@@ -229,7 +227,6 @@ class Issue extends CI_Controller { ...@@ -229,7 +227,6 @@ class Issue extends CI_Controller {
count($_POST['issue_category']) == count($_POST['default_description']) && count($_POST['issue_category']) == count($_POST['default_description']) &&
count($_POST['issue_category']) == count($_POST['default_service_fee']) && count($_POST['issue_category']) == count($_POST['default_service_fee']) &&
count($_POST['issue_category']) == count($_FILES['issue_cat_image']['name'])){ count($_POST['issue_category']) == count($_FILES['issue_cat_image']['name'])){
$typ = 0; $typ = 0;
$files = $_FILES; $files = $_FILES;
...@@ -256,18 +253,20 @@ class Issue extends CI_Controller { ...@@ -256,18 +253,20 @@ class Issue extends CI_Controller {
$image_name = "assets/uploads/services/".$imgData['file_name']; $image_name = "assets/uploads/services/".$imgData['file_name'];
$insertSubTyp[] = array('issue_category' => $_POST['issue_category'][$typ], $insertSubTyp[] = array('issue_category' => $_POST['issue_category'][$typ],
'issue_cat_image' => $image_name,'status'=>'1', 'issue_cat_image' => $image_name,'status'=>'1',
'default_service_fee' => $_POST['default_service_fee'][$typ], 'default_service_fee' => $_POST['default_service_fee'][$typ],
'default_description' => $_POST['default_description'][$typ], 'default_description' => $_POST['default_description'][$typ],
'issue_id'=>$issue_id); 'issue_id'=>$issue_id);
} }
} }
if($this->upload->do_upload('issue_image')){
$imgData = $this->upload->data(); if(isset($_FILES['issue_image']) && !empty($_FILES['issue_image']['name']) &&
$this->upload->do_upload('issue_image')){
$imgData = $this->upload->data();
$issue_data['issue_image'] = "assets/uploads/services/".$imgData['file_name']; $issue_data['issue_image'] = "assets/uploads/services/".$imgData['file_name'];
} }
} }
if($err == 1){ if($err == 1){
$flashMsg['message'] = $errMsg; $flashMsg['message'] = $errMsg;
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
...@@ -462,25 +461,19 @@ class Issue extends CI_Controller { ...@@ -462,25 +461,19 @@ class Issue extends CI_Controller {
} }
$custData = array(); $custData = array();
if($mapping_type == 1){ foreach($mapping_data['issue_cat_ids'] AS $type_ids) {
foreach($mapping_data['issue_cat_ids'] AS $type_ids) { $issArr = array('issue_id'=>$mapping_data['issue_id'],
if(isset($mapping_data['default_service_fee_'.$type_ids]) && 'mechanic_id'=>$mapping_data['mechanic_id'],
!empty($mapping_data['default_service_fee_'.$type_ids]) && 'issue_cat_id'=>$type_ids);
isset($mapping_data['default_description_'.$type_ids]) && if($mapping_type == 1 &&
!empty($mapping_data['default_description_'.$type_ids])){ isset($mapping_data['default_service_fee_'.$type_ids]) &&
isset($mapping_data['default_description_'.$type_ids])){
$custData[] = array('issue_id'=>$mapping_data['issue_id'],
'mechanic_id'=>$mapping_data['mechanic_id'], $issArr['custom_description'] = $mapping_data['default_description_'.$type_ids];
'issue_cat_id'=>$type_ids, $issArr['custom_service_fee'] = $mapping_data['default_service_fee_'.$type_ids];
'custom_description'=>$mapping_data['default_description_'.$type_ids],
'custom_service_fee'=>$mapping_data['default_service_fee_'.$type_ids]);
}
} }
} else { $custData[] = $issArr;
$custData[] = array('issue_id'=>$mapping_data['issue_id'],
'mechanic_id'=>$mapping_data['mechanic_id']);
} }
return $custData; return $custData;
} }
} }
......
...@@ -109,7 +109,26 @@ class Mechanic extends CI_Controller { ...@@ -109,7 +109,26 @@ class Mechanic extends CI_Controller {
}else if($err == 0 && (!isset($_POST['address']) || empty($_POST['address']))){ }else if($err == 0 && (!isset($_POST['address']) || empty($_POST['address']))){
$err = 1; $err = 1;
$errMsg = 'Provide an address'; $errMsg = 'Provide an address';
}else if($err == 0 && (!isset($_POST['location']) || empty($_POST['location']))){
$err = 1;
$errMsg = 'Provide a Functional Area';
}else if($err == 0 && (!isset($_POST['start_time']) || empty($_POST['start_time']))){
$err = 1;
$errMsg = 'Provide Work Start Time';
}else if($err == 0 && (!isset($_POST['end_time']) || empty($_POST['end_time']))){
$err = 1;
$errMsg = 'Provide Work End Time';
}else if($err == 0 && ($_POST['start_time'] >= $_POST['end_time'])){
$err = 1;
$errMsg = 'Provide proper Working Hours';
} }
$fnLocation = getLocationLatLng($_POST['location']);
if(empty($fnLocation)){
$err = 1;
$errMsg = 'Provide a Valid Functional Area';
}
if($err == 0){ if($err == 0){
$config = set_upload_service("assets/uploads/services"); $config = set_upload_service("assets/uploads/services");
$this->load->library('upload'); $this->load->library('upload');
...@@ -139,6 +158,8 @@ class Mechanic extends CI_Controller { ...@@ -139,6 +158,8 @@ class Mechanic extends CI_Controller {
redirect(base_url('Mechanic/addMechanic')); redirect(base_url('Mechanic/addMechanic'));
} }
$_POST['password'] = md5($_POST['password']); $_POST['password'] = md5($_POST['password']);
$_POST['location_lat'] = $fnLocation['lat'];
$_POST['location_lng'] = $fnLocation['lng'];
$status = $this->Mechanic_model->addMechanic($_POST); $status = $this->Mechanic_model->addMechanic($_POST);
if($status == 1){ if($status == 1){
...@@ -214,7 +235,26 @@ class Mechanic extends CI_Controller { ...@@ -214,7 +235,26 @@ class Mechanic extends CI_Controller {
}else if($err == 0 && (!isset($_POST['address']) || empty($_POST['address']))){ }else if($err == 0 && (!isset($_POST['address']) || empty($_POST['address']))){
$err = 1; $err = 1;
$errMsg = 'Provide your address'; $errMsg = 'Provide your address';
}else if($err == 0 && (!isset($_POST['location']) || empty($_POST['location']))){
$err = 1;
$errMsg = 'Provide a Functional Area';
}else if($err == 0 && (!isset($_POST['start_time']) || empty($_POST['start_time']))){
$err = 1;
$errMsg = 'Provide Work Start Time';
}else if($err == 0 && (!isset($_POST['end_time']) || empty($_POST['end_time']))){
$err = 1;
$errMsg = 'Provide Work End Time';
}else if($err == 0 && ($_POST['start_time'] >= $_POST['end_time'])){
$err = 1;
$errMsg = 'Provide proper Working Hours';
} }
$fnLocation = getLocationLatLng($_POST['location']);
if(empty($fnLocation)){
$err = 1;
$errMsg = 'Provide a Valid Functional Area';
}
if($err == 0){ if($err == 0){
$config = set_upload_service("assets/uploads/services"); $config = set_upload_service("assets/uploads/services");
$this->load->library('upload'); $this->load->library('upload');
...@@ -237,9 +277,11 @@ class Mechanic extends CI_Controller { ...@@ -237,9 +277,11 @@ class Mechanic extends CI_Controller {
if($err == 1){ if($err == 1){
$flashMsg['message'] = $errMsg; $flashMsg['message'] = $errMsg;
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Mechanic/addMechanic')); redirect(base_url('Mechanic/editMechanics/'.$mechanic_id));
} }
$_POST['location_lat'] = $fnLocation['lat'];
$_POST['location_lng'] = $fnLocation['lng'];
$status = $this->Mechanic_model->updateMechanic(decode_param($mechanic_id),$_POST); $status = $this->Mechanic_model->updateMechanic(decode_param($mechanic_id),$_POST);
if($status == 1){ if($status == 1){
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); $flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success');
......
...@@ -59,6 +59,9 @@ class Vehicle extends CI_Controller { ...@@ -59,6 +59,9 @@ class Vehicle extends CI_Controller {
echo json_encode($return_arr);exit; echo json_encode($return_arr);exit;
} }
if($searchType == 2){ if($searchType == 2){
$vehicle_data['car_model'] = $vehData['attributes']['Model'];
$vehicle_data['car_maker'] = $vehData['attributes']['Make'];
$vehicle_data['car_model_year'] = $vehData['attributes']['Year'];
$vehData['vehicle'] = $vehData['attributes']['Year'].' '.$vehData['attributes']['Make'].' '. $vehData['vehicle'] = $vehData['attributes']['Year'].' '.$vehData['attributes']['Make'].' '.
$vehData['attributes']['Model'].' '.$vehData['attributes']['Trim']; $vehData['attributes']['Model'].' '.$vehData['attributes']['Trim'];
} }
......
...@@ -4,182 +4,502 @@ header('Content-Type: text/html; charset=utf-8'); ...@@ -4,182 +4,502 @@ header('Content-Type: text/html; charset=utf-8');
// Allow from any origin // Allow from any origin
if(isset($_SERVER['HTTP_ORIGIN'])) { if(isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true'); header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day header('Access-Control-Max-Age: 86400'); // cache for 1 day
} }
// Access-Control headers are received during OPTIONS requests // Access-Control headers are received during OPTIONS requests
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}"); header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
exit(0); exit(0);
} }
class Webservices extends CI_Controller { class Webservices extends CI_Controller {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$this->load->model('Webservice_model'); $this->load->model('Webservice_model');
$this->load->library('form_validation'); $this->load->library('form_validation');
$auth = ''; $auth = '';
$class = $this->router->fetch_class(); $class = $this->router->fetch_class();
$method = $this->router->fetch_method(); $method = $this->router->fetch_method();
if($this->input->server('REQUEST_METHOD') == 'GET') if($this->input->server('REQUEST_METHOD') == 'GET')
$postdata = json_encode($_GET); $postdata = json_encode($_GET);
else if ($this->input->server('REQUEST_METHOD') == 'POST') else if ($this->input->server('REQUEST_METHOD') == 'POST')
$postdata = file_get_contents("php://input"); $postdata = file_get_contents("php://input");
if (isset(apache_request_headers()['Auth'])) { if (isset(apache_request_headers()['Auth'])) {
$auth = apache_request_headers()['Auth']; $auth = apache_request_headers()['Auth'];
} }
// $this->last_id = set_log($class, $method, $postdata, $auth); // $this->last_id = set_log($class, $method, $postdata, $auth);
} }
// customer_login // customer_login
public function customer_login(){ public function customer_login(){
header('Content-type: application/json'); header('Content-type: application/json');
$post = file_get_contents("php://input"); $post = file_get_contents("php://input");
$postData = json_decode($post, true); $postData = json_decode($post, true);
$this->load->model('Customer_model'); $this->load->model('Customer_model');
$respArr = array('status'=>'0','message'=>'Required Fields are empty.'); $respArr = array('status'=>'0','message'=>'Required Fields are empty.');
if(!isset($postData['email']) || empty($postData['email']) || if(!isset($postData['email']) || empty($postData['email']) ||
!isset($postData['password']) || empty($postData['password'])){ !isset($postData['password']) || empty($postData['password'] = md5($postData['password']))){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$custResp = $this->Customer_model->checkCustomerLogin($postData); $custResp = $this->Customer_model->checkCustomerLogin($postData);
if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){ if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '1'){ if($custResp['status'] == '1'){
$respArr['data'] = $custResp['data']; $respArr['data'] = $custResp['data'];
$respArr['status'] = '1'; $respArr['status'] = '1';
$respArr['message'] = 'Success'; $respArr['message'] = 'Success';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '2'){ if($custResp['status'] == '2'){
$respArr['status'] = '2'; $respArr['status'] = '2';
$respArr['message'] = 'Invalid Email Address'; $respArr['message'] = 'Invalid Email Address';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '3'){ if($custResp['status'] == '3'){
$respArr['status'] = '3'; $respArr['status'] = '3';
$respArr['message'] = 'Invalid Password'; $respArr['message'] = 'Invalid Password';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
echo json_encode($respArr); exit; echo json_encode($respArr); exit;
} }
// customer_forgot_password // customer_forgot_password
public function customer_forgot_password(){ public function customer_forgot_password(){
header('Content-type: application/json'); header('Content-type: application/json');
$post = file_get_contents("php://input"); $post = file_get_contents("php://input");
$postData = json_decode($post, true); $postData = json_decode($post, true);
$this->load->model('Customer_model'); $this->load->model('Customer_model');
$respArr = array('status'=>'0','message'=>'Required Fields are empty.'); $respArr = array('status'=>'0','message'=>'Required Fields are empty.');
if(empty($postData) || !isset($postData['email']) || empty($postData['email'])){ if(empty($postData) || !isset($postData['email']) || empty($postData['email'])){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$custResp = $this->Customer_model->genCustForgotPassLink($postData); $custResp = $this->Customer_model->genCustForgotPassLink($postData);
if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){ if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '2'){ if($custResp['status'] == '2'){
$respArr['status'] = '2'; $respArr['status'] = '2';
$respArr['message'] = 'Invalid Email Address'; $respArr['message'] = 'Invalid Email Address';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '1'){ if($custResp['status'] == '1'){
/* /*
MAIL SENT CONFIGARATION MAIL SENT CONFIGARATION -- TODO
*/ */
$respArr['status'] = '1'; $respArr['status'] = '1';
$respArr['message'] = 'Password Reset Email has been sent'; $respArr['message'] = 'Password Reset Email has been sent';
} }
echo json_encode($respArr); exit; echo json_encode($respArr); exit;
} }
// customer_registration // customer_registration
public function customer_registration(){ public function customer_registration(){
header('Content-type: application/json'); header('Content-type: application/json');
$post = file_get_contents("php://input"); $post = file_get_contents("php://input");
$postData = json_decode($post, true); $postData = json_decode($post, true);
$this->load->model('Customer_model'); $this->load->model('Customer_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.'); $respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData)){ if(empty($postData)){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$err = 0; $err = 0;
$msg = ''; $msg = '';
if(!isset($postData['email']) || empty($postData['email'])){ if(!isset($postData['email']) || empty($postData['email'])){
$err = 1; $err = 1;
$msg = 'Provide a valid Email ID'; $msg = 'Provide a valid Email ID';
} }
else if(!isset($postData['password']) || empty($postData['password'])){ else if(!isset($postData['password']) || empty($postData['password'] = md5($postData['password']))){
$err = 1; $err = 1;
$msg = 'Provide a Password'; $msg = 'Provide a Password';
} }
else if(!isset($postData['first_name']) || empty($postData['first_name'])){ else if(!isset($postData['first_name']) || empty($postData['first_name'])){
$err = 1; $err = 1;
$msg = 'Provide valid Name'; $msg = 'Provide valid Name';
} }
else if(!isset($postData['last_name']) || empty($postData['last_name'])){ else if(!isset($postData['last_name']) || empty($postData['last_name'])){
$err = 1; $err = 1;
$msg = 'Provide valid Name'; $msg = 'Provide valid Name';
} }
if($err == 1){ if($err == 1){
$respArr['message'] = $msg; $respArr['message'] = $msg;
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if(isset($postData['phone']) && empty($postData['phone'])){ if(isset($postData['phone']) && empty($postData['phone'])){
unset($postData['phone']); unset($postData['phone']);
} }
unset($postData['promocode']); unset($postData['promocode']);
$custResp = $this->Customer_model->customer_registration($postData); $custResp = $this->Customer_model->createCustomer($postData);
if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){ if(empty($custResp)){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
if($custResp['status'] == '2'){ if($custResp == '1'){
$respArr['status'] = '2'; $custResp = $this->Customer_model->checkCustomerLogin($postData);
$respArr['message'] = 'Email Address already in use';
echo json_encode($respArr);exit; if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){
} echo json_encode($respArr);exit;
}
if($custResp['status'] == '1'){
$custResp = $this->Customer_model->checkCustomerLogin($postData); if($custResp['status'] == '1'){
if(empty($custResp) || !isset($custResp['status']) || empty($custResp['status'])){ $respArr['data'] = $custResp['data'];
echo json_encode($respArr);exit; $respArr['status'] = '1';
} $respArr['message'] = 'Success';
echo json_encode($respArr);exit;
if($custResp['status'] == '1'){ }
$respArr['data'] = $custResp['data']; } else if($custResp == '2'){
$respArr['status'] = '1'; $respArr['status'] = '2';
$respArr['message'] = 'Success'; $respArr['message'] = 'Email Address already in use';
echo json_encode($respArr);exit;
} else if($custResp == '3'){
$respArr['status'] = '2';
$respArr['message'] = 'Phone already in use';
echo json_encode($respArr);exit;
}
echo json_encode($respArr); exit;
}
// getGeneralIssues
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;
}
// getNearByMechanics
public function getNearByMechanics(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Mechanic_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['pickup_data']) || !isset($postData['sub_issues']) ||
empty($postData['pickup_data']) || empty($postData['sub_issues']) ){
echo json_encode($respArr); exit;
}
$mechanic_data = $this->Mechanic_model->getNearByMechanics($postData['pickup_data'],$postData['sub_issues']);
if(!empty($mechanic_data)){
$respArr['status'] = '1';
$respArr['message'] = 'Success';
$respArr['mechanic_data'] = $mechanic_data;
}
echo json_encode($respArr); exit;
}
// scheduleNow
public function scheduleNow(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData)){
echo json_encode($respArr); exit;
}
$this->load->model('Booking_model');
$status = $this->Booking_model->scheduleBooking($postData);
if($status){
$respArr['status'] = '1';
$respArr['message'] = 'Success';
}
echo json_encode($respArr); exit;
}
// edit_customer_profile
public function edit_customer_profile(){
header('Content-type: application/json');
$postData = $_POST;
$this->load->model('Customer_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || empty($postData = json_decode($postData['data'],true)) ||
!isset($postData['customer_id']) || empty($postData['customer_id'])){
echo json_encode($respArr);exit;
}
$err = 0;
$msg = '';
if(!isset($postData['email']) || empty($postData['email'])){
$err = 1;
$msg = 'Provide a valid Email ID';
}
else if(!isset($postData['first_name']) || empty($postData['first_name'])){
$err = 1;
$msg = 'Provide valid Name';
}
else if(!isset($postData['last_name']) || empty($postData['last_name'])){
$err = 1;
$msg = 'Provide valid Name';
}
else if(!isset($postData['phone']) || empty($postData['phone'])){
$err = 1;
$msg = 'Provide valid Phone';
}
else if(!isset($postData['address']) || empty($postData['address'])){
$err = 1;
$msg = 'Provide valid Address';
}
if($err == 1){
$respArr['message'] = $msg;
echo json_encode($respArr);exit;
}
if(isset($_FILES) && !empty($_FILES) &&
isset($_FILES['profile_image']) && !empty($_FILES['profile_image'])){
$config = set_upload_service("assets/uploads/services");
$this->load->library('upload');
$config['file_name'] = $postData['customer_id']."_".$_FILES['profile_image']['name'];
$this->upload->initialize($config);
if($this->upload->do_upload('profile_image')){
$upload_data = $this->upload->data();
$postData['profile_image'] = $config['upload_path']."/".$upload_data['file_name'];
}
}
$customer_id = $postData['customer_id'];
if(isset($postData['password']) && !empty($postData['password']) &&
isset($postData['cpassword']) && !empty($postData['cpassword']) &&
$postData['password'] == $postData['cpassword']){
$postData['password'] = md5($postData['password']);
} else {
unset($postData['password']);
}
unset($postData['cpassword']);
unset($postData['customer_id']);
$custResp = $this->Customer_model->updateCustomer($customer_id,$postData);
if(empty($custResp)){
echo json_encode($respArr);exit;
}
if($custResp == '1'){
$respArr['status'] = '1';
$respArr['message'] = 'Profile successfully updated';
$respArr['profile_image'] = (isset($postData['profile_image']) && !empty($postData['profile_image']))?$postData['profile_image']:'';
echo json_encode($respArr);exit;
} else if($custResp == '2'){
$respArr['status'] = '2';
$respArr['message'] = 'Email Address already in use';
echo json_encode($respArr);exit;
} else if($custResp == '3'){
$respArr['status'] = '3';
$respArr['message'] = 'Phone Number already in use';
echo json_encode($respArr);exit;
}
echo json_encode($respArr); exit;
}
// customerVechiles
function customerVechiles(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Vehicle_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id'])){
echo json_encode($respArr);exit;
}
$vehData = $this->Vehicle_model->getCustVechiles($postData);
if($vehData != '0'){
$respArr['status'] = 1;
$respArr['message'] = 'success';
$respArr['vehData'] = $vehData;
}
echo json_encode($respArr);exit;
}
// getCustBookDetails
function getCustBookDetails(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Booking_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id'])){
echo json_encode($respArr);exit;
}
$status = (isset($postData['status']) && !empty($postData['status']))?$postData['status']:'';
$bookingDetails = $this->Booking_model->getCustBookDetails($postData,$status);
if($bookingDetails != '0'){
$respArr['status'] = 1;
$respArr['message'] = 'success';
$respArr['bookData'] = $bookingDetails;
}
echo json_encode($respArr);exit;
}
// cancelBooking
function cancelBooking(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Booking_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id']) ||
!isset($postData['booking_id']) || empty($postData['booking_id'])){
echo json_encode($respArr);exit;
}
$status=$this->Booking_model->changeBookStatus($postData['customer_id'],$postData['booking_id'],'3');
if($status){
$respArr['status'] = 1;
$respArr['message'] = 'success';
}
echo json_encode($respArr);exit;
}
// deleteCustomerCar
function deleteCustomerCar(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Vehicle_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id']) ||
!isset($postData['customer_veh_id']) || empty($postData['customer_veh_id'])){
echo json_encode($respArr);exit;
}
$status = $this->Vehicle_model->changeCustomerCarStatus($postData['customer_id'],
$postData['customer_veh_id'],'2');
if($status){
$respArr['status'] = 1;
$respArr['message'] = 'success';
}
echo json_encode($respArr);exit;
}
// addCustomerCar
function addCustomerCar(){
header('Content-type: application/json');
$post = file_get_contents("php://input");
$postData = json_decode($post, true);
$this->load->model('Vehicle_model');
$respArr = array('status'=>'0','message'=>'Something went wrong.');
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id'])){
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
}
echo json_encode($respArr); exit; $param = "";
} $searchType = $postData['type'];
$searchData = $postData['vehicleData'];
$locationData = $postData['location'];
$vehicle_data['status'] = '1';
$vehicle_data['customer_id'] = $postData['customer_id'];
$vehicle_data['car_loc_lat'] = $locationData['location_lat'];
$vehicle_data['car_loc_lng'] = $locationData['location_lng'];
$vehicle_data['car_location'] = $locationData['location'];
$this->load->model('Settings_model');
$settings = $this->Settings_model->settings_viewing();
$searchData = $postData['vehicleData'];
if($searchType == 1 &&
isset($searchData['car_maker']) && !empty($searchData['car_maker']) &&
isset($searchData['modelName']) && !empty($searchData['modelName']) &&
isset($searchData['modelYear']) && !empty($searchData['modelYear'])){
$vehicle_data['car_maker'] = $searchData['car_maker'];
$vehicle_data['car_model'] = $searchData['modelName'];
$vehicle_data['car_model_year'] = $searchData['modelYear'];
$param = "?format=json&key=".urlencode($settings['vin_audit_api'])."&year=".
urlencode($searchData['modelYear'])."&make=".urlencode($searchData['car_maker']).
"&model=".urlencode($searchData['modelName']);
}
else if($searchType == 2 && isset($searchData['vin']) && !empty($searchData['vin'])){
$vehicle_data['car_vin'] = $searchData['vin'];
$param = "?format=json&key=".urlencode($settings['vin_audit_api']).
"&vin=".urlencode($searchData['vin']);
}
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;
$return_arr['message'] = 'No Data Found.';
echo json_encode($return_arr);exit;
}
if($searchType == 2){
$vehicle_data['car_model'] = $vehData['attributes']['Model'];
$vehicle_data['car_maker'] = $vehData['attributes']['Make'];
$vehicle_data['car_model_year'] = $vehData['attributes']['Year'];
$vehData['vehicle']= $vehData['attributes']['Year'].' '.$vehData['attributes']['Make'].' '.
$vehData['attributes']['Model'].' '.$vehData['attributes']['Trim'];
}
$vehicle_data['car_name'] = $vehData['vehicle'];
$vehicle_data['vehicle_data'] = json_encode($vehData);
$car_id = $this->Vehicle_model->addVehicle($vehicle_data);
if(!empty($car_id)){
$return_arr['status'] = '1';
$return_arr['car_id'] = $car_id;
$return_arr['veh_data'] = $vehData;
}
}
echo json_encode($return_arr);exit;
}
} }
?> ?>
\ No newline at end of file
<?php
class Booking_model extends CI_Model {
public function _consruct(){
parent::_construct();
}
public function scheduleBooking($postData = array()){
if(empty($postData) ||
!isset($postData['customer_id']) || empty($postData['customer_id']) ||
!isset($postData['pickup_data']) || empty($postData['pickup_data']) ||
!isset($postData['vechile_info']) || empty($postData['vechile_info']) ||
!isset($postData['mechanic_id']) || empty($postData['mechanic_id']) ||
!isset($postData['selected_issues']) || empty($postData['selected_issues'])){
return 0;
}
$vehData = $postData['vechile_info'];
$car_name = $vehData['modelYear'].' '.$vehData['maker'].' '.$vehData['modelName'];
$vehJson = array('vehicle' => $car_name,
'attributes' =>
array('Year' => $vehData['modelYear'],
'Make' => $vehData['maker'],
'Trim' => $vehData['trim'],
'Model' => $vehData['modelName'],
'Engine' => $vehData['emgine']));
$insert_array = array('customer_id' => $postData['customer_id'],
'car_name' => $car_name,
'car_model' => $vehData['modelName'],
'car_maker' => $vehData['maker'],
'car_loc_lat' => $postData['pickup_data']['pickup_lat'],
'car_loc_lng' => $postData['pickup_data']['pickup_lng'],
'car_location' => $postData['pickup_data']['pickup_loc'],
'vehicle_data' => json_encode($vehJson),
'car_model_year'=> $vehData['modelYear'],
'status' => '3');
$selected_issues = array();
foreach($postData['selected_issues'] AS $selIssue){
$selected_issues[] = array('issue' =>$selIssue['issue'],
'issue_id' =>$selIssue['issue_id'],
'sub_issue_id' =>$selIssue['sub_issue_id'],
'issue_category' =>$selIssue['issue_category']);
}
if($this->db->insert('customer_vehicle',$insert_array)){
$last_id = $this->db->insert_id();
$book_data = array('customer_veh_id' => $last_id,
'customer_id' => $postData['customer_id'],
'mechanic_id' => $postData['mechanic_id'],
'scheduled_date' => $postData['schedule_date']['date'],
'scheduled_time' => $postData['schedule_date']['time'],
'issues_selected' => json_encode($selected_issues),
'mileage' => $vehData['milage'],
'cost' => $postData['cost'],
'status' => '0');
if($this->db->insert('bookings',$book_data)){
return 1;
}
}
return 0;
}
function getCustBookDetails($postData = array(), $status = ''){
$cond = array();
if(empty($postData) || !isset($postData['customer_id']) || empty($postData['customer_id'])){
return 0;
}
$cond = "BK.customer_id='".$postData['customer_id']."' ";
$cond .= (!empty($status))?"AND BK.status IN (".$status.") ":'';
$sql = "SELECT BK.booking_id,BK.customer_id,BK.mechanic_id,BK.customer_veh_id,BK.scheduled_date,
BK.scheduled_time,BK.cost,BK.status,MECH.first_name,MECH.last_name,VEH.car_name,
BK.status
FROM bookings AS BK
INNER JOIN mechanic AS MECH ON (MECH.mechanic_id AND BK.mechanic_id)
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id AND BK.customer_veh_id)
WHERE $cond
GROUP BY BK.booking_id";
$bookData = $this->db->query($sql);
if(!empty($bookData)){
return $bookData->result();
}
return 0;
}
function changeBookStatus($customer_id = '', $booking_id = '', $status = ''){
if(empty($customer_id) || empty($booking_id) || $status == ''){
return 0;
}
$status = $this->db->update('bookings',
array('status'=>$status),
array('customer_id'=>$customer_id,'booking_id'=>$booking_id));
return $status;
}
}
?>
\ No newline at end of file
...@@ -38,6 +38,7 @@ class Customer_model extends CI_Model { ...@@ -38,6 +38,7 @@ class Customer_model extends CI_Model {
return 2; return 2;
} }
} }
if(isset($customer_data['phone']) && !empty($customer_data['phone'])){ if(isset($customer_data['phone']) && !empty($customer_data['phone'])){
$phoneChk = $this->db->get_where('customers',array('phone'=>$customer_data['phone'],'status !='=>'2')); $phoneChk = $this->db->get_where('customers',array('phone'=>$customer_data['phone'],'status !='=>'2'));
if(!empty($phoneChk) && $phoneChk->num_rows() > 0){ if(!empty($phoneChk) && $phoneChk->num_rows() > 0){
...@@ -99,7 +100,7 @@ class Customer_model extends CI_Model { ...@@ -99,7 +100,7 @@ class Customer_model extends CI_Model {
} }
$result = $this->db->get_where('customers',array('email'=>$userLogData['email'], $result = $this->db->get_where('customers',array('email'=>$userLogData['email'],
'password'=>md5($userLogData['password']), 'password'=>$userLogData['password'],
'status'=>'1')); 'status'=>'1'));
$respArr['status'] = 3; $respArr['status'] = 3;
if(!empty($result) && $result->num_rows() == 1 && !empty($custData = $result->row())){ if(!empty($result) && $result->num_rows() == 1 && !empty($custData = $result->row())){
...@@ -131,23 +132,5 @@ class Customer_model extends CI_Model { ...@@ -131,23 +132,5 @@ class Customer_model extends CI_Model {
} }
return $respArr; return $respArr;
} }
function customer_registration($userData = array()){
$respArr = array('status'=>0);
if(empty($userData)){
return $respArr;
}
$result = $this->db->get_where('customers',array('email'=>$userData['email'],'status'=>'1'));
if(!empty($result) && $result->num_rows() >= 1){
$respArr['status'] = 2;
return $respArr;
}
$userData['password'] = md5($userData['password']);
$status = $this->db->insert('customers',$userData);
if($status){
$respArr['status'] = 1;
}
return $respArr;
}
} }
?> ?>
\ No newline at end of file
...@@ -90,17 +90,23 @@ class Issue_model extends CI_Model { ...@@ -90,17 +90,23 @@ class Issue_model extends CI_Model {
} }
function updateIssue($issue_id='',$issue_data=array(),$updateSubTyp=array(),$insertSubTyp=array()){ function updateIssue($issue_id='',$issue_data=array(),$updateSubTyp=array(),$insertSubTyp=array()){
if(empty($issue_id) || empty($issue_data) || empty($updateSubTyp)){ if(empty($issue_id) || empty($issue_data)){
return 0; return 0;
} }
$status = $this->db->update('issues',$issue_data,array('issue_id'=>$issue_id)); $status = $this->db->update('issues',$issue_data,array('issue_id'=>$issue_id));
$scat_ids = array(); $scat_ids = array();
foreach ($updateSubTyp AS $scat_id => $scat_data) { if(!empty($updateSubTyp)){
$scat_ids[] = $scat_id; foreach ($updateSubTyp AS $scat_id => $scat_data) {
$this->db->update('issues_category',$scat_data,array('issue_cat_id'=>$scat_id)); $scat_ids[] = $scat_id;
} $this->db->update('issues_category',$scat_data,array('issue_cat_id'=>$scat_id));
$this->db->where_not_in('issue_cat_id',$scat_ids)->delete('issues_category'); }
}
if(!empty($scat_ids)){
$this->db->where_not_in('issue_cat_id',$scat_ids);
}
$this->db->where('issue_id',$issue_id);
$this->db->delete('issues_category');
if(!empty($insertSubTyp)){ if(!empty($insertSubTyp)){
$this->db->insert_batch('issues_category',$insertSubTyp); $this->db->insert_batch('issues_category',$insertSubTyp);
...@@ -123,39 +129,41 @@ class Issue_model extends CI_Model { ...@@ -123,39 +129,41 @@ class Issue_model extends CI_Model {
$cond = ($view_all != 0)?' MI.status IN (0,1) ':' MI.status IN (1) '; $cond = ($view_all != 0)?' MI.status IN (0,1) ':' MI.status IN (1) ';
$cond .= (!empty($issue_id))?" AND MI.issue_id = '$issue_id' ":""; $cond .= (!empty($issue_id))?" AND MI.issue_id = '$issue_id' ":"";
$sql = "SELECT ISS.issue_id,MI.mechanic_id,ISS.issue,ISS.issue_image,IC.issue_cat_id, $sql = "SELECT MI.issue_id,MI.issue_cat_id,MI.mechanic_id,MI.custom_description,MI.custom_service_fee,
IC.issue_category,IC.issue_cat_image,IC.default_description,IC.default_service_fee, MI.status,ISS.issue,ISS.issue_image
MI.custom_description,MI.custom_service_fee,MI.status
FROM mechanic_issues AS MI FROM mechanic_issues AS MI
INNER JOIN issues AS ISS ON (ISS.issue_id=MI.issue_id) INNER JOIN issues AS ISS ON (ISS.issue_id=MI.issue_id)
LEFT JOIN issues_category AS IC ON (IC.issue_id=MI.issue_id)
WHERE MI.mechanic_id='$mechanic_id' AND ISS.status='1' AND $cond WHERE MI.mechanic_id='$mechanic_id' AND ISS.status='1' AND $cond
GROUP BY IC.issue_id,IC.issue_cat_id"; GROUP BY MI.issue_id,MI.issue_cat_id";
$mechIssueData = $this->db->query($sql); $mechIssueData = $this->db->query($sql);
if(empty($mechIssueData) || empty($mechIssueData = $mechIssueData->result_array())) if(empty($mechIssueData) || empty($mechIssueData = $mechIssueData->result_array()))
return 0; return 0;
$cstFlag = 0;
$customIssues = array(); $customIssues = array();
$subIssueData = array();
foreach ($mechIssueData AS $mechIsssue) { foreach ($mechIssueData AS $mechIsssue) {
$cstFlag = 0;
$issue_id = $mechIsssue['issue_id']; $issue_id = $mechIsssue['issue_id'];
$sub_issue_id = $mechIsssue['issue_cat_id']; if(!isset($customIssues[$issue_id])){
if(!isset($customIssues[$issue_id])){ $customIssues[$issue_id] = array('issue'=>$mechIsssue['issue'],
$issue_data = array('issue'=>$mechIsssue['issue'], 'issue_id'=>$mechIsssue['issue_id'],
'issue_id'=>$issue_id, 'mechanic_id'=>$mechIsssue['mechanic_id'],
'mechanic_id'=>$mechIsssue['mechanic_id'], 'issue_image'=>$mechIsssue['issue_image'],
'issue_image'=>$mechIsssue['issue_image'], 'status'=>$mechIsssue['status'],
'status'=>$mechIsssue['status']); 'custom_enable'=>'0');
}
$customIssues[$issue_id] = $issue_data;
} if(!empty($issCat_id = $mechIsssue['issue_cat_id'])){
if(!empty($sub_issue_id)){
$subIssueDtls['description'] = $mechIsssue['default_description']; $sIssData = $this->db->get_where('issues_category',array('issue_cat_id'=>$issCat_id));
$subIssueDtls['service_fee'] = $mechIsssue['default_service_fee']; if(empty($sIssData) || empty($sIssData = $sIssData->row_array())){
$subIssueDtls['issue_category'] = $mechIsssue['issue_category']; continue;
$subIssueDtls['issue_cat_image'] = $mechIsssue['issue_cat_image']; }
$subIssueDtls['description'] = $sIssData['default_description'];
$subIssueDtls['service_fee'] = $sIssData['default_service_fee'];
$subIssueDtls['issue_category'] = $sIssData['issue_category'];
$subIssueDtls['issue_cat_image'] = $sIssData['issue_cat_image'];
if(!empty($mechIsssue['custom_description'])){ if(!empty($mechIsssue['custom_description'])){
$cstFlag = 1; $cstFlag = 1;
$subIssueDtls['description'] = $mechIsssue['custom_description']; $subIssueDtls['description'] = $mechIsssue['custom_description'];
...@@ -164,10 +172,10 @@ class Issue_model extends CI_Model { ...@@ -164,10 +172,10 @@ class Issue_model extends CI_Model {
$cstFlag = 1; $cstFlag = 1;
$subIssueDtls['service_fee'] = $mechIsssue['custom_service_fee']; $subIssueDtls['service_fee'] = $mechIsssue['custom_service_fee'];
} }
$subIssueData[$sub_issue_id] = $subIssueDtls;
$customIssues[$issue_id]['sub_issue'][$issCat_id] = $subIssueDtls;
$customIssues[$issue_id]['custom_enable'] = $cstFlag;
} }
$customIssues[$issue_id]['sub_issue'] = $subIssueData;
$customIssues[$issue_id]['custom_enable'] = $cstFlag;
} }
return $customIssues; return $customIssues;
} }
...@@ -196,5 +204,49 @@ class Issue_model extends CI_Model { ...@@ -196,5 +204,49 @@ 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])){
$iData = array('issue'=>$issueData['issue'],'issue_id'=>$issue_id,
'issue_image'=>$issueData['issue_image']);
$genIssueData[$issue_id] = $iData;
}
if(isset($issueData['issue_cat_id']) && !empty($issueData['issue_cat_id'])){
$sIssueId = $issueData['issue_cat_id'];
$isData = 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']);
$genIssueData[$issue_id]['sub_categories'][] = $isData;
}
}
$respArr = array();
if(!empty($genIssueData)){
foreach ($genIssueData AS $value) {
$respArr[] = $value;
}
}
return $respArr;
}
} }
?> ?>
\ No newline at end of file
...@@ -44,9 +44,14 @@ class Mechanic_model extends CI_Model { ...@@ -44,9 +44,14 @@ class Mechanic_model extends CI_Model {
'shop_id'=>$mechanic_data['shop_id'], 'shop_id'=>$mechanic_data['shop_id'],
'address'=>$mechanic_data['address'], 'address'=>$mechanic_data['address'],
'licence'=>$mechanic_data['licence'], 'licence'=>$mechanic_data['licence'],
'location'=>$mechanic_data['location'],
'email_id'=>$mechanic_data['email_id'], 'email_id'=>$mechanic_data['email_id'],
'end_time'=>$mechanic_data['end_time'],
'last_name'=>$mechanic_data['last_name'], 'last_name'=>$mechanic_data['last_name'],
'start_time'=>$mechanic_data['start_time'],
'first_name'=>$mechanic_data['first_name'], 'first_name'=>$mechanic_data['first_name'],
'location_lat'=>$mechanic_data['location_lat'],
'location_lng'=>$mechanic_data['location_lng'],
'licence_number'=>$mechanic_data['licence_number'], 'licence_number'=>$mechanic_data['licence_number'],
'licence_exp_date'=>$mechanic_data['licence_exp_date'])); 'licence_exp_date'=>$mechanic_data['licence_exp_date']));
return $status; return $status;
...@@ -105,6 +110,11 @@ class Mechanic_model extends CI_Model { ...@@ -105,6 +110,11 @@ class Mechanic_model extends CI_Model {
'state'=>$mechanic_data['state'],'shop_id'=>$mechanic_data['shop_id'], 'state'=>$mechanic_data['state'],'shop_id'=>$mechanic_data['shop_id'],
'address'=>$mechanic_data['address'],'email_id'=>$mechanic_data['email_id'], 'address'=>$mechanic_data['address'],'email_id'=>$mechanic_data['email_id'],
'last_name'=>$mechanic_data['last_name'],'phone'=>$mechanic_data['phone'], 'last_name'=>$mechanic_data['last_name'],'phone'=>$mechanic_data['phone'],
'location'=>$mechanic_data['location'],
'end_time'=>$mechanic_data['end_time'],
'start_time'=>$mechanic_data['start_time'],
'location_lat'=>$mechanic_data['location_lat'],
'location_lng'=>$mechanic_data['location_lng'],
'licence_number'=>$mechanic_data['licence_number'], 'licence_number'=>$mechanic_data['licence_number'],
'licence_exp_date'=>$mechanic_data['licence_exp_date']); 'licence_exp_date'=>$mechanic_data['licence_exp_date']);
...@@ -122,5 +132,79 @@ class Mechanic_model extends CI_Model { ...@@ -122,5 +132,79 @@ class Mechanic_model extends CI_Model {
$status = $this->db->update('admin_users',array('status'=>$status),array('id'=>$mechanic_id)); $status = $this->db->update('admin_users',array('status'=>$status),array('id'=>$mechanic_id));
return $status; return $status;
} }
function getNearByMechanics($location_data = array(),$sub_issues = array()){
if(empty($location_data) || empty($sub_issues)){
return 0;
}
$current_lat = $location_data['pickup_lat'];
$current_lng = $location_data['pickup_lng'];
$issue_cat_id = implode(',',$sub_issues);
$sql = "SELECT AU.display_name,AU.profile_image,ME.*,MS.shop_name,MS.address AS shop_address,
MS.phone AS shop_phone,MS.email_id AS shop_email_id,
3956*2*ASIN(SQRT(POWER(SIN(($current_lat-ME.location_lat)*pi()/180/2),2)+
COS($current_lat*pi()/180 )*COS(ME.location_lat*pi()/180)*
POWER(SIN(($current_lng-ME.location_lng)*pi()/180/2),2) )) AS distance
FROM mechanic AS ME
INNER JOIN admin_users AS AU ON (AU.id=ME.mechanic_id)
LEFT JOIN mechanic_shop AS MS ON (MS.shop_id=ME.shop_id AND MS.status='1')
WHERE AU.status='1'
-- HAVING distance<30";
$mechData = $this->db->query($sql);
if(empty($mechData) || empty($mechData = $mechData->result_array())){
return 0;
}
$estimate = 0;
$mechDataArr = array();
foreach($mechData AS $index => $data){
if(empty($data['start_time']) || empty($data['end_time'])){
$scheduleTiming = array('09:00 AM','10:00 AM','11:00 AM','12:00 PM','01:00 PM',
'02:00 PM','03:00 PM','04:00 PM','05:00 PM','06:00 PM');
} else {
$endTime = strtotime($data['end_time']);
$schTime = strtotime($data['start_time']);
$scheduleTiming = array();
for( ; $schTime <= ($endTime-3600) ; $schTime += 3600){
$scheduleTiming[] = date('h:i A',$schTime);
}
}
$mechanic_id = $data['mechanic_id'];
$sql = "SELECT ISS.*, IC.*, MI.*
FROM issues_category AS IC
INNER JOIN issues AS ISS ON (IC.issue_id=ISS.issue_id)
LEFT JOIN mechanic_issues AS MI ON (MI.issue_cat_id=IC.issue_cat_id AND
MI.mechanic_id='$mechanic_id' AND MI.status='1')
WHERE ISS.status='1' AND IC.status='1' AND IC.issue_cat_id IN ($issue_cat_id)";
$subIssData = $this->db->query($sql);
$sIssueData = array();
if(!empty($subIssData) && !empty($subIssData = $subIssData->result_array())){
$sIssueData = $subIssData;
}
$estimate = 0;
foreach($sIssueData AS $sIndex => $sIssue){
if(!empty($sIssue['custom_service_fee'])){
$estimate += $sIssue['custom_service_fee'];
$sIssueData[$sIndex]['service_fee'] = $sIssue['custom_service_fee'];
} else {
$estimate += $sIssue['default_service_fee'];
$sIssueData[$sIndex]['service_fee'] = $sIssue['default_service_fee'];
}
}
$mechData[$index]['estimate'] = $estimate;
$mechData[$index]['sub_issues'] = $sIssueData;
$mechData[$index]['scheduleTiming'] = $scheduleTiming;
}
return $mechData;
}
} }
?> ?>
\ No newline at end of file
...@@ -25,5 +25,35 @@ class Vehicle_model extends CI_Model { ...@@ -25,5 +25,35 @@ class Vehicle_model extends CI_Model {
} }
return $status; return $status;
} }
function getCustVechiles($searchData = array()){
if(empty($searchData)){
return 0;
}
$cond = array();
$cond['status'] = 1;
if(isset($searchData['customer_id']) && !empty($searchData['customer_id'])){
$cond['customer_id'] = $searchData['customer_id'];
}
$vehData = $this->db->get_where('customer_vehicle',$cond);
if(!empty($vehData)){
return $vehData->result();
}
return 0;
}
function changeCustomerCarStatus($customer_id = '', $customer_veh_id = '', $status = ''){
if(empty($customer_id) || empty($customer_veh_id) || $status == ''){
return 0;
}
$upStatus = $this->db->update('customer_vehicle',
array('status'=>$status),
array('customer_id'=>$customer_id,'customer_veh_id'=>$customer_veh_id));
return $upStatus;
}
} }
?> ?>
\ No newline at end of file
...@@ -73,10 +73,10 @@ ...@@ -73,10 +73,10 @@
<tr> <tr>
<th class="hidden">ID</th> <th class="hidden">ID</th>
<th width="10%;">Issue Icon</th> <th width="10%;">Issue Icon</th>
<th width="29%;">Issue Category</th> <th width="25%;">Issue Category</th>
<th width="12%;">Mapping Type</th> <th width="13%;">Mapping Type</th>
<th width="10%;">Status</th> <th width="10%;">Status</th>
<th width="40%;">Action</th> <th width="43%;">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -112,6 +112,12 @@ ...@@ -112,6 +112,12 @@
required="" name="state" placeholder="Enter email ID" value="<?= (isset($user_data->state))?$user_data->state:'' ?>"> required="" name="state" placeholder="Enter email ID" value="<?= (isset($user_data->state))?$user_data->state:'' ?>">
<span class="glyphicon form-control-feedback"></span> <span class="glyphicon form-control-feedback"></span>
</div> </div>
<div class="form-group">
<label>Functional Area</label>
<input type="text" class="form-control" data-parsley-trigger="change"
id="loc_search_1" name="location" placeholder="Choose Functional Area" value="<?= (isset($user_data->location))?$user_data->location:'' ?>">
<span class="glyphicon form-control-feedback"></span>
</div>
<?php if(!empty($shop_data)){ ?> <?php if(!empty($shop_data)){ ?>
<div class="form-group"> <div class="form-group">
<label>Workshop</label> <label>Workshop</label>
...@@ -145,6 +151,27 @@ ...@@ -145,6 +151,27 @@
value="<?= (isset($user_data->phone))?$user_data->phone:'' ?>" name="phone" placeholder="Enter Phone Number" > value="<?= (isset($user_data->phone))?$user_data->phone:'' ?>" name="phone" placeholder="Enter Phone Number" >
<span class="glyphicon form-control-feedback"></span> <span class="glyphicon form-control-feedback"></span>
</div> </div>
<div class="form-group" style="display:inline-flex;">
<div style="width:250px;" class="clockpicker" data-autoclose="true">
<label>Working Hours</label>
<input type="text" class="form-control required" data-parsley-trigger="change"
data-parsley-minlength="2" required name="start_time" placeholder="Work Start Time"
value="<?= (isset($user_data->start_time))?$user_data->start_time:'' ?>"
id="start_time" autocomplete="off" >
<span class="glyphicon form-control-feedback"></span>
</div>
<div style="width:250px;padding-left:10px;padding-top:25px;"
class="clockpicker" data-autoclose="true">
<input type="text" class="form-control required" data-parsley-trigger="change"
data-parsley-minlength="2" required="" placeholder="Work End Time" autocomplete="off"
value="<?= (isset($user_data->end_time))?$user_data->end_time:'' ?>" id="end_time"
name="end_time">
<span class="glyphicon form-control-feedback"></span>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label>Licence Number</label> <label>Licence Number</label>
<input type="text" class="form-control" data-parsley-trigger="change" <input type="text" class="form-control" data-parsley-trigger="change"
......
...@@ -201,6 +201,20 @@ jQuery('[id="viewMechanic"]').on('click',function() { ...@@ -201,6 +201,20 @@ jQuery('[id="viewMechanic"]').on('click',function() {
'<div class="col-md-1">:</div>'+ '<div class="col-md-1">:</div>'+
'<div class="col-md-6"><label>'+mechanic_data['state']+'</label></div> '+ '<div class="col-md-6"><label>'+mechanic_data['state']+'</label></div> '+
'</div> '+ '</div> '+
'<div class="row"> '+
'<div class="col-md-4">Working Hours</div>'+
'<div class="col-md-1">:</div>'+
'<div class="col-md-6">'+
'<label>'+
mechanic_data['start_time']+' - '+mechanic_data['end_time']+
'</label>'+
'</div> '+
'</div> '+
'<div class="row"> '+
'<div class="col-md-4">Location</div>'+
'<div class="col-md-1">:</div>'+
'<div class="col-md-6"><label>'+mechanic_data['location']+'</label></div> '+
'</div> '+
shopHtml+ shopHtml+
'</div> '+ '</div> '+
'<div class="col-md-5"> '+ '<div class="col-md-5"> '+
......
-- phpMyAdmin SQL Dump -- phpMyAdmin SQL Dump
-- version 4.7.9 -- version 4.8.3
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: 127.0.0.1:3306 -- Host: db
-- Generation Time: Dec 30, 2018 at 07:28 PM -- Generation Time: Jan 18, 2019 at 01:31 PM
-- Server version: 5.7.21 -- Server version: 5.6.41
-- PHP Version: 5.6.35 -- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0; SET AUTOCOMMIT = 0;
...@@ -28,17 +28,15 @@ SET time_zone = "+00:00"; ...@@ -28,17 +28,15 @@ SET time_zone = "+00:00";
-- Table structure for table `admin_users` -- Table structure for table `admin_users`
-- --
DROP TABLE IF EXISTS `admin_users`; CREATE TABLE `admin_users` (
CREATE TABLE IF NOT EXISTS `admin_users` ( `id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL, `username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL, `password` varchar(100) NOT NULL,
`user_type` tinyint(3) NOT NULL COMMENT '1 => Super Admin, 2 => Mechanic', `user_type` tinyint(3) NOT NULL COMMENT '1 => Super Admin, 2 => Mechanic',
`display_name` varchar(200) NOT NULL, `display_name` varchar(200) NOT NULL,
`profile_image` varchar(500) NOT NULL, `profile_image` varchar(500) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '1', `status` tinyint(4) NOT NULL DEFAULT '1'
PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `admin_users` -- Dumping data for table `admin_users`
...@@ -46,9 +44,49 @@ CREATE TABLE IF NOT EXISTS `admin_users` ( ...@@ -46,9 +44,49 @@ CREATE TABLE IF NOT EXISTS `admin_users` (
INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_name`, `profile_image`, `status`) VALUES INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_name`, `profile_image`, `status`) VALUES
(1, 'admin', '202cb962ac59075b964b07152d234b70', 1, 'Super Admin User', 'assets/uploads/services/1543990056_1523012120_default.png', 1), (1, 'admin', '202cb962ac59075b964b07152d234b70', 1, 'Super Admin User', 'assets/uploads/services/1543990056_1523012120_default.png', 1),
(2, 'mechanic', '202cb962ac59075b964b07152d234b70', 2, 'Mechanic', 'assets/uploads/services/1544088354_car1.jpg', 1), (2, 'mechanic', '202cb962ac59075b964b07152d234b70', 2, 'Mechanic', 'assets/uploads/services/1546929651_audi-r8-1366x786.jpg', 1),
(11, 'cfghbfchdrfg', '97a4aa7bfb0e20d7b9813ffe99f91fd4', 2, 'lnoik', 'assets/uploads/services/1544013534_images.jpg', 0), (11, 'cfghbfchdrfg', '97a4aa7bfb0e20d7b9813ffe99f91fd4', 2, 'lnoik', 'assets/uploads/services/1544013534_images.jpg', 1),
(12, 'admin123', '202cb962ac59075b964b07152d234b70', 2, 'Super Admin', 'assets/uploads/services/1544091403_Himalayan.jpg', 1); (12, 'admin123', '202cb962ac59075b964b07152d234b70', 2, 'Super Admin', 'assets/uploads/services/1544091403_Himalayan.jpg', 2),
(13, 'jansa', '202cb962ac59075b964b07152d234b70', 2, 'Jensa Mechanic', 'assets/uploads/services/1546851554_234858854male.jpg', 1),
(14, 'mechanic_1', '202cb962ac59075b964b07152d234b70', 2, 'Super Mechanic 1', 'assets/uploads/services/1546929755_1523012036_hj.jpg', 1);
-- --------------------------------------------------------
--
-- Table structure for table `bookings`
--
CREATE TABLE `bookings` (
`booking_id` int(13) NOT NULL,
`customer_id` int(13) DEFAULT NULL,
`mechanic_id` int(13) DEFAULT NULL,
`customer_veh_id` int(13) DEFAULT NULL,
`mileage` varchar(25) DEFAULT NULL,
`cost` decimal(10,0) DEFAULT NULL,
`issues_selected` longtext,
`custom_issue_data` blob,
`scheduled_date` varchar(50) DEFAULT NULL,
`scheduled_time` varchar(50) DEFAULT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bookings`
--
INSERT INTO `bookings` (`booking_id`, `customer_id`, `mechanic_id`, `customer_veh_id`, `mileage`, `cost`, `issues_selected`, `custom_issue_data`, `scheduled_date`, `scheduled_time`, `status`) VALUES
(4, 3, 13, 27, '', '1000', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 1),
(5, 3, 2, 28, '', '2520', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"10\",\"issue_category\":\"General Service L:1\"}]', NULL, '2019-01-17', '01:00 PM', 1),
(6, 3, 2, 29, '', '3652', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"10\",\"issue_category\":\"General Service L:1\"}]', NULL, '2019-01-17', '02:00 PM', 0),
(7, 3, 13, 30, '', '7582', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 0),
(8, 3, 13, 31, '', '522', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-17', '11:00 AM', 0),
(9, 3, 13, 32, '', '2500', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0),
(10, 3, 13, 34, '', '3500', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"},{\"issue\":\"General Service\",\"issue_id\":\"12\",\"sub_issue_id\":\"9\",\"issue_category\":\"General Service L:0\"}]', NULL, '2019-01-18', '12:00 PM', 0),
(11, 3, 13, 35, '', '1000', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0),
(12, 3, 13, 36, '', '850', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '12:00 PM', 0),
(13, 3, 13, 37, '', '6950', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '11:00 AM', 0),
(14, 3, 13, 38, '', '850', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '10:00 AM', 0),
(15, 3, 13, 39, '', '800', '[{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"7\",\"issue_category\":\"Oil Change\"},{\"issue\":\"Oil Change and General Service\",\"issue_id\":\"11\",\"sub_issue_id\":\"8\",\"issue_category\":\"Oil Top Up \"}]', NULL, '2019-01-18', '04:00 PM', 0);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -56,9 +94,8 @@ INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_n ...@@ -56,9 +94,8 @@ INSERT INTO `admin_users` (`id`, `username`, `password`, `user_type`, `display_n
-- Table structure for table `customers` -- Table structure for table `customers`
-- --
DROP TABLE IF EXISTS `customers`; CREATE TABLE `customers` (
CREATE TABLE IF NOT EXISTS `customers` ( `customer_id` int(20) NOT NULL,
`customer_id` int(20) NOT NULL AUTO_INCREMENT,
`first_name` varchar(50) NOT NULL, `first_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL, `last_name` varchar(50) NOT NULL,
`phone` varchar(20) DEFAULT NULL, `phone` varchar(20) DEFAULT NULL,
...@@ -67,9 +104,8 @@ CREATE TABLE IF NOT EXISTS `customers` ( ...@@ -67,9 +104,8 @@ CREATE TABLE IF NOT EXISTS `customers` (
`profile_image` varchar(500) DEFAULT NULL, `profile_image` varchar(500) DEFAULT NULL,
`password` varchar(50) DEFAULT NULL, `password` varchar(50) DEFAULT NULL,
`date_of_birth` varchar(200) DEFAULT NULL, `date_of_birth` varchar(200) DEFAULT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`customer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `customers` -- Dumping data for table `customers`
...@@ -78,8 +114,10 @@ CREATE TABLE IF NOT EXISTS `customers` ( ...@@ -78,8 +114,10 @@ CREATE TABLE IF NOT EXISTS `customers` (
INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `email`, `address`, `profile_image`, `password`, `date_of_birth`, `status`) VALUES INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `email`, `address`, `profile_image`, `password`, `date_of_birth`, `status`) VALUES
(1, 'Tobin', 'Thomas', '9995559194', '[email protected]', 'Techware', 'assets/uploads/services/1544417044_sniper.jpg', NULL, '05/05/1994', 1), (1, 'Tobin', 'Thomas', '9995559194', '[email protected]', 'Techware', 'assets/uploads/services/1544417044_sniper.jpg', NULL, '05/05/1994', 1),
(2, 'Tobin', 'Thomas', '99955752194', '[email protected]', 'Techware', 'assets/uploads/services/1545036793_car1.jpg', NULL, '12/20/2018', 1), (2, 'Tobin', 'Thomas', '99955752194', '[email protected]', 'Techware', 'assets/uploads/services/1545036793_car1.jpg', NULL, '12/20/2018', 1),
(3, 'Tobin', 'Thomas', '9993242394', '[email protected]', 'Techware', 'assets/uploads/services/1545037023_images.jpg', 'e10adc3949ba59abbe56e057f20f883e', '12/11/2018', 1), (3, 'Tobin', 'Thomas', '9993242394', '[email protected]', 'Techware', 'assets/uploads/services/3_1393675771-ferrari.jpg', 'e10adc3949ba59abbe56e057f20f883e', '12/11/2018', 1),
(7, 'tobin', 'thomas', '9995559194', '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 1); (7, 'tobin', 'thomas', '9995559194', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 1),
(8, 'tobin', 'thomas', '8956235896', '[email protected]', NULL, 'assets/uploads/services/1545036793_car1.jpg', 'e10adc3949ba59abbe56e057f20f883e', NULL, 1),
(9, 'tobin', 'thomas test', NULL, '[email protected]', NULL, NULL, 'e10adc3949ba59abbe56e057f20f883e', NULL, 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -87,9 +125,8 @@ INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `ema ...@@ -87,9 +125,8 @@ INSERT INTO `customers` (`customer_id`, `first_name`, `last_name`, `phone`, `ema
-- Table structure for table `customer_vehicle` -- Table structure for table `customer_vehicle`
-- --
DROP TABLE IF EXISTS `customer_vehicle`; CREATE TABLE `customer_vehicle` (
CREATE TABLE IF NOT EXISTS `customer_vehicle` ( `customer_veh_id` int(11) NOT NULL,
`customer_veh_id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) DEFAULT NULL, `customer_id` int(11) DEFAULT NULL,
`car_name` varchar(250) DEFAULT NULL, `car_name` varchar(250) DEFAULT NULL,
`car_model` varchar(150) DEFAULT NULL, `car_model` varchar(150) DEFAULT NULL,
...@@ -101,9 +138,8 @@ CREATE TABLE IF NOT EXISTS `customer_vehicle` ( ...@@ -101,9 +138,8 @@ CREATE TABLE IF NOT EXISTS `customer_vehicle` (
`car_loc_lat` varchar(150) DEFAULT NULL, `car_loc_lat` varchar(150) DEFAULT NULL,
`car_loc_lng` varchar(150) DEFAULT NULL, `car_loc_lng` varchar(150) DEFAULT NULL,
`created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `created_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(3) NOT NULL DEFAULT '3', `status` tinyint(3) NOT NULL DEFAULT '3'
PRIMARY KEY (`customer_veh_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `customer_vehicle` -- Dumping data for table `customer_vehicle`
...@@ -121,7 +157,25 @@ INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `c ...@@ -121,7 +157,25 @@ INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `c
(16, NULL, '2017 Hyundai Sonata SE', 'sonata', 'hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'DfR Solutions, Virginia Manor Road, Beltsville, MD, USA', '39.063356', '-76.893169', '2018-12-17 10:33:11', 3), (16, NULL, '2017 Hyundai Sonata SE', 'sonata', 'hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'DfR Solutions, Virginia Manor Road, Beltsville, MD, USA', '39.063356', '-76.893169', '2018-12-17 10:33:11', 3),
(17, NULL, NULL, NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\"}', 'DRTY SMMR, Myrtle Avenue, Brooklyn, NY, USA', '40.6973088', '-73.9308637', '2018-12-17 11:42:55', 3), (17, NULL, NULL, NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\"}', 'DRTY SMMR, Myrtle Avenue, Brooklyn, NY, USA', '40.6973088', '-73.9308637', '2018-12-17 11:42:55', 3),
(20, NULL, '2005 Toyota Corolla CE', NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla CE\"}', 'CA, USA', '36.778261', '-119.4179324', '2018-12-17 12:35:05', 3), (20, NULL, '2005 Toyota Corolla CE', NULL, NULL, NULL, '1NXBR32E85Z505904', '{\"vin\":\"1NXBR32E85Z505904\",\"attributes\":{\"VIN\":\"1NXBR32E85Z505904\",\"Year\":\"2005\",\"Make\":\"Toyota\",\"Model\":\"Corolla\",\"Trim\":\"CE\",\"Short Trim\":\"CE\",\"Trim Variations\":\"CE \\/ LE \\/ S\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Compact\",\"Vehicle Category\":\"Compact Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"13.2 gallon\",\"City Mileage\":\"30 - 32 miles\\/gallon\",\"Highway Mileage\":\"38 - 41 miles\\/gallon\",\"Engine\":\"1.8L L4 DOHC 16V\",\"Engine Size\":\"1.8\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"4\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"Non-Abs | 4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"2615\",\"Gross Weight\":\"\",\"Overall Height\":\"58.50 inches\",\"Overall Length\":\"178.30 inches\",\"Overall Width\":\"66.90 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$14,287\",\"Delivery Charges\":\"$540\",\"MSRP\":\"$15,790\"},\"success\":true,\"error\":\"\",\"vehicle\":\"2005 Toyota Corolla CE\"}', 'CA, USA', '36.778261', '-119.4179324', '2018-12-17 12:35:05', 3),
(21, NULL, '2014 Hyundai Sonata GLS', 'sonata', 'hyundai', '2014', NULL, '{\"vehicle\":\"2014 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2014\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"GLS\",\"Short Trim\":\"GLS\",\"Trim Variations\":\"GLS \\/ GLS PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"24 miles\\/gallon\",\"Highway Mileage\":\"35 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"57.90 inches\",\"Overall Length\":\"189.80 inches\",\"Overall Width\":\"72.20 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,532\",\"Delivery Charges\":\"$810\",\"MSRP\":\"$21,450\"},\"success\":true,\"error\":\"\"}', 'Fresno, CA, USA', '36.7377981', '-119.7871247', '2018-12-17 12:48:33', 3); (21, NULL, '2014 Hyundai Sonata GLS', 'sonata', 'hyundai', '2014', NULL, '{\"vehicle\":\"2014 Hyundai Sonata GLS\",\"attributes\":{\"Year\":\"2014\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"GLS\",\"Short Trim\":\"GLS\",\"Trim Variations\":\"GLS \\/ GLS PZEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"24 miles\\/gallon\",\"Highway Mileage\":\"35 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"57.90 inches\",\"Overall Length\":\"189.80 inches\",\"Overall Width\":\"72.20 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$20,532\",\"Delivery Charges\":\"$810\",\"MSRP\":\"$21,450\"},\"success\":true,\"error\":\"\"}', 'Fresno, CA, USA', '36.7377981', '-119.7871247', '2018-12-17 12:48:33', 3),
(22, 3, '2018 Hyundai Sonata Sport', 'Sonata', 'Hyundai', '2018', NULL, '{\"vehicle\":\"2018 Hyundai Sonata Sport\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"Sport\",\"Short Trim\":\"SEL\",\"Trim Variations\":\"SEL \\/ Limited SULEV \\/ Sport \\/ Limited \\/ SEL SULEV\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Passenger Car\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"\",\"Doors\":\"4\",\"Fuel Type\":\"Gasoline\",\"Fuel Capacity\":\"\",\"City Mileage\":\"\",\"Highway Mileage\":\"\",\"Engine\":\"GDI THETA-II\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"\",\"Transmission Gears\":\"\",\"Driven Wheels\":\"\",\"Anti-Brake System\":\"\",\"Steering Type\":\"\",\"Curb Weight\":\"\",\"Gross Weight\":\"\",\"Overall Height\":\"\",\"Overall Length\":\"\",\"Overall Width\":\"\",\"Standard Seating\":\"\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"\"},\"success\":true,\"error\":\"\"}', 'Groove ???? 2 G218 Rama I Rd, Khwaeng Pathum Wan, Khet Pathum Wan, Krung Thep Maha Nakhon 10330, Thailand', '13.7453362', '100.5381618', '2019-01-16 09:05:18', 2),
(23, 3, '2017 Hyundai Sonata SE', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata SE\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"SE\",\"Short Trim\":\"SE\",\"Trim Variations\":\"Base PZEV \\/ Base \\/ SE PZEV \\/ SE \\/ Eco \\/ Sport \\/ Limited \\/ Sport 2.0T \\/ Limited 2.0T\",\"Made In\":\"United States\",\"Vehicle Style\":\"Sedan (4-Door)\",\"Vehicle Type\":\"Car\",\"Vehicle Size\":\"Midsize\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallon\",\"City Mileage\":\"25 miles\\/gallon\",\"Highway Mileage\":\"36 miles\\/gallon\",\"Engine\":\"2.4L L4 DOHC 16V\",\"Engine Size\":\"2.4\",\"Engine Cylinders\":\"4\",\"Transmission Type\":\"Automatic\",\"Transmission Gears\":\"6\",\"Driven Wheels\":\"Front Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"R&P\",\"Curb Weight\":\"3252\",\"Gross Weight\":\"\",\"Overall Height\":\"58.10 inches\",\"Overall Length\":\"191.10 inches\",\"Overall Width\":\"73.40 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"$21,047\",\"Delivery Charges\":\"$835\",\"MSRP\":\"$21,950\"},\"success\":true,\"error\":\"\"}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-16 09:09:10', 1),
(24, 3, '2018 Seat Leon', 'Leon', 'Seat', '2018', NULL, '{\"vehicle\":\"2018 Seat Leon\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Seat\",\"Trim\":\"\",\"Model\":\"Leon\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-16 12:08:53', 3),
(25, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 08:24:15', 3),
(26, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 08:48:12', 3),
(27, 3, '2019 Peugeot 307', '307', 'Peugeot', '2019', NULL, '{\"vehicle\":\"2019 Peugeot 307\",\"attributes\":{\"Year\":\"2019\",\"Make\":\"Peugeot\",\"Trim\":\"\",\"Model\":\"307\",\"Engine\":\"\"}}', 'F1563 Princes Hwy, Termeil NSW 2539, Australia', '-35.4853846', '150.3415399', '2019-01-17 09:37:22', 3),
(28, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:39:08', 3),
(29, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:43:16', 3),
(30, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:44:33', 3),
(31, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-17 09:47:07', 3),
(32, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 05:13:09', 3),
(33, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Model\":\"Sonata\",\"Trim\":\"\",\"Short Trim\":\"\",\"Trim Variations\":\"\",\"Made In\":\"South Korea\",\"Vehicle Style\":\"\",\"Vehicle Type\":\"Sedan\",\"Vehicle Size\":\"\",\"Vehicle Category\":\"Large Cars\",\"Doors\":\"4\",\"Fuel Type\":\"Regular Unleaded\",\"Fuel Capacity\":\"18.5 gallons\",\"City Mileage\":\"22 miles\\/gallon\",\"Highway Mileage\":\"31 miles\\/gallon\",\"Engine\":\"Intercooled Turbo Regular Unleaded I-4 2.0 L\\/122\",\"Engine Size\":\"2-L\",\"Engine Cylinders\":\"4-Cylinder\",\"Transmission Type\":\"Automatic w\\/OD\",\"Transmission Gears\":\"6-Speed\",\"Driven Wheels\":\"Front-Wheel Drive\",\"Anti-Brake System\":\"4-Wheel ABS\",\"Steering Type\":\"Rack & Pinion\",\"Curb Weight\":\"3492 pounds\",\"Gross Weight\":\"\",\"Overall Height\":\"58.1 inches\",\"Overall Length\":\"191.1 inches\",\"Overall Width\":\"73.4 inches\",\"Standard Seating\":\"5\",\"Optional Seating\":\"\",\"Invoice Price\":\"\",\"Delivery Charges\":\"\",\"MSRP\":\"$26,600\"},\"success\":true,\"error\":\"\"}', 'Tr??c 71 Hai Bà Tr?ng, C?a Nam, Hoàn Ki?m, Hà N?i, Vietnam', '21.027065', '105.843043', '2019-01-18 05:29:16', 1),
(34, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:18:49', 3),
(35, 3, '2017 Citroën C5 Break', 'C5 Break', 'Citroën', '2017', NULL, '{\"vehicle\":\"2017 Citro\\u00ebn C5 Break\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Citro\\u00ebn\",\"Trim\":\"\",\"Model\":\"C5 Break\",\"Engine\":\"\"}}', 'FG-1 76-B, Maya Apartments Rd, Block FG1, Vikaspuri, Delhi, 110018, India', '28.642685', '77.0700741', '2019-01-18 06:27:05', 3),
(36, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:27:22', 3),
(37, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:28:35', 3),
(38, 3, '2018 Peugeot 307 SW', '307 SW', 'Peugeot', '2018', NULL, '{\"vehicle\":\"2018 Peugeot 307 SW\",\"attributes\":{\"Year\":\"2018\",\"Make\":\"Peugeot\",\"Trim\":\"\",\"Model\":\"307 SW\",\"Engine\":\"\"}}', 'BG-510, Bawana Rd, Block BG, Sanjay Gandhi Transport Nagar, Delhi, 110042, India', '28.738923', '77.148339', '2019-01-18 06:28:59', 3),
(39, 3, '2017 Hyundai Sonata', 'Sonata', 'Hyundai', '2017', NULL, '{\"vehicle\":\"2017 Hyundai Sonata\",\"attributes\":{\"Year\":\"2017\",\"Make\":\"Hyundai\",\"Trim\":\"\",\"Model\":\"Sonata\",\"Engine\":\"\"}}', 'Broadway, New York, USA', '40.908288', '-73.896564', '2019-01-18 06:38:54', 3);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -129,16 +183,14 @@ INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `c ...@@ -129,16 +183,14 @@ INSERT INTO `customer_vehicle` (`customer_veh_id`, `customer_id`, `car_name`, `c
-- Table structure for table `forgot_password_link` -- Table structure for table `forgot_password_link`
-- --
DROP TABLE IF EXISTS `forgot_password_link`; CREATE TABLE `forgot_password_link` (
CREATE TABLE IF NOT EXISTS `forgot_password_link` ( `id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_type` tinyint(3) DEFAULT NULL COMMENT '1=>Customer 2=>Mechanic', `user_type` tinyint(3) DEFAULT NULL COMMENT '1=>Customer 2=>Mechanic',
`user_id` int(11) DEFAULT NULL, `user_id` int(11) DEFAULT NULL,
`token` varchar(500) DEFAULT NULL, `token` varchar(500) DEFAULT NULL,
`created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `forgot_password_link` -- Dumping data for table `forgot_password_link`
...@@ -147,7 +199,8 @@ CREATE TABLE IF NOT EXISTS `forgot_password_link` ( ...@@ -147,7 +199,8 @@ CREATE TABLE IF NOT EXISTS `forgot_password_link` (
INSERT INTO `forgot_password_link` (`id`, `user_type`, `user_id`, `token`, `created_date`, `status`) VALUES INSERT INTO `forgot_password_link` (`id`, `user_type`, `user_id`, `token`, `created_date`, `status`) VALUES
(1, 1, NULL, '7e07594058e29d84ce3ff26e4b283fc3', '2018-12-30 13:12:20', 1), (1, 1, NULL, '7e07594058e29d84ce3ff26e4b283fc3', '2018-12-30 13:12:20', 1),
(2, 1, 3, '747e195179012d145766f9ea9ee1f4aa', '2018-12-30 13:12:49', 1), (2, 1, 3, '747e195179012d145766f9ea9ee1f4aa', '2018-12-30 13:12:49', 1),
(3, 1, 3, '08be0c60b807ba994ca520d4c4f2d083', '2018-12-30 14:55:25', 1); (3, 1, 3, '08be0c60b807ba994ca520d4c4f2d083', '2018-12-30 14:55:25', 1),
(4, 1, 3, '460fce2846e4bb57241d44745ede1482', '2018-12-31 08:56:06', 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -155,24 +208,23 @@ INSERT INTO `forgot_password_link` (`id`, `user_type`, `user_id`, `token`, `crea ...@@ -155,24 +208,23 @@ INSERT INTO `forgot_password_link` (`id`, `user_type`, `user_id`, `token`, `crea
-- Table structure for table `issues` -- Table structure for table `issues`
-- --
DROP TABLE IF EXISTS `issues`; CREATE TABLE `issues` (
CREATE TABLE IF NOT EXISTS `issues` ( `issue_id` int(11) NOT NULL,
`issue_id` int(11) NOT NULL AUTO_INCREMENT,
`issue` varchar(500) NOT NULL, `issue` varchar(500) NOT NULL,
`issue_image` varchar(500) DEFAULT NULL, `issue_image` varchar(500) DEFAULT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`issue_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `issues` -- Dumping data for table `issues`
-- --
INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES
(9, 'Wheel Maintenance', 'assets/uploads/services/images8.jpg', 1), (9, 'Wheel Maintenance', 'assets/uploads/services/images8.jpg', 2),
(10, 'AC Maintenance', 'assets/uploads/services/car_ac.jpg', 1), (10, 'AC Maintenance', 'assets/uploads/services/car_ac.jpg', 2),
(11, 'Oil Change and General Service', 'assets/uploads/services/images9.jpg', 1), (11, 'Oil Change and General Service', 'assets/uploads/services/images9.jpg', 1),
(12, 'General Service', 'assets/uploads/services/Twitch_KingpinSkin_old2_HD1.jpg', 1); (12, 'General Service', 'assets/uploads/services/Twitch_KingpinSkin_old2_HD1.jpg', 1),
(13, 'Oil Change and General Service (Free Water Service and Polishing).', 'assets/uploads/services/Himalayan.jpg', 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -180,17 +232,15 @@ INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES ...@@ -180,17 +232,15 @@ INSERT INTO `issues` (`issue_id`, `issue`, `issue_image`, `status`) VALUES
-- Table structure for table `issues_category` -- Table structure for table `issues_category`
-- --
DROP TABLE IF EXISTS `issues_category`; CREATE TABLE `issues_category` (
CREATE TABLE IF NOT EXISTS `issues_category` ( `issue_cat_id` int(11) NOT NULL,
`issue_cat_id` int(11) NOT NULL AUTO_INCREMENT,
`issue_id` int(11) DEFAULT NULL, `issue_id` int(11) DEFAULT NULL,
`issue_category` varchar(500) DEFAULT NULL, `issue_category` varchar(500) DEFAULT NULL,
`issue_cat_image` varchar(500) DEFAULT NULL, `issue_cat_image` varchar(500) DEFAULT NULL,
`default_service_fee` double DEFAULT NULL, `default_service_fee` double DEFAULT NULL,
`default_description` longtext, `default_description` longtext,
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`issue_cat_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `issues_category` -- Dumping data for table `issues_category`
...@@ -200,7 +250,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is ...@@ -200,7 +250,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is
(7, 11, 'Oil Change', 'assets/uploads/services/Twitch_KingpinSkin_old2_HD.jpg', 1500, 'Oil Change and general service with free water service. Oil Change and general service with free water service. Oil Change and general service with free water service. ', 1), (7, 11, 'Oil Change', 'assets/uploads/services/Twitch_KingpinSkin_old2_HD.jpg', 1500, 'Oil Change and general service with free water service. Oil Change and general service with free water service. Oil Change and general service with free water service. ', 1),
(8, 11, 'Oil Top Up ', 'assets/uploads/services/Himalayan1.jpg', 500, 'Oil Top Up and general service with free water service. ', 1), (8, 11, 'Oil Top Up ', 'assets/uploads/services/Himalayan1.jpg', 500, 'Oil Top Up and general service with free water service. ', 1),
(9, 12, 'General Service L:0', 'assets/uploads/services/park-512.png', 700, 'With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. ', 1), (9, 12, 'General Service L:0', 'assets/uploads/services/park-512.png', 700, 'With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. With out Water Service and Polishing. ', 1),
(10, 12, 'General Service L:1', 'assets/uploads/services/car.jpg', 700, 'Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. ', 1); (10, 12, 'General Service L:1', 'assets/uploads/services/car.jpg', 700, 'Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. Free Water Service and Polishing. ', 1),
(11, 13, 'Oil Change and General Service', 'assets/uploads/services/orig.jpg', 1500, 'Oil Change and General Service without free water service. Oil Change and General Service without free water service. Oil Change and General Service without free water service. ', 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -208,9 +259,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is ...@@ -208,9 +259,8 @@ INSERT INTO `issues_category` (`issue_cat_id`, `issue_id`, `issue_category`, `is
-- Table structure for table `mechanic` -- Table structure for table `mechanic`
-- --
DROP TABLE IF EXISTS `mechanic`; CREATE TABLE `mechanic` (
CREATE TABLE IF NOT EXISTS `mechanic` ( `id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`mechanic_id` int(11) NOT NULL, `mechanic_id` int(11) NOT NULL,
`shop_id` int(11) NOT NULL DEFAULT '0', `shop_id` int(11) NOT NULL DEFAULT '0',
`first_name` varchar(50) NOT NULL, `first_name` varchar(50) NOT NULL,
...@@ -223,19 +273,23 @@ CREATE TABLE IF NOT EXISTS `mechanic` ( ...@@ -223,19 +273,23 @@ CREATE TABLE IF NOT EXISTS `mechanic` (
`licence` varchar(500) NOT NULL, `licence` varchar(500) NOT NULL,
`licence_number` varchar(250) DEFAULT NULL, `licence_number` varchar(250) DEFAULT NULL,
`licence_exp_date` varchar(250) DEFAULT NULL, `licence_exp_date` varchar(250) DEFAULT NULL,
`location` varchar(250) DEFAULT NULL,
`location_lat` varchar(30) DEFAULT NULL, `location_lat` varchar(30) DEFAULT NULL,
`location_lng` varchar(30) DEFAULT NULL, `location_lng` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`) `start_time` varchar(250) DEFAULT NULL,
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; `end_time` varchar(250) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic` -- Dumping data for table `mechanic`
-- --
INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name`, `email_id`, `phone`, `address`, `city`, `state`, `licence`, `licence_number`, `licence_exp_date`, `location_lat`, `location_lng`) VALUES INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name`, `email_id`, `phone`, `address`, `city`, `state`, `licence`, `licence_number`, `licence_exp_date`, `location`, `location_lat`, `location_lng`, `start_time`, `end_time`) VALUES
(1, 2, 0, 'Tobin', 'Thomas', '[email protected]', '9995559194', 'Techware Software Solution', 'Ernakulam', 'Kerala', 'assets/uploads/services/1544088274_1523012036_hj.jpg', '', '', NULL, NULL), (1, 2, 0, 'Tobin', 'Thomas', '[email protected]', '9995559194', 'Techware Software Solution', 'Ernakulam', 'Kerala', 'assets/uploads/services/1546929651_1523012036_hj.jpg', 'LI000515456', '01/29/2019', 'FL, USA', '27.6648274', '-81.5157535', '10:00', '17:00'),
(5, 11, 0, 'kjo', 'kjo', '[email protected]', '34653456344456', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091718_sniper.jpg', 'dfrgdersgt', '12/13/2018', NULL, NULL), (5, 11, 0, 'kjo', 'kjo', '[email protected]', '34653456344456', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091718_sniper.jpg', 'dfrgdersgt', '12/13/2018', 'Fort Lauderdale, FL, USA', '26.1224386', '-80.1373174', '06:30', '13:55'),
(6, 12, 0, 'Driver', 'john', '[email protected]', '9995551234', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091568_1523012036_hj.jpg', 'LI00051545', '12/25/2018', NULL, NULL); (6, 12, 0, 'Driver', 'john', '[email protected]', '9995551234', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1544091568_1523012036_hj.jpg', 'LI00051545', '12/25/2018', NULL, NULL, NULL, NULL, NULL),
(7, 13, 1, 'Jensa', 'Jose', '[email protected]', '9995559856', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546851554_1523012036_hj.jpg', 'LI0005154', '01/30/2019', 'Grand Rapids, MI, USA', '42.9633599', '-85.6680863', NULL, NULL),
(8, 14, 0, 'Tobin', 'Thomas', '[email protected]', '9934534594', 'Techware', 'Aiea', 'Hawaii', 'assets/uploads/services/1546929755_1523012036_hj1.jpg', 'LI000515456', '01/29/2019', 'J K O\'Donnell\'s, West Wayne Street, Fort Wayne, IN, USA', '41.0780191', '-85.1402719', '10:00', '17:00');
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -243,17 +297,15 @@ INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name ...@@ -243,17 +297,15 @@ INSERT INTO `mechanic` (`id`, `mechanic_id`, `shop_id`, `first_name`, `last_name
-- Table structure for table `mechanic_issues` -- Table structure for table `mechanic_issues`
-- --
DROP TABLE IF EXISTS `mechanic_issues`; CREATE TABLE `mechanic_issues` (
CREATE TABLE IF NOT EXISTS `mechanic_issues` ( `id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`issue_id` int(11) DEFAULT NULL, `issue_id` int(11) DEFAULT NULL,
`issue_cat_id` int(11) DEFAULT NULL, `issue_cat_id` int(11) DEFAULT NULL,
`mechanic_id` int(11) DEFAULT NULL, `mechanic_id` int(11) DEFAULT NULL,
`custom_description` longtext, `custom_description` longtext,
`custom_service_fee` double NOT NULL DEFAULT '0', `custom_service_fee` double NOT NULL DEFAULT '0',
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic_issues` -- Dumping data for table `mechanic_issues`
...@@ -264,8 +316,8 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `issue_cat_id`, `mechanic_id`, ...@@ -264,8 +316,8 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `issue_cat_id`, `mechanic_id`,
(21, 11, NULL, 2, NULL, 0, 2), (21, 11, NULL, 2, NULL, 0, 2),
(22, 11, NULL, 2, NULL, 0, 2), (22, 11, NULL, 2, NULL, 0, 2),
(23, 10, NULL, 2, NULL, 0, 2), (23, 10, NULL, 2, NULL, 0, 2),
(24, 11, 7, 2, '!@#$%^ N Oil Change and general service with free water service. Oil Change and general service with free water service. Oil Change and general service with free water service. ', 400, 2), (24, 11, 7, 13, '!@#$%^ N Oil Change and general service with free water service. Oil Change and general service with free water service. Oil Change and general service with free water service. ', 400, 1),
(25, 11, 8, 2, '!@#$%^ N Oil Top Up and general service with free water service. ', 400, 2), (25, 11, 8, 13, '!@#$%^ N Oil Top Up and general service with free water service. ', 400, 1),
(26, 11, NULL, 2, NULL, 0, 1); (26, 11, NULL, 2, NULL, 0, 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -274,16 +326,14 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `issue_cat_id`, `mechanic_id`, ...@@ -274,16 +326,14 @@ INSERT INTO `mechanic_issues` (`id`, `issue_id`, `issue_cat_id`, `mechanic_id`,
-- Table structure for table `mechanic_shop` -- Table structure for table `mechanic_shop`
-- --
DROP TABLE IF EXISTS `mechanic_shop`; CREATE TABLE `mechanic_shop` (
CREATE TABLE IF NOT EXISTS `mechanic_shop` ( `shop_id` int(11) NOT NULL,
`shop_id` int(11) NOT NULL AUTO_INCREMENT,
`shop_name` varchar(250) NOT NULL, `shop_name` varchar(250) NOT NULL,
`address` varchar(500) NOT NULL, `address` varchar(500) NOT NULL,
`phone` varchar(15) NOT NULL, `phone` varchar(15) NOT NULL,
`email_id` varchar(150) NOT NULL, `email_id` varchar(150) NOT NULL,
`status` tinyint(3) NOT NULL DEFAULT '1', `status` tinyint(3) NOT NULL DEFAULT '1'
PRIMARY KEY (`shop_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `mechanic_shop` -- Dumping data for table `mechanic_shop`
...@@ -299,9 +349,8 @@ INSERT INTO `mechanic_shop` (`shop_id`, `shop_name`, `address`, `phone`, `email_ ...@@ -299,9 +349,8 @@ INSERT INTO `mechanic_shop` (`shop_id`, `shop_name`, `address`, `phone`, `email_
-- Table structure for table `setting` -- Table structure for table `setting`
-- --
DROP TABLE IF EXISTS `setting`; CREATE TABLE `setting` (
CREATE TABLE IF NOT EXISTS `setting` ( `id` int(11) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(250) NOT NULL, `title` varchar(250) NOT NULL,
`title_short` varchar(250) NOT NULL, `title_short` varchar(250) NOT NULL,
`site_logo` varchar(150) NOT NULL, `site_logo` varchar(150) NOT NULL,
...@@ -313,9 +362,8 @@ CREATE TABLE IF NOT EXISTS `setting` ( ...@@ -313,9 +362,8 @@ CREATE TABLE IF NOT EXISTS `setting` (
`smtp_password` varchar(150) NOT NULL, `smtp_password` varchar(150) NOT NULL,
`google_api_key` varchar(500) DEFAULT NULL, `google_api_key` varchar(500) DEFAULT NULL,
`vin_audit_url` varchar(500) DEFAULT NULL, `vin_audit_url` varchar(500) DEFAULT NULL,
`vin_audit_api` varchar(500) DEFAULT NULL, `vin_audit_api` varchar(500) DEFAULT NULL
PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
-- --
-- Dumping data for table `setting` -- Dumping data for table `setting`
...@@ -323,6 +371,146 @@ CREATE TABLE IF NOT EXISTS `setting` ( ...@@ -323,6 +371,146 @@ CREATE TABLE IF NOT EXISTS `setting` (
INSERT INTO `setting` (`id`, `title`, `title_short`, `site_logo`, `fav_icon`, `country_flag`, `currency`, `smtp_host`, `smtp_username`, `smtp_password`, `google_api_key`, `vin_audit_url`, `vin_audit_api`) VALUES INSERT INTO `setting` (`id`, `title`, `title_short`, `site_logo`, `fav_icon`, `country_flag`, `currency`, `smtp_host`, `smtp_username`, `smtp_password`, `google_api_key`, `vin_audit_url`, `vin_audit_api`) VALUES
(1, 'd-Car Fixers', 'd-CarFixers', 'assets/uploads/services/1539680946_1523012036_hj.jpg', 'assets/uploads/services/1539680946_1523540473_guenstig_reifen.png', 'US', 'USD', '[email protected]', 'AIzaSyC9JX3BZZfx2S6GQieC_PqjuJdUbZ7_wyM1', 'Golden_1234', 'AIzaSyCcc-YDSJyDpehNE6qfntfWpEQ4uS4aq6A', 'https://specifications.vinaudit.com/getspecifications.php', 'VA_DEMO_KEY'); (1, 'd-Car Fixers', 'd-CarFixers', 'assets/uploads/services/1539680946_1523012036_hj.jpg', 'assets/uploads/services/1539680946_1523540473_guenstig_reifen.png', 'US', 'USD', '[email protected]', 'AIzaSyC9JX3BZZfx2S6GQieC_PqjuJdUbZ7_wyM1', 'Golden_1234', 'AIzaSyCcc-YDSJyDpehNE6qfntfWpEQ4uS4aq6A', 'https://specifications.vinaudit.com/getspecifications.php', 'VA_DEMO_KEY');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admin_users`
--
ALTER TABLE `admin_users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
ADD PRIMARY KEY (`booking_id`);
--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
ADD PRIMARY KEY (`customer_id`);
--
-- Indexes for table `customer_vehicle`
--
ALTER TABLE `customer_vehicle`
ADD PRIMARY KEY (`customer_veh_id`);
--
-- Indexes for table `forgot_password_link`
--
ALTER TABLE `forgot_password_link`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `issues`
--
ALTER TABLE `issues`
ADD PRIMARY KEY (`issue_id`);
--
-- Indexes for table `issues_category`
--
ALTER TABLE `issues_category`
ADD PRIMARY KEY (`issue_cat_id`);
--
-- Indexes for table `mechanic`
--
ALTER TABLE `mechanic`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mechanic_issues`
--
ALTER TABLE `mechanic_issues`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `mechanic_shop`
--
ALTER TABLE `mechanic_shop`
ADD PRIMARY KEY (`shop_id`);
--
-- Indexes for table `setting`
--
ALTER TABLE `setting`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admin_users`
--
ALTER TABLE `admin_users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
MODIFY `booking_id` int(13) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
MODIFY `customer_id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `customer_vehicle`
--
ALTER TABLE `customer_vehicle`
MODIFY `customer_veh_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;
--
-- AUTO_INCREMENT for table `forgot_password_link`
--
ALTER TABLE `forgot_password_link`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `issues`
--
ALTER TABLE `issues`
MODIFY `issue_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- AUTO_INCREMENT for table `issues_category`
--
ALTER TABLE `issues_category`
MODIFY `issue_cat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `mechanic`
--
ALTER TABLE `mechanic`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `mechanic_issues`
--
ALTER TABLE `mechanic_issues`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
--
-- AUTO_INCREMENT for table `mechanic_shop`
--
ALTER TABLE `mechanic_shop`
MODIFY `shop_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `setting`
--
ALTER TABLE `setting`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT; COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment