| 12694 |
anikendra |
1 |
<?php
|
|
|
2 |
if(isset($mobile_operator) && !empty($mobile_operator)){
|
|
|
3 |
$mobile_operator = $mobile_operator[0];
|
|
|
4 |
}
|
|
|
5 |
if(isset($dth_operator) && !empty($dth_operator)){
|
|
|
6 |
$dth_operator = $dth_operator[0];
|
|
|
7 |
}
|
|
|
8 |
if(isset($plan_map) && !empty($plan_map)){
|
|
|
9 |
$plan_map = $plan_map[0];
|
|
|
10 |
$i=0;
|
|
|
11 |
$plan = array();
|
|
|
12 |
$operator = array();
|
|
|
13 |
foreach($plan_map as $maps){
|
|
|
14 |
foreach($maps as $map){
|
|
|
15 |
$operator[] = $map->operatorId;
|
|
|
16 |
$plan[$i]['operatorId'] = $map->operatorId;
|
|
|
17 |
$plan[$i]['Name'] = $map->name;
|
|
|
18 |
$plan[$i]['displayName'] = $map->displayName;
|
|
|
19 |
$i++;
|
|
|
20 |
}
|
|
|
21 |
}
|
|
|
22 |
}
|
|
|
23 |
$authorized = $this->session->userdata('authorized');
|
|
|
24 |
if(isset($authorized['email']) && !empty($authorized['email'])){
|
|
|
25 |
if(strpos($authorized['email'], 'anonymous') == false){
|
|
|
26 |
$email = $authorized['email'];
|
|
|
27 |
}
|
|
|
28 |
}
|
|
|
29 |
$dth_operator1 = (array) $dth_operator;
|
|
|
30 |
$mobile_operator1 = (array) $mobile_operator;
|
|
|
31 |
if(isset($rechargeOperator) && !empty($rechargeOperator)){
|
|
|
32 |
if(in_array(strtoupper($rechargeOperator), $dth_operator1)){
|
|
|
33 |
$rechargeType = 'dth';
|
|
|
34 |
}elseif(in_array(strtoupper($rechargeOperator), $mobile_operator1)){
|
|
|
35 |
$rechargeType = 'mobile';
|
|
|
36 |
}
|
|
|
37 |
}
|
|
|
38 |
?>
|
|
|
39 |
<div class="rech-cont">
|
|
|
40 |
<div class="rech-head clearfix">
|
|
|
41 |
<div class="mobile-re <?php if(!isset($rechargeType) || $rechargeType != 'dth'){ echo 'selected';}?>">mobile</div>
|
|
|
42 |
<div> </div>
|
|
|
43 |
<div class="dth-re <?php if(isset($rechargeType) && $rechargeType == 'dth'){ echo 'selected';}?>">Dth</div>
|
|
|
44 |
</div><!--recharge-head-->
|
|
|
45 |
<div id="error" class="error_msg" style="display:none">
|
|
|
46 |
</div>
|
|
|
47 |
<form name="mobile-recharge" method="post" action="<?php echo base_url().'confirm'?>"class="mobile-recharge" onsubmit="return mobileValidation()" style="display:<?php if(!isset($rechargeType) || $rechargeType != 'dth'){ echo 'block';} else { echo 'none'; }?>">
|
|
|
48 |
<fieldset>
|
|
|
49 |
<?php if(isset($rechargeType) && $rechargeType == 'mobile'){?><div><h1><?php echo strtoupper($rechargeOperator); ?></h1><div><?php } ?>
|
|
|
50 |
<label>Mobile Number</label>
|
|
|
51 |
<input name="mobile-number" type="number" id="mobile-number" onKeyUp="operator()" onfocus="clearError()"/>
|
|
|
52 |
<div id="operator-list" style="display:none" class="fetch-operator" onclick="operator()">Click to fetch operator list</div>
|
|
|
53 |
<label>Operator</label>
|
|
|
54 |
<select name="operatorId" id="mobile-operator" onChange="changeOperator(event)" disabled="true" onfocus="clearError()">
|
|
|
55 |
<option>Select Operator</option>
|
|
|
56 |
<?php if(isset($mobile_operator) && !empty($mobile_operator)){
|
|
|
57 |
foreach($mobile_operator as $key => $value){?>
|
|
|
58 |
<option value="<?php echo $key;?>" <?php if(isset($rechargeType) && $rechargeType == 'mobile'){ if(strcasecmp($value,$rechargeOperator) == 0){ echo 'selected = true';}}?>><?php echo $value;?></option>
|
|
|
59 |
<?php }}?>
|
|
|
60 |
</select>
|
|
|
61 |
<input type="hidden" name="operator-name" id="operator_hidden" value="">
|
|
|
62 |
<div id="plans" style="display:none;">
|
|
|
63 |
<label>Plans</label>
|
|
|
64 |
<select name="planName" id="operator-palns">
|
|
|
65 |
|
|
|
66 |
</select>
|
|
|
67 |
</div>
|
|
|
68 |
<div id="special" class="plans-btn clearfix" style="display:none">
|
|
|
69 |
<p>See popular plans for <span id="operatorName"></span></p>
|
|
|
70 |
<div id="1" onclick="topup(event)">Topup</div><div id="2" onclick="topup(event)">Special</div>
|
|
|
71 |
</div>
|
|
|
72 |
<label>Amount (In Rs)</label>
|
|
|
73 |
<input name="recharge-amt" id="mobile-amount" type="number" placeholder="" />
|
|
|
74 |
|
|
|
75 |
<label>Email Id</label>
|
|
|
76 |
<input id="emailId" name="email" type="email" value="<?php if(isset($email) && !empty($email)) echo $email;?>" onfocus="clearError()" autocorrect="off" autocapitalize="off" autocomplete="off" spellcheck="false"/>
|
|
|
77 |
|
|
|
78 |
<input type="submit" value="Recharge" name="submit"/>
|
|
|
79 |
</fieldset>
|
|
|
80 |
</form><!--mobile-recharge-->
|
|
|
81 |
<form name="dth-recharge" method="post" action="<?php echo base_url().'confirm'?>"class="dth-recharge" onsubmit="return dthValidation()" style="display:<?php if(isset($rechargeType) && $rechargeType == 'dth'){ echo 'block';} else { echo 'none'; }?>">
|
|
|
82 |
<fieldset>
|
|
|
83 |
<?php if(isset($rechargeType) && $rechargeType == 'dth'){?><div><h1><?php echo strtoupper($rechargeOperator).' online recharge'; ?></h1><div><?php } ?>
|
|
|
84 |
<label>Operator</label>
|
|
|
85 |
<select name="operatorId" id="dth-operator" onChange="changeName(event)" onfocus="clearError()">
|
|
|
86 |
<option>Select Operator</option>
|
|
|
87 |
<?php if(isset($dth_operator) && !empty($dth_operator)){
|
|
|
88 |
foreach($dth_operator as $key => $value){?>
|
|
|
89 |
<option value="<?php echo $key;?>" <?php if(isset($rechargeType) && $rechargeType == 'dth'){ if(strcasecmp($value,$rechargeOperator) == 0){ echo 'selected = true';}}?>><?php echo $value;?></option>
|
|
|
90 |
<?php }}?>
|
|
|
91 |
</select>
|
|
|
92 |
<input type="hidden" name="operator-name" id="dth_hidden" value="">
|
|
|
93 |
<label id="accountName">Account Number :</label>
|
|
|
94 |
<input name="dth-number" type="number" id="dth-number" onfocus="clearError()"/>
|
|
|
95 |
<label>Amount (In Rs)</label>
|
|
|
96 |
<input name="recharge-amt" id="dth-amount" type="number" onfocus="clearError()"/>
|
|
|
97 |
|
|
|
98 |
<label>Email Id</label>
|
|
|
99 |
<input id="dth-email" name="email" type="email" value="<?php if(isset($email) && !empty($email)) echo $email;?>" onfocus="clearError()"/>
|
|
|
100 |
|
|
|
101 |
<input type="submit" value="Recharge" name="submit"/>
|
|
|
102 |
</fieldset>
|
|
|
103 |
</form><!--dth-recharge-->
|
|
|
104 |
|
|
|
105 |
</div><!--rech-cont-->
|
|
|
106 |
|
|
|
107 |
<div class="topup-cont" style="display:none;">
|
|
|
108 |
<div class="topup-wrapper">
|
|
|
109 |
<p>Popular Plans</p>
|
|
|
110 |
<div class="close" onclick="closePlan();"></div>
|
|
|
111 |
<div class="clear"></div>
|
|
|
112 |
<div class="topup-cont-head clearfix">
|
|
|
113 |
<div>Amt.</div>
|
|
|
114 |
<div>Validity</div>
|
|
|
115 |
<div>Talktime</div>
|
|
|
116 |
</div><!--topup-cont-head-->
|
|
|
117 |
<div id='appendlist' class="topup-cont-body clearfix">
|
|
|
118 |
</div>
|
|
|
119 |
</div>
|
|
|
120 |
</div><!--topup-cont-->
|
|
|
121 |
<script type="text/javascript">
|
|
|
122 |
var plan = <?php echo json_encode($plan);?>;
|
|
|
123 |
var special = <?php echo json_encode($this->config->item('topup-special'));?>;
|
|
|
124 |
var dthIdMap = <?php echo json_encode($this->config->item('DthIdAliasMap'));?>;
|
|
|
125 |
</script>
|