<?php $this->load->view('header');?>

	<div class="row-fluid">
		<div class="span12">

			<!-- BEGIN PAGE TITLE & BREADCRUMB-->

			<h3 class="page-title"><?php echo $this->lang->line('hf_account_topup');?> </h3>

			<ul class="breadcrumb">

				<li><i class="icon-home"></i><a href="<?php echo base_url();?>home/"><?php echo $this->lang->line('hf_home');?></a> <i class="icon-angle-right"></i></li>
				<li><?php echo $this->lang->line('hf_topup');?> <i class="icon-angle-right"></i></li>
				<li><?php echo $this->lang->line('hf_account_topup');?></li>
			</ul>
			<!-- END PAGE TITLE & BREADCRUMB-->
		</div>
	</div>
	
	<div class="row-fluid">
		<div class="span12">
			<form id="topup-form" class="form-horizontal" method="post" action="<?php echo base_url();?>topup/submit/" onsubmit="return validateForm('topup-form')">
				<?php 
					$alert_box = '';
					$alert_msg = '';
					
					if($this->session->userdata('form_msg_type') == 100) {
						$alert_box = 'success';
						$alert_msg = $this->session->userdata('form_msg');
					}
					else if($this->session->userdata('form_msg_type') == 200) {
						$alert_box = 'error';
						$alert_msg = $this->session->userdata('form_msg');
					}
					
					if($this->session->userdata('form_msg_type') == 100 OR $this->session->userdata('form_msg_type') == 200) {
						$this->session->unset_userdata(array('form_msg_type' => '', 'form_msg' => ''));
					}

					if( ! empty($alert_msg)) {
				?>
				<div class="alert alert-<?php echo $alert_box;?>">
					<button class="close" data-dismiss="alert"></button>
					<?php echo $alert_msg;?>
				</div>
				<?php }?>
					
				<div class="control-group">
					<label class="control-label"><?php echo $this->lang->line('topup_topup_currency');?></label>
					<div class="controls">
						<select id="currency_id" name="currency_id" class="m-wrap span2">
							<option value="1" <?php echo (isset($currency_id) && $currency_id == '1') ? 'selected="selected"' : '';?>><?php echo $this->lang->line('wallet_1');?></option>
							<option value="2" <?php echo (isset($currency_id) && $currency_id == '2') ? 'selected="selected"' : '';?>><?php echo $this->lang->line('wallet_2');?></option>
							<option value="3" <?php echo (isset($currency_id) && $currency_id == '3') ? 'selected="selected"' : '';?>><?php echo $this->lang->line('wallet_3');?></option>
							<option value="4" <?php echo (isset($currency_id) && $currency_id == '4') ? 'selected="selected"' : '';?>><?php echo $this->lang->line('wallet_4');?></option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->lang->line('topup_topup_amount');?></label>
					<div class="controls">
						<input type="text" id="transaction_amount" name="transaction_amount" class="m-wrap medium" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->lang->line('topup_to_member');?></label>
					<div class="controls">
						<input id="tags_2" name="to_member_username" type="text" class="medium tags" value="<?php echo isset($to_member_username) ? htmlspecialchars($to_member_username, ENT_QUOTES) : '';?>" />
					</div>
				</div>
				<div class="control-group" style="display:none;">
					<label class="control-label" ><?php echo $this->lang->line('topup_currency_rate');?>: </label>
					<div class="controls">
						<select id="currency_rate" name="currency_rate" class="m-wrap span2">
							<option value="0"><?php echo $this->lang->line('topup_select');?></option>
							<option value="6.0">6.0</option>
							<option value="6.1">6.1</option>
							<option value="6.2">6.2</option>
							<option value="6.3">6.3</option>
							<option value="6.4">6.4</option>
							<option value="6.5">6.5</option>
							<option value="6.6">6.6</option>
							<option value="6.7">6.7</option>
							<option value="6.8">6.8</option>
							<option value="6.9">6.9</option>
							<option value="7">7.0</option>
							<option value="7.1">7.1</option>
							<option value="7.2">7.2</option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" ><?php echo $this->lang->line('topup_remark');?>: </label>
					<div class="controls">
						<select id="remark" name="remark" class="m-wrap span2">
							<option value=""><?php echo $this->lang->line('topup_select');?></option>
							<option value="Cash"><?php echo $this->lang->line('topup_cash');?></option>
							<option value="Wallet"><?php echo $this->lang->line('topup_wallet');?></option>
							<option value="Point"><?php echo $this->lang->line('topup_point');?></option>
							<option value="Income Point"><?php echo $this->lang->line('topup_income_point');?></option>
							<option value="Others"><?php echo $this->lang->line('topup_others');?></option>
						</select>
					</div>
				</div>	
				<div class="control-group no_display" id="remark_others_panel">
					<label class="control-label">&nbsp;</label>
					<div class="controls">
						<input type="text" id="remark_others" name="remark_others" class="m-wrap medium" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->lang->line('topup_remark');?> 2: </label>
					<div class="controls">
						<input type="text" id="remark_2" name="remark_2" class="m-wrap medium" />
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->lang->line('topup_security_key');?></label>
					<div class="controls">
						<input type="password" id="security_key" name="security_key" class="m-wrap medium" />
					</div>
				</div>				
				<div class="form-actions">
					<input class="no_display" type="hidden" id="<?php echo $this->security->get_csrf_token_name(); ?>" name="<?php echo $this->security->get_csrf_token_name(); ?>" value="<?php echo $this->security->get_csrf_hash(); ?>" />
					<button type="submit" class="btn blue"><i class="icon-ok"></i> <?php echo $this->lang->line('topup_submit');?></button>
				</div>
			</form>
		</div><!-- End span12 -->
		
	</div> <!-- End Row Fluid -->

<?php $this->load->view('footer');?>