Subversion Repositories SmartDukaan

Rev

Rev 11558 | Rev 11637 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10582 lgm 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
?>
30
 
31
<div class="rech-cont">
32
<div class="rech-head clearfix">
33
         <div class="mobile-re selected">mobile</div>
34
         <div> </div>
35
         <div class="dth-re">Dth</div>
36
       </div><!--recharge-head-->
37
        <div id="error" class="error_msg" style="display:none">
11631 lgm 38
       </div> 
10582 lgm 39
        <form name="mobile-recharge" method="post" action="<?php echo base_url().'confirm'?>"class="mobile-recharge" onsubmit="return mobileValidation()">
40
          <fieldset>
11631 lgm 41
            <?php if(isset($rechargeOperator) && !empty($rechargeOperator)){?><div><h1><?php echo $title; ?></h1><div><?php } ?>
10582 lgm 42
            <label>Mobile Number</label>
11547 lgm 43
            <input name="mobile-number" type="number" id="mobile-number" onKeyUp="operator()" onfocus="clearError()"/>
10582 lgm 44
            <label>Operator</label>
11547 lgm 45
            <select name="operatorId" id="mobile-operator" onChange="changeOperator(event)" disabled="true" onfocus="clearError()">
10582 lgm 46
              <option>Select Operator</option>
47
              <?php if(isset($mobile_operator) && !empty($mobile_operator)){
48
                foreach($mobile_operator as $key => $value){?>
11631 lgm 49
              <option value="<?php echo $key;?>" <?php if(isset($rechargeOperator) && !empty($rechargeOperator)){ if(strcasecmp($value,$rechargeOperator) == 0){ echo 'selected = true';}}?>><?php echo $value;?></option>
10582 lgm 50
              <?php }}?>
51
            </select>
52
            <input type="hidden" name="operator-name" id="operator_hidden" value="">
53
            <div id="plans" style="display:none;">
54
              <label>Plans</label>
55
              <select name="planName" id="operator-palns">
56
 
57
              </select>
58
            </div>
59
            <div id="special" class="plans-btn clearfix" style="display:none">
60
              <p>See popular plans for <span id="operatorName"></span></p>
61
              <div id="1" onclick="topup(event)">Topup</div><div id="2" onclick="topup(event)">Special</div>
62
            </div>
63
            <label>Amount (In Rs)</label>
64
            <input name="recharge-amt" id="mobile-amount" type="number" class="price" placeholder="" />
65
 
66
            <label>Email Id</label>
10967 lgm 67
            <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"/>
10582 lgm 68
 
69
            <input type="submit" value="Recharge" name="submit"/>
70
          </fieldset>
71
        </form><!--mobile-recharge-->
72
        <form name="dth-recharge" method="post" action="<?php echo base_url().'confirm'?>"class="dth-recharge" onsubmit="return dthValidation()">
73
          <fieldset>
74
 
75
            <label>Operator</label>
76
            <select name="operatorId" id="dth-operator" onChange="changeName(event)" onfocus="clearError()">
10967 lgm 77
              <option>Select Operator</option>
10582 lgm 78
              <?php if(isset($dth_operator) && !empty($dth_operator)){
79
                foreach($dth_operator as $key => $value){?>
80
              <option value="<?php echo $key;?>"><?php echo $value;?></option>
81
              <?php }}?>
82
            </select>
83
            <input type="hidden" name="operator-name" id="dth_hidden" value="">
84
            <label id="accountName">Account Number :</label>
85
            <input name="dth-number" type="number" id="dth-number" onfocus="clearError()"/>
86
            <label>Amount (In Rs)</label>
87
            <input name="recharge-amt" id="dth-amount" type="number" class="price" onfocus="clearError()"/>
88
 
89
            <label>Email Id</label>
90
            <input id="dth-email" name="email" type="email" value="<?php if(isset($email) && !empty($email)) echo $email;?>" onfocus="clearError()"/>
91
 
92
            <input type="submit" value="Recharge" name="submit"/>
93
          </fieldset>
94
        </form><!--dth-recharge-->
95
 
96
</div><!--rech-cont-->
97
 
98
<div class="topup-cont" style="display:none;">
11126 lgm 99
  <div class="topup-wrapper">
100
    <p>Popular Plans</p>
101
    <div class="close" onclick="closePlan();"></div>
102
    <div class="clear"></div>
103
    <div class="topup-cont-head clearfix">
11558 lgm 104
      <div>Amt.</div>
11126 lgm 105
      <div>Validity</div>
106
      <div>Talktime</div>
107
    </div><!--topup-cont-head-->
108
    <div id='appendlist' class="topup-cont-body clearfix">
109
    </div>
10582 lgm 110
  </div>
111
</div><!--topup-cont-->
112
<script type="text/javascript">
113
var plan = <?php echo json_encode($plan);?>;
114
var special = <?php echo json_encode($this->config->item('topup-special'));?>;
115
var dthIdMap = <?php echo json_encode($this->config->item('DthIdAliasMap'));?>;
116
</script>