forked from rutherlesdev/ChegouBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd_booking.php
2515 lines (2367 loc) · 184 KB
/
add_booking.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
define('ROOT_PATH', dirname(__DIR__) . '/');
include_once(ROOT_PATH . "common.php");
$sql = "SELECT vValue,vName FROM `configurations` WHERE vName IN ('APP_DELIVERY_MODE','ENABLE_TOLL_COST','TOLL_COST_APP_ID','TOLL_COST_APP_CODE','CHILD_SEAT_ACCESSIBILITY_OPTION','WHEEL_CHAIR_ACCESSIBILITY_OPTION','HANDICAP_ACCESSIBILITY_OPTION')";
$APP_DELIVERY_MODE = $ENABLE_TOLL_COST = $TOLL_COST_APP_ID = $TOLL_COST_APP_CODE = $CHILD_SEAT_ACCESSIBILITY_OPTION = $WHEEL_CHAIR_ACCESSIBILITY_OPTION = $HANDICAP_ACCESSIBILITY_OPTION = "";
$configData = $obj->MySQLSelect($sql);
for ($c = 0; $c < count($configData); $c++) {
if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "APP_DELIVERY_MODE") {
$APP_DELIVERY_MODE = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "ENABLE_TOLL_COST") {
$ENABLE_TOLL_COST = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "TOLL_COST_APP_ID") {
$TOLL_COST_APP_ID = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "TOLL_COST_APP_CODE") {
$TOLL_COST_APP_CODE = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "CHILD_SEAT_ACCESSIBILITY_OPTION") {
$CHILD_SEAT_ACCESSIBILITY_OPTION = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "WHEEL_CHAIR_ACCESSIBILITY_OPTION") {
$WHEEL_CHAIR_ACCESSIBILITY_OPTION = $configData[$c]['vValue'];
} else if (isset($configData[$c]['vName']) && $configData[$c]['vName'] == "HANDICAP_ACCESSIBILITY_OPTION") {
$HANDICAP_ACCESSIBILITY_OPTION = $configData[$c]['vValue'];
}
}
$script = "booking";
$tbl_name = 'cab_booking';
function converToTzManual($time, $toTz, $fromTz, $dateFormat = "Y-m-d H:i:s") {
$date = new DateTime($time, new DateTimeZone($fromTz));
$date->setTimezone(new DateTimeZone($toTz));
$time = $date->format($dateFormat);
return $time;
}
$userType1 = isset($_REQUEST['userType1']) ? $_REQUEST['userType1'] : '';
$success = isset($_REQUEST['success']) ? $_REQUEST['success'] : '';
$var_msg = isset($_REQUEST['var_msg']) ? $_REQUEST['var_msg'] : '';
$iCabBookingId = isset($_REQUEST['booking_id']) ? $_REQUEST['booking_id'] : '';
$action = ($iCabBookingId != '') ? 'Edit' : 'Add';
//For Country
$sql = "SELECT vCountryCode,vCountry from country where eStatus = 'Active'";
$db_code = $obj->MySQLSelect($sql);
$sql = "select cn.vCountryCode,cn.vCountry,cn.vPhoneCode,cn.vTimeZone from country cn inner join
configurations c on c.vValue=cn.vCountryCode where c.vName='" . DEFAULT_COUNTRY_CODE_WEB . "'";
$db_con = $obj->MySQLSelect($sql);
$vPhoneCode = $generalobj->clearPhone($db_con[0]['vPhoneCode']);
$vRideCountry = isset($_REQUEST['vRideCountry']) ? $_REQUEST['vRideCountry'] : $db_con[0]['vCountryCode'];
$vTimeZone = isset($_REQUEST['vTimeZone']) ? $_REQUEST['vTimeZone'] : $db_con[0]['vTimeZone'];
$vCountry = $db_con[0]['vCountryCode'];
$address = $db_con[0]['vCountry']; // Google HQ
/* $prepAddr = str_replace(' ','+',$address);
$geocode=file_get_contents('https://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false');
$output= json_decode($geocode);
$latitude = $output->results[0]->geometry->location->lat;
$longitude = $output->results[0]->geometry->location->lng; */
$dBooking_date = "";
$sql1 = "SELECT * FROM `package_type` WHERE eStatus='Active'";
$db_PackageType = $obj->MySQLSelect($sql1);
if ($action == 'Edit') {
$sql = "SELECT $tbl_name.*,$tbl_name.fNightPrice as NightSurge,$tbl_name.fPickUpPrice as PickSurge,
register_user.vPhone,register_user.vName,register_user.vLastName,register_user.vEmail,register_user.vPhoneCode,register_user.vCountry FROM " . $tbl_name . " LEFT JOIN register_user on register_user.iUserId=" . $tbl_name . ".iUserId WHERE " . $tbl_name . ".iCabBookingId = '" . $iCabBookingId . "'";
$db_data = $obj->MySQLSelect($sql);
$vLabel = $id;
$systemTimeZone = date_default_timezone_get();
if (count($db_data) > 0) {
foreach ($db_data as $key => $value) {
$iUserId = $value['iUserId'];
$iDriverId = $value['iDriverId'];
$vDistance = $value['vDistance'];
$vDuration = $value['vDuration'];
$dBookingDate = $value['dBooking_date'];
$vSourceAddresss = $value['vSourceAddresss'];
$tDestAddress = $value['tDestAddress'];
$iVehicleTypeId = $value['iVehicleTypeId'];
$vPhone = $generalobj->clearPhone($value['vPhone']);
$vName = $value['vName'];
$vLastName = $generalobj->clearName(" " . $value['vLastName']);
$vEmail = $generalobj->clearEmail($value['vEmail']);
$vPhoneCode = $generalobj->clearPhone($value['vPhoneCode']);
$vCountry = $value['vCountry'];
$iPackageTypeId = $value['iPackageTypeId'];
$tPackageDetails = $value['tPackageDetails'];
$tDeliveryIns = $value['tDeliveryIns'];
$tPickUpIns = $value['tPickUpIns'];
$vReceiverName = $value['vReceiverName'];
$vReceiverMobile = $value['vReceiverMobile'];
$eStatus = $value['eStatus'];
$from_lat_long = '(' . $value['vSourceLatitude'] . ', ' . $value['vSourceLongitude'] . ')';
$from_lat = $value['vSourceLatitude'];
$from_long = $value['vSourceLongitude'];
$to_lat_long = '(' . $value['vDestLatitude'] . ', ' . $value['vDestLongitude'] . ')';
$to_lat = $value['vDestLatitude'];
$to_long = $value['vDestLongitude'];
$eAutoAssign = $value['eAutoAssign'];
$fPickUpPrice = $value['PickSurge'];
$fNightPrice = $value['NightSurge'];
$vRideCountry = $value['vRideCountry'];
$vTimeZone = $value['vTimeZone'];
$eFemaleDriverRequest = $value['eFemaleDriverRequest'];
$eHandiCapAccessibility = $value['eHandiCapAccessibility'];
$etype = $value['eType'];
$eFlatTrip = $value['eFlatTrip'];
$fFlatTripPrice = $value['fFlatTripPrice'];
$eTollSkipped = $value['eTollSkipped'];
$fTollPrice = $value['fTollPrice'];
$vTollPriceCurrencyCode = $value['vTollPriceCurrencyCode'];
$dBooking_date = converToTzManual($dBookingDate, $vTimeZone, $systemTimeZone);
if ($etype == 'Ride') {
$eRideType = 'later';
}
if ($etype == 'Deliver') {
$eDeliveryType = 'later';
}
$vCouponCode = $value['vCouponCode'];
}
}
}
if ($_SESSION['sess_user'] == 'rider' && $userType1 == 'rider') {
$sess_iUserId = $_SESSION['sess_iUserId'];
$rsql = "SELECT * FROM `register_user` WHERE iUserId='" . $sess_iUserId . "'";
$db_userdata = $obj->MySQLSelect($rsql);
$vCountry = $db_userdata[0]['vCountry'];
$vPhone = $generalobj->clearPhone($db_userdata[0]['vPhone']);
$vName = $db_userdata[0]['vName'];
$vLastName = $db_userdata[0]['vLastName'];
$vEmail = $generalobj->clearEmail($db_userdata[0]['vEmail']);
$vPhoneCode = $generalobj->clearPhone($db_userdata[0]['vPhoneCode']);
$eAutoAssign = 'Yes';
$eBookingFrom = 'User';
}
if ($_SESSION['sess_user'] == 'company' && $userType1 == 'company') {
$sess_iCompanyId = $_SESSION['sess_iCompanyId'];
$eBookingFrom = 'Company';
}
if ($eBookingFrom == '') {
$eBookingFrom = 'Admin';
}
//Ride Vehicle data
$sql = "SELECT iVehicleTypeId,vVehicleType_" . $_SESSION['sess_lang'] . " AS vVehicleType,vLogo,vLogo1 FROM vehicle_type WHERE eType = 'Ride' ORDER BY iVehicleTypeId ASC";
$db_ride_vehicles = $obj->MySQLSelect($sql);
//Delivery Vehicle data
$sql = "SELECT iVehicleTypeId,vVehicleType_" . $_SESSION['sess_lang'] . " AS vVehicleType,vLogo,vLogo1 FROM vehicle_type WHERE eType = 'Deliver' ORDER BY iVehicleTypeId ASC";
$db_delivery_vehicles = $obj->MySQLSelect($sql);
?>
<div id="content">
<div class="inner">
<div class="row">
<div class="col-lg-8">
<? if ($APP_TYPE != "UberX" && $APP_TYPE != "Ride-Delivery-UberX") { ?>
<h1> Manual <?php echo $langage_lbl['LBL_TEXI_ADMIN']; ?> Dispatch </h1>
<?php } else { ?>
<h1> <?php echo $langage_lbl['LBL_MANUAL_TAXI_DISPATCH']; ?> </h1>
<?php } ?>
</div>
<div class="col-lg-4 helpbutton">
<? if ($APP_TYPE != "UberX") { ?>
<h1 class="float-right"><a class="btn btn-primary how_it_work_btn" data-toggle="modal" data-target="#myModal"><i class="fa fa-question-circle" style="font-size: 18px;"></i> <?php echo $langage_lbl['LBL_DIS_HOW_IT_WORKS']; ?></a></h1>
<? } else { ?>
<h1 class="float-right"><a class="btn btn-primary how_it_work_btn" data-toggle="modal" data-target="#myModalufx"><i class="fa fa-question-circle" style="font-size: 18px;"></i> <?php echo $langage_lbl['LBL_DIS_HOW_IT_WORKS']; ?></a></h1>
<? } ?>
</div>
</div>
<hr />
<form name="add_booking_form" id="add_booking_form" method="post" action="<?= $tconfig["tsite_url"] ?>booking/action_booking.php" >
<div class="form-group" style="display: inline-block;">
<?php if ($success == "1") { ?>
<div class="alert alert-success alert-dismissable">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">x</button>
<?php
echo ($vassign != "1") ? 'Booking Has Been Added Successfully.' : $langage_lbl['LBL_DRIVER_TXT_ADMIN'] . ' Has Been Assigned Successfully.';
?>
</div>
<br/>
<?php } ?>
<?php if ($success == 2) { ?>
<div class="alert alert-danger alert-dismissable">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">x</button>
"Edit / Delete Record Feature" has been disabled on the Demo Admin Panel. This feature will be enabled on the main script we will provide you. </div>
<br/>
<?php } ?>
<?php if ($success == 0 && $var_msg != "") { ?>
<div class="alert alert-danger alert-dismissable">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">x</button>
<?= $var_msg; ?>
</div>
<br/>
<?php } ?>
<input type="hidden" name="previousLink" id="previousLink" value=""/>
<input type="hidden" name="eBookingFrom" id="eBookingFrom" value="<?= $eBookingFrom ?>" />
<input type="hidden" name="backlink" id="backlink" value="cabbooking.php"/>
<input type="hidden" name="distance" id="distance" value="<?= $vDistance; ?>">
<input type="hidden" name="duration" id="duration" value="<?= $vDuration; ?>">
<input type="hidden" name="from_lat_long" id="from_lat_long" value="<?= $from_lat_long; ?>" >
<input type="hidden" name="from_lat" id="from_lat" value="<?= $from_lat; ?>" >
<input type="hidden" name="from_long" id="from_long" value="<?= $from_long; ?>" >
<input type="hidden" name="to_lat_long" id="to_lat_long" value="<?= $to_lat_long; ?>" >
<input type="hidden" name="to_lat" id="to_lat" value="<?= $to_lat; ?>" >
<input type="hidden" name="to_long" id="to_long" value="<?= $to_long; ?>" >
<input type="hidden" name="fNightPrice" id="fNightPrice" value="<?= $fNightPrice; ?>" >
<input type="hidden" name="fPickUpPrice" id="fPickUpPrice" value="<?= $fPickUpPrice; ?>" >
<input type="hidden" name="eFlatTrip" id="eFlatTrip" value="<?= $eFlatTrip; ?>" >
<input type="hidden" name="fFlatTripPrice" id="fFlatTripPrice" value="<?= $fFlatTripPrice; ?>" >
<input type="hidden" value="1" id="location_found" name="location_found">
<input type="hidden" value="" id="user_type" name="user_type" >
<input type="hidden" value="<?= $iUserId; ?>" id="iUserId" name="iUserId" >
<input type="hidden" value="<?= $eStatus; ?>" id="eStatus" name="eStatus" >
<input type="hidden" value="<?= $vTimeZone; ?>" id="vTimeZone" name="vTimeZone" >
<input type="hidden" value="<?= $vRideCountry; ?>" id="vRideCountry" name="vRideCountry" >
<input type="hidden" value="<?= $iCabBookingId; ?>" id="iCabBookingId" name="iCabBookingId" >
<input type="hidden" value="<?= $GOOGLE_SEVER_API_KEY_WEB; ?>" id="google_server_key" name="google_server_key" >
<input type="hidden" value="" id="getradius" name="getradius" >
<input type="hidden" value="KMs" id="eUnit" name="eUnit" >
<input type="hidden" name="fTollPrice" id="fTollPrice" value="<?= $fTollPrice ?>">
<input type="hidden" name="vTollPriceCurrencyCode" id="vTollPriceCurrencyCode" value="<?= $vTollPriceCurrencyCode ?>">
<input type="hidden" name="eTollSkipped" id="eTollSkipped" value="<?= $eTollSkipped ?>">
<input type="hidden" name="iCompanyId" id="iCompanyId" value="<?= $sess_iCompanyId; ?>">
<?php if ($APP_TYPE != 'Ride-Delivery' && $APP_TYPE != 'Ride-Delivery-UberX' || ($APP_TYPE == 'Ride-Delivery' && $APP_DELIVERY_MODE == "Multi")) { ?>
<input type="hidden" value="<?= $etype ?>" id="eType" name="eType" />
<?php } ?>
<div class="add-booking-form-taxi add-booking-form-taxi1 col-lg-12" id="add-booking-form-taxi1"> <span class="col0">
<select name="vCountry" id="vCountry" class="form-control form-control-select" onChange="changeCode(this.value, '<?php echo $iVehicleTypeId; ?>');setDriverListing();" required>
<!-- <option value="">Select Country</option> -->
<? for ($i = 0; $i < count($db_code); $i++) { ?>
<option value="<?= $db_code[$i]['vCountryCode'] ?>"
<?php if ($db_code[$i]['vCountryCode'] == $vCountry) {
echo "selected";
} ?> >
<?= $db_code[$i]['vCountry']; ?>
</option>
<? } ?>
</select>
</span>
<span class="col6">
<input type="text" class="form-control add-book-input" name="vPhoneCode" id="vPhoneCode" value="<?= $vPhoneCode; ?>" readonly />
</span>
<span class="col2">
<input type="text" pattern="[0-9]{1,}" title="Enter Mobile Number." class="form-control add-book-input" name="vPhone" id="vPhone" value="<?= $vPhone; ?>" placeholder="<?php echo $langage_lbl['LBL_ENTER_PHONE_NO_WEB']; ?>" onKeyUp="return isNumberKey(event)" onblur="return isNumberKey(event)" required />
</span>
<span class="col3">
<input type="text" class="form-control first-name1" name="vName" id="vName" value="<?= $vName; ?>" placeholder="<?php echo $langage_lbl['LBL_YOUR_FIRST_NAME']; ?>" required />
<input type="text" class="form-control last-name1" name="vLastName" id="vLastName" value="<?= $vLastName; ?>" placeholder="<?php echo $langage_lbl['LBL_YOUR_LAST_NAME']; ?>" required />
</span>
<span class="col4" style="margin: 0px;">
<input type="email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$" class="form-control" name="vEmail" id="vEmail" value="<?= $vEmail; ?>" placeholder="<?php echo $langage_lbl['LBL_EMAIL_TEXT']; ?>" required >
<div id="emailCheck"></div>
</span>
</div>
</div>
<div class="map-main-page-inner">
<div class="content map-main-page-inner-tab" id="content_1">
<div class="form-group service-type">
<?php if (($APP_TYPE == 'Ride-Delivery' || $APP_TYPE == 'Ride-Delivery-UberX')) { ?>
<h3 ><?php echo $langage_lbl['LBL_MYTRIP_TRIP_TYPE']; ?></h3>
<div class="radio-but">
<div class="add-booking-radiobut radio-inline">
<input class="add-booking" id="r1" name="eType" type="radio" value="Ride" <?php if ($etype == 'Ride') {
echo 'checked';
} ?> onChange="show_type(this.value), showVehicleCountryVise($('#vCountry option:selected').val(), '<?php echo $iVehicleTypeId; ?>', this.value);" checked="checked">
<label for="r1"><?php echo $langage_lbl['LBL_RIDE']; ?></label></div>
<div class="add-booking-radiobut radio-inline">
<input id="r2" name="eType" type="radio" value="Deliver" <?php if ($etype == 'Deliver') {
echo 'checked';
} ?> onChange="show_type(this.value), showVehicleCountryVise($('#vCountry option:selected').val(), '<?php echo $iVehicleTypeId; ?>', this.value);">
<label for="r2"><?php echo $langage_lbl['LBL_DELIVERY']; ?></label></div>
<? if ($APP_TYPE == 'Ride-Delivery-UberX') { ?>
<div class="add-booking-radiobut radio-inline">
<input class="add-booking" id="r3" name="eType" type="radio" value="UberX" <?php if ($etype == 'UberX') {
echo 'checked';
} ?> onChange="show_type(this.value), showVehicleCountryVise($('#vCountry option:selected').val(), '<?php echo $iVehicleTypeId; ?>', this.value);">
<label for="r3"><?php echo $langage_lbl['LBL_OTHER']; ?></label></div>
<? } ?>
</div>
<?php } ?>
</div>
<div class="map-live-hs-mid">
<?php if ($APP_TYPE == 'Ride-Delivery' || $APP_TYPE == 'Delivery' || $APP_TYPE == 'Ride-Delivery-UberX') { ?>
<div id="ride-delivery-type" style="display:none; margin-top:20px;">
<label class="delivery-option" ><?php echo $langage_lbl['LBL_DELIVERY_OPTIONS_WEB']; ?> :</label>
<span>
<select class="form-control form-control-select form-control14" name="iPackageTypeId" id="iPackageTypeId">
<option value=""><?php echo $langage_lbl['LBL_SELECT_PACKAGE_TYPE']; ?></option>
<? foreach ($db_PackageType as $val) { ?>
<option value="<?= $val['iPackageTypeId'] ?>" <? if ($val['iPackageTypeId'] == $iPackageTypeId && $action == "Edit") { ?>selected<? } ?>><?= $val['vName']; ?></option>
<? } ?>
</select>
</span>
<span>
<input type="text" class="form-control form-control14" name="vReceiverName" id="vReceiverName" value="<?= $vReceiverName; ?>" placeholder="Recipient's name" />
</span>
<span>
<input type="text" class="form-control form-control14" pattern="[0-9]{1,}" title="Enter Mobile Number." name="vReceiverMobile" id="vReceiverMobile" value="<?= $vReceiverMobile; ?>" placeholder="Recipient's mobile" >
</span>
<span> <input type="text" class="form-control form-control14" name="tPickUpIns" id="tPickUpIns" value="<?= $tPickUpIns; ?>" placeholder="Pick up Ins"></span>
<span> <input type="text" class="form-control form-control14" name="tDeliveryIns" id="tDeliveryIns" value="<?= $tDeliveryIns; ?>" placeholder="Delivery Ins"></span>
<span style="margin-bottom: 0px"> <input type="text" class="form-control form-control14" name="tPackageDetails" id="tPackageDetails" value="<?= $tPackageDetails; ?>" placeholder="Package details"></span>
</div>
<?php } ?>
</div>
<div class="map-live-hs-mid">
<span class="col5">
<div class="pickup-location">
<h3 ><?php echo $langage_lbl['LBL_PICK_UP_LOCATION']; ?></h3>
<input type="text" class="ride-location1 highalert txt_active form-control first-name1" name="vSourceAddresss" id="from" value="<?= $vSourceAddresss; ?>" placeholder="<?= ucfirst(strtolower($langage_lbl['LBL_PICKUP_LOCATION_HEADER_TXT'])); ?>" required onpaste="checkrestrictionfrom('from');">
</div>
<? if ($APP_TYPE != "UberX") { ?>
<div class="pickup-location">
<h3 class="tolabel" ><?= ucfirst(strtolower($langage_lbl['LBL_DROP_OFF_LOCATION_TXT'])); ?></h3>
<input type="text" class="ride-location1 highalert txt_active form-control last-name1" name="tDestAddress" id="to" value="<?= $tDestAddress; ?>" placeholder="<?= ucfirst(strtolower($langage_lbl['LBL_DROP_OFF_LOCATION_TXT'])); ?>" required onpaste="checkrestrictionto('to');">
</div>
<? } ?>
</span>
<span>
<? if ($userType1 != 'rider') { ?>
<div class="vehicle-type">
<h3 ><?php echo $langage_lbl['LBL_VEHICLE_TYPE_SMALL_TXT']; ?></h3>
<select class="form-control form-control-select form-control14" name='iVehicleTypeId' id="iVehicleTypeId" required onChange="showAsVehicleType(this.value)">
<option value="" >Select <?php echo $langage_lbl['LBL_VEHICLE_TYPE_SMALL_TXT']; ?></option>
<?php /*
$sql1 = "SELECT iVehicleTypeId, vVehicleType FROM `vehicle_type` WHERE 1";
$db_carType = $obj->MySQLSelect($sql1);
foreach ($db_carType as $db_car) {
?>
<option value="<?php echo $db_car['iVehicleTypeId']; ?>" <?php if ($iVehicleTypeId == $db_car['iVehicleTypeId']) {
echo "selected";
} ?> ><?php echo $db_car['vVehicleType']; ?></option>
<?php } */ ?>
</select>
</div>
<? } ?>
<? if ($userType1 == 'rider') { ?>
<div class="vehicle-type">
<h3 ><?php echo $langage_lbl['LBL_VEHICLE_TYPE_SMALL_TXT']; ?></h3>
<div class="radio-vehicle-type rideShow" >
<?php
foreach ($db_ride_vehicles as $key => $vehilceval) {
$msatt = $acls = "";
if ($key == 0) { //For set first vehicle active
$msatt = "hover_"; //For vehicle active
$acls = "checked"; //For set first vehicle active
$logo = $vehilceval['vLogo1'];
} else {
$logo = $vehilceval['vLogo'];
}
?>
<!-- Save Active images for all vehicles -->
<input type="hidden" name="vehicle_image_hover_<?php echo $vehilceval['iVehicleTypeId']; ?>" id="vehicle_image_hover_<?php echo $vehilceval['iVehicleTypeId']; ?>" value='<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $vehilceval["iVehicleTypeId"] . "/android/" . $vehilceval['vLogo1']; ?>' />
<!-- Save In-active images for all vehicles -->
<input type="hidden" name="vehicle_image_<?php echo $vehilceval['iVehicleTypeId']; ?>" id="vehicle_image_<?php echo $vehilceval['iVehicleTypeId']; ?>" value='<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $vehilceval["iVehicleTypeId"] . "/android/" . $vehilceval['vLogo']; ?>' />
<b class="vehicleImageIdClass_ride" id="<?php echo $vehilceval['iVehicleTypeId']; ?>"><input id="r5_<?php echo $vehilceval['iVehicleTypeId']; ?>" name="iDriverVehicleId_ride" type="radio" <?php echo $acls; ?> value="<?php echo $vehilceval['iVehicleTypeId']; ?>">
<label for="r5_<?php echo $vehilceval['iVehicleTypeId']; ?>" style="display: block;"><em><img src="<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $vehilceval['iVehicleTypeId'] . '/android/' . $logo; ?>" alt="" data-id="<?php echo $vehilceval['iVehicleTypeId']; ?>" style="width: 60px;height: 60px;"></em><?php echo $vehilceval['vVehicleType']; ?><p style="float: right" class="tootltipclass"><img src="assets/img/question-icon.jpg" id="tooltip_<?= $vehilceval['iVehicleTypeId']; ?>" alt="Question" onClick="showEstimateFareDisplayFare(<?= $vehilceval['iVehicleTypeId']; ?>);"></p>
</label>
</b>
<? } ?>
</div>
<!-- Delivery Vehicles -->
<div class="radio-vehicle-type deliveryShow" style="display:none;">
<?php
for ($i = 0; $i < count($db_delivery_vehicles); $i++) {
$msatt = $acls = "";
if ($i == 0) {
$msatt = "hover_";
$acls = "checked";
$logo = $db_delivery_vehicles[$i]['vLogo1'];
} else {
$logo = $db_delivery_vehicles[$i]['vLogo'];
}
?>
<!-- Save Active images for all vehicles -->
<input type="hidden" name="vehicle_image_hover_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" id="vehicle_image_hover_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" value='<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $db_delivery_vehicles[$i]["iVehicleTypeId"] . "/android/" . $db_delivery_vehicles[$i]['vLogo1']; ?>' />
<!-- Save In-active images for all vehicles -->
<input type="hidden" name="vehicle_image_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" id="vehicle_image_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" value='<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $db_delivery_vehicles[$i]["iVehicleTypeId"] . "/android/" . $db_delivery_vehicles[$i]['vLogo']; ?>' />
<!-- Vehicles selection and name -->
<b class="vehicleImageIdClass_delivery" id="<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>"><input id="r5_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" name="iDriverVehicleId_delivery" type="radio" <?php echo $acls; ?> value="<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>">
<label for="r5_<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" style="display: block;"><em><img src="<?php echo $tconfig["tsite_upload_images_vehicle_type"] . "/" . $db_delivery_vehicles[$i]['iVehicleTypeId'] . '/android/' . $logo; ?>" alt="" data-id="<?php echo $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" style="width: 60px;height: 60px;"></em><?php echo $db_delivery_vehicles[$i]['vVehicleType']; ?><p style="float: right" class="tootltipclass"><img src="assets/img/question-icon.jpg" id="tooltip_<?= $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>" alt="Question" onClick="showEstimateFareDisplayFare(<?= $db_delivery_vehicles[$i]['iVehicleTypeId']; ?>);"></p></label></b>
<?php } ?>
</div>
<div class="vehicle-type-ufx" style="display: none;">
<select class="form-control form-control-select form-control14" name='iVehicleTypeId' id="iVehicleTypeId" onChange="showVehicleTypeAmount(this.value)">
<option value="" >Select <?php echo $langage_lbl['LBL_VEHICLE_TYPE_SMALL_TXT']; ?></option>
</select>
<div class="clear"></div>
<div id="iVehicleTypeData" style="display: none;">
</div>
</div>
</div>
<? } ?>
</span>
<span class="service-pickup-type">
<h3 ><?php echo $langage_lbl['LBL_SELECT_YOUR_PICKUP_TYPE_WEB']; ?></h3>
<!-- For Ride Options -->
<div class="radio-but-type rideShow">
<b>
<input id="r3_eRideType" name="eRideType" type="radio" value="now" <? if ($eRideType != 'later') { ?> checked="" <? } ?>>
<label for="r3_eRideType"><?php echo $langage_lbl['LBL_RIDE_NOW']; ?></label>
</b>
<b>
<input id="r4_eRideType" name="eRideType" type="radio" value="later" <? if ($eRideType == 'later') { ?> checked="" <? } ?>>
<label for="r4_eRideType"><?php echo $langage_lbl['LBL_RIDE_LATER']; ?></label>
</b>
</div>
<!-- For Delivery Options -->
<div class="radio-but-type deliveryShow" style="display:none;">
<b><input id="r3_eDeliveryType" name="eDeliveryType" type="radio" checked='checked' value="now" <? if ($eDeliveryType != 'later') { ?> checked="" <? } ?>>
<label for="r3_eDeliveryType"><?php echo $langage_lbl['LBL_DELIVER_NOW_WEB']; ?></label>
</b><b>
<input id="r4_eDeliveryType" name="eDeliveryType" type="radio" value="later" <? if ($eDeliveryType == 'later') { ?> checked="" <? } ?>>
<label for="r4_eDeliveryType"><?php echo $langage_lbl['LBL_DELIVER_LATER_WEB']; ?></label></b>
</div>
</span>
<span class="dateSchedule" style="display:none">
<input type="text" class="form-control form-control14" name="dBooking_date" id="datetimepicker4" value="<?= $dBooking_date; ?>" placeholder="<?php echo $langage_lbl['LBL_SELECT_DATETIME_WEB']; ?>" onBlur="getFarevalues('');<?php if ($APP_TYPE == "UberX") { ?>setDriverListing();<?php } ?>">
</span>
<!-- new added -->
<div class="pickup-location pickup-location1" style="margin-bottom: 10px;">
<h3 ><?php echo $langage_lbl['LBL_DISCOUNT_CODE_WEB']; ?></h3>
<span class="form-group"><div><input name="vCouponCode" id="promocode" type="text" placeholder="<?php echo $langage_lbl['LBL_COUPON_CODE_WEB']; ?>" value="<?= $vCouponCode ?>"></div></span>
<b class='promocode-btn002'><a href="javascript:void(0);" id="myButton" class="submit" onclick="checkPromoCode();"><?php echo $langage_lbl['LBL_APPLY']; ?></a></b>
</div>
<? if ($APP_TYPE != 'UberX') { ?>
<?php if ($APP_TYPE == 'Ride' || $APP_TYPE == 'Ride-Delivery' || $APP_TYPE == 'Ride-Delivery-UberX') { ?>
<div id="ride-type" style="display:block;">
<span class="auto_assign001">
<input type="checkbox" name="eFemaleDriverRequest" id="eFemaleDriverRequest" value="Yes" <?php if ($eFemaleDriverRequest == 'Yes') echo 'checked'; ?>>
<p><?php echo $langage_lbl['LBL_LADIES_ONLY_RIDE_WEB']; ?></p>
</span>
<?php if (isset($HANDICAP_ACCESSIBILITY_OPTION) && $HANDICAP_ACCESSIBILITY_OPTION == "Yes") { ?>
<span class="auto_assign001">
<input type="checkbox" name="eHandiCapAccessibility" id="eHandiCapAccessibility" value="Yes" <?php if ($eHandiCapAccessibility == 'Yes') echo 'checked'; ?>>
<p><?php echo $langage_lbl['LBL_PREFER_HANDICAP_ACCESSBILITY_WEB']; ?></p>
</span>
<?php } if (isset($CHILD_SEAT_ACCESSIBILITY_OPTION) && $CHILD_SEAT_ACCESSIBILITY_OPTION == "Yes") { ?>
<span class="auto_assign001">
<input type="checkbox" name="eChildSeatAvailable" id="eChildSeatAvailable" value="Yes" <?php if ($eChildSeatAvailable == 'Yes') echo 'checked'; ?>>
<p><?php echo $langage_lbl['LBL_CHILD_SEAT_ADD_VEHICLES']; ?></p>
</span>
<?php } if (isset($WHEEL_CHAIR_ACCESSIBILITY_OPTION) && $WHEEL_CHAIR_ACCESSIBILITY_OPTION == "Yes") { ?>
<span class="auto_assign001">
<input type="checkbox" name="eWheelChairAvailable" id="eWheelChairAvailable" value="Yes" <?php if ($eWheelChairAvailable == 'Yes') echo 'checked'; ?>>
<p><?php echo $langage_lbl['LBL_WHEEL_CHAIR_ADD_VEHICLES']; ?></p>
</span>
<?php } ?>
</div>
<?php } ?>
<span class="autoassignbtn auto_assign001">
<input type="checkbox" name="eAutoAssign" id="eAutoAssign" value="Yes" <?php if ($eAutoAssign == 'Yes') echo 'checked'; ?>>
<p><?php echo $langage_lbl['LBL_AUTO_ASSIGN_WEB']; ?> <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?></p>
</span>
<span class="auto_assignOr">
<h3>OR</h3>
</span>
<?php } ?>
<span id="showdriverSet001" style="display:none;"><p class="margin-right5">Assigned <?php echo $langage_lbl['LBL_DRIVER_TXT']; ?>: </p><p id="driverSet001"></p></span>
</div>
<div class="driverlists">
<span class="add-booking1">
<input name="" type="text" placeholder="Type <?= $langage_lbl['LBL_DRIVER_PROVIDER']; ?> name to search from below list" id="name_keyWord" onKeyUp="get_drivers_list(this.value)">
</span>
<ul id="driver_main_list" style="">
<div class="" id="imageIcons" style="width:100%;">
<div align="center">
<img src="default.gif">
<span><?php echo $langage_lbl['LBL_RETRIEVING_WEB']; ?> <?php echo $langage_lbl['LBL_DIVER']; ?> list.Please Wait...</span>
</div>
</div>
</ul>
<input type="text" name="iDriverId" id="iDriverId" value="" class="form-control height-1" required>
</div>
<!-- <div class="service-pickup-type">
<h3>Choose Your Payment Method</h3>
<div class="radio-but-type"> <b>
<input id="vTripPaymentMode_r01" name="vTripPaymentMode" checked type="radio" value="cash" onchange="cardDetailChange(this.value);">
<label for="vTripPaymentMode_r01">Cash</label>
</b> <b>
<input id="vTripPaymentMode_r02" name="vTripPaymentMode" type="radio" value="card" onchange="cardDetailChange(this.value);">
<label for="vTripPaymentMode_r02">Credit Card</label>
</b>
</div>
</div>
<span class="cardno-main-detail002">
<?php if ($vUserCard != "") { ?>
<p class='cardno-detail002' style="display:none;"> <b><?php echo $vUserCard; ?></b> <a href="javascript:void(0);" class="change-card002" onclick="showHideToggle('cardDetialClass001','toggle','class');">Click here to change</a></b>
<?php } ?>
</span> -->
</div>
<div class="map-page">
<div class="panel-heading location-map" style="background:none;">
<div class="google-map-wrap">
<div class="map-color-code">
<div>
<label style="width: 20%;"><?php echo $langage_lbl['LBL_PROVIDER_DRIVER_AVAILABILITY']; ?> </label>
<span class="select-map-availability"><select onChange="setNewDriverLocations(this.value)" id="newSelect02">
<option value='' data-id=""><?php echo $langage_lbl['LBL_ALL']; ?></option>
<option value="Available" data-id="img/green-icon.png"><?= $langage_lbl['LBL_AVAILABLE']; ?></option>
<option value="Active" data-id="img/red.png"><?php echo $langage_lbl['LBL_ENROUTE_TO']; ?></option>
<option value="Arrived" data-id="img/blue.png"><?php echo $langage_lbl['LBL_REACHED_PICKUP']; ?></option>
<option value="On Going Trip" data-id="img/yellow.png"><?php echo $langage_lbl['LBL_JOURNEY_STARTED']; ?></option>
<option value="Not Available" data-id="img/offline-icon.png"><?= $langage_lbl['LBL_OFFLINE']; ?></option>
</select></span>
</div>
<div style="margin-top: 15px;">
<label style="width: 20%;"><?php echo $langage_lbl['LBL_MAP_ZOOM_LEVEL_WEB']; ?></label>
<span>
<?php $radius_driver = array(5, 10, 20, 30); ?>
<select class="form-control form-control-select form-control14" name='radius-id' id="radius-id" onChange="play(this.value)" style="width: 40%;display: inline-block;">
<option value=""> <?php echo $langage_lbl['LBL_SELECT_RADIUS']; ?> </option>
<?php foreach ($radius_driver as $value) { ?>
<option value="<?php echo $value ?>"><?php echo $value . $DEFAULT_DISTANCE_UNIT . ' Radius'; ?></option>
<?php } ?>
</select>
</span>
</div>
</div>
<div id="map-canvas" class="google-map" style="width:100%; height:500px;"></div>
</div>
</div>
</div>
<? if ($userType1 != 'rider') { ?>
<?
if ($APP_TYPE != 'UberX') {
if ($userType1 == 'company') {
$class = 'total-price total-price1 new';
} else {
$class = 'total-price total-price1';
}
?>
<div class="<?= $class; ?>" > <h3><?php echo $langage_lbl['LBL_FARE_ESTIMATION_TXT']; ?></h3>
<hr>
<ul>
<li id="MinFare">
<b><?php echo $langage_lbl['LBL_MINIMUM_FARE']; ?></b> :
<?php echo $generalobj->symbol_currency(); ?>
<em id="minimum_fare_price">0</em>
</li>
<li id="BaseFare">
<b><?php echo $langage_lbl['LBL_BASE_FARE_SMALL_TXT']; ?></b> :
<?php echo $generalobj->symbol_currency(); ?>
<em id="base_fare_price">0</em>
</li>
<li id="FixFare" style="display:none">
<b><?php echo $langage_lbl['LBL_FIX_FARE_WEB']; ?></b> :
<?php echo $generalobj->symbol_currency(); ?>
<em id="fix_fare_price">0</em>
</li>
<li id="DistanceFare">
<b><?php echo $langage_lbl['LBL_DISTANCE_TXT']; ?> (<em id="dist_fare">0</em> <em id="change_eUnit"><? echo $DEFAULT_DISTANCE_UNIT; ?></em>)</b> :
<?php echo $generalobj->symbol_currency(); ?>
<em id="dist_fare_price">0</em>
</li>
<li id="TimeFare">
<b><?php echo $langage_lbl['LBL_TIME_TXT']; ?> (<em id="time_fare">0</em> Minutes)</b> :
<?php echo $generalobj->symbol_currency(); ?>
<em id="time_fare_price">0</em>
</li>
<li id="fare_normal" style="display:none">
<b><?php echo $langage_lbl['LBL_NORMAL_FARE']; ?></b> : <?php echo $generalobj->symbol_currency(); ?>
<em id="normal_fare_price">0</em>
</li>
<li id="fare_surge" style="display:none">
<b><?php echo $langage_lbl['LBL_SURCHARGE_DIFF_TXT']; ?> (<em id="fare_surge_price">0</em> X)</b>
: <?php echo $generalobj->symbol_currency(); ?> <em id="surge_fare_diff">0</em>
</li>
<li id="toll_price" style="display:none">
<b><?php echo $langage_lbl['LBL_TOLL_TXT']; ?> </b>
: <?php echo $generalobj->symbol_currency(); ?> <em id="toll_price_val"><?= $fTollPrice ?></em>
</li>
</ul>
<span><?php echo $langage_lbl['LBL_Total_Fare']; ?><b>
<?php echo $generalobj->symbol_currency(); ?>
<em id="total_fare_price">0</em></b></span> </div>
<? }
}
?>
<!-- popup -->
<div class="map-popup" style="display:none" id="driver_popup"></div>
<!-- popup end -->
</div>
<input type="hidden" name="newType" id="newType" value="">
<input type="hidden" name="submitbtn" id="submitbtn" value="submitform">
<div style="clear:both;"></div>
<div class="book-now-reset add-booking-button"><span>
<input type="submit" class="save btn-info button-submit" name="submitbutton" id="submitbutton" value="<?php echo $langage_lbl['LBL_REQUEST_DRIVER_WEB']; ?>">
<!-- <input type="reset" class="save btn-info button-submit" name="reset" id="reset12" value="Reset" > -->
</span></div>
</form>
<div style="clear:both;"></div>
<div class="admin-notes">
<h4>Notes:</h4>
<ul>
<li>
Administrator can Add / Edit <?php echo $langage_lbl['LBL_RIDER_RIDE_MAIN_SCREEN']; ?> later booking on this page.
</li>
<li>
<?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> current availability is not connected with booking being made. Please confirm future avaialbility of <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> before doing booking.
</li>
<li>Adding booking from here will not send request to <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> immediately.</li>
<li>In case of "Auto Assign <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>" option selected, <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>(s) get automatic request before 8-12 minutes of actual booking time.</li>
<li>In case of "Auto Assign <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>" option not selected, <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>(s) get booking confirmation sms as well as reminder sms before 30 minutes of actual booking. <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> has to start the scheduled <?= $langage_lbl['LBL_TRIP_TXT_ADMIN']; ?> by going to "Your <?= $langage_lbl['LBL_TRIP_TXT_ADMIN']; ?>" >> Upcoming section from <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> App.</li>
<li>In case of "Auto Assign <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>", the competitive algorithm will be followed instead of one you have selected in settings.</li>
</ul>
</div>
</div>
<!--END PAGE CONTENT -->
</div>
<div style="clear:both;"></div>
<!-- Card Modal -->
<div id="CardModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<form id="cardPayForm" class="cardDetialClass001" novalidate autocomplete="on" method="POST">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><?= $langage_lbl['LBL_CARD_PAYMENT_DETAILS']; ?></h4>
</div>
<div class="modal-body">
<input type="hidden" name="type" value="GenerateToken" >
<span><div class="form-group"><input name="cardNo" type="text" placeholder="Enter Your Card Number" class="cc-number" data-stripe="number"/></div></span>
<span>
<div class="form-group"><input type="text" name="cardExp" class="add-car-mm cc-exp" placeholder="MM / YYYY" data-stripe="exp"/></div>
<div class="form-group"><input type="text" name="cardCvv" class="add-car-cvv cc-cvc" placeholder="cvv" data-stripe="cvc"/></div>
<h2 class="validation"></h2>
</div>
<div class="modal-footer">
<b class='card-btn002'><a href="javascript:void(0);" class="btn btn-success submit" id="validatePayCard"><?= $langage_lbl['Add Card']; ?></a></b>
<button type="button" class="btn btn-danger" data-dismiss="modal"><?= $langage_lbl['LBL_CLOSE_TXT']; ?></button>
</div>
</form>
</div>
</div>
</div>
<!--Wallet Low Balance-->
<div class="modal fade" id="usermodel" tabindex="-1" role="dialog" aria-labelledby="usermodel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<input type="hidden" name="iDriverId_temp" id="iDriverId_temp">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="inactiveModalLabel"><?= $langage_lbl['LBL_LOW_WALLET_BALANCE_WEB']; ?></h4>
</div>
<div class="modal-body">
<p><span style="font-size: 15px;"> This <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> is having low balance in his wallet and is not able to accept cash ride. Would you still like to assign this <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?>?</span></p>
<p><b style="font-size: 15px;"> <?= $langage_lbl['LBL_MINIMUM_REQUIRED_BALANCE_WEB']; ?> : </b><span style="font-size: 15px;"><?php echo $generalobj->symbol_currency() . " " . number_format($WALLET_MIN_BALANCE, 2); ?></span></p>
<p><b style="font-size: 15px;"> <?= $langage_lbl['LBL_AVAILABLE_BALANCE_WEB']; ?> : </b><span style="font-size: 15px;"><?php echo $generalobj->symbol_currency(); ?> <span id="usr-bal"></span></span></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><?= $langage_lbl['LBL_NOT_NOW_WEB']; ?></button>
<button type="button" class="btn btn-success btn-ok action_modal_submit" data-dismiss="modal" onClick="AssignDriver('');"><?= $langage_lbl['LBL_BTN_OK_TXT']; ?></button>
</div>
</div>
</div>
</div>
<!--end Wallet Low Balance-->
<!--user inactive/deleted-->
<div class="modal fade" id="inactiveModal" tabindex="-1" role="dialog" aria-labelledby="inactiveModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="inactiveModalLabel"><?php echo $langage_lbl['LBL_USER_DETAIL']; ?></h4>
</div>
<div class="modal-body">
<span style="font-size: 15px;"><?php echo $langage_lbl['LBL_USER_STATUS_IN_MANUAL_BOOKING_WEB']; ?> </span>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" data-dismiss="modal"><?= $langage_lbl['LBL_CONTINUE_BTN']; ?></button>
<!-- <button type="button" class="btn btn-primary">Continue</button> -->
</div>
</div>
</div>
</div>
<!--end user inactive/deleted-->
<!--surcharge confirmation-->
<div class="modal fade" id="surgemodel" tabindex="-1" role="dialog" aria-labelledby="surgemodel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="inactiveModalLabel"><?php echo $langage_lbl['LBL_CONFIRM_SURCHARGE_WEB']; ?></h4>
</div>
<div class="modal-body">
<p><span style="font-size: 15px;"><?php echo $langage_lbl['LBL_SURCHARGE_WEB']; ?> <?php echo $langage_lbl['LBL_SURCHARGE_TRIP_UNDER_TIMING_WEB']; ?></span></p>
<table style="font-size: 15px;" cellspacing="5" cellpadding="5">
<tr>
<td width="100px"> <b><?php echo $langage_lbl['LBL_SURGE_TYPE_WEB']; ?></b></td>
<td> : <span id="surge_type"></span><?php echo $langage_lbl['LBL_SURCHARGE_WEB']; ?> </td>
</tr>
<tr>
<td><?php echo $langage_lbl['LBL_SURGE_FACTOR_WEB']; ?><b></b></td>
<td> : <span id="surge_factor"></span> X</td>
</tr>
<tr>
<td><b><?php echo $langage_lbl['LBL_SURGE_TIMING_WEB']; ?></b></td>
<td> : <span id="surge_timing"></span></td>
</tr>
</table>
</div>
<div class="modal-footer">
<!-- <button type="button" class="btn btn-default" data-dismiss="modal">Not Now</button> -->
<button type="button" class="btn btn-success btn-ok action_modal_submit" data-dismiss="modal" ><?php echo $langage_lbl['LBL_BTN_OK_TXT']; ?></button>
</div>
</div>
</div>
</div>
<!--end surcharge confirmation-->
<link rel="stylesheet" type="text/css" media="screen" href="<?= $tconfig["tsite_url_main_admin"]; ?>css/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
<script type="text/javascript" src="<?= $tconfig["tsite_url_main_admin"]; ?>js/moment.min.js"></script>
<script type="text/javascript" src="<?= $tconfig["tsite_url_main_admin"]; ?>js/bootstrap-datetimepicker.min.js"></script>
<link rel="stylesheet" href="<?= $tconfig["tsite_url_main_admin"]; ?>css/select2/select2.min.css" type="text/css" >
<script type="text/javascript" src="<?= $tconfig["tsite_url_main_admin"]; ?>js/plugins/select2.min.js"></script>
<script>
var eType = "";
var APP_DELIVERY_MODE = '<?= $APP_DELIVERY_MODE ?>';
var ENABLE_TOLL_COST = "<?= $ENABLE_TOLL_COST ?>";
//alert("<?php echo $APP_TYPE; ?>");
switch ("<?php echo $APP_TYPE; ?>") {
case "Ride-Delivery":
if (APP_DELIVERY_MODE == "Multi") {
eType = 'Ride';
} else {
eType = $('input[name=eType]:checked').val();
}
break;
case "Ride-Delivery-UberX":
/*if(APP_DELIVERY_MODE == "Multi"){
eType = 'Ride';
} else {*/
eType = $('input[name=eType]:checked').val();
/*}*/
break;
case "Delivery":
eType = 'Deliver';
break;
case "UberX":
eType = 'UberX';
break;
default:
eType = 'Ride';
}
function show_type(etype) {
if (etype == 'Ride') {
$('#ride-delivery-type').hide();
$('#ride-type').show();
<? if ($userType1 != 'rider' && $userType1 != 'company') { ?>
$('.auto_assign001').show();
<? } ?>
$('#iPackageTypeId').removeAttr('required');
$('#vReceiverMobile').removeAttr('required');
$('#vReceiverName').removeAttr('required');
$('#to').show();
$('.total-price1').show();
$('.deliveryShow').hide();
$('.rideShow').show();
$('.vehicle-type-ufx').hide();
$('.tolabel').show();
$('.service-pickup-type').show();
if ($('input[name=eRideType]:checked').val() == 'now') {
$(".dateSchedule").hide();
$('#datetimepicker4').removeAttr('required');
} else {
$(".dateSchedule").show();
$('#datetimepicker4').attr('required', 'required');
}
} else if (etype == 'Deliver') {
$('#ride-delivery-type').show();
$('#ride-type').hide();
<? if ($userType1 != 'rider') { ?>
$('.auto_assign001').show();
<? } ?>
$('#iPackageTypeId').attr('required', 'required');
$('#vReceiverMobile').attr('required', 'required');
$('#vReceiverName').attr('required', 'required');
$('#to').show();
$('.total-price1').show();
$('.deliveryShow').show();
$('.rideShow').hide();
$('.vehicle-type-ufx').hide();
$('.tolabel').show();
$('.service-pickup-type').show();
if ($('input[name=eDeliveryType]:checked').val() == 'now') { // Check if Delivery now or later
$(".dateSchedule").hide(); // Hide date option
$('#datetimepicker4').removeAttr('required');
} else {
$(".dateSchedule").show(); // Show date option
$('#datetimepicker4').attr('required', 'required');
}
} else if (etype == 'UberX') {
$('#ride-delivery-type').hide();
$('#to').hide();
$('#ride-type').hide();
<? if ($userType1 != 'rider') { ?>
$('.auto_assign001').hide();
<? } ?>
$('#iPackageTypeId').removeAttr('required');
$('#to').removeAttr('required');
$('#vReceiverMobile').removeAttr('required');
$('#vReceiverName').removeAttr('required');
$('#to').removeAttr('required');
$('.total-price1').hide();
$('.deliveryShow').hide();
$('.rideShow').hide();
$('.vehicle-type-ufx').show();
$('.tolabel').hide();
$('.service-pickup-type').hide();
$(".dateSchedule").show();
$('#datetimepicker4').attr('required', 'required');
}
}
function formatData(state) {
if (!state.id) {
return state.text;
}
var optimage = $(state.element).data('id');
if (!optimage) {
return state.text;
} else {
var $state = $(
'<span class="userName"><img src="' + optimage + '" class="mpLocPic" /> ' + $(state.element).text() + '</span>'
);
return $state;
}
}
$("#newSelect02").select2({
templateResult: formatData,
templateSelection: formatData
});
var eFlatTrip = 'No';
var eTypeQ11 = 'yes';
var map;
var geocoder;
var circle;
var markers = [];
var driverMarkers = [];
var bounds = [];
var newLocations = "";
var autocomplete_from;
var autocomplete_to;
var eLadiesRide = 'No';
var eHandicaps = 'No';
var eChildSeat = 'No';
var eWheelChair = 'No';
var geocoder = new google.maps.Geocoder();
var directionsService = new google.maps.DirectionsService(); // For Route Services on map
var directionsOptions = {// For Polyline Route line options on map
polylineOptions: {
strokeColor: '#FF7E00',
strokeWeight: 5
}
};
var directionsDisplay = new google.maps.DirectionsRenderer(directionsOptions);
var showsurgemodal = "Yes";
function setDriverListing(iVehicleTypeId) {
dBooking_date = $("#datetimepicker4").val();
vCountry = $("#vCountry").val();
keyword = $("#name_keyWord").val();
eLadiesRide = 'No';
eHandicaps = 'No';
eChildSeat = 'No';
eWheelChair = 'No';
var sess_iCompanyId = '<?= $sess_iCompanyId; ?>';
if ($("#eFemaleDriverRequest").is(":checked")) {
eLadiesRide = 'Yes';
}
if ($("#eHandiCapAccessibility").is(":checked")) {
eHandicaps = 'Yes';
}
if ($("#eChildSeatAvailable").is(":checked")) {
eChildSeat = 'Yes';
}
if ($("#eWheelChairAvailable").is(":checked")) {
eWheelChair = 'Yes';
}
// alert(eLadiesRide);
$.ajax({
type: "POST",
url: "<?= $tconfig["tsite_url"] ?>booking/get_available_driver_list.php",
dataType: "html",
data: {vCountry: vCountry, type: '', iVehicleTypeId: iVehicleTypeId, keyword: keyword, eLadiesRide: eLadiesRide, eHandicaps: eHandicaps, eChildSeat: eChildSeat, eWheelChair: eWheelChair, dBooking_date: dBooking_date, AppeType: eType, sess_iCompanyId: sess_iCompanyId},
success: function (dataHtml2) {
if (dataHtml2 != "") {
$('#driver_main_list').show();
$('#driver_main_list').html(dataHtml2);
if ($("#eAutoAssign").is(':checked')) {
$(".assign-driverbtn").attr('disabled', 'disabled');
}
} else {
$('#driver_main_list').html('<h4 style="margin:25px 0 0 15px">Sorry , No <?= $langage_lbl['LBL_DRIVER_TXT_ADMIN']; ?> Found.</h4>');
$('#driver_main_list').show();
}
}, error: function (dataHtml2) {
}
});
}
function AssignDriver(driverId) {
if (driverId == "") {
driverId = $('#iDriverId_temp').val();
}
$('#iDriverId').val(driverId);
$("#showdriverSet001").show();
$("#driverSet001").html($('.driver_' + driverId).html());
}
function checkUserBalance(driverId) {
$.ajax({
type: "POST",
url: "<?= $tconfig["tsite_url"] ?>booking/ajax_get_user_balance.php",
data: "driverId=" + driverId + "&type=Driver",
success: function (data) {
data1 = data.split("|");
var CDE = '<?= $COMMISION_DEDUCT_ENABLE ?>';
var Min_Bal = '<?= $WALLET_MIN_BALANCE ?>';
if (CDE == "Yes") {
if (parseFloat(data1[1]) < parseFloat(Min_Bal)) {
var amt = parseFloat(data1[1]).toFixed(2);
$("#usr-bal").text(amt);
$("#iDriverId_temp").val(driverId);
$("#usermodel").modal('show');
return false;
} else {
AssignDriver(driverId);
return false;
}
} else {
AssignDriver(driverId);
return false;
}
}, error: function (dataHtml2) {
}
});
}
function setDriversMarkers(flag) {
newType = $("#newType").val();
vType = $("#iVehicleTypeId").val();
var sess_iCompanyId = '<?= $sess_iCompanyId; ?>';
eLadiesRide = "No";
eHandicaps = "No";
eChildSeat = "No";
eWheelChair = "No";
if ($("#eFemaleDriverRequest").is(":checked")) {
eLadiesRide = 'Yes';
}
if ($("#eHandiCapAccessibility").is(":checked")) {
eHandicaps = 'Yes';
}
if ($("#eChildSeatAvailable").is(":checked")) {
eChildSeat = 'Yes';
}
if ($("#eWheelChairAvailable").is(":checked")) {
eWheelChair = 'Yes';
}