HEX
Server: Apache/2.2.15 (CentOS)
System: Linux ip-10-0-2-146.eu-west-1.compute.internal 2.6.32-754.35.1.el6.centos.plus.x86_64 #1 SMP Sat Nov 7 11:33:42 UTC 2020 x86_64
User: root (0)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /www/exchange2/exchange/templates/originator_application_form_2.html
<AJDF:output>include file="header.html"</AJDF:output>
 <script src="<AJDF:output>$smarty.session.base_url</AJDF:output>/js/jquery.maskedinput.min.js" type="text/javascript"></script>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="top">&nbsp;</td>
        </tr>
        <tr>
          <td class="login_bg" align="left" valign="middle"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="left" valign="middle" class="login_bg_t">Exchange Trade Centre | Create Organisation Application Form</td>
                <td width="" align="left" valign="middle" class="txt_11">Originator Organisation ID: <AJDF:output>$smarty.session.user.org_ref_id</AJDF:output>  </td>
                <td class="txt_11" align="right"><AJDF:output>include file='originator_top_dashboard_links.html'</AJDF:output></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td align="center" valign="top" class="about_c" id="tool"><table width="100%" border="0" cellspacing="5" cellpadding="5">
              <tr>
                <td width="18%" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left" valign="top"><AJDF:output>include file='left_sidebar_small.html'</AJDF:output></td>
                    </tr>
                  </table></td>
                <td width="82%" align="right" valign="top">
                    <form method="POST" action="?do=saveapplication2" name="sub" enctype="multipart/form-data">
                      <table cellspacing="0" cellpadding="3" border="0" width="100%">
                	<AJDF:output> if $smarty.session.org_notify !=''</AJDF:output>
                        <AJDF:output>$smarty.session.org_notify</AJDF:output>
                    <AJDF:output>/if</AJDF:output>

                        <tbody>
                            <tr>
                              <td align="left" valign="top" class="inves_top_bg"><table cellspacing="0" cellpadding="0" border="0" width="100%">
                                  <tbody>
                                    <tr>
                                      <td align="left" valign="top" class=""><span>Bank Details</span></td>
                                      <td align="right" valign="top" class="inves_top_bg_hide"> Step 2 of 7 &nbsp;</td>
                                    </tr>
                                  </tbody>
                                </table></td>
                            </tr>
							<tr>
								<td align="left" valign="top" class="about_c_1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr class="very_lite_gray">
										<td align="left" valign="top">&nbsp;</td>
									</tr>
									<tr class="very_lite_gray">
										<td align="left" valign="top" class="txt_12_red">&nbsp;&nbsp;<b>Please Note:</b> All fields marked with * require an input </td>
									</tr>
									<tr class="very_lite_gray">
										<td align="left" valign="top">&nbsp;</td>
									</tr>
								</table></td>
							</tr>
                            <tr class="very_lite_gray">
                              <td align="center" valign="top"><table cellspacing="0" cellpadding="0" border="0" width="100%">
                                  <tbody>
                                    <tr>
                                      <td align="left" width="50%" valign="top">
                                        <table cellspacing="2" cellpadding="2" border="0" width="50%">
                                          <tbody>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red"> * </td>
                                              <td align="left" width="37%" valign="top">Bank Name : <br>
                                                  <span class="txt_11_cute">Selected by Primay Trading Country</span></td>
                                              <td align="left" width="53%" valign="top"><span id="dropBank">
                                                    <select class="cmb_bx1" name="bank_name" id="bank_name" onchange="bank_news(this.value);" tabindex="1">
                                                        <option value="">Please Choose</option>
                                                    </select>
                                                    </span><span id="otherBank"></span> <br>
                                                    <span style="color: rgb(255, 0, 0);">
                                                    <AJDF:output>$errmsg.bank_name</AJDF:output>
                                                    </span></td>
                                              <td align="left" width="7%" valign="top"><a href="javascript:void(0);" class="under" title="<AJDF:output>$help.27.content</AJDF:output>">(?)</a></td>
                                          </tr>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red"></td>
                                              <td align="left" width="37%" valign="top">Bank Account Name:</td>
                                              <td align="left" width="53%" valign="top"><input onchange="compulsory_fields()" type="text" class="text_b" value="<AJDF:output>$values.account_name</AJDF:output>" name="account_name" id="account_name" tabindex="2">
                                                  <br>
                                        <span style="color: rgb(255, 0, 0);">
                                        <AJDF:output>$errmsg.account_name</AJDF:output>
                                        </span></td>
                                              <td align="left" valign="top"><a href="javascript:void(0);" class="under" title="<AJDF:output>$help.50.content</AJDF:output>">(?)</a></td>
                                          </tr>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red"></td>
                                              <td align="left" width="37%" valign="top">Bank Account Number :</td>
                                              <td align="left" width="53%" valign="top"><input onchange="compulsory_fields()" type="text" class="text_b" value="<AJDF:output>$values.account_no</AJDF:output>" name="account_no" id="account_no" tabindex="3">
                                                  <br>
                                        <span style="color: rgb(255, 0, 0);">
                                        <AJDF:output>$errmsg.account_no</AJDF:output>
                                        </span></td>
                                              <td align="left" valign="top"><a href="javascript:void(0);" class="under" title="<AJDF:output>$help.51.content</AJDF:output>">(?)</a></td>
                                          </tr>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red"></td>
                                              <td align="left" width="37%" valign="top">Sort Code :</td>
                                              <td align="left" width="53%" valign="top"><input onchange="compulsory_fields()" type="text" size="8" maxlength="8" class="text_ph_code" value="<AJDF:output>$values.sort_code</AJDF:output>" name="sort_code" id="sort_code" tabindex="4">
                                                  &nbsp;<a href="javascript:void(0);" class="under" title="<AJDF:output>$help.52.content</AJDF:output>">(?)</a><br>
                                        <span style="color: rgb(255, 0, 0);">
                                        <AJDF:output>$errmsg.sort_code</AJDF:output>
                                        </span></td>
                                          </tr>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red temp_comp">*</td>
                                              <td align="left" width="37%" valign="top">IBAN Number :</td>
                                              <td align="left" width="53%" valign="top"><input type="text" class="text_b" value="<AJDF:output>$values.iban_code</AJDF:output>" name="iban_code" id="iban_code" tabindex="5">
                                                  <br>
                                            <span style="color: rgb(255, 0, 0);">
                                            <AJDF:output>$errmsg.iban_code</AJDF:output>
                                            </span></td>
                                              <td align="left" valign="top"><a href="javascript:void(0);" class="under" title="<AJDF:output>$help.53.content</AJDF:output>">(?)</a></td>
                                          </tr>
                                          <tr>
                                              <td align="center" valign="top" class="txt_11_red temp_comp">*</td>
                                              <td align="left" width="37%" valign="top">Swift Code :</td>
                                              <td align="left" width="53%" valign="top"><input type="text" class="text_b" value="<AJDF:output>$values.swift_code</AJDF:output>" name="swift_code" id="swift_code" tabindex="6">
                                                  <br>
                                            <span style="color: rgb(255, 0, 0);">
                                            <AJDF:output>$errmsg.swift_code</AJDF:output>
                                            </span></td>
                                              <td align="left" valign="top"><a href="javascript:void(0);" class="under" title="<AJDF:output>$help.54.content</AJDF:output>">(?)</a></td>
                                          </tr>
                                          <tr>
                                            <td align="center" valign="top" class="txt_11_red"> * </td>
                                            <td align="left" width="37%" valign="top">Currency :</td>
                                            <td align="left" width="53%" valign="top">
                                              <AJDF:output>include file="../admin/templates/common/currencies.html"</AJDF:output>
                                            </td>
                                            <td align="left" width="7%" valign="top"></td>
                                          </tr>
                                          </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                  </tbody>
                                </table></td>
                            </tr>
                            <tr>
                              <td align="center" valign="top" class="dark_gray_bg">
                                <input name="addressno" id="addressno" value="<AJDF:output>if $values.addressno </AJDF:output><AJDF:output>$values.addressno</AJDF:output><AJDF:output>else</AJDF:output>0<AJDF:output>/if</AJDF:output>" type="hidden">
                                <input name="noder" id="noder" value="<AJDF:output>if $values.noder </AJDF:output><AJDF:output>$values.noder</AJDF:output><AJDF:output>else</AJDF:output>0<AJDF:output>/if</AJDF:output>" type="hidden">
                                <input name="noder1" id="noder1" value="<AJDF:output>if $values.noder1 </AJDF:output><AJDF:output>$values.noder1</AJDF:output><AJDF:output>else</AJDF:output>0<AJDF:output>/if</AJDF:output>" type="hidden">
                                <input name="noder2" id="noder2" value="<AJDF:output>if $values.noder2 </AJDF:output><AJDF:output>$values.noder2</AJDF:output><AJDF:output>else</AJDF:output>0<AJDF:output>/if</AJDF:output>" type="hidden">
                                <input name="noder3" id="noder3" value="<AJDF:output>if $values.noder3 </AJDF:output><AJDF:output>$values.noder3</AJDF:output><AJDF:output>else</AJDF:output>0<AJDF:output>/if</AJDF:output>" type="hidden">
                                <input name="org_id" id="org_id" value="<AJDF:output>php</AJDF:output>echo $_SESSION['org_id'];<AJDF:output>/php</AJDF:output>" type="hidden">
                                <input type="button" value="Back" class="mem_bttn" onclick="location.href='index.php?do=application1_1&id=<AJDF:output>$smarty.session.org_id</AJDF:output>'" tabindex="8">
                                <input name="submit" value="Save &amp; Continue " class="mem_bttn" type="submit" tabindex="9">
                                </td>
                            </tr>
                        </tbody>
                      </table>
                    </form>
                </td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="left" valign="top">&nbsp;</td>
  </tr>
</table>
 <script>
  jQuery(function($){
     $("#sort_code").mask("99-99-99");
  });
</script>
<script>
var i =1; j=1; k=1; l=1; m=1; n=1;

function addDiffBankForm(){

	var l = document.getElementById("noder1").value;



	if(l<3){

		l++;

		$.post(  

		"?do=fetchdiffbankform",

		{id: l,label: "form"},  

		function(responseText){

			if(responseText !=3){

				$('#view_plans').html(responseText);

				$("#popUp").show("slow");

				scroll(0,0);

			}else{

				alert('Only three Bank Details are allowed');

			}

		},

		"html"

		);

		document.getElementById("noder1").value=1;

		

	}else{

		alert('Only three Bank Details are allowed;');

	}

	

}



function removeDiffBank(str){

	$.post(

		"?do=deletediffbank",

		{id: str},  

		function(responseText){  

			$("#multiAddressDiffBank").html(responseText);

			//$("#popUp").show("slow");

		},  

		"html"  

	);  

	

}

$(function() {



	/*$.post(

		"?do=savediffbankform",  

		function(responseText){  

			$("#multiAddressDiffBank").html("");

			$("#multiAddressDiffBank").html(responseText);

			//$("#popUp").show("slow");

		},  

		"html"

	);*/

				

	



	//Pop up Close

	$("#addr_close").click(function () {

		$("#addPopUp").hide("slow");

	});

}); 



function addDB1Form(bank_id){
	var m = document.getElementById("noder2").value;
	if(m<=30){
		m++;
		$.post(
		"?do=fetchindiffbankform1&frmid=1",
		{id: m,label: "form",bank_id: bank_id},
		function(responseText){
			if(responseText !=3){
				$('#view_plans').html(responseText);
				$("#popUp").show("slow");	
				scroll(0,0);
			}else{
				alert('Only three Bank Details are allowed');
			}
		},
		"html"
		);
		document.getElementById("noder2").value=m;
		
	}else{
		alert('Only three Bank Details are allowed;');
	}
	
}

function removeForm(id){
	$("#popUp").hide("slow");
	document.getElementById("noder2").value= document.getElementById("noder2").value - 1;
}

function removeInDiffBank(str,acc_id,bank_id,iterates){
	$.post(
		"?do=deleteindiffbank",
		{id: str,acc_id: acc_id,bank_id: bank_id,iterates: iterates},
		function(responseText){

				var indiff = "#indiff"+iterates;
				$(indiff).html("");
				$(indiff).html(responseText);

		},
		"html"
	);
	
}
$(function() {

	$.post(
		"?do=saveindiffbankform1",
		function(responseText){
// 			$("#multiAddressInDiffBank0").html("");
// 			$("#multiAddressInDiffBank0").html(responseText);
			//$("#popUp").show("slow");
		},
		"html"
	);
	

	//Pop up Close
	$("#addr_close").click(function () {
		$("#addPopUp").hide("slow");
	});
}); 


function addDB2Form(bank_id){
	var n = document.getElementById("noder3").value;
	if(n<=30){
		n++;
		$.post(
		"?do=fetchindiffbankform2&frmid=2",
		{id: n,label: "form",bank_id: bank_id},
		function(responseText){
			if(responseText !=3){
				$('#view_plans').html(responseText);
				$("#popUp").show("slow");	
				scroll(0,0);
			}else{
				alert('Only three Bank Details are allowed');
			}
		},
		"html"
		);
		document.getElementById("noder3").value=n;
		
	}else{
		alert('Only three Bank Details are allowed;');
	}
	
}

function removeForm1(id){
	$("#popUp").hide("slow");
	document.getElementById("noder3").value= document.getElementById("noder3").value - 1;
}

$(function() {

	$.post(
		"?do=saveindiffbankform2",
		function(responseText){
			//$("#multiAddressInDiffBank1").html("");
			//$("#multiAddressInDiffBank1").html(responseText);
			//$("#popUp").show("slow");
		},  
		"html"
	);


	//Pop up Close
	$("#addr_close").click(function () {
		$("#addPopUp").hide("slow");
	});
}); 

function addBankForm(){
	var k = document.getElementById("noder").value;
	if(k<=30){
		k++;
		$.post(  
		"?do=fetchbankform",
		{id: k,label: "form"},  
		function(responseText){
			if(responseText != 3){
				$('#view_plans').html(responseText);
				$("#popUp").show("slow");
				scroll(0,0);
			}else{
				alert('Only three Bank Details are allowed');
			}
		},
		"html"
		);
		document.getElementById("noder").value=k;
		
	}else{
		alert('Only three Bank Details are allowed;');
	}
	
}

function removeForm(id){
	$("#popUp").hide("slow");
	document.getElementById("noder").value= document.getElementById("noder").value - 1;
}

function removeBank(acc,str){
	$.post(
		"?do=deletebank",
		{id: str,acc_id: acc},
		function(responseText){  
			$("#multiAddressBank").html(responseText);
			//$("#popUp").show("slow");
		},  
		"html"  
	);
	
}
$(function() {

	$.post(
		"?do=savebankform",  
		function(responseText){  
			$("#multiAddressBank").html("");
			$("#multiAddressBank").html(responseText);
			//$("#popUp").show("slow");
		},  
		"html"
	);
				
	

	//Pop up Close
	$("#addr_close").click(function () {
		$("#addPopUp").hide("slow");
	});
}); 



function addForm(){
	var i = document.getElementById("addressno").value;
// 	alert(i);
	if(i<=30){
		i++; //j++;
		$.post(  
		"?do=fetchsecondform",  
		{id: i,label: "form"},  
		function(responseText){  

			if(responseText !=3){
				$('#view_plans').html(responseText);
				$("#popUp").show("slow");
				scroll(0,0);
			}else{
				alert('Only three Branch Address are allowed');
			}
		},  
		"html"  
		);
		document.getElementById("addressno").value=i;
	}else{
		alert('Only three Branch Address are allowed');
	}
}

function removeForm(id){
	$("#popUp").hide("slow");
	document.getElementById("addressno").value= document.getElementById("addressno").value - 1;
}


function removeBranch(str){
	$.post(  
		"?do=deletesecondform",  
		{id: str},  
		function(responseText){  
			$("#multiAddress").html(responseText);
			//$("#popUp").show("slow");
		},  
		"html"  
	);  
	
}

//if same option. duplicate the address for Billing
$(function() {
//jQuery(document).ready(function($) {

	$.post(  
		"?do=savesecondform",  
		function(responseText){  
			$("#multiAddress").html("");
			$("#multiAddress").html(responseText);
			//$("#popUp").show("slow");
		},  
		"html"  
	);  

$("#addr_close").click(function () {
    $("#addPopUp").hide("slow");
    });

});

<AJDF:output>if ($values.bank_orgc_country !='')</AJDF:output>
	//Durin validation: Change Nace by Nace Group Id 
	$.post(  
		"?do=getbankbycountry",
		{id: "<AJDF:output>$values.bank_orgc_country</AJDF:output>",label: "bank_name",
		num: "<AJDF:output>$values.bank_name</AJDF:output>"},  
		function(responseText1){  
			$("#dropBank").html(responseText1);
            if($("#bank_name").val()==''){
              $("#bank_name").val(<AJDF:output>$smarty.session.step_2_save.bank_name</AJDF:output>);
            }
			if($("#bank_name").val()=='0'){
				var val = '<AJDF:output>$smarty.session.step_2.bank_new</AJDF:output>';
				var htm = '<br><br><input type="text" id="bank_new" name="bank_new" value="'+val+'" class="text_b">';
				document.getElementById('otherBank').innerHTML = htm;
			}
		},
	
	"html"  
	);

<AJDF:output>/if</AJDF:output>
var bank =1;
function primary_trade(str){
		//alert(str);
	
	if (str == true){
		document.getElementById("selPrimary").style.display = "none";

	
	}else{
		document.getElementById("selPrimary").style.display = "block";

	}
	bank =0;
}


<AJDF:output>if ($values.trade_address == "1")</AJDF:output>
	primary_trade(true);
<AJDF:output>else</AJDF:output>
	primary_trade(false);
<AJDF:output>/if</AJDF:output>

function bank_news(str) {

	//var bank_val = '<AJDF:output>$values.bank_name</AJDF:output>';
	var val = '<AJDF:output>$values.bank_new</AJDF:output>';

	if(str === "0" || str === 0){
		var htm = '<br><br><input type="text" id="bank_new" name="bank_new" value="'+val+'" class="text_b">';

		document.getElementById('otherBank').innerHTML = htm;
	}else{
		document.getElementById('otherBank').innerHTML = '';
	}
}	 
<AJDF:output>if ($smarty.session.step_2.bank_name == "0")</AJDF:output>

	var htm = '<br><br><input type="text" id="bank_new" name="bank_new" value="<AJDF:output>$smarty.session.step_2.bank_new</AJDF:output>" class="text_b">';

	document.getElementById('otherBank').innerHTML = htm;
<AJDF:output>/if</AJDF:output>


function org_bill(str){
	if (str == true){
		document.getElementById("selOrgbill").style.display = "none";
	}else{
		document.getElementById("selOrgbill").style.display = "block";
	}
}
<AJDF:output>if ($values.billing_address == "1")</AJDF:output>
	org_bill(true);
<AJDF:output>else</AJDF:output>
	org_bill(false);
<AJDF:output>/if</AJDF:output>
</script>
<script>
var iterate = '1'; 
function addstyle(str){
	for(i=1; i<=iterate;i++){
		var id = "#trade_"+i;
		var drop = "#search_id_"+i
		if(str == i){

			$(id).removeClass('clsTradeBook');
			//$(id).addClass('nodisplay');
		}else{
			$(id).addClass('clsTradeBook');
			//$(id).removeClass('nodisplay');
			 $(drop).slideUp("slow");
		}
	}
}

function addstyles(str, id,drop)
{
	for(i=1; i<=3;i++){
		var id = id+i;
		var drop = drop+i
		if(str == i){
				//alert(drop);
			$(id).removeClass('clsTradeBook');
			//$(id).addClass('nodisplay');
			$(drop).slideDown("slow");
		}else{
			$(id).addClass('clsTradeBook');
			//$(id).removeClass('nodisplay');
			 $(drop).slideUp("slow");
		}
	}
}

function compulsory_fields() {
    var name = $.trim($("#account_name").val()),
            no = $.trim($("#account_no").val()),
            code = $.trim($("#sort_code").val());

    if (name != '' && no != '' && code != '') {
        $(".temp_comp").empty();
    } else {
        $(".temp_comp").html('*');
    }
}

</script>
<style>
.small{
	font-size:11px;
}
</style>
</div>
<div id="popUp" style="display:none;">
  <div id="light" class="white_content">
    <div id="view_plans"> </div>
  </div>
  <div id="fade" class="black_overlay"></div>
</div>
<AJDF:output>include file="footer.html"</AJDF:output>