Merge branch 'ajil' into 'master'
Ajil
See merge request !4
Showing
... | ... | @@ -3,16 +3,242 @@ defined('BASEPATH') OR exit('No direct script access allowed'); |
class Customer extends CI_Controller { | ||
public function index() | ||
{ | ||
$data['page'] = 'customer/list'; | ||
$data['datatable'] = 1; | ||
$this->load->view('template', $data); | ||
public function __construct() { | ||
parent::__construct(); | ||
date_default_timezone_set("Asia/Kolkata"); | ||
$this->load->model('Customer_model'); | ||
if(!$this->session->userdata('logged_in')) { | ||
redirect(base_url()); | ||
} | ||
else { | ||
$menu = $this->session->userdata('admin'); | ||
if( $menu!=1 ) { | ||
$this->session->set_flashdata('message', array('message' => "You don't have permission to access testimonials page.",'class' => 'danger')); | ||
redirect(base_url().'dashboard'); | ||
} | ||
} | ||
} | ||
public function create(){ | ||
$template['page'] = 'Customer/create'; | ||
$template['menu'] = 'Customer Management'; | ||
$template['smenu'] = 'Add Customer'; | ||
$template['pTitle'] = "Add Customer"; | ||
$template['pDescription'] = "Create New Customer"; | ||
$this->load->view('template',$template); | ||
} | ||
public function index(){ | ||
$template['page'] = 'Customer/list'; | ||
$template['menu'] = 'Customer Management'; | ||
$template['smenu'] = 'View Customers'; | ||
$template['pTitle'] = "View Customers"; | ||
$template['pDescription'] = "View and Manage Customers"; | ||
$template['page_head'] = "Customer Management"; | ||
$template['datatable'] = 1; | ||
$template['customer_data'] = $this->Customer_model->getCustomerData(); | ||
$this->load->view('template',$template); | ||
} | ||
public function getCustomerData(){ | ||
$resArr = array('status'=>0); | ||
if(!isset($_POST)||empty($_POST)||!isset($_POST['customer_id'])||empty($_POST['customer_id']) || | ||
!is_numeric($customer_id = decode_param($_POST['customer_id']))){ | ||
echo json_encode($resArr);exit; | ||
} | ||
$view_all = (isset($_POST['view_all']) && $_POST['view_all'] == 1)?1:0; | ||
$mechData = $this->Customer_model->getCustomerData($customer_id,$view_all); | ||
if(empty($mechData)){ | ||
echo json_encode($resArr);exit; | ||
} | ||
$resArr['status'] = 1; | ||
$resArr['data'] = $mechData; | ||
echo json_encode($resArr);exit; | ||
} | ||
function changeStatus($customer_id = '',$status = '1'){ | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(empty($customer_id) || !is_numeric($customer_id = decode_param($customer_id))){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/viewCustomers')); | ||
} | ||
$status = $this->Customer_model->changeStatus($customer_id,$status); | ||
if(!$status){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
} | ||
redirect(base_url('Customer')); | ||
} | ||
public function createCustomer(){ | ||
//echo json_encode($_POST);exit; | ||
$err = 0; | ||
$errMsg = ''; | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/addCustomer')); | ||
} | ||
if($err == 0 && (!isset($_POST['name']) || empty($_POST['name']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Customer Name'; | ||
}else if($err == 0 && (!isset($_POST['email']) || empty($_POST['email']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Customer Email'; | ||
}else if($err == 0 && (!isset($_POST['phone']) || empty($_POST['phone']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Customer Phone'; | ||
}else if($err == 0 && (!isset($_POST['dob']) || empty($_POST['dob']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Date Of Birth'; | ||
} | ||
if($err == 0){ | ||
$config = set_upload_service("uploads/customer"); | ||
$this->load->library('upload'); | ||
$config['file_name'] = time()."_".$_FILES['profile_image']['name']; | ||
$this->upload->initialize($config); | ||
if(!$this->upload->do_upload('profile_image')){ | ||
$err = 1; | ||
$errMsg = $this->upload->display_errors(); | ||
}else{ | ||
$upload_data = $this->upload->data(); | ||
$_POST['profile_image'] = $config['upload_path']."/".$upload_data['file_name']; | ||
} | ||
} | ||
public function create() | ||
{ | ||
$data['page'] = 'customer/create'; | ||
$this->load->view('template', $data); | ||
if($err == 1){ | ||
$flashMsg['message'] = $errMsg; | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/addCustomer')); | ||
} | ||
$temp_password = rand(10000000, 99999999); | ||
$_POST['password'] = md5($temp_password); | ||
$status = $this->Customer_model->addCustomer($_POST); | ||
if($status == 1){ | ||
$to =$_POST['email']; | ||
$sender_email = "[email protected]"; | ||
$data['ckrpassword']=$temp_password; | ||
$mail_head = "Your Access Account is now activated"; | ||
$mail_status = send_custom_email($sender_email,$mail_head,$to,'Checker Login', $this->load->view('template/mail_template/checker_login', $data,TRUE),''); | ||
$flashMsg =array('message'=>'Successfully Created User Details..!','class'=>'success'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer')); | ||
} else if($status == 2){ | ||
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/create')); | ||
} else if($status == 3){ | ||
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/create')); | ||
} else if($status == 4){ | ||
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/create')); | ||
} else { | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/create')); | ||
} | ||
} | ||
public function editCustomers($customer_id){ | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(empty($customer_id) || !is_numeric($customer_id = decode_param($customer_id))){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/viewCustomers')); | ||
} | ||
$template['page'] = 'Customer/create'; | ||
$template['menu'] = 'Customer Management'; | ||
$template['smenu'] = 'Edit Customer'; | ||
$template['pTitle'] = "Edit Customers"; | ||
$template['pDescription'] = "Update Customer Data"; | ||
$template['customer_data'] = $this->Customer_model->getCustomerData($customer_id,1); | ||
$template['customer_id'] = encode_param($customer_id); | ||
$this->load->view('template',$template); | ||
} | ||
public function updateCustomer($customer_id = ''){ | ||
//echo json_encode(decode_param($customer_id));exit; | ||
$err = 0; | ||
$errMsg = ''; | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/addCustomer')); | ||
} | ||
if($err == 0 && (!isset($_POST['name']) || empty($_POST['name']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Customer Name'; | ||
}else if($err == 0 && (!isset($_POST['email']) || empty($_POST['email']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Customer Email'; | ||
}else if($err == 0 && (!isset($_POST['phone']) || empty($_POST['phone']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Customer Phone'; | ||
}else if($err == 0 && (!isset($_POST['dob']) || empty($_POST['dob']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Date Of Birth'; | ||
} | ||
if($err == 0){ | ||
$config = set_upload_service("uploads/customer"); | ||
$this->load->library('upload'); | ||
$config['file_name'] = time()."_".$_FILES['profile_image']['name']; | ||
$this->upload->initialize($config); | ||
if($this->upload->do_upload('profile_image')){ | ||
$upload_data = $this->upload->data(); | ||
$_POST['profile_image'] = $config['upload_path']."/".$upload_data['file_name']; | ||
} | ||
} | ||
if($err == 1){ | ||
$flashMsg['message'] = $errMsg; | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/editCustomers/'.$customer_id)); | ||
} | ||
$status = $this->Customer_model->updateCustomer(decode_param($customer_id),$_POST); | ||
if($status == 1){ | ||
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer')); | ||
} else if($status == 2){ | ||
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/edit/'.$customer_id)); | ||
} else if($status == 3){ | ||
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/edit/'.$customer_id)); | ||
} else if($status == 4){ | ||
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/edit/'.$customer_id)); | ||
} else { | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Customer/edit/'.$customer_id)); | ||
} | ||
} | ||
} | ||
?> | ||
\ No newline at end of file |
application/controllers/Shopper.php
0 → 100644
<?php | ||
defined('BASEPATH') OR exit('No direct script access allowed'); | ||
class Shopper extends CI_Controller { | ||
public function __construct() { | ||
parent::__construct(); | ||
date_default_timezone_set("Asia/Kolkata"); | ||
$this->load->model('Shopper_model'); | ||
if(!$this->session->userdata('logged_in')) { | ||
redirect(base_url()); | ||
} | ||
else { | ||
$menu = $this->session->userdata('admin'); | ||
if( $menu!=1 ) { | ||
$this->session->set_flashdata('message', array('message' => "You don't have permission to access testimonials page.",'class' => 'danger')); | ||
redirect(base_url().'dashboard'); | ||
} | ||
} | ||
} | ||
public function create(){ | ||
$template['page'] = 'Shopper/create'; | ||
$template['menu'] = 'Shopper Management'; | ||
$template['smenu'] = 'Add Shopper'; | ||
$template['pTitle'] = "Add Shopper"; | ||
$template['pDescription'] = "Create New Shopper"; | ||
$this->load->view('template',$template); | ||
} | ||
public function index(){ | ||
$template['page'] = 'Shopper/list'; | ||
$template['menu'] = 'Shopper Management'; | ||
$template['smenu'] = 'View Shopper'; | ||
$template['pTitle'] = "View Shopper"; | ||
$template['pDescription'] = "View and Manage Shopper"; | ||
$template['page_head'] = "Shopper Management"; | ||
$template['shopper_data'] = $this->Shopper_model->getShopperData(); | ||
//echo json_encode($template);exit; | ||
$this->load->view('template',$template); | ||
} | ||
public function getShopperData(){ | ||
$resArr = array('status'=>0); | ||
if(!isset($_POST)||empty($_POST)||!isset($_POST['shopper_id'])||empty($_POST['shopper_id']) || | ||
!is_numeric($customer_id = decode_param($_POST['shopper_id']))){ | ||
echo json_encode($resArr);exit; | ||
} | ||
$view_all = (isset($_POST['view_all']) && $_POST['view_all'] == 1)?1:0; | ||
$mechData = $this->Shopper_model->getShopperData($customer_id,$view_all); | ||
if(empty($mechData)){ | ||
echo json_encode($resArr);exit; | ||
} | ||
$resArr['status'] = 1; | ||
$resArr['data'] = $mechData; | ||
echo json_encode($resArr);exit; | ||
} | ||
function changeStatus($shopper_id = '',$status = '1'){ | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Shopper/viewShopper')); | ||
} | ||
$status = $this->Shopper_model->changeStatus($shopper_id,$status); | ||
if(!$status){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
} | ||
redirect(base_url('Shopper')); | ||
} | ||
public function createShopper(){ | ||
//echo json_encode($_POST);exit; | ||
$err = 0; | ||
$errMsg = ''; | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Shopper/addShopper')); | ||
} | ||
if($err == 0 && (!isset($_POST['name']) || empty($_POST['name']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Name'; | ||
}else if($err == 0 && (!isset($_POST['email']) || empty($_POST['email']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Email'; | ||
}else if($err == 0 && (!isset($_POST['phone']) || empty($_POST['phone']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Phone'; | ||
}else if($err == 0 && (!isset($_POST['dob']) || empty($_POST['dob']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Date Of Birth'; | ||
} | ||
if($err == 0){ | ||
$config = set_upload_service("uploads/shopper"); | ||
$this->load->library('upload'); | ||
$config['file_name'] = time()."_".$_FILES['profile_image']['name']; | ||
$this->upload->initialize($config); | ||
if(!$this->upload->do_upload('profile_image')){ | ||
$err = 1; | ||
$errMsg = $this->upload->display_errors(); | ||
}else{ | ||
$upload_data = $this->upload->data(); | ||
$_POST['profile_image'] = $config['upload_path']."/".$upload_data['file_name']; | ||
} | ||
} | ||
if($err == 1){ | ||
$flashMsg['message'] = $errMsg; | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Shopper/addShopper')); | ||
} | ||
$temp_password = rand(10000000, 99999999); | ||
$_POST['password'] = md5($temp_password); | ||
$status = $this->Shopper_model->addShopper($_POST); | ||
if($status == 1){ | ||
$to =$_POST['email']; | ||
$sender_email = "[email protected]"; | ||
$data['ckrpassword']=$temp_password; | ||
$mail_head = "Your Access Account is now activated"; | ||
$mail_status = send_custom_email($sender_email,$mail_head,$to,'Checker Login', $this->load->view('template/mail_template/checker_login', $data,TRUE),''); | ||
$flashMsg =array('message'=>'Successfully Created User Details..!','class'=>'success'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper')); | ||
} else if($status == 2){ | ||
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/create')); | ||
} else if($status == 3){ | ||
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/create')); | ||
} else if($status == 4){ | ||
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/create')); | ||
} else { | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/create')); | ||
} | ||
} | ||
public function editShopper($shopper_id){ | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Customer/viewCustomers')); | ||
} | ||
$template['page'] = 'Shopper/create'; | ||
$template['menu'] = 'Shopper Management'; | ||
$template['smenu'] = 'Edit Shopper'; | ||
$template['pTitle'] = "Edit Shopper"; | ||
$template['pDescription'] = "Update Shopper Data"; | ||
$template['shopper_data'] = $this->Shopper_model->getShopperData($shopper_id,1); | ||
$template['shopper_id'] = encode_param($shopper_id); | ||
$this->load->view('template',$template); | ||
} | ||
public function updateShopper($shopper_id = ''){ | ||
//echo json_encode(decode_param($customer_id));exit; | ||
$err = 0; | ||
$errMsg = ''; | ||
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger'); | ||
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Shopper/addShopper')); | ||
} | ||
if($err == 0 && (!isset($_POST['name']) || empty($_POST['name']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Name'; | ||
}else if($err == 0 && (!isset($_POST['email']) || empty($_POST['email']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Email'; | ||
}else if($err == 0 && (!isset($_POST['phone']) || empty($_POST['phone']))){ | ||
$err = 1; | ||
$errMsg = 'Provide Shopper Phone'; | ||
}else if($err == 0 && (!isset($_POST['dob']) || empty($_POST['dob']))){ | ||
$err = 1; | ||
$errMsg = 'Provide a Date Of Birth'; | ||
} | ||
if($err == 0){ | ||
$config = set_upload_service("uploads/shopper"); | ||
$this->load->library('upload'); | ||
$config['file_name'] = time()."_".$_FILES['profile_image']['name']; | ||
$this->upload->initialize($config); | ||
if($this->upload->do_upload('profile_image')){ | ||
$upload_data = $this->upload->data(); | ||
$_POST['profile_image'] = $config['upload_path']."/".$upload_data['file_name']; | ||
} | ||
} | ||
if($err == 1){ | ||
$flashMsg['message'] = $errMsg; | ||
$this->session->set_flashdata('message',$flashMsg); | ||
redirect(base_url('Shopper/editShopper/'.$customer_id)); | ||
} | ||
$status = $this->Shopper_model->updateShopper(decode_param($customer_id),$_POST); | ||
if($status == 1){ | ||
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper')); | ||
} else if($status == 2){ | ||
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/edit/'.$shopper_id)); | ||
} else if($status == 3){ | ||
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/edit/'.$shopper_id)); | ||
} else if($status == 4){ | ||
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger'); | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/edit/'.$customer_id)); | ||
} else { | ||
$this->session->set_flashdata('message', $flashMsg); | ||
redirect(base_url('Shopper/edit/'.$customer_id)); | ||
} | ||
} | ||
} | ||
?> | ||
\ No newline at end of file |
... | ... | @@ -33,4 +33,57 @@ function encode_param($param = ''){ |
} | ||
function send_custom_email($from, $mail_head, $to, $subject, $email_message) | ||
{ | ||
// $headers = "Organization: The 303\r\n"; | ||
// $headers .= "MIME-Version: 1.0\r\n"; | ||
// $headers .= "X-Mailer: PHP". phpversion() ."\r\n" ; | ||
// $headers .= "Reply-To: The3O3 <'.$from.'>\r\n"; | ||
// $headers .= 'From: The3O3 <'.$from.'>' . "\r\n"; | ||
// $headers .= "Content-Type: text/html; charset=UTF-8\r\n"; | ||
// $headers .= "X-Priority: 1\r\n"; | ||
// if (mail($to, $subject, $email_message, $headers)) { | ||
// return TRUE; | ||
// }else{ | ||
// return FALSE; | ||
// } | ||
$ci =& get_instance(); | ||
$ci->load->database(); | ||
$ci->load->library('email'); | ||
$config['protocol'] = "smtp"; | ||
$config['smtp_host'] = "smtp.sendgrid.net"; | ||
$config['smtp_port'] = "587"; | ||
$config['smtp_user'] = '[email protected]'; | ||
$config['smtp_pass'] = 'Golden_123'; | ||
$config['charset'] = "utf-8"; | ||
$config['mailtype'] = "html"; | ||
$config['newline'] = "\r\n"; | ||
$ci->email->initialize($config); | ||
$ci->email->from($from, $mail_head); | ||
$ci->email->to($to); | ||
$ci->email->reply_to('[email protected]'); | ||
$ci->email->subject($subject); | ||
$ci->email->message($email_message); | ||
$send = $ci->email->send(); | ||
if($send == TRUE) | ||
{ | ||
return TRUE; | ||
} else{ | ||
return FALSE; | ||
} | ||
} | ||
function getSettings(){ | ||
$CI = & get_instance(); | ||
$settings = $CI->db->get('settings'); | ||
return (!empty($settings))?$settings->row_array():''; | ||
} | ||
?> | ||
\ No newline at end of file |
application/models/Customer_model.php
0 → 100644
application/models/Shopper_model.php
0 → 100644
application/views/Shopper/list.php
0 → 100644
... | ... | @@ -17,6 +17,8 @@ |
<link rel="stylesheet" href="<?php echo base_url('assets/css/style.css'); ?>"> | ||
<link rel="stylesheet" href="<?php echo base_url('assets/css/lib/datatable/dataTables.bootstrap.min.css'); ?>"> | ||
<link href="<?php echo base_url();?>assets/css/parsley/parsley.css" rel="stylesheet"> | ||
<script src="<?php echo base_url('assets/js/jquery.min.js'); ?>"></script> | ||
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> --> | ||
<!--link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/chartist.min.css" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/jqvmap.min.css" rel="stylesheet"> | ||
... | ... |
assets/images/no_image.png
0 → 100644
5.89 KB
assets/images/user_avatar.jpg
0 → 100644
3.28 KB
assets/js/custom-script.js
0 → 100644
... | ... | @@ -3,7 +3,7 @@ |
-- https://www.phpmyadmin.net/ | ||
-- | ||
-- Host: 127.0.0.1 | ||
-- Generation Time: Apr 10, 2019 at 07:27 AM | ||
-- Generation Time: Apr 12, 2019 at 09:33 AM | ||
-- Server version: 10.1.38-MariaDB | ||
-- PHP Version: 7.1.27 | ||
... | ... | @@ -19,7 +19,7 @@ SET time_zone = "+00:00"; |
/*!40101 SET NAMES utf8mb4 */; | ||
-- | ||
-- Database: `access` | ||
-- Database: `adarsh_access` | ||
-- | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -34,14 +34,14 @@ CREATE TABLE `admin` ( |
`username` varchar(50) DEFAULT NULL, | ||
`password` varchar(255) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `admin` | ||
-- | ||
INSERT INTO `admin` (`id`, `role`, `username`, `password`, `status`) VALUES | ||
(1, 1, 'admin@gmail.com', '21232f297a57a5a743894a0e4a801fc3', 1); | ||
(1, 1, 'admin', '21232f297a57a5a743894a0e4a801fc3', 1); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -66,7 +66,7 @@ CREATE TABLE `booking` ( |
`delivery_time` date DEFAULT NULL, | ||
`track_status` varchar(50) DEFAULT NULL COMMENT 'Shipping Track Status', | ||
`status` int(11) DEFAULT '1' COMMENT '0=>Cancelled, 1=>Booked, 2=>Processing, 3=>Completed' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -76,20 +76,20 @@ CREATE TABLE `booking` ( |
CREATE TABLE `brand` ( | ||
`id` int(11) NOT NULL, | ||
`brand_image` varchar(444) NOT NULL, | ||
`brand_name` varchar(50) DEFAULT NULL, | ||
`brand_name_arab` varchar(50) DEFAULT NULL, | ||
`brand_image` varchar(150) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=> Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `brand` | ||
-- | ||
INSERT INTO `brand` (`id`, `brand_image`, `brand_name`, `status`) VALUES | ||
(1, './uploads/brand/1554720705green4.png', 'aa', 0), | ||
(7, './uploads/brand/1554716795blue2.jpg', 'PUMA', 1), | ||
(8, './uploads/brand/1554720626brown6.jpg', 'PUMA22', 1), | ||
(9, './uploads/brand/1554787730black5.jpg', 'aa', 0); | ||
INSERT INTO `brand` (`id`, `brand_name`, `brand_name_arab`, `brand_image`, `status`) VALUES | ||
(1, 'PUMA', '555', './uploads/brand/1554985669black5.jpg', 1), | ||
(2, 'PUMA', 'sfsfsf', './uploads/brand/1554985836blue2.jpg', 1), | ||
(3, 'vvv', 'bbbb', './uploads/brand/1555050576green4.png', 1); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -104,7 +104,7 @@ CREATE TABLE `cart` ( |
`prod_id` int(11) NOT NULL, | ||
`qty` int(11) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -115,18 +115,21 @@ CREATE TABLE `cart` ( |
CREATE TABLE `category` ( | ||
`id` int(11) NOT NULL, | ||
`cat_name` varchar(50) DEFAULT NULL, | ||
`cat_name_arab` varchar(50) DEFAULT NULL, | ||
`cat_image` varchar(255) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `category` | ||
-- | ||
INSERT INTO `category` (`id`, `cat_name`, `cat_image`, `status`) VALUES | ||
(7, 'PUMA1', './uploads/category1554449751green4.png', 0), | ||
(9, 'bb3412', './uploads/category/1554452377benzz.jpg', 1), | ||
(10, 'gh', './uploads/category/1554803570blue2.jpg', 0); | ||
INSERT INTO `category` (`id`, `cat_name`, `cat_name_arab`, `cat_image`, `status`) VALUES | ||
(1, 'Mobile', '', '/assets/upload/mobile.png', 0), | ||
(2, 'Fridge', 'rr', './uploads/category/1554983236blue2.jpg', 1), | ||
(3, 'cat11', 'catarb', './uploads/category/1554983100black5.jpg', 1), | ||
(4, 'test', 'catarb', './uploads/category/1555050316black5.jpg', 1), | ||
(5, 'rrrrrrrrrr', 'rrrrrrrrrrrr', './uploads/category/1555050383black5.jpg', 1); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -136,11 +139,20 @@ INSERT INTO `category` (`id`, `cat_name`, `cat_image`, `status`) VALUES |
CREATE TABLE `currency` ( | ||
`id` int(11) NOT NULL, | ||
`curr_name` varchar(50) DEFAULT NULL, | ||
`country_name` varchar(50) DEFAULT NULL, | ||
`symbol` varchar(5) DEFAULT NULL, | ||
`rate` double DEFAULT NULL COMMENT 'Rate Converted into SAR (1 USD = 3.75 SAR) ', | ||
`code` varchar(5) NOT NULL, | ||
`flag` varchar(100) NOT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 2=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `currency` | ||
-- | ||
INSERT INTO `currency` (`id`, `country_name`, `symbol`, `rate`, `code`, `flag`, `status`) VALUES | ||
(1, 'India', '₹', 0.054, '+91', '/assets/uploads/india.png', 1); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -150,17 +162,48 @@ CREATE TABLE `currency` ( |
CREATE TABLE `customer` ( | ||
`id` int(11) NOT NULL, | ||
`users_id` int(11) NOT NULL, | ||
`user_type` int(11) NOT NULL DEFAULT '1', | ||
`name` varchar(45) DEFAULT NULL, | ||
`name_arab` varchar(55) DEFAULT NULL, | ||
`email_id` varchar(50) DEFAULT NULL, | ||
`code` varchar(10) NOT NULL, | ||
`phone_no` varchar(15) DEFAULT NULL, | ||
`dob` varchar(25) DEFAULT NULL, | ||
`address` varchar(255) DEFAULT NULL, | ||
`address_arab` varchar(250) DEFAULT NULL, | ||
`profile_photo` varchar(255) DEFAULT NULL, | ||
`assist_name` varchar(45) DEFAULT NULL, | ||
`assist_name_arab` varchar(250) DEFAULT NULL, | ||
`assist_code` varchar(10) NOT NULL, | ||
`assist_phone_no` varchar(25) DEFAULT NULL, | ||
`assist_email_id` varchar(50) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `customer` | ||
-- | ||
INSERT INTO `customer` (`id`, `user_type`, `name`, `name_arab`, `email_id`, `code`, `phone_no`, `dob`, `address`, `address_arab`, `profile_photo`, `assist_name`, `assist_name_arab`, `assist_code`, `assist_phone_no`, `assist_email_id`) VALUES | ||
(1, 1, 'Customer', 'fgfgfg', '[email protected]', '343', '9400882745', '31-07-1990', 'Nuvento Kochi', '[email protected]', '/assets/images/admin.jpg', 'Nuvento Support', 'sdgdg', '44', '354754754', '[email protected]'), | ||
(2, 1, 'Martin', NULL, '[email protected]', '', '7209638547', '30/09/2000', 'Nuvento Kochi', NULL, NULL, 'Support', NULL, '', '7777777777', '[email protected]'), | ||
(3, 1, 'Martin', NULL, '[email protected]', '', '7209638577', '30/09/2000', 'Nuvento Kochi', NULL, NULL, 'Support', NULL, '', '7777777888', '[email protected]'), | ||
(5, 1, 'Martin', NULL, '[email protected]', '+91', '7209638333', '30/09/2000', 'Nuvento Kochi', NULL, NULL, 'Support', NULL, '+91', '7777777777', '[email protected]'), | ||
(6, 1, 'royraju', 'arabicroy', '[email protected]', '91', '64544455454', '44/77/7777', 'sdgfdhfdhf', 'adsfsfs', 'uploads/customer/1555041833_driver_car.jpg', 'sdgdgdgd', 'sfsfssssssss', '44', '454657575', '[email protected]'), | ||
(7, 1, 'hhh', 'ffffffff', '[email protected]', '91', '45446464', '44/77/7777', 'dfhdfhf', 'fhfhf', 'uploads/customer/1555042169_blue2.jpg', 'fff', 'hhh', '65', '345464646', '[email protected]'), | ||
(8, 1, 'agr', 'grr', '[email protected]', '91', '13646436', '44/77/7777', 'dsfhfhdf', 'fdghgg', 'uploads/customer/1555042456_red1.jpeg', 'sdgsdg', 'gggggggggggg', '546575', '65768658', '[email protected]'), | ||
(9, 1, 'dfdd', 'truckdvrtx', '[email protected]', '9999999999', '9999999999', '44/77/7777', 'info', 'dfdfd', 'uploads/customer/1555045046_blue2.jpg', 'dfdf', 'dfdf', '66', '4646464', '[email protected]'), | ||
(10, 1, 'ajil', 'ajilarb', '[email protected]', '9999999999', '91', '44/77/7777', 'info', 'sdgds', 'uploads/customer/1555052661_benzz.jpg', 'assssssss', 'ghghg', '3456789876', '2222222224', '[email protected]'); | ||
-- | ||
-- Triggers `customer` | ||
-- | ||
DELIMITER $$ | ||
CREATE TRIGGER `customer_AFTER_INSERT` AFTER INSERT ON `customer` FOR EACH ROW BEGIN | ||
INSERT INTO users (user_id, user_type,username) | ||
Values (NEW.id, 1,NEW.email_id); | ||
END | ||
$$ | ||
DELIMITER ; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -181,7 +224,7 @@ CREATE TABLE `customer_address` ( |
`state` varchar(50) DEFAULT NULL, | ||
`landmark` varchar(100) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -198,7 +241,7 @@ CREATE TABLE `cust_shopper_wish` ( |
`cost` double DEFAULT NULL, | ||
`delivery_time` varchar(50) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Request, 2=>Accept, 0=>Decline' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -211,7 +254,7 @@ CREATE TABLE `favourite` ( |
`cust_id` int(11) NOT NULL, | ||
`prod_id` int(11) NOT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -220,12 +263,8 @@ CREATE TABLE `favourite` ( |
-- | ||
CREATE TABLE `notification` ( | ||
`id` int(11) NOT NULL, | ||
`date` datetime DEFAULT NULL, | ||
`cust_id` int(11) NOT NULL, | ||
`message` text, | ||
`status` int(11) DEFAULT '1' COMMENT '1=> Active, 0=>Inactive' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
`id` int(11) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -245,7 +284,7 @@ CREATE TABLE `order_address` ( |
`city` varchar(50) DEFAULT NULL, | ||
`state` varchar(50) DEFAULT NULL, | ||
`landmark` varchar(100) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -268,7 +307,7 @@ CREATE TABLE `products` ( |
`qty` int(11) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted', | ||
`wish_flag` int(11) DEFAULT '0' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -282,7 +321,7 @@ CREATE TABLE `prod_galley` ( |
`media_url` varchar(100) DEFAULT NULL, | ||
`media_type` int(11) DEFAULT '1' COMMENT '1=>Image, 2=> Video', | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -294,7 +333,7 @@ CREATE TABLE `recent` ( |
`id` int(11) NOT NULL, | ||
`cust_id` int(11) NOT NULL, | ||
`prod_id` int(11) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -304,28 +343,27 @@ CREATE TABLE `recent` ( |
CREATE TABLE `settings` ( | ||
`id` int(11) NOT NULL, | ||
`title` varchar(55) DEFAULT NULL, | ||
`title_short` varchar(55) DEFAULT NULL, | ||
`country_flag` varchar(55) DEFAULT NULL, | ||
`currency` varchar(55) DEFAULT NULL, | ||
`site_logo` varchar(250) DEFAULT NULL, | ||
`fav_icon` varchar(250) DEFAULT NULL, | ||
`commission` double DEFAULT NULL, | ||
`vat` double DEFAULT NULL, | ||
`smtp_host` varchar(50) DEFAULT NULL, | ||
`smtp_username` varchar(45) DEFAULT NULL, | ||
`smtp_password` varchar(100) DEFAULT NULL, | ||
`smtp_port` int(11) DEFAULT NULL, | ||
`title` varchar(150) NOT NULL, | ||
`title_short` varchar(100) NOT NULL, | ||
`site_logo` varchar(150) NOT NULL, | ||
`country_flag` varchar(100) NOT NULL, | ||
`currency` varchar(20) NOT NULL, | ||
`fav_icon` varchar(55) NOT NULL, | ||
`google_api_key` varchar(66) NOT NULL, | ||
`service_charge` varchar(55) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
`google_api_key` varchar(450) DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `settings` | ||
-- | ||
INSERT INTO `settings` (`id`, `commission`, `vat`, `smtp_host`, `smtp_username`, `smtp_password`, `smtp_port`, `title`, `title_short`, `site_logo`, `country_flag`, `currency`, `fav_icon`, `google_api_key`, `service_charge`) VALUES | ||
(1, 20, 22, 'asffsfdgf', 'smtp', '123456', 8, 'access', 'acs', 'uploads/services/1554873867_black5.jpg', 'sse', '22', 'uploads/services/1554873867_brown6.jpg', 'fsgs', '2211'); | ||
INSERT INTO `settings` (`id`, `title`, `title_short`, `country_flag`, `currency`, `site_logo`, `fav_icon`, `commission`, `vat`, `smtp_host`, `smtp_username`, `smtp_password`, `smtp_port`, `google_api_key`) VALUES | ||
(0, 'dgdg', 'gg', 'fdddddd', '$', 'uploads/services/1555051648_black5.jpg', 'uploads/services/1555051648_brown6.jpg', 55, NULL, NULL, 'gfgf', '12345', NULL, 'fgfhfhfh'); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -335,15 +373,39 @@ INSERT INTO `settings` (`id`, `commission`, `vat`, `smtp_host`, `smtp_username`, |
CREATE TABLE `shopper` ( | ||
`id` int(11) NOT NULL, | ||
`users_id` int(11) NOT NULL, | ||
`user_type` int(11) NOT NULL DEFAULT '2', | ||
`name` varchar(45) DEFAULT NULL, | ||
`name_arab` varchar(55) DEFAULT NULL, | ||
`email_id` varchar(50) DEFAULT NULL, | ||
`code` int(55) DEFAULT NULL, | ||
`phone_no` varchar(15) DEFAULT NULL, | ||
`shop_name` varchar(50) DEFAULT NULL, | ||
`shop_name_arab` varchar(55) DEFAULT NULL, | ||
`dob` varchar(25) DEFAULT NULL, | ||
`profile_photo` varchar(255) DEFAULT NULL, | ||
`commission` double DEFAULT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `shopper` | ||
-- | ||
INSERT INTO `shopper` (`id`, `user_type`, `name`, `name_arab`, `email_id`, `code`, `phone_no`, `shop_name`, `shop_name_arab`, `dob`, `profile_photo`, `commission`) VALUES | ||
(1, 2, 'Shopper', '', '[email protected]', 5, '9072127102', 'Nuvento', 'lll', '31/08/1990', '/assets/images/admin.jpg', 10), | ||
(2, 2, 'zzzzzzz', 'z', '[email protected]', 91, '5555555', 'zxc', 'zcc', '44/77/7777', 'uploads/shopper/1555045170_brown6.jpg', 4), | ||
(3, 2, 'dgdgd', 'ddg', '[email protected]', NULL, '54464646464', 'dgdgdg', 'dddd', '44/77/7777', 'uploads/shopper/1555050855_brown6.jpg', 4), | ||
(4, 2, 'bhhg', 'truckdvrtx', '[email protected]', NULL, '464757575', 'dgdg', 'hghg', '44/77/7777', 'uploads/shopper/1555052967_brown6.jpg', 0); | ||
-- | ||
-- Triggers `shopper` | ||
-- | ||
DELIMITER $$ | ||
CREATE TRIGGER `shopper_AFTER_INSERT` AFTER INSERT ON `shopper` FOR EACH ROW BEGIN | ||
INSERT INTO users (user_id, user_type, username) | ||
Values (NEW.id, 2, NEW.email_id); | ||
END | ||
$$ | ||
DELIMITER ; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -354,18 +416,22 @@ CREATE TABLE `shopper` ( |
CREATE TABLE `sub_category` ( | ||
`id` int(11) NOT NULL, | ||
`sub_cat_name` varchar(50) DEFAULT NULL, | ||
`sub_cat_name_arab` varchar(50) DEFAULT NULL, | ||
`sub_cat_image` varchar(100) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>inactive', | ||
`cat_id` int(11) NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `sub_category` | ||
-- | ||
INSERT INTO `sub_category` (`id`, `sub_cat_name`, `sub_cat_image`, `status`, `cat_id`) VALUES | ||
(2, 'ajil', './uploads/subcategory/1554811443usADWQ.jpg', 1, 7), | ||
(3, 'amal', './uploads/subcategory/1554811530green4.png', 1, 9); | ||
INSERT INTO `sub_category` (`id`, `sub_cat_name`, `sub_cat_name_arab`, `sub_cat_image`, `status`, `cat_id`) VALUES | ||
(1, 'Iphone', 'ee', './uploads/subcategory/1554984154steve-jobs.jpg', 1, 1), | ||
(2, 'Samsung', NULL, '/assets/images/samsung.png', 1, 1), | ||
(3, 'LG', NULL, '/assets/images/lg.png', 1, 2), | ||
(4, 'sct1', 'scat arb', './uploads/subcategory/1554984013red1.jpeg', 1, 3), | ||
(5, 'dddd', 'scat arb', './uploads/subcategory/1555050708black5.jpg', 1, 5); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -381,7 +447,7 @@ CREATE TABLE `transaction` ( |
`trans_id` varchar(50) DEFAULT NULL, | ||
`amount` double DEFAULT NULL, | ||
`status` int(11) DEFAULT NULL COMMENT '1=>Success, 0=>Failure' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -391,12 +457,32 @@ CREATE TABLE `transaction` ( |
CREATE TABLE `users` ( | ||
`id` int(11) NOT NULL, | ||
`user_type` int(11) DEFAULT NULL COMMENT '1=>Customer, 2=>Shopper', | ||
`user_id` int(11) DEFAULT NULL, | ||
`user_type` int(11) DEFAULT NULL COMMENT '1=>Customer, 2=>Shopper, 0=> Admin', | ||
`user_id` int(11) DEFAULT '0', | ||
`username` varchar(100) DEFAULT NULL, | ||
`password` varchar(255) DEFAULT NULL, | ||
`status` int(11) DEFAULT '0' COMMENT '1=>Active, 0=>Inactive, 2=>Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `users` | ||
-- | ||
INSERT INTO `users` (`id`, `user_type`, `user_id`, `username`, `password`, `status`) VALUES | ||
(1, 1, 1, '[email protected]', 'e10adc3949ba59abbe56e057f20f883e', 1), | ||
(2, 2, 1, '[email protected]', 'e10adc3949ba59abbe56e057f20f883e', 1), | ||
(3, 1, 2, '[email protected]', NULL, 0), | ||
(4, 1, 3, '[email protected]', NULL, 0), | ||
(6, 1, 5, '[email protected]', 'e10adc3949ba59abbe56e057f20f883e', 1), | ||
(12, 1, 8, '[email protected]', NULL, 0), | ||
(13, 2, 0, '[email protected]', 'f384782368b3b5393a53e98150328d41', 1), | ||
(15, 1, 9, '[email protected]', NULL, 0), | ||
(16, 2, 0, '[email protected]', '025f4ed201f2b880c8651e0643dba7e3', 1), | ||
(17, 2, 2, '[email protected]', NULL, 0), | ||
(18, 2, 0, '[email protected]', 'e6998394ce15266347b7b9e3094e5d7e', 1), | ||
(19, 2, 3, '[email protected]', NULL, 0), | ||
(20, 1, 10, '[email protected]', NULL, 0), | ||
(21, 2, 4, '[email protected]', NULL, 0); | ||
-- -------------------------------------------------------- | ||
... | ... | @@ -408,13 +494,69 @@ CREATE TABLE `wish` ( |
`id` int(11) NOT NULL, | ||
`cust_id` int(11) NOT NULL, | ||
`cat_id` int(11) NOT NULL, | ||
`post_date` varchar(10) NOT NULL, | ||
`sub_cat_id` int(11) NOT NULL, | ||
`prod_name` varchar(50) DEFAULT NULL, | ||
`description` text, | ||
`media_url` text, | ||
`price_range` varchar(45) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Inactive/Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `wish` | ||
-- | ||
INSERT INTO `wish` (`id`, `cust_id`, `cat_id`, `post_date`, `sub_cat_id`, `prod_name`, `description`, `status`) VALUES | ||
(1, 1, 1, '2019-04-08', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(2, 1, 1, '2019-04-09', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(3, 1, 1, '2019-04-10', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(4, 1, 1, '2019-04-10', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(5, 1, 1, '2019-04-10', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(6, 1, 1, '2019-04-10', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(7, 1, 1, '2019-04-10', 1, 'Iphone XS 64 GB', 'Advanced Face ID. Security is simple when your face is your password. You can unlock your iPhone and log in to apps, accounts and more with a glance. It’s the most secure facial authentication ever in a smartphone. And now it’s even faster', 1), | ||
(8, 1, 1, '2019-04-10', 1, 'Ipad', 'New Ipod $500', 1); | ||
-- -------------------------------------------------------- | ||
-- | ||
-- Table structure for table `wish_media` | ||
-- | ||
CREATE TABLE `wish_media` ( | ||
`id` int(11) NOT NULL, | ||
`wish_id` int(11) NOT NULL, | ||
`url` varchar(100) DEFAULT NULL, | ||
`status` int(11) DEFAULT '1' COMMENT '1=>Active, 0=>Deleted' | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
-- | ||
-- Dumping data for table `wish_media` | ||
-- | ||
INSERT INTO `wish_media` (`id`, `wish_id`, `url`, `status`) VALUES | ||
(1, 1, 'assets/uploads/post_141043.jpg', 1), | ||
(2, 1, 'assets/uploads/post_832965.jpg', 1), | ||
(3, 1, 'assets/uploads/post_331771.jpg', 1), | ||
(4, 2, 'assets/uploads/post_246155.jpg', 1), | ||
(5, 2, 'assets/uploads/post_743383.jpg', 1), | ||
(6, 2, 'assets/uploads/post_961739.jpg', 1), | ||
(7, 3, 'assets/uploads/post_678522.jpg', 1), | ||
(8, 3, 'assets/uploads/post_673325.jpg', 1), | ||
(9, 3, 'assets/uploads/post_613738.jpg', 1), | ||
(10, 4, 'assets/uploads/post_838875.jpg', 1), | ||
(11, 4, 'assets/uploads/post_663459.jpg', 1), | ||
(12, 4, 'assets/uploads/post_508337.jpg', 1), | ||
(13, 5, 'assets/uploads/post_710656.jpg', 1), | ||
(14, 5, 'assets/uploads/post_983065.jpg', 1), | ||
(15, 5, 'assets/uploads/post_869342.jpg', 1), | ||
(16, 6, 'assets/uploads/post_999677.jpg', 1), | ||
(17, 6, 'assets/uploads/post_234718.jpg', 1), | ||
(18, 6, 'assets/uploads/post_718787.jpg', 1), | ||
(19, 7, 'assets/uploads/post_937548.jpg', 1), | ||
(20, 7, 'assets/uploads/post_550848.jpg', 1), | ||
(21, 7, 'assets/uploads/post_586649.jpg', 1), | ||
(22, 8, 'assets/uploads/post_944501.jpg', 1), | ||
(23, 8, 'assets/uploads/post_979695.jpg', 1), | ||
(24, 8, 'assets/uploads/post_600306.jpg', 1); | ||
-- | ||
-- Indexes for dumped tables | ||
... | ... | @@ -466,8 +608,7 @@ ALTER TABLE `currency` |
-- Indexes for table `customer` | ||
-- | ||
ALTER TABLE `customer` | ||
ADD PRIMARY KEY (`id`,`users_id`), | ||
ADD KEY `fk_customer_users_idx` (`users_id`); | ||
ADD PRIMARY KEY (`id`); | ||
-- | ||
-- Indexes for table `customer_address` | ||
... | ... | @@ -484,7 +625,7 @@ ALTER TABLE `cust_shopper_wish` |
ADD KEY `fk_cust_shopper_wish_customer1_idx` (`cust_id`), | ||
ADD KEY `fk_cust_shopper_wish_wish2_idx` (`wish_id`), | ||
ADD KEY `fk_cust_shopper_wish_shopper1_idx` (`shopper_id`), | ||
ADD KEY `fk_cust_shopper_wish_currency1_idx` (`curr_id`); | ||
ADD KEY `fk_cust_shopper_wish_currency1` (`curr_id`); | ||
-- | ||
-- Indexes for table `favourite` | ||
... | ... | @@ -498,8 +639,7 @@ ALTER TABLE `favourite` |
-- Indexes for table `notification` | ||
-- | ||
ALTER TABLE `notification` | ||
ADD PRIMARY KEY (`id`,`cust_id`), | ||
ADD KEY `fk_notification_customer1_idx` (`cust_id`); | ||
ADD PRIMARY KEY (`id`); | ||
-- | ||
-- Indexes for table `order_address` | ||
... | ... | @@ -543,8 +683,7 @@ ALTER TABLE `settings` |
-- Indexes for table `shopper` | ||
-- | ||
ALTER TABLE `shopper` | ||
ADD PRIMARY KEY (`id`,`users_id`), | ||
ADD KEY `fk_shopper_users1_idx` (`users_id`); | ||
ADD PRIMARY KEY (`id`); | ||
-- | ||
-- Indexes for table `sub_category` | ||
... | ... | @@ -576,6 +715,13 @@ ALTER TABLE `wish` |
ADD KEY `fk_wish_sub_category1_idx` (`sub_cat_id`); | ||
-- | ||
-- Indexes for table `wish_media` | ||
-- | ||
ALTER TABLE `wish_media` | ||
ADD PRIMARY KEY (`id`,`wish_id`), | ||
ADD KEY `fk_wish_media_wish1_idx` (`wish_id`); | ||
-- | ||
-- AUTO_INCREMENT for dumped tables | ||
-- | ||
... | ... | @@ -595,7 +741,7 @@ ALTER TABLE `booking` |
-- AUTO_INCREMENT for table `brand` | ||
-- | ||
ALTER TABLE `brand` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; | ||
-- | ||
-- AUTO_INCREMENT for table `cart` | ||
... | ... | @@ -607,13 +753,13 @@ ALTER TABLE `cart` |
-- AUTO_INCREMENT for table `category` | ||
-- | ||
ALTER TABLE `category` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; | ||
-- | ||
-- AUTO_INCREMENT for table `customer` | ||
-- | ||
ALTER TABLE `customer` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; | ||
-- | ||
-- AUTO_INCREMENT for table `customer_address` | ||
... | ... | @@ -667,13 +813,13 @@ ALTER TABLE `recent` |
-- AUTO_INCREMENT for table `shopper` | ||
-- | ||
ALTER TABLE `shopper` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; | ||
-- | ||
-- AUTO_INCREMENT for table `sub_category` | ||
-- | ||
ALTER TABLE `sub_category` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; | ||
-- | ||
-- AUTO_INCREMENT for table `transaction` | ||
... | ... | @@ -685,13 +831,19 @@ ALTER TABLE `transaction` |
-- AUTO_INCREMENT for table `users` | ||
-- | ||
ALTER TABLE `users` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22; | ||
-- | ||
-- AUTO_INCREMENT for table `wish` | ||
-- | ||
ALTER TABLE `wish` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; | ||
-- | ||
-- AUTO_INCREMENT for table `wish_media` | ||
-- | ||
ALTER TABLE `wish_media` | ||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25; | ||
-- | ||
-- Constraints for dumped tables | ||
... | ... | @@ -714,12 +866,6 @@ ALTER TABLE `cart` |
ADD CONSTRAINT `fk_cart_shopper1` FOREIGN KEY (`shopper_id`) REFERENCES `shopper` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `customer` | ||
-- | ||
ALTER TABLE `customer` | ||
ADD CONSTRAINT `fk_customer_users` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `customer_address` | ||
-- | ||
ALTER TABLE `customer_address` | ||
... | ... | @@ -742,12 +888,6 @@ ALTER TABLE `favourite` |
ADD CONSTRAINT `fk_favourite_products1` FOREIGN KEY (`prod_id`) REFERENCES `products` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `notification` | ||
-- | ||
ALTER TABLE `notification` | ||
ADD CONSTRAINT `fk_notification_customer1` FOREIGN KEY (`cust_id`) REFERENCES `customer` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `order_address` | ||
-- | ||
ALTER TABLE `order_address` | ||
... | ... | @@ -776,12 +916,6 @@ ALTER TABLE `recent` |
ADD CONSTRAINT `fk_recent_products1` FOREIGN KEY (`prod_id`) REFERENCES `products` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `shopper` | ||
-- | ||
ALTER TABLE `shopper` | ||
ADD CONSTRAINT `fk_shopper_users1` FOREIGN KEY (`users_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `sub_category` | ||
-- | ||
ALTER TABLE `sub_category` | ||
... | ... | @@ -800,6 +934,12 @@ ALTER TABLE `wish` |
ADD CONSTRAINT `fk_wish_category1` FOREIGN KEY (`cat_id`) REFERENCES `category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, | ||
ADD CONSTRAINT `fk_wish_customer1` FOREIGN KEY (`cust_id`) REFERENCES `customer` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, | ||
ADD CONSTRAINT `fk_wish_sub_category1` FOREIGN KEY (`sub_cat_id`) REFERENCES `sub_category` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
-- | ||
-- Constraints for table `wish_media` | ||
-- | ||
ALTER TABLE `wish_media` | ||
ADD CONSTRAINT `fk_wish_media_wish1` FOREIGN KEY (`wish_id`) REFERENCES `wish` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; | ||
COMMIT; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
... | ... |
uploads/brand/1554985605black5.jpg
0 → 100644
901 KB
uploads/brand/1554985669black5.jpg
0 → 100644
901 KB
uploads/brand/1554985836blue2.jpg
0 → 100644
44.8 KB
uploads/brand/1555050563black5.jpg
0 → 100644
901 KB
uploads/brand/1555050576green4.png
0 → 100644
4.65 KB
uploads/category/1554983100black5.jpg
0 → 100644
901 KB
uploads/category/1554983236blue2.jpg
0 → 100644
44.8 KB
uploads/category/1555050316black5.jpg
0 → 100644
901 KB
uploads/category/1555050372brown6.jpg
0 → 100644
27.4 KB
uploads/category/1555050383black5.jpg
0 → 100644
901 KB
uploads/customer/1554893697_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554893731_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554894109_black5.jpg
0 → 100644
901 KB
uploads/customer/1554894121_black5.jpg
0 → 100644
901 KB
uploads/customer/1554895872_black5.jpg
0 → 100644
901 KB
uploads/customer/1554895913_black5.jpg
0 → 100644
901 KB
uploads/customer/1554895961_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896002_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896020_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896038_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896281_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896384_black5.jpg
0 → 100644
901 KB
uploads/customer/1554896887_blue2.jpg
0 → 100644
44.8 KB
uploads/customer/1554897503_black5.jpg
0 → 100644
901 KB
uploads/customer/1554897825_black5.jpg
0 → 100644
901 KB
uploads/customer/1554897919_black5.jpg
0 → 100644
901 KB
uploads/customer/1554897966_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554898058_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554898107_black5.jpg
0 → 100644
901 KB
uploads/customer/1554898496_black5.jpg
0 → 100644
901 KB
uploads/customer/1554898568_black5.jpg
0 → 100644
901 KB
uploads/customer/1554901093_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554901187_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554901769_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554901849_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554901878_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554957794_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554957848_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554957931_benzz.jpg
0 → 100644
2.73 KB
uploads/customer/1554957999_black5.jpg
0 → 100644
901 KB
uploads/customer/1555041785_driver_car.jpg
0 → 100644
7.36 KB
uploads/customer/1555041833_driver_car.jpg
0 → 100644
7.36 KB
uploads/customer/1555042169_blue2.jpg
0 → 100644
44.8 KB
uploads/customer/1555042456_red1.jpeg
0 → 100644
68.8 KB
uploads/customer/1555045046_blue2.jpg
0 → 100644
44.8 KB
uploads/customer/1555052661_benzz.jpg
0 → 100644
2.73 KB
uploads/services/1555050930_black5.jpg
0 → 100644
901 KB
uploads/services/1555050930_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051301_black5.jpg
0 → 100644
901 KB
uploads/services/1555051301_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051336_black5.jpg
0 → 100644
901 KB
uploads/services/1555051336_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051380_black5.jpg
0 → 100644
901 KB
uploads/services/1555051380_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051425_black5.jpg
0 → 100644
901 KB
uploads/services/1555051425_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051494_black5.jpg
0 → 100644
901 KB
uploads/services/1555051494_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051638_black5.jpg
0 → 100644
901 KB
uploads/services/1555051638_brown6.jpg
0 → 100644
27.4 KB
uploads/services/1555051648_black5.jpg
0 → 100644
901 KB
uploads/services/1555051648_brown6.jpg
0 → 100644
27.4 KB
uploads/shopper/1554972174_black5.jpg
0 → 100644
901 KB
uploads/shopper/1555044720_black5.jpg
0 → 100644
901 KB
uploads/shopper/1555044843_black5.jpg
0 → 100644
901 KB
uploads/shopper/1555044891_black5.jpg
0 → 100644
901 KB
uploads/shopper/1555045117_blue2.jpg
0 → 100644
44.8 KB
uploads/shopper/1555045170_brown6.jpg
0 → 100644
27.4 KB
uploads/shopper/1555050855_brown6.jpg
0 → 100644
27.4 KB
uploads/shopper/1555052967_brown6.jpg
0 → 100644
27.4 KB
uploads/subcategory/1554894059black5.jpg
0 → 100644
901 KB
uploads/subcategory/1554984013red1.jpeg
0 → 100644
68.8 KB
uploads/subcategory/1554984154steve-jobs.jpg
0 → 100644
34.5 KB
uploads/subcategory/1555050708black5.jpg
0 → 100644
901 KB