getConnection(); $token = escape_str($_REQUEST["token"]); $check_arr=$conn->selectQuery(TABLE_QUOTATIONSHARE ,"*","sharetoken='".$token."'","1"); if(!$check_arr['nr']>0) { $client_ip=globalfunc::getIp($conn); $sec=LOCK_ACCESS_MINUTES*60; $expiry_time=date('Y-m-d H:i:s',strtotime('-'.$sec.' seconds',strtotime(NOW))); $lock_qry_str="SELECT SUM(lock_count) lock_count FROM ".TABLE_LOCK_ACCESS." WHERE is_deleted='0' AND modified_on>='".$expiry_time."' AND ip='".$client_ip."' GROUP BY ip LIMIT 1"; $lock_value=$conn->getQueryValue($lock_qry_str); if(count($lock_value)>0 && $lock_value[0]->lock_count>=3) { header("HTTP/1.1 404 Page Not Found"); header('Access-Control-Allow-Origin: *'); echo 'Sorry Invalid Access. Access Blocked For 10 min.'; exit; } globalfunc::insertLockLog($conn,$token); header("HTTP/1.1 404 Page Not Found"); header('Access-Control-Allow-Origin: *'); echo 'PAGE NOT FOUND'; exit; } //GET DEALER $dealer_arr=$conn->selectQuery(DMS_DEALER ,"dealer_code,dealer_name,phone,email,address,state,city"," dealer_code='".$check_arr['result'][0]->dealer_code."' ","1"); $dealer_name=($dealer_arr['nr']>0)?$dealer_arr['result'][0]->dealer_name:''; $dealer_address=($dealer_arr['nr']>0 && $dealer_arr['result'][0]->address!='')?$dealer_arr['result'][0]->address:$dealer_name; $dealer_phone=($dealer_arr['nr']>0 && $dealer_arr['result'][0]->phone!='')?$dealer_arr['result'][0]->phone:''; $dealer_email=($dealer_arr['nr']>0 && $dealer_arr['result'][0]->email!='')?$dealer_arr['result'][0]->email:''; //GET MODEL $model_arr=$conn->selectQuery(DMS_ENQUIRY_MODEL ,"title,title_code,variant,variant_code"," title_code='".$check_arr['result'][0]->model."' AND variant_code='".$check_arr['result'][0]->variant."' ","1"); $model_str=($model_arr['nr']>0)?$model_arr['result'][0]->title:''; $variant_str=($model_arr['nr']>0)?$model_arr['result'][0]->variant:''; $check_arr['result'][0]->exsh_price=($check_arr['result'][0]->exsh_price)?$check_arr['result'][0]->exsh_price:0; $check_arr['result'][0]->rto_price=($check_arr['result'][0]->rto_price)?$check_arr['result'][0]->rto_price:0; $check_arr['result'][0]->insurance_price=($check_arr['result'][0]->insurance_price)?$check_arr['result'][0]->insurance_price:0; $check_arr['result'][0]->access_price=($check_arr['result'][0]->access_price)?$check_arr['result'][0]->access_price:0; $check_arr['result'][0]->exwarr_price=($check_arr['result'][0]->exwarr_price)?$check_arr['result'][0]->exwarr_price:0; $check_arr['result'][0]->other_price=($check_arr['result'][0]->other_price)?$check_arr['result'][0]->other_price:0; $check_arr['result'][0]->total_price=($check_arr['result'][0]->total_price)?$check_arr['result'][0]->total_price:0; // print_r($check_arr); $quotationhtml =' Hyper-M
'.$dealer_name.'
Showroom : '.$dealer_address.'
'; $quotationhtml.=($dealer_phone)?'Tel. : '.$dealer_phone:''; $quotationhtml.=($dealer_phone && $dealer_email)?", ":''; $quotationhtml.=($dealer_email)?'Email: '.$dealer_email:''; $quotationhtml.='
QUOTATION FORM
'.$check_arr['result'][0]->name.'
'.$model_str.'
'.$variant_str.'
'.$check_arr['result'][0]->mobile.'
'.$check_arr['result'][0]->email.'
'. strtoupper(date('d-M-Y',strtotime($check_arr['result'][0]->created_on))).'
'; $quotationhtml.=($check_arr['result'][0]->discount!='')?'':''; $quotationhtml.=($check_arr['result'][0]->discount!='')?'':''; $quotationhtml.='
Vehicle Quotation Unit Price Remarks if any
Ex. Showroom Price
'.$check_arr['result'][0]->exsh_price.'
'; //EXSH REMARKS $quotationhtml.=($check_arr['result'][0]->exsh_remark!='')?'
'.$check_arr['result'][0]->exsh_remark.'
':''; $quotationhtml.='
Road Tax/ RTO Charges
'.$check_arr['result'][0]->rto_price.'
'; //RTO REMARKS $quotationhtml.=($check_arr['result'][0]->rto_remark!='')?'
'.$check_arr['result'][0]->rto_remark.'
':''; $quotationhtml.='
Insurance
'.$check_arr['result'][0]->insurance_price.'
'; //INSURANCE $quotationhtml.=($check_arr['result'][0]->insurance_remark!='')?'
'.$check_arr['result'][0]->insurance_remark.'
':''; $quotationhtml.='
Accessories
'.$check_arr['result'][0]->access_price.'
'; //ACCESSORIES $quotationhtml.=($check_arr['result'][0]->access_remark!='')?'
'.$check_arr['result'][0]->access_remark.'
':''; $quotationhtml.='
Extended Warranty
'.$check_arr['result'][0]->exwarr_price.'
'; //EXTENDED WARRANTY $quotationhtml.=($check_arr['result'][0]->access_remark!='')?'
'.$check_arr['result'][0]->exwarr_remark.'
':''; $quotationhtml.='
Others
'.$check_arr['result'][0]->other_price.'
'; //OTHERS $quotationhtml.=($check_arr['result'][0]->other_remark!='')?'
'.$check_arr['result'][0]->other_remark.'
':''; $quotationhtml.='
Total On-Road Price
'.$check_arr['result'][0]->total_price.'
Offer/Discount
'.$check_arr['result'][0]->discount.'
Price after Discount
'.$check_arr['result'][0]->final_price.'
T&C:

1) The above prices are inclusive of all Taxes

2) This Quote is valid till '.date('d-m-Y',strtotime($check_arr['result'][0]->validity_date)).' Only

3) The above prices are subject to change without any notice & the prices prevailing at the time of delivery shall be charged

This is system generated vehicle quotation only, does not require any signature.

'; echo $quotationhtml; exit; ?>