 <?php require('cot-tax-database-connection.php');  ?>

 	
 <link href="<?php echo WEB_ROOT; ?>library/spry/textfieldvalidation/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/textfieldvalidation/SpryValidationTextField.js" type="text/javascript"></script>

<script src="<?php echo WEB_ROOT; ?>admin/library/jquery.min.js" type="text/javascript"></script>

<link href="<?php echo WEB_ROOT; ?>library/spry/textareavalidation/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/textareavalidation/SpryValidationTextarea.js" type="text/javascript"></script>

<link href="<?php echo WEB_ROOT; ?>library/spry/selectvalidation/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/selectvalidation/SpryValidationSelect.js" type="text/javascript"></script>
 
 
 <div class="element-wrapper">
<div class="element-box">
 
 <h2 ><img src="<?php echo WEB_ROOT; ?>assets/telex.png" width="70" >   Telex => Bank Transfer</h2>
                  <p>Telegraphic Transfer or telex transfer, often abbreviated to TT, is a term used to refer to an electronic means of transferring funds.
                  A transfer charge is often charged by the sending Bank and in some cases by the receiving Bank.</p>
                  


                        <form action="" method="POST" enctype="multipart/form-data" />
                   
                            <?php
									if(isset($_POST['check']))
									{
										//Get form data
										$telex_no=$_POST['telex_no'];
										
										$query=mysqli_query($conn,"SELECT * FROM `telex_code` WHERE `telex_no`=$telex_no");
										$row=mysqli_fetch_array($query);
									
										if($row['telex_no']==$telex_no){
										   
										   
										   echo '<meta content="5; url=?v=telex-transfer2"       http-equiv="refresh" />';
                        			echo '<h3 style="color:orange; font-size:14px;">Telex Code is valid, Wait a moment....</h3>';
                        			 
										}else{
										   echo "<h2 style='color:red;'>Invalid Approval Number!</h2>"; 
										}
									 }
								
								?>
                   
                    
                      
                        <div class="form-group"> 
                          <label>Enter Telex Approval Code (Telex => Bank )</label>
                          <div class="form-group" style="font-size:12px;">
                             <span id="sprytf_telex_no">
                            <input type="text" class="form-control" style="height:40px; width:90%;" id="telex_no" name="telex_no" placeholder="Telex Approval Code" />
                          <br/>
                            <span class="textfieldRequiredMsg">Telex code is required.</span>
                			<span class="textfieldMinCharsMsg">min of least 10 characters.</span>
                			<span class="textfieldMaxCharsMsg">max 15 characters.</span>
                			<span class="textfieldInvalidFormatMsg">Telex code must be Integer.</span>
                          
                          </div>
                        </div>
                       
                
                    <button type="submit"  name="check"  class="btn btn-primary">Validate Telex Approval Code</button>
                    <div class="clearfix"></div>
                  </form>
                 
        
     </div></div>   
        
        
        <script type="text/javascript">
<!-- 
var sprytf_accno = new Spry.Widget.ValidationTextField("sprytf_telex_no", 'integer', {minChars:10, maxChars: 15, validateOn:["blur", "change"]}); 
//-->
</script>