Subversion Repositories SmartDukaan

Rev

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