| 19771 |
naman |
1 |
<script>
|
|
|
2 |
$(document).ready(function(){
|
|
|
3 |
$('.sendsms').click(function(){
|
|
|
4 |
var retid = $(this).data('retid')
|
|
|
5 |
var phone = $('#'+retid).val().trim();
|
|
|
6 |
var value = true;
|
|
|
7 |
|
|
|
8 |
if(phone != ''){
|
|
|
9 |
if(phone.match(/^\d{10}$/) == null)
|
|
|
10 |
{
|
|
|
11 |
value = false;
|
|
|
12 |
message = "Invalid contact number";
|
|
|
13 |
alert(message);
|
|
|
14 |
}
|
|
|
15 |
}
|
|
|
16 |
|
|
|
17 |
if(value){
|
|
|
18 |
$.ajax({
|
|
|
19 |
'url' : "<?php echo $base_url;?>retailers/sendsms?retid="+retid+"&contact="+phone,
|
|
|
20 |
'type': "GET"
|
|
|
21 |
},'json')
|
|
|
22 |
.done(function(msg){
|
|
|
23 |
val = JSON.parse(msg);
|
|
|
24 |
if(val['result'] == "success")
|
|
|
25 |
{
|
|
|
26 |
alert("Sms sent successfully..");
|
| 19779 |
naman |
27 |
location.reload();
|
| 19771 |
naman |
28 |
}
|
|
|
29 |
else{
|
|
|
30 |
alert("Sms sending failed..");
|
|
|
31 |
}
|
|
|
32 |
});
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
});
|
|
|
36 |
});
|
|
|
37 |
</script>
|
|
|
38 |
<div class="container">
|
|
|
39 |
<div class = "row">
|
|
|
40 |
<div class="col-lg-12 table-responsive">
|
|
|
41 |
<h2><?php echo __('Verified Retailers'); ?></h2>
|
|
|
42 |
|
|
|
43 |
<table cellpadding="0" cellspacing="0" border="1" class="table table-striped" >
|
|
|
44 |
<tr>
|
|
|
45 |
|
|
|
46 |
<th style="text-align:center">Mobile No.</th>
|
|
|
47 |
<th style="text-align:center">Tin</th>
|
|
|
48 |
<th style="text-align:center">Address</th>
|
|
|
49 |
<th style="text-align:center">City</th>
|
|
|
50 |
<th style="text-align:center">State</th>
|
|
|
51 |
<th style="text-align:center">If any other number</th>
|
|
|
52 |
<th></th>
|
|
|
53 |
</tr>
|
|
|
54 |
|
|
|
55 |
<?php foreach($verified as $pkey => $pvalue):?>
|
|
|
56 |
<tr>
|
|
|
57 |
<td style="text-align:center"><?php echo $pvalue['Retailer']['contact1'];?></td>
|
|
|
58 |
<td style="text-align:center"><?php echo $pvalue['Retailer']['tinnumber'];?></td>
|
|
|
59 |
<td style="text-align:center"><?php echo $pvalue['Retailer']['address'];?></td>
|
|
|
60 |
<td style="text-align:center"><?php echo $pvalue['Retailer']['city'];?></td>
|
|
|
61 |
<td style="text-align:center"><?php echo $pvalue['Retailer']['state'];?></td>
|
|
|
62 |
<td style="text-align:center">
|
|
|
63 |
<input type ="text" class = "contact2" id= "<?php echo $pvalue['Retailer']['id'];?>">
|
|
|
64 |
</td>
|
|
|
65 |
<td style="text-align:center">
|
|
|
66 |
<button type="button" class="btn btn-success btn-xs sendsms" data-retid= "<?php echo $pvalue['Retailer']['id'];?>">Send Sms</button>
|
|
|
67 |
</td>
|
|
|
68 |
</tr>
|
|
|
69 |
|
|
|
70 |
<?php endforeach;?>
|
|
|
71 |
|
|
|
72 |
</table>
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|
|
|
75 |
|
|
|
76 |
</div>
|