Commit 9f95eea1 by Ajil

new 12/04

parents cb99241c 9204878f
...@@ -7,6 +7,7 @@ application/logs/* ...@@ -7,6 +7,7 @@ application/logs/*
!application/logs/index.html !application/logs/index.html
!application/*/.htaccess !application/*/.htaccess
application/config/database.php
composer.lock composer.lock
......
...@@ -37,7 +37,7 @@ class Customer extends CI_Controller { ...@@ -37,7 +37,7 @@ class Customer extends CI_Controller {
$template['pTitle'] = "View Customers"; $template['pTitle'] = "View Customers";
$template['pDescription'] = "View and Manage Customers"; $template['pDescription'] = "View and Manage Customers";
$template['page_head'] = "Customer Management"; $template['page_head'] = "Customer Management";
$template['datatable'] = 1;
$template['customer_data'] = $this->Customer_model->getCustomerData(); $template['customer_data'] = $this->Customer_model->getCustomerData();
$this->load->view('template',$template); $this->load->view('template',$template);
} }
......
...@@ -50,6 +50,31 @@ class Handlerequest extends CI_Controller { ...@@ -50,6 +50,31 @@ class Handlerequest extends CI_Controller {
} }
} }
public function wishPost() {
if($this->validate_headers() == true){
if(isset($_POST)) {
$data = $_POST;
if(isset($_FILES)){
$images = $this->handle_model->image_upload($_FILES);
$data = $_POST;
$data = $this->handle_model->wish_post($data, $images);
if($data['status'] == 1){
$data = $this->encrypted(json_encode($data['data']));
$this->response($data);
} else {
$this->errorResponse($data['code'],$data['message']);
}
} else {
$this->errorResponse('023','Wish media is missing');
}
} else {
$this->errorResponse('002','Invalid request');
}
} else {
$this->errorResponse('001','Authentication failed');
}
}
public function validate_headers() { public function validate_headers() {
if($this->headers['x-api-key'] == $this->secret_key) { if($this->headers['x-api-key'] == $this->secret_key) {
return true; return true;
......
...@@ -24,7 +24,7 @@ class Shopper extends CI_Controller { ...@@ -24,7 +24,7 @@ class Shopper extends CI_Controller {
$template['page'] = 'Shopper/create'; $template['page'] = 'Shopper/create';
$template['menu'] = 'Shopper Management'; $template['menu'] = 'Shopper Management';
$template['smenu'] = 'Add Shopper'; $template['smenu'] = 'Add Shopper';
$template['pTitle'] = "Add Customer"; $template['pTitle'] = "Add Shopper";
$template['pDescription'] = "Create New Shopper"; $template['pDescription'] = "Create New Shopper";
$this->load->view('template',$template); $this->load->view('template',$template);
...@@ -64,7 +64,7 @@ class Shopper extends CI_Controller { ...@@ -64,7 +64,7 @@ class Shopper extends CI_Controller {
} }
function changeStatus($shopper_id = '',$status = '1'){ function changeStatus($shopper_id = '',$status = '1'){
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error'); $flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger');
if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){ if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Shopper/viewShopper')); redirect(base_url('Shopper/viewShopper'));
...@@ -81,7 +81,7 @@ class Shopper extends CI_Controller { ...@@ -81,7 +81,7 @@ class Shopper extends CI_Controller {
//echo json_encode($_POST);exit; //echo json_encode($_POST);exit;
$err = 0; $err = 0;
$errMsg = ''; $errMsg = '';
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error'); $flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger');
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Shopper/addShopper')); redirect(base_url('Shopper/addShopper'));
...@@ -139,27 +139,27 @@ class Shopper extends CI_Controller { ...@@ -139,27 +139,27 @@ class Shopper extends CI_Controller {
$flashMsg =array('message'=>'Successfully Created User Details..!','class'=>'success'); $flashMsg =array('message'=>'Successfully Created User Details..!','class'=>'success');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer')); redirect(base_url('Shopper'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/create')); redirect(base_url('Shopper/create'));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/create')); redirect(base_url('Shopper/create'));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/create')); redirect(base_url('Shopper/create'));
} else { } else {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/create')); redirect(base_url('Shopper/create'));
} }
} }
public function editShopper($shopper_id){ public function editShopper($shopper_id){
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error'); $flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger');
if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){ if(empty($shopper_id) || !is_numeric($shopper_id = decode_param($shopper_id))){
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Customer/viewCustomers')); redirect(base_url('Customer/viewCustomers'));
...@@ -181,7 +181,7 @@ class Shopper extends CI_Controller { ...@@ -181,7 +181,7 @@ class Shopper extends CI_Controller {
//echo json_encode(decode_param($customer_id));exit; //echo json_encode(decode_param($customer_id));exit;
$err = 0; $err = 0;
$errMsg = ''; $errMsg = '';
$flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'error'); $flashMsg = array('message'=>'Something went wrong, please try again..!','class'=>'danger');
if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){ if(!isset($_POST) || empty($_POST) || !isset($_FILES) || empty($_FILES)){
$this->session->set_flashdata('message',$flashMsg); $this->session->set_flashdata('message',$flashMsg);
redirect(base_url('Shopper/addShopper')); redirect(base_url('Shopper/addShopper'));
...@@ -225,15 +225,15 @@ class Shopper extends CI_Controller { ...@@ -225,15 +225,15 @@ class Shopper extends CI_Controller {
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Shopper')); redirect(base_url('Shopper'));
} else if($status == 2){ } else if($status == 2){
$flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Email ID alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Shopper/edit/'.$shopper_id)); redirect(base_url('Shopper/edit/'.$shopper_id));
} else if($status == 3){ } else if($status == 3){
$flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'Phone Number alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Shopper/edit/'.$shopper_id)); redirect(base_url('Shopper/edit/'.$shopper_id));
} else if($status == 4){ } else if($status == 4){
$flashMsg = array('message'=>'User Name alrady exist..!','class'=>'error'); $flashMsg = array('message'=>'User Name alrady exist..!','class'=>'danger');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Shopper/edit/'.$customer_id)); redirect(base_url('Shopper/edit/'.$customer_id));
} else { } else {
......
...@@ -42,15 +42,7 @@ class Customer_model extends CI_Model { ...@@ -42,15 +42,7 @@ class Customer_model extends CI_Model {
WHERE USR.status!='2' AND CUST.phone_no='".$customer_data['phone']."'"); WHERE USR.status!='2' AND CUST.phone_no='".$customer_data['phone']."'");
if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3; if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3;
$status = $this->db->insert('users', $status = $this->db->insert('customer',
array('username'=>$customer_data['email'],
'password'=>$customer_data['password'],
'user_type'=>'3','status'=>'1'));
if(!$status){
return 0;
}
$customer_id = $this->db->insert_id();
$status = $this->db->insert('customer',
array('name'=>$customer_data['name'], array('name'=>$customer_data['name'],
'name_arab'=>$customer_data['name_arab'], 'name_arab'=>$customer_data['name_arab'],
'email_id'=>$customer_data['email'], 'email_id'=>$customer_data['email'],
...@@ -65,6 +57,30 @@ class Customer_model extends CI_Model { ...@@ -65,6 +57,30 @@ class Customer_model extends CI_Model {
'assist_phone_no'=>$customer_data['assist_phone'], 'assist_phone_no'=>$customer_data['assist_phone'],
'assist_email_id'=>$customer_data['assist_email'], 'assist_email_id'=>$customer_data['assist_email'],
'profile_photo'=>$customer_data['profile_image'])); 'profile_photo'=>$customer_data['profile_image']));
$customer_id = $this->db->insert_id();
if(!$status){
return 0;
}
$this->db->where('user_id',$id);
$this->db->where('user_type','1');
$status = $this->db->update('users',array('password'=>$customer_data['password'],
'user_type'=>'1','status'=>'1'));
return $status; return $status;
} }
......
...@@ -27,7 +27,7 @@ class Handle_model extends CI_Model { ...@@ -27,7 +27,7 @@ class Handle_model extends CI_Model {
} }
function registration($data) { function registration($data) {
$dup = $this->db->query("SELECT customer.email_id, customer.phone_no FROM `users` LEFT JOIN customer ON users.user_type = customer.user_type WHERE (users.username = '".$data['email_id']."' OR customer.phone_no = '".$data['phone_no']."')"); $dup = $this->db->query("SELECT customer.email_id, customer.phone_no FROM `users` LEFT JOIN customer ON users.user_type = customer.user_type WHERE (users.username = '".$data['email_id']."' OR customer.phone_no = '".$data['phone_no']."') GROUP BY customer.id");
if($dup->num_rows() > 0) { if($dup->num_rows() > 0) {
if($dup->num_rows() > 1) { if($dup->num_rows() > 1) {
$res = array('status'=> 0,'message'=>'Email and Phone are already exists','code'=>'009'); $res = array('status'=> 0,'message'=>'Email and Phone are already exists','code'=>'009');
...@@ -50,12 +50,14 @@ class Handle_model extends CI_Model { ...@@ -50,12 +50,14 @@ class Handle_model extends CI_Model {
'address'=>$data['address'], 'address'=>$data['address'],
'assist_name'=>$data['assist_name'], 'assist_name'=>$data['assist_name'],
'assist_phone_no'=>$data['assist_phone_no'], 'assist_phone_no'=>$data['assist_phone_no'],
'assist_email_id'=>$data['assist_email_id'] 'assist_email_id'=>$data['assist_email_id'],
'code'=>$data['code'],
'assist_code'=>$data['assist_code']
); );
$rs = $this->db->insert('customer', $userData); $rs = $this->db->insert('customer', $userData);
if($rs) { if($rs) {
$insert_id = $this->db->insert_id(); $insert_id = $this->db->insert_id();
$this->db->where('user_id',$insert_id)->where('user_type',1)->update('users',array('pin'=>md5($data['pin']), 'status'=>1)); $this->db->where('user_id',$insert_id)->where('user_type',1)->update('users',array('password'=>md5($data['pin']), 'status'=>1));
$user = $this->db->where('id', $insert_id)->get('customer')->row(); $user = $this->db->where('id', $insert_id)->get('customer')->row();
$res = array('status'=>1, 'message'=>'Registration Successfully', 'data'=>$user); $res = array('status'=>1, 'message'=>'Registration Successfully', 'data'=>$user);
} else { } else {
...@@ -66,7 +68,7 @@ class Handle_model extends CI_Model { ...@@ -66,7 +68,7 @@ class Handle_model extends CI_Model {
} }
function categories($data) { function categories($data) {
if($data['cat_id']) { if(isset($data['cat_id'])) {
$this->db->where('id',$data['cat_id']); $this->db->where('id',$data['cat_id']);
} }
$data_rs = $this->db->select('id,cat_name,cat_image')->where('status', 1)->get('category'); $data_rs = $this->db->select('id,cat_name,cat_image')->where('status', 1)->get('category');
...@@ -84,10 +86,10 @@ class Handle_model extends CI_Model { ...@@ -84,10 +86,10 @@ class Handle_model extends CI_Model {
} }
function sub_categories($data) { function sub_categories($data) {
if($data['cat_id']) { if(isset($data['cat_id'])) {
$this->db->where('cat_id',$data['cat_id']); $this->db->where('cat_id',$data['cat_id']);
} }
if($data['id']) { if(isset($data['id'])) {
$this->db->where('id',$data['id']); $this->db->where('id',$data['id']);
} }
$data_rs = $this->db->select('id,sub_cat_name,sub_cat_image')->where('status', 1)->get('sub_category'); $data_rs = $this->db->select('id,sub_cat_name,sub_cat_image')->where('status', 1)->get('sub_category');
...@@ -104,6 +106,162 @@ class Handle_model extends CI_Model { ...@@ -104,6 +106,162 @@ class Handle_model extends CI_Model {
return $res; return $res;
} }
function get_country($data) {
if(isset($data['id'])) {
$this->db->where('id',$data['id']);
}
$data_rs = $this->db->select('id,country_name,symbol,rate,code,flag')->where('status', 1)->get('currency');
if($data_rs->num_rows() > 0){
if($data_rs->num_rows() > 1){
$data = $data_rs->result();
} else {
$data = $data_rs->row();
}
$res = array('status'=>1, 'message'=>'Country List List', 'data'=>$data);
} else {
$res = array('status'=>0,'message'=>'No Country found!','code'=>'024');
}
return $res;
}
function image_upload($file) {
$config['upload_path'] = './assets/uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 2000;
$config['max_width'] = 1500;
$config['max_height'] = 1500;
$this->load->library('upload');
$count = count($file['media']['name']);
for($i = 0; $i < $count; $i++) {
$_FILES['userfile']['name']= $file['media']['name'][$i];
$_FILES['userfile']['type']= $file['media']['type'][$i];
$_FILES['userfile']['tmp_name']= $file['media']['tmp_name'][$i];
$_FILES['userfile']['error']= $file['media']['error'][$i];
$_FILES['userfile']['size']= $file['media']['size'][$i];
$name = explode('.',$_FILES['userfile']['name']);
$length = count($name);
$ext = $name[$length-1];
$new_name = 'post_'.rand(111111,999999).'.'.$ext;
$config['file_name'] = $new_name;
$this->upload->initialize($config);
$this->upload->do_upload();
$dataInfo[] = 'assets/uploads/'.$new_name;
}
return $dataInfo;
}
function wish_post($data, $images) {
$wish = array(
'cust_id'=>$data['cust_id'],
'cat_id'=>$data['cat_id'],
'sub_cat_id'=>$data['sub_cat_id'],
'description'=>$data['description'],
'prod_name'=>$data['prod_name'],
'post_date'=>date('Y-m-d')
);
$rs = $this->db->insert('wish', $wish);
if($rs) {
$insert_id = $this->db->insert_id();
$data_image = array();
foreach($images as $image) {
$image_array = array(
'wish_id'=>$insert_id,
'url'=>$image
);
array_push($data_image,$image_array);
}
$this->db->insert_batch('wish_media', $data_image);
$res = array('status'=>1, 'message'=>'Wish posted successfully', 'data'=>array('wish_id'=>$insert_id));
} else {
$res = array('status'=>0,'message'=>'Something Went Wrong! Wish post Failed','code'=>'012');
}
return $res;
}
function wish_list($data) {
$state = 0;
if(isset($data['id'])) {
$this->db->where('wish.id',$data['id']);
$state = 1;
}
if(isset($data['cust_id'])) {
$this->db->where('wish.cust_id',$data['cust_id']);
}
if(isset($data['cat_id'])) {
$this->db->where('wish.cat_id',$data['cat_id']);
$state = 1;
}
if(isset($data['cat_id'])) {
$this->db->where('wish.cat_id',$data['cat_id']);
$state = 1;
}
if(isset($data['post_date'])) {
$this->db->where('wish.post_date',$data['post_date']);
$state = 1;
}
if($state == 0) {
$total = $this->db->where('status', 1)->select('id')->get('wish')->num_rows();
$per_page = 10;
if(isset($data['page'])) {
$page = $data['page'];
} else {
$page = 1;
}
$total_page = ceil($total / $per_page);
$start = ($page-1) * $per_page;
$this->db->limit($per_page, $start);
$meta = array(
'total'=>$total,
'per_page'=>$per_page,
'total_page'=>$total_page,
'curr_page'=>$page
);
}
if(isset($data['cust_id'])) {
$this->db->where('wish.cust_id',$data['cust_id']);
}
$this->db->select('wish.id,wish.post_date,wish.prod_name, wish.description, category.cat_name, sub_category.sub_cat_name,GROUP_CONCAT(DISTINCT wish_media.url SEPARATOR "\n") AS images');
$this->db->from('wish');
$this->db->join('wish_media','wish.id = wish_media.wish_id', 'LEFT');
$this->db->join('category','wish.cat_id = category.id', 'LEFT');
$this->db->join('sub_category','wish.sub_cat_id = sub_category.id', 'LEFT');
$this->db->where('wish.status', 1);
$this->db->group_by('wish.id');
$this->db->order_by('id', 'DESC');
$data_rs = $this->db->get();
if($data_rs->num_rows() > 0){
if($data_rs->num_rows() > 1){
$data = $data_rs->result();
} else {
$data = $data_rs->row();
}
if($state == 0) {
$rs = array('data'=>$data, 'meta'=>$meta);
$res = array('status'=>1, 'message'=>'Wish List', 'data'=>$rs);
} else {
$res = array('status'=>1, 'message'=>'Wish List', 'data'=>$data);
}
} else {
$res = array('status'=>0,'message'=>'No Wish posts found!','code'=>'025');
}
return $res;
}
......
...@@ -16,8 +16,9 @@ class Settings_model extends CI_Model { ...@@ -16,8 +16,9 @@ class Settings_model extends CI_Model {
} }
public function update_settings($data){ public function update_settings($data){
//echo json_encode($data);exit;
$result = $this->db->update('settings', $data); $result = $this->db->update('settings', $data);
return $result; return $result;
} }
} }
......
...@@ -11,8 +11,8 @@ class Shopper_model extends CI_Model { ...@@ -11,8 +11,8 @@ class Shopper_model extends CI_Model {
$sql = "SELECT CUST.*,USR.status $sql = "SELECT CUST.*,USR.status
FROM shopper AS CUST FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE $cond"; WHERE $cond AND USR.user_type='2'";
$shopperData = $this->db->query($sql); $shopperData = $this->db->query($sql);
...@@ -33,33 +33,43 @@ class Shopper_model extends CI_Model { ...@@ -33,33 +33,43 @@ class Shopper_model extends CI_Model {
if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 4; if(!empty($userNameChk) && $userNameChk->num_rows() > 0) return 4;
$emailChk = $this->db->query("SELECT * FROM shopper AS CUST $emailChk = $this->db->query("SELECT * FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE USR.status!='2' AND CUST.email='".$shopper_data['email']."'"); WHERE USR.status!='2' AND CUST.email_id='".$shopper_data['email']."'");
if(!empty($emailChk) && $emailChk->num_rows() > 0) return 2; if(!empty($emailChk) && $emailChk->num_rows() > 0) return 2;
$phoneChk = $this->db->query("SELECT * FROM shopper AS CUST $phoneChk = $this->db->query("SELECT * FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id=CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE USR.status!='2' AND CUST.phone='".$shopper_data['phone']."'"); WHERE USR.status!='2' AND CUST.phone_no='".$shopper_data['phone']."'");
if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3; if(!empty($phoneChk) && $phoneChk->num_rows() > 0) return 3;
$status = $this->db->insert('users', $status = $this->db->insert('shopper',array( 'name'=>$shopper_data['name'],
array('username'=>$shopper_data['email'], 'name_arab'=>$shopper_data['name_arab'],
'password'=>$shopper_data['password'], 'email_id'=>$shopper_data['email'],
'user_type'=>'2','status'=>'1')); 'phone_no'=>$shopper_data['phone'],
if(!$status){
return 0;
}
$shopper_id = $this->db->insert_id();
$status = $this->db->insert('shopper',
array('user_id'=>$shopper_id,
'name'=>$shopper_data['name'],
'email'=>$shopper_data['email'],
'phone'=>$shopper_data['phone'],
'dob'=>$shopper_data['dob'], 'dob'=>$shopper_data['dob'],
'shop_name'=>$shopper_data['shop_name'], 'shop_name'=>$shopper_data['shop_name'],
'shop_name_arab'=>$shopper_data['shop_name_arab'],
'commission'=>$shopper_data['commission'], 'commission'=>$shopper_data['commission'],
'profile_photo'=>$shopper_data['profile_image'])); 'profile_photo'=>$shopper_data['profile_image']));
$shopper_id = $this->db->insert_id();
if(!$status){
return 0;
}
$this->db->where('user_id',$id);
$this->db->where('user_type','2');
$status = $this->db->update('users',array('password'=>$shopper_data['password'],
'user_type'=>'2','status'=>'1'));
return $status; return $status;
} }
...@@ -71,21 +81,21 @@ class Shopper_model extends CI_Model { ...@@ -71,21 +81,21 @@ class Shopper_model extends CI_Model {
if(empty($shopper_id) || empty($shopper_data)) if(empty($shopper_id) || empty($shopper_data))
return 0; return 0;
$userIdChk = $this->db->query("SELECT * FROM shopper AS CUST $userIdChk = $this->db->query("SELECT * FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id = CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND
USR.username='".$shopper_data['email']."'"); USR.username='".$shopper_data['email']."'");
if(!empty($userIdChk) && $userIdChk->num_rows() > 0) { return 4; } if(!empty($userIdChk) && $userIdChk->num_rows() > 0) { return 4; }
$emailChk = $this->db->query("SELECT * FROM shopper AS CUST $emailChk = $this->db->query("SELECT * FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id = CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND
CUST.email='".$shopper_data['email']."'"); CUST.email_id='".$shopper_data['email']."'");
if(!empty($emailChk) && $emailChk->num_rows() > 0) { return 2; } if(!empty($emailChk) && $emailChk->num_rows() > 0) { return 2; }
$phoneChk = $this->db->query("SELECT * FROM shopper AS CUST $phoneChk = $this->db->query("SELECT * FROM shopper AS CUST
INNER JOIN users AS USR ON (USR.id = CUST.user_id) INNER JOIN users AS USR ON (USR.user_id=CUST.id)
WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND WHERE USR.status!='2' AND CUST.id!='".$shopper_id."' AND
CUST.phone='".$shopper_data['phone']."'"); CUST.phone_no='".$shopper_data['phone']."'");
if(!empty($phoneChk) && $phoneChk->num_rows() > 0) { return 3; } if(!empty($phoneChk) && $phoneChk->num_rows() > 0) { return 3; }
$upMecArr = array('name'=>$shopper_data['name'], $upMecArr = array('name'=>$shopper_data['name'],
......
...@@ -7,7 +7,7 @@ class Validation_model extends CI_Model { ...@@ -7,7 +7,7 @@ class Validation_model extends CI_Model {
'email'=>array('code'=>'005', 'message'=>'Invalid Email id') 'email'=>array('code'=>'005', 'message'=>'Invalid Email id')
), ),
'password'=>array('required'=>array('code'=>'006', 'message'=>'Password is null or empty'), 'password'=>array('required'=>array('code'=>'006', 'message'=>'Password is null or empty'),
'min_4'=>array('code'=>'007', 'message'=>'Password length is minimum 6') 'min_4'=>array('code'=>'007', 'message'=>'Password length is minimum 4')
) )
), ),
'registration'=> array('email_id'=>array('required'=>array('code'=>'004', 'message'=>'Email id is null or empty'), 'registration'=> array('email_id'=>array('required'=>array('code'=>'004', 'message'=>'Email id is null or empty'),
...@@ -17,7 +17,7 @@ class Validation_model extends CI_Model { ...@@ -17,7 +17,7 @@ class Validation_model extends CI_Model {
'phone'=>array('code'=>'015', 'message'=>'Invalid Phone no'), 'phone'=>array('code'=>'015', 'message'=>'Invalid Phone no'),
), ),
'pin'=>array('required'=>array('code'=>'006', 'message'=>'Password is null or empty'), 'pin'=>array('required'=>array('code'=>'006', 'message'=>'Password is null or empty'),
'min_4'=>array('code'=>'007', 'message'=>'Password length is minimum 6') 'min_4'=>array('code'=>'007', 'message'=>'Password length is minimum 4')
), ),
'name'=>array('event_id'=>array('required'=>array('code'=>'016', 'message'=>'Name is null or empty') 'name'=>array('event_id'=>array('required'=>array('code'=>'016', 'message'=>'Name is null or empty')
) )
...@@ -37,6 +37,8 @@ class Validation_model extends CI_Model { ...@@ -37,6 +37,8 @@ class Validation_model extends CI_Model {
), ),
'categories'=>array(), 'categories'=>array(),
'sub_categories'=>array(), 'sub_categories'=>array(),
'get_country'=>array(),
'wish_list'=>array(),
'forgot'=> array('email_id'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'forgot'=> array('email_id'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
) )
......
...@@ -79,30 +79,24 @@ ...@@ -79,30 +79,24 @@
<label for="nf-password" class=" form-control-label">Category Image</label> <label for="nf-password" class=" form-control-label">Category Image</label>
</div> </div>
</div> </div>
<div class="row">
<?php if(!empty($brandData->brand_image)) { ?>
<br>
<div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="catagory_image_div"> <div class="col-md-12" style="padding-bottom:10px;">
<img src="<?= (isset($brandData->brand_image))?base_url($brandData->brand_image):'' ?>" /> <div class="col-md-3">
</div> <img id="image_id_1" src="<?= (isset($brandData->brand_image))?base_url($brandData->brand_image):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
</div>
<div class="col-md-12" style="padding-top: 25px;">
<input name="brand" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="form-control"/>
</div>
</div>
</div> </div>
</div> </div>
<br>
<?php } ?>
<div class="row">
<div class="col-md-12"> </div>
<input type="file" id="nf-password" name="brand" placeholder="Enter Password.." class="form-control">
</div>
</div>
</div> </div>
<button type="submit" class="btn btn-primary btn-sm"> <button type="submit" class="btn btn-primary btn-sm">
......
...@@ -89,25 +89,23 @@ ...@@ -89,25 +89,23 @@
</div> </div>
</div> </div>
<?php if(!empty($categoryData->cat_image)) { ?>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="catagory_image_div"> <div class="col-md-12" style="padding-bottom:10px;">
<img src="<?= (isset($categoryData->cat_image))?base_url($categoryData->cat_image):'' ?>" /> <div class="col-md-3">
</div> <img id="image_id_1" src="<?= (isset($categoryData->profile_photo))?base_url($categoryData->profile_photo):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
</div>
<div class="col-md-12" style="padding-top: 25px;">
<input name="category" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="form-control"/>
</div>
</div>
</div> </div>
</div> </div>
<br>
<?php } ?>
<div class="row">
<div class="col-md-12">
<input type="file" id="nf-password" name="category" placeholder="Enter Password.." class="form-control">
</div>
</div>
</div> </div>
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
<i class="fa fa-dot-circle-o"></i> Submit <i class="fa fa-dot-circle-o"></i> Submit
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label>Commission Per Booking</label> <label>Commission Per Booking</label>
<input type="text" name="service_charge" class="form-control required" placeholder="Enter Service Charge" value="<?= $data['service_charge'] ?>"> <input type="text" name="commission" class="form-control required" placeholder="Enter Service Charge" value="<?= $data['commission'] ?>">
</div> </div>
</div> </div>
......
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Name (Arabic)</label> <label for="nf-email" class=" form-control-label">Name (Arabic)</label>
<input type="text" id="nf-brand" name="name" placeholder="Enter Name" class="form-control required" value="<?= (isset($shopper_data->name))?$shopper_data->name:'' ?>" > <input type="text" id="nf-brand" name="name_arab" placeholder="Enter Name" class="form-control required" value="<?= (isset($shopper_data->name_arab))?$shopper_data->name_arab:'' ?>" >
</div> </div>
</div> </div>
<br> <br>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Email</label> <label for="nf-email" class=" form-control-label">Email</label>
<input type="text" id="nf-brand" name="email" placeholder="Enter Email" class="form-control required" value="<?= (isset($shopper_data->email))?$shopper_data->email:'' ?>" > <input type="text" id="nf-brand" name="email" placeholder="Enter Email" class="form-control required" value="<?= (isset($shopper_data->email_id))?$shopper_data->email_id:'' ?>" >
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Commission</label> <label for="nf-email" class=" form-control-label">Commission</label>
...@@ -87,11 +87,11 @@ ...@@ -87,11 +87,11 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Phone Code</label> <label for="nf-email" class=" form-control-label">Phone Code</label>
<input type="text" id="nf-brand" name="phone_code" placeholder="Enter Phone Code" class="form-control required" value="<?= (isset($shopper_data->phone_code))?$shopper_data->phone_code:'' ?>" > <input type="text" id="nf-brand" name="phone_code" placeholder="Enter Phone Code" class="form-control required" value="<?= (isset($shopper_data->code))?$shopper_data->code:'' ?>" >
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Phone</label> <label for="nf-email" class=" form-control-label">Phone</label>
<input type="text" id="nf-brand" name="phone" placeholder="Enter Phone Number" class="form-control required" value="<?= (isset($shopper_data->phone))?$shopper_data->phone:'' ?>" > <input type="text" id="nf-brand" name="phone" placeholder="Enter Phone Number" class="form-control required" value="<?= (isset($shopper_data->phone_no))?$shopper_data->phone_no:'' ?>" >
</div> </div>
</div> </div>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="nf-email" class=" form-control-label">Shop Name (Arabic)</label> <label for="nf-email" class=" form-control-label">Shop Name (Arabic)</label>
<input type="text" id="nf-brand" name="shop_name" placeholder="Enter Address" class="form-control required" value="<?= (isset($shopper_data->shop_name))?$shopper_data->shop_name:'' ?>" > <input type="text" id="nf-brand" name="shop_name_arab" placeholder="Enter Address" class="form-control required" value="<?= (isset($shopper_data->shop_name_arab))?$shopper_data->shop_name_arab:'' ?>" >
</div> </div>
</div> </div>
<br> <br>
...@@ -112,22 +112,24 @@ ...@@ -112,22 +112,24 @@
<label for="nf-email" class=" form-control-label">DOB</label> <label for="nf-email" class=" form-control-label">DOB</label>
<input type="text" id="nf-brand" name="dob" placeholder="Enter DOB" class="form-control required" value="<?= (isset($shopper_data->dob))?$shopper_data->dob:'' ?>" > <input type="text" id="nf-brand" name="dob" placeholder="Enter DOB" class="form-control required" value="<?= (isset($shopper_data->dob))?$shopper_data->dob:'' ?>" >
</div> </div>
<div class="col-md-6">
<label for="nf-email" class=" form-control-label">Profile Photo</label>
<?php if(!empty($shopper_data->profile_photo)) { ?>
<div class="catagory_image_div">
<img src="<?= (isset($shopper_data->profile_photo))?base_url($shopper_data->profile_photo):'' ?>" />
</div>
<?php } ?>
<input type="file" id="nf-password" name="profile_image" placeholder="Select Profile Photo" class="form-control">
<div class="row">
<div class="col-md-12">
<div class="col-md-12" style="padding-bottom:10px;">
<div class="col-md-3">
<img id="image_id_1" src="<?= (isset($shopper_data->profile_photo))?base_url($shopper_data->profile_photo):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
</div>
<div class="col-md-12" style="padding-top: 25px;">
<input name="profile_image" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="form-control"/>
</div>
</div>
</div> </div>
</div> </div>
</div>
<br> <br>
<button type="submit" class="btn btn-primary btn-sm"> <button type="submit" class="btn btn-primary btn-sm">
<i class="fa fa-dot-circle-o"></i> Submit <i class="fa fa-dot-circle-o"></i> Submit
......
...@@ -47,7 +47,7 @@ if($this->session->flashdata('message')) { ...@@ -47,7 +47,7 @@ if($this->session->flashdata('message')) {
<li><a href="<?= base_url() ?>">Dashboard <li><a href="<?= base_url() ?>">Dashboard
</a></li> </a></li>
<li><a ><?= $menu ?></a></li> <li><a ><?= $menu ?></a></li>
<li class="active"><?= $smenu ?></li> <!-- <li class="active"><?= $smenu ?></li> -->
</ol> </ol>
</div> </div>
</div> </div>
...@@ -82,8 +82,8 @@ if($this->session->flashdata('message')) { ...@@ -82,8 +82,8 @@ if($this->session->flashdata('message')) {
<tr> <tr>
<td><?php echo $key+1;?></td> <td><?php echo $key+1;?></td>
<td><?= $shopper->name ?></td> <td><?= $shopper->name ?></td>
<td><?= $shopper->email ?></td> <td><?= $shopper->email_id ?></td>
<td><?= $shopper->phone ?></td> <td><?= $shopper->phone_no ?></td>
<td><a class="btn btn-sm btn-info" id="viewShopper" shopper_id="<?= encode_param($shopper->id) ?>"> <td><a class="btn btn-sm btn-info" id="viewShopper" shopper_id="<?= encode_param($shopper->id) ?>">
<i class="fa fa-fw fa-eye"></i>View <i class="fa fa-fw fa-eye"></i>View
...@@ -96,17 +96,17 @@ if($this->session->flashdata('message')) { ...@@ -96,17 +96,17 @@ if($this->session->flashdata('message')) {
Edit Edit
</a> </a>
<a class="btn btn-sm btn-danger" <a class="btn btn-sm btn-danger"
href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->user_id))."/2" ?>" href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->id))."/2" ?>"
onClick="return doconfirm()"> onClick="return doconfirm()">
<i class="fa fa-fw fa-trash"></i>Delete <i class="fa fa-fw fa-trash"></i>Delete
</a> </a>
<?php if($shopper->status == 1){ ?> <?php if($shopper->status == 1){ ?>
<a class="btn btn-sm btn-success" style="background-color:#ac2925" href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->user_id))."/0" ?>"> <a class="btn btn-sm btn-success" style="background-color:#ac2925" href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->id))."/0" ?>">
<i class="fa fa-cog"></i> De-activate <i class="fa fa-cog"></i> De-activate
</a> </a>
<?php } else { ?> <?php } else { ?>
<a class="btn btn-sm btn-success" href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->user_id))."/1" ?>"> <a class="btn btn-sm btn-success" href="<?= base_url("Shopper/changeStatus/".encode_param($shopper->id))."/1" ?>">
<i class="fa fa-cog"></i> Activate <i class="fa fa-cog"></i> Activate
</a> </a>
<?php } ?> <?php } ?>
......
...@@ -100,39 +100,21 @@ ...@@ -100,39 +100,21 @@
</div> </div>
</div> </div>
<br> <br>
<div class="row">
<div class="col-md-12">
<label for="nf-password" class=" form-control-label">Category Image</label> <div class="row">
</div>
</div>
<br>
<?php if(!empty($subcatData->sub_cat_image)) { ?>
<div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="catagory_image_div"> <div class="col-md-12" style="padding-bottom:10px;">
<img src="<?= (isset($subcatData->sub_cat_image))?base_url($subcatData->sub_cat_image):'' ?>" /> <div class="col-md-3">
</div> <img id="image_id_1" src="<?= (isset($subcatData->sub_cat_image))?base_url($subcatData->sub_cat_image):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
</div>
<div class="col-md-12" style="padding-top: 25px;">
<input name="subcategory" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="form-control"/>
</div>
</div>
</div> </div>
</div> </div>
<br>
<?php } ?>
<div class="row">
<div class="col-md-12">
<input type="file" id="nf-password" name="subcategory" placeholder="Enter Password.." class="form-control">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary btn-sm"> <button type="submit" class="btn btn-primary btn-sm">
<i class="fa fa-dot-circle-o"></i> Submit <i class="fa fa-dot-circle-o"></i> Submit
......
...@@ -139,39 +139,21 @@ ...@@ -139,39 +139,21 @@
<label for="nf-email" class=" form-control-label">Assist Phone</label> <label for="nf-email" class=" form-control-label">Assist Phone</label>
<input type="text" id="nf-brand" name="assist_phone" placeholder="Enter Assist Phone" class="form-control required" value="<?= (isset($customer_data->assist_phone_no))?$customer_data->assist_phone_no:'' ?>" > <input type="text" id="nf-brand" name="assist_phone" placeholder="Enter Assist Phone" class="form-control required" value="<?= (isset($customer_data->assist_phone_no))?$customer_data->assist_phone_no:'' ?>" >
</div> </div>
<div class="col-md-6">
<label for="nf-email" class=" form-control-label">Profile Photo</label>
<?php if(!empty($customer_data->profile_photo)) { ?> <div class="col-md-6">
<div class="catagory_image_div">
<img src="<?= (isset($customer_data->profile_photo))?base_url($customer_data->profile_photo):'' ?>" />
</div>
<?php } ?>
<input type="file" id="nf-password" name="profile_image" placeholder="Select Profile Photo" class="form-control">
</div>
</div>
</div>
<!-- <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label>Profile Picture</label> <label>Profile Picture</label>
<div class="col-md-12" style="padding-bottom:10px;"> <div class="col-md-12" style="padding-bottom:10px;">
<div class="col-md-3"> <div class="col-md-3">
<img id="image_id" src="<?= (isset($customer_data->profile_photo))?base_url($customer_data->profile_photo):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" /> <img id="image_id_1" src="<?= (isset($customer_data->profile_photo))?base_url($customer_data->profile_photo):'' ?>" onerror="this.src='<?=base_url("assets/images/user_avatar.jpg")?>';" height="75" width="75" />
</div> </div>
<div class="col-md-9" style="padding-top: 25px;"> <div class="col-md-12" style="padding-top: 25px;">
<input name="profile_image" type="file" accept="image/*" onchange="setImg(this,'image_id');" /> <input name="profile_image" type="file" accept="image/*" onchange="setImg(this,'image_id_1');" class="form-control"/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
-->
<button type="submit" class="btn btn-primary btn-sm"> <button type="submit" class="btn btn-primary btn-sm">
<i class="fa fa-dot-circle-o"></i> Submit <i class="fa fa-dot-circle-o"></i> Submit
</button> </button>
......
...@@ -47,7 +47,7 @@ if($this->session->flashdata('message')) { ...@@ -47,7 +47,7 @@ if($this->session->flashdata('message')) {
<li><a href="<?= base_url() ?>">Dashboard <li><a href="<?= base_url() ?>">Dashboard
</a></li> </a></li>
<li><a ><?= $menu ?></a></li> <li><a ><?= $menu ?></a></li>
<li class="active"><?= $smenu ?></li> <!-- <li class="active"><?= $smenu ?></li> -->
</ol> </ol>
</div> </div>
</div> </div>
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
country_flag = '<?= $settings['country_flag'] ?>'; country_flag = '<?= $settings['country_flag'] ?>';
</script> </script>
<script src="https://maps.googleapis.com/maps/api/js?key=<?= $gKey ?>&libraries=places"></script> <script src="https://maps.googleapis.com/maps/api/js?key=<?= $gKey ?>&libraries=places"></script>
<script src="<?php echo base_url('assets/js/jquery.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/popper.min.js'); ?>"></script> <script src="<?php echo base_url('assets/js/popper.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/bootstrap.min.js'); ?>"></script> <script src="<?php echo base_url('assets/js/bootstrap.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/jquery.matchHeight.min.js'); ?>"></script> <script src="<?php echo base_url('assets/js/jquery.matchHeight.min.js'); ?>"></script>
...@@ -24,7 +22,7 @@ ...@@ -24,7 +22,7 @@
<!--Local Stuff--> <!--Local Stuff-->
<script> <!-- <script>
jQuery(document).ready(function($) { jQuery(document).ready(function($) {
"use strict"; "use strict";
...@@ -214,4 +212,5 @@ ...@@ -214,4 +212,5 @@
}); });
// Bar Chart #flotBarChart End // Bar Chart #flotBarChart End
}); });
</script> </script> -->
\ No newline at end of file
...@@ -17,6 +17,8 @@ ...@@ -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/style.css'); ?>">
<link rel="stylesheet" href="<?php echo base_url('assets/css/lib/datatable/dataTables.bootstrap.min.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"> <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> --> <!-- <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/chartist.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/jqvmap.min.css" rel="stylesheet"> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/jqvmap.min.css" rel="stylesheet">
......
...@@ -7,7 +7,7 @@ function setImg(input,id) { ...@@ -7,7 +7,7 @@ function setImg(input,id) {
var reader = new FileReader(); var reader = new FileReader();
reader.onload = function (e) { reader.onload = function (e) {
$('#'+id).attr('src', e.target.result); jQuery('#'+id).attr('src', e.target.result);
}; };
reader.readAsDataURL(input.files[0]); reader.readAsDataURL(input.files[0]);
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: 127.0.0.1 -- Host: 127.0.0.1
-- Generation Time: Apr 12, 2019 at 06:17 AM -- Generation Time: Apr 12, 2019 at 09:33 AM
-- Server version: 10.1.38-MariaDB -- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.27 -- PHP Version: 7.1.27
...@@ -88,7 +88,8 @@ CREATE TABLE `brand` ( ...@@ -88,7 +88,8 @@ CREATE TABLE `brand` (
INSERT INTO `brand` (`id`, `brand_name`, `brand_name_arab`, `brand_image`, `status`) VALUES INSERT INTO `brand` (`id`, `brand_name`, `brand_name_arab`, `brand_image`, `status`) VALUES
(1, 'PUMA', '555', './uploads/brand/1554985669black5.jpg', 1), (1, 'PUMA', '555', './uploads/brand/1554985669black5.jpg', 1),
(2, 'PUMA', 'sfsfsf', './uploads/brand/1554985836blue2.jpg', 1); (2, 'PUMA', 'sfsfsf', './uploads/brand/1554985836blue2.jpg', 1),
(3, 'vvv', 'bbbb', './uploads/brand/1555050576green4.png', 1);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -126,7 +127,9 @@ CREATE TABLE `category` ( ...@@ -126,7 +127,9 @@ CREATE TABLE `category` (
INSERT INTO `category` (`id`, `cat_name`, `cat_name_arab`, `cat_image`, `status`) VALUES INSERT INTO `category` (`id`, `cat_name`, `cat_name_arab`, `cat_image`, `status`) VALUES
(1, 'Mobile', '', '/assets/upload/mobile.png', 0), (1, 'Mobile', '', '/assets/upload/mobile.png', 0),
(2, 'Fridge', 'rr', './uploads/category/1554983236blue2.jpg', 1), (2, 'Fridge', 'rr', './uploads/category/1554983236blue2.jpg', 1),
(3, 'cat11', 'catarb', './uploads/category/1554983100black5.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);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -187,7 +190,9 @@ INSERT INTO `customer` (`id`, `user_type`, `name`, `name_arab`, `email_id`, `cod ...@@ -187,7 +190,9 @@ INSERT INTO `customer` (`id`, `user_type`, `name`, `name_arab`, `email_id`, `cod
(5, 1, 'Martin', NULL, '[email protected]', '+91', '7209638333', '30/09/2000', 'Nuvento Kochi', NULL, NULL, 'Support', NULL, '+91', '7777777777', '[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]'), (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]'), (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]'); (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` -- Triggers `customer`
...@@ -338,14 +343,28 @@ CREATE TABLE `recent` ( ...@@ -338,14 +343,28 @@ CREATE TABLE `recent` (
CREATE TABLE `settings` ( CREATE TABLE `settings` (
`id` int(11) NOT NULL, `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, `commission` double DEFAULT NULL,
`vat` double DEFAULT NULL, `vat` double DEFAULT NULL,
`smtp_host` varchar(50) DEFAULT NULL, `smtp_host` varchar(50) DEFAULT NULL,
`smtp_username` varchar(45) DEFAULT NULL, `smtp_username` varchar(45) DEFAULT NULL,
`smtp_password` varchar(100) DEFAULT NULL, `smtp_password` varchar(100) DEFAULT NULL,
`smtp_port` int(11) DEFAULT NULL `smtp_port` int(11) DEFAULT NULL,
`google_api_key` varchar(450) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `settings`
--
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');
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
...@@ -356,9 +375,12 @@ CREATE TABLE `shopper` ( ...@@ -356,9 +375,12 @@ CREATE TABLE `shopper` (
`id` int(11) NOT NULL, `id` int(11) NOT NULL,
`user_type` int(11) NOT NULL DEFAULT '2', `user_type` int(11) NOT NULL DEFAULT '2',
`name` varchar(45) DEFAULT NULL, `name` varchar(45) DEFAULT NULL,
`name_arab` varchar(55) DEFAULT NULL,
`email_id` varchar(50) DEFAULT NULL, `email_id` varchar(50) DEFAULT NULL,
`code` int(55) DEFAULT NULL,
`phone_no` varchar(15) DEFAULT NULL, `phone_no` varchar(15) DEFAULT NULL,
`shop_name` varchar(50) DEFAULT NULL, `shop_name` varchar(50) DEFAULT NULL,
`shop_name_arab` varchar(55) DEFAULT NULL,
`dob` varchar(25) DEFAULT NULL, `dob` varchar(25) DEFAULT NULL,
`profile_photo` varchar(255) DEFAULT NULL, `profile_photo` varchar(255) DEFAULT NULL,
`commission` double DEFAULT NULL `commission` double DEFAULT NULL
...@@ -368,8 +390,11 @@ CREATE TABLE `shopper` ( ...@@ -368,8 +390,11 @@ CREATE TABLE `shopper` (
-- Dumping data for table `shopper` -- Dumping data for table `shopper`
-- --
INSERT INTO `shopper` (`id`, `user_type`, `name`, `email_id`, `phone_no`, `shop_name`, `dob`, `profile_photo`, `commission`) VALUES 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]', '9072127102', 'Nuvento', '31/08/1990', '/assets/images/admin.jpg', 10); (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` -- Triggers `shopper`
...@@ -405,7 +430,8 @@ INSERT INTO `sub_category` (`id`, `sub_cat_name`, `sub_cat_name_arab`, `sub_cat_ ...@@ -405,7 +430,8 @@ INSERT INTO `sub_category` (`id`, `sub_cat_name`, `sub_cat_name_arab`, `sub_cat_
(1, 'Iphone', 'ee', './uploads/subcategory/1554984154steve-jobs.jpg', 1, 1), (1, 'Iphone', 'ee', './uploads/subcategory/1554984154steve-jobs.jpg', 1, 1),
(2, 'Samsung', NULL, '/assets/images/samsung.png', 1, 1), (2, 'Samsung', NULL, '/assets/images/samsung.png', 1, 1),
(3, 'LG', NULL, '/assets/images/lg.png', 1, 2), (3, 'LG', NULL, '/assets/images/lg.png', 1, 2),
(4, 'sct1', 'scat arb', './uploads/subcategory/1554984013red1.jpeg', 1, 3); (4, 'sct1', 'scat arb', './uploads/subcategory/1554984013red1.jpeg', 1, 3),
(5, 'dddd', 'scat arb', './uploads/subcategory/1555050708black5.jpg', 1, 5);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -448,9 +474,15 @@ INSERT INTO `users` (`id`, `user_type`, `user_id`, `username`, `password`, `stat ...@@ -448,9 +474,15 @@ INSERT INTO `users` (`id`, `user_type`, `user_id`, `username`, `password`, `stat
(3, 1, 2, '[email protected]', NULL, 0), (3, 1, 2, '[email protected]', NULL, 0),
(4, 1, 3, '[email protected]', NULL, 0), (4, 1, 3, '[email protected]', NULL, 0),
(6, 1, 5, '[email protected]', 'e10adc3949ba59abbe56e057f20f883e', 1), (6, 1, 5, '[email protected]', 'e10adc3949ba59abbe56e057f20f883e', 1),
(7, 3, 6, '[email protected]', 'fd1837df4323d6b27fd34c10b58b5707', 0), (12, 1, 8, '[email protected]', NULL, 0),
(11, 3, 0, '[email protected]', '2ba4c28a89b106fabf8e5f89d765fa9d', 1), (13, 2, 0, '[email protected]', 'f384782368b3b5393a53e98150328d41', 1),
(12, 1, 8, '[email protected]', NULL, 0); (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);
-- -------------------------------------------------------- -- --------------------------------------------------------
...@@ -709,7 +741,7 @@ ALTER TABLE `booking` ...@@ -709,7 +741,7 @@ ALTER TABLE `booking`
-- AUTO_INCREMENT for table `brand` -- AUTO_INCREMENT for table `brand`
-- --
ALTER TABLE `brand` ALTER TABLE `brand`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
-- --
-- AUTO_INCREMENT for table `cart` -- AUTO_INCREMENT for table `cart`
...@@ -721,13 +753,13 @@ ALTER TABLE `cart` ...@@ -721,13 +753,13 @@ ALTER TABLE `cart`
-- AUTO_INCREMENT for table `category` -- AUTO_INCREMENT for table `category`
-- --
ALTER TABLE `category` ALTER TABLE `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 `customer` -- AUTO_INCREMENT for table `customer`
-- --
ALTER TABLE `customer` ALTER TABLE `customer`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
-- --
-- AUTO_INCREMENT for table `customer_address` -- AUTO_INCREMENT for table `customer_address`
...@@ -781,13 +813,13 @@ ALTER TABLE `recent` ...@@ -781,13 +813,13 @@ ALTER TABLE `recent`
-- AUTO_INCREMENT for table `shopper` -- AUTO_INCREMENT for table `shopper`
-- --
ALTER TABLE `shopper` ALTER TABLE `shopper`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
-- --
-- AUTO_INCREMENT for table `sub_category` -- AUTO_INCREMENT for table `sub_category`
-- --
ALTER TABLE `sub_category` ALTER TABLE `sub_category`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
-- --
-- AUTO_INCREMENT for table `transaction` -- AUTO_INCREMENT for table `transaction`
...@@ -799,7 +831,7 @@ ALTER TABLE `transaction` ...@@ -799,7 +831,7 @@ ALTER TABLE `transaction`
-- AUTO_INCREMENT for table `users` -- AUTO_INCREMENT for table `users`
-- --
ALTER TABLE `users` ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13; MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
-- --
-- AUTO_INCREMENT for table `wish` -- AUTO_INCREMENT for table `wish`
......
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