0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.191.171.86


Current Path : /var/www/results/bnu/js/
Upload File :
Current File : /var/www/results/bnu/js/jscript.js

var path_name = window.location.pathname;

path_name = path_name.replace("result.php", "");
path_name = path_name.replace("index.php", "");
path_name = path_name.replace("update_challan.php", "");
path_name = path_name.replace("subjectDetails.php", "");
path_name = path_name.replace("payment_gate_way_responce.php", "");
path_name = path_name.replace("src/download_upload.html/", "");

if (location.protocol != "https:") {
  var $host_url =
    "http://" + window.location.host + "/" + path_name + "/app.php?a=";
} else {
  var $host_url =
    "https://" + window.location.host + "/" + path_name + "/app.php?a=";
}

//var $host_url = "http://"+window.location.host+"/"+path_name+"/app.php?a=";
$host_url = $host_url.replace("/src/download_upload.html", "");
$g_dropdown_data = "";
$g_edit_app_code = 0;

function GetUrlParameters() {
  var url_object = new Object();
  var data_set = window.location.href.split("?");

  if (data_set.length > 1) {
    var params_set = data_set[1].split("&");

    for (i = 0; i < params_set.length; i++) {
      var pv = params_set[i];
      var pvv = pv.split("=");
      url_object[pvv[0]] = pvv[1];
    }
  }
  return url_object;
}

function home() {
  window.location.href = "index.php";
}
/* function PopulateResultDegreeList()
{
	//alert('a');
		$.ajax({
		type: "POST",
		async:false,
		url: $host_url+"PopulateResultDegreeList",
		success: PopulateResultDegreeListResponce
		});
}
function PopulateResultDegreeListResponce(responce)
{
	 responce = eval('(' + responce + ')');
	 alert(responce.data['funivcode']); 
	var html=responce.data['html'];
	$("#degree_list_div").html(html);	
	 
} */
/* function ValidateRegNo()
{ 
	var reg_no=trim($("#reg_no").val());
	var exam=$("#exam").val();
	if(empty(reg_no))
	{
	alert("Register number should be entered");
	return false;
	} 	 
	window.location.href="result.php?r="+reg_no+"&e="+exam;
} */

function ValidateRegNo() {
  var reg_no = trim($("#reg_no").val());
  var exam = $("#exam").val();

  if (empty(reg_no)) {
    alert("Register number should be entered");
    return false;
  }
  if (exam == "none") {
    alert("Select semister");
    return false;
  }

  $.ajax({
    type: "POST",
    data: "&reg_no=" + reg_no + "&exam=" + exam,
    url: $host_url + "ValidateRegNo",
    success: function ValidateReg(responce) {
      responce = eval("(" + responce + ")");
      if (responce.error_code == "-1") {
        alert(responce.data);
        document.getElementById("reg_no").focus();
        return false;
      } else if (responce.error_code == "0") {
        var temres = responce.data;
        setCookie("univcode", temres, 1);
        category = "";
        if (
          getCookie(funivcode) == "035" ||
          getCookie(funivcode) == "032" ||
          getCookie(funivcode) == "026"
        ) {
          if (document.getElementById("catscst").checked == true)
            category = document.getElementById("catscst").value;
        }

        window.location.href =
          "result.php?r=" + reg_no + "&e=" + exam + "&ct=" + category;
      }
    }
  });
}

function OpenUpdateChallanScreen(app_no, reg_no, exam_no) {
  var s = $(".reg_no_div").position();
  var Left = s.left + 2 + "px";

  var Top = s.top + 50 + "px";

  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "GetStudentDetailsForPayment",
    data: "&app_no=" + app_no,
    success: function GetStudentDetailsForPaymentResponse(responce) {
      responce = eval("(" + responce + ")");
      if (responce.error_code == "0") {
        ftotal = responce.data["ftotal"];
        $("#dialog").dialog("open");
        $("#dialog")
          .parent()
          .css("top", Top);
        $("#dialog")
          .parent()
          .css("left", Left);
        $("#dialog")
          .parent()
          .css("width", "720px");
        $("#dialog")
          .parent()
          .css("height", "220px");
        $("#dialog").css("min-height", "110px");
        $("#dialog")
          .parent()
          .css("height", "170px");
        $("#ui-id-5").css("font-size", "12px");
        $("#dialog").dialog(
          "option",
          "title",
          "Challan Update Details for " + app_no
        );

        $("#dialog").load("update_challan.html", function() {
          $("#date_of_payment").mask({ mask: "##/##/####" });
          $("#amount_paid").val(ftotal);
          $("#st_app_no").val(app_no);
        });
      } else {
        alert(responce.data);
      }
    }
  });
}

function date_format($str) {
  if (trim($str) == "" || $str == "undefined") return "0000-00-00";
  else {
    var indx = $str.indexOf("/");
    if (indx == -1) return $str;
    else {
      $date = $str.split("/");
      return $date[2] + "-" + $date[1] + "-" + $date[0];
    }
  }
}

function DoUpdateChallan() {
  var app_no = trim($("#st_app_no").val());
  var challan_no = trim($("#challan_no").val());
  app_no = app_no.replace(":", "");
  var bank_name = trim($("#bank_name").val());
  var date_of_payment = date_format(trim($("#date_of_payment").val()));
  var fchallan_amt = trim($("#amount_paid").val());

  if (empty(challan_no)) {
    alert("Please Enter Challan No");
    $("#challan_no").focus();
    return false;
  } else if (empty(bank_name)) {
    alert("Please Enter Bank Name");
    $("#bank_name").focus();
    return false;
  } else if (date_of_payment == "0000-00-00") {
    alert("Please Enter Date Of Payment");
    $("#date_of_payment").focus();
    return false;
  } else if (empty(fchallan_amt) || fchallan_amt == "0") {
    alert("Please Enter Amount Paids");
    return false;
  }

  var lstr_data =
    "&app_no=" +
    app_no +
    "&fbank_name=" +
    bank_name +
    "&fchallan_date=" +
    date_of_payment +
    "&fchallan_no=" +
    challan_no +
    "&fchallan_amt=" +
    fchallan_amt;

  $.ajax({
    type: "POST",
    async: false,
    data: lstr_data,
    url: $host_url + "DoUpdateChallan",
    success: function DoUpdateChallanResponce(responce) {
      responce = eval("(" + responce + ")");
      if (responce.error_code == 0) {
        alert(responce.data);
        $("#dialog").dialog("close");
        DisplayRevalutionApplications();
      } else {
        alert(responce.data);
      }
    }
  });
}

function PopulateResultDegreeList() {
  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "PopulateResultDegreeList",
    success: PopulateResultDegreeListResponce
  });
}

function PopulateResultDegreeListResponce(responce) {
  responce = eval("(" + responce + ")");
  funivcode = responce.data["funivcode"];

  setCookie("funivcode", funivcode, 1);
  $("#catcode").hide();
  if (funivcode == "026" || funivcode == "032" || funivcode == "035")
    $("#catcode").show();

  var html = responce.data["html"];
  var mess_data = responce.data["mess_data"];
  $("#reg_text").html(responce.data["reg_text"]);
  $("#degree_list_div").html(html);
  $("#message_board").html(mess_data);
}

function DisplayStudentResult(r, e, ct) {
  $.ajax({
    type: "POST",
    async: false,
    data: "r=" + r + "&e=" + trim(e) + "&ct=" + ct,
    url: $host_url + "DisplayStudentResult",
    success: DisplayStudentResultResponce
  });
}

function DisplayStudentResultResponce(responce) {
  responce = eval("(" + responce + ")");

  var html = responce.data["html"];
  var FRESULTDATE = responce.data["FRESULTDATE"];
  var scroll_txt = responce.data["scroll_txt"];
  var rv_rt_total_fee = parseFloat(responce.data["rv_rt_total_fee"]);

  if (rv_rt_total_fee == 0) {
    $("#ui-id-3").hide();
    $("#ui-id-2").hide();
    $("#ui-id-4").hide();
  }

  $("#ContentPlaceHolder1_lblDate").html(
    "Result Announced Date: " + FRESULTDATE
  );
  $("#ContentPlaceHolder1_lblExmLastDate").html(scroll_txt);

  if (responce.error_code == -1) {
    $("#result_error_div").html(html);
    $("#result_error_div").show();
    $("#ContentPlaceHolder1_lblDate").html("");
    $("#ContentPlaceHolder1_lblExmLastDate").html("");
  } else {
    $("#result_error_div").html("");
    $("#result_error_div").hide();
    $("#result_success_div").html(html);
  }
}

function DisplayStudentsubjectDetailsResult(r, e) {
  $.ajax({
    type: "POST",
    async: false,
    data: "r=" + r + "&e=" + e,
    url: $host_url + "DisplayStudentsubjectDetailsResult",
    success: DisplayStudentsubjectDetailsResultResponce
  });
}

function DisplayStudentsubjectDetailsResultResponce(responce) {
  responce = eval("(" + responce + ")");
  var html = responce.data["html"];

  if (responce.error_code == -1) {
    $("#result_error_div").html(html);
    $("#result_error_div").show();
  } else {
    $("#result_error_div").html("");
    $("#result_error_div").hide();
    $("#result_success_div").html(html);
  }
}
function DisplayRevalutionDetails() {
  url_object = GetUrlParameters();
  var r = url_object["r"];
  var e = url_object["e"];
  $.ajax({
    type: "POST",
    async: false,
    data: "r=" + r + "&e=" + e,
    url: $host_url + "DisplayRevalutionDetails",
    success: DisplayRevalutionDetailsResponce
  });
}

function DisplayRevalutionDetailsResponce(responce) {
  responce = eval("(" + responce + ")");
  var html = responce.data["reval_html"];

  if (responce.error_code == 0) {
    var student_info =
      '<br><table width="100%" align="center" class="result_table_header">' +
      $("#student_info").html() +
      "</table><br>";
    $("#revaluation").html(student_info + html);
    $("#result_error_div").show();
  } else {
  }
}

function ValidateStudentMobileNo() {
  var FMOBILE = $("#FMOBILE").val();
  if (empty(FMOBILE)) {
    alert(FMOBILE);
    return false;
  }

  url_object = GetUrlParameters();
  var r = url_object["r"];
  var e = url_object["e"];

  $.ajax({
    type: "POST",
    async: false,
    data: "r=" + r + "&e=" + e + "&FMOBILE=" + FMOBILE,
    url: $host_url + "ValidateStudentMobileNo",
    success: ValidateStudentMobileNoResponce
  });
}

function MakeOnlinePayment(appno, tmpbankdet, univcode) {
  var bankdet = "";
  $.ajax({
    type: "POST",
    async: false,
    url: $host_url + "getmasbank",
    success: function(responce) {
      responce = eval("(" + responce + ")");
      bankdet = responce.data;
    }
  });

  var button = "";
  $.ajax({
    type: "POST",
    async: false,
    data: "appno=" + appno + "&funivcode=" + univcode,
    url: "razorpay/pay.php",
    success: function(responce) {
      button = responce;
    }
  });

  console.log(bankdet);
  var str = `<style>.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
	}</style><br/><table width = "90%" style = "margin:1% auto;border-collapse:collapse" border = "1" >
				<thead>
					<th>
						Sl. No.
					</th>
					<th>
						Bank
					</th>
					<th>
						Bank Charges
					</th>
					<th>
						Make Payment
					</th>
				</thead><tbody>`;
  var z = 1;
  for (var i = 0; i < bankdet.length; i++) {
    str += `<tr>
					 	<td width = "10%;" style = "text-align: center;">
							${z}
						</td>
						<td width = "20%;">
							<img  alt="${bankdet[i]["fbank"]}"  height="100" width="100" src = "${
      bankdet[i]["fbanklog"]
    }" />
						</td>
						<td width = "40%;">
							${bankdet[i]["fbankcharge"]}
						</td>`;
    if (bankdet[i]["fbank"] == "razorpay") {
      str += `<td width = "20%;">
							${button}
							</td>`;
    } else {
      str += `<td width = "20%;">
							<button id="paytm1" class = "button" onclick = "MakePayment('${
                bankdet[i]["fbank"]
              }','${appno}','${univcode}')">
							Make Payment
							</button>
							</td>`;
    }

    str += `</tr>`;
    z++;
  }
  str += `</tbody></table>`;

  $("#mobile_no_div").hide();
  $("#applications").html(str);
  //window.location.href="payment_gateway.php?productinfo="+app_no;
}

function ValidateStudentMobileNoResponce(responce) {
  responce = eval("(" + responce + ")");
  if (responce.error_code == 0) {
    DisplayRevalutionApplications();
  } else {
    alert("Invalid Mobile No");
    $("#your_app_div").html("");
  }
}

function DisplayRevalutionApplications() {
  url_object = GetUrlParameters();
  var r = url_object["r"];
  var e = url_object["e"];

  $.ajax({
    type: "POST",
    async: false,
    data: "r=" + r + "&e=" + e,
    url: $host_url + "DisplayRevalutionApplications",
    success: DisplayRevalutionApplicationsResponce
  });
}

function DisplayRevalutionApplicationsResponce(responce) {
  responce = eval("(" + responce + ")");
  var html = responce.data["html"];
  if (responce.error_code == 0) {
    var student_info = "";
    if (
      trim($("#student_info").html()) != "undefined" &&
      !empty($("#student_info").html())
    ) {
      student_info =
        '<table width="100%" align="center" class="result_table_header">' +
        $("#student_info").html() +
        "</table><br><br>";
    }
    $("#mobile_no_div").hide();
    $("#applications").html(student_info + html);
  } else {
  }
}

function CalculateRevaluationTotFee() {
  html_objects = $("input[id*='rv_']");
  if (empty(html_objects) || html_objects.length == 0)
    html_objects = $("input[id*='rt_']");
  if (empty(html_objects) || html_objects.length == 0)
    html_objects = $("input[id*='xr_']");
  if (empty(html_objects) || html_objects.length == 0)
    html_objects = $("input[id*='cv_']");

  var total_fee = 0;
  var rvfee = 0;
  var xrfee = 0;

  var rv_cnt = 0;
  var xr_cnt = 0;

  for ($i = 0; $i < html_objects.length; $i++) {
    var rv_total = "0";
    var rt_total = "0";
    var xr_total = "0";
    var cv_total = "0";

    var id = html_objects[$i]["id"];
    var internal_code = id.split("_")[1];

    if (
      $("#rv_" + internal_code).is(":disabled") == false &&
      $("#rv_" + internal_code).is(":checked") == true
    ) {
      rv_total = $("#fee_rv_" + internal_code).html();
      rv_cnt++;
    } else rv_total = "0";

    rv_total = rv_total.replace("(", "");
    rv_total = rv_total.replace(")", "");
    if (
      $("#rt_" + internal_code).is(":disabled") == false &&
      $("#rt_" + internal_code).is(":checked") == true
    )
      rt_total = $("#fee_rt_" + internal_code).html();
    else rt_total = "0";

    rt_total = rt_total.replace("(", "");
    rt_total = rt_total.replace(")", "");
    if ($("#xr_" + internal_code).is(":checked") == true) {
      xr_total = $("#fee_xr_" + internal_code).html();
      xr_cnt++;
    } else xr_total = "0";

    xr_total = xr_total.replace("(", "");
    xr_total = xr_total.replace(")", "");

    if (
      $("#cv_" + internal_code).is(":disabled") == false &&
      $("#cv_" + internal_code).is(":checked") == true
    )
      cv_total = $("#fee_cv_" + internal_code).html();
    else cv_total = "0";
    cv_total = cv_total.replace("(", "");
    cv_total = cv_total.replace(")", "");

    if (parseFloat($("#xr_app_fee").html()) > 0) {
      if (
        $("#rv_" + internal_code).is(":checked") == true &&
        $("#rv_" + internal_code).is(":disabled") == false &&
        $("#xr_" + internal_code).is(":disabled") == false
      ) {
        xr_total = $("#fee_xr_" + internal_code).html();
        $("#xr_" + internal_code).attr("checked", true);
        $("#xr_" + internal_code).attr("disabled", true);

        xr_total = xr_total.replace("(", "");
        xr_total = xr_total.replace(")", "");
      }
    }

    var row_tot =
      parseFloat(rv_total) +
      parseFloat(rt_total) +
      parseFloat(xr_total) +
      parseFloat(cv_total);

    $("#total_" + internal_code).html(row_tot);
    total_fee = parseFloat(total_fee + row_tot);

    rvfee += parseFloat(rv_total);

    xrfee += parseFloat(xr_total);
  }

  if (rvfee > 0) {
    total_fee += parseFloat($("#rv_app_fee").html());
  }

  if (xrfee > 0) {
    total_fee += parseFloat($("#xr_app_fee").html());
  }

  if (xrfee > 0 || rvfee > 0) {
    var app = rv_cnt > xr_cnt ? rv_cnt : xr_cnt;
    console.log($("#fine_app_fee").html());
    console.log(parseFloat($("#fine_app_fee").html()));
    console.log(app);
    console.log(app * parseFloat($("#fine_app_fee").html()));
    var fine_app_fee = app * parseFloat($("#fine_app_fee").html());
    total_fee += fine_app_fee;
  }

  $("#grand_total").html(total_fee);
}

function SaveRevaluation() {
  var grand_total = parseFloat($("#grand_total").html());
  var fpaymode = $("#fpaymode").val();

  if (fpaymode == "Select") {
    alert("Please select Payment Type");
    return false;
  } else if (empty(grand_total)) {
    alert("Please select any Subjects");
    return false;
  }

  html_objects = $("td[id*='fccode_']");
  var reval_arr = new Object();

  for ($i = 0; $i < html_objects.length; $i++) {
    var id = html_objects[$i]["id"];
    var internal_code = id.split("fccode_")[1];
    var rv_total = "0";
    var rt_total = "0";
    var xr_total = "0";
    var cv_total = "0";

    var row_total = parseFloat($("#total_" + internal_code).html());
    var fccode = $("#fccode_" + internal_code).html();

    if (row_total > 0) {
      reval_arr[internal_code] = new Object();
      reval_arr[internal_code]["row_total"] = row_total;
      reval_arr[internal_code]["fccode"] = fccode;

      if (
        $("#rv_" + internal_code).is(":disabled") == false &&
        $("#rv_" + internal_code).is(":checked") == true
      ) {
        rv_total = $("#fee_rv_" + internal_code).html();
        rv_total = rv_total.replace("(", "");
        rv_total = rv_total.replace(")", "");
        reval_arr[internal_code]["RV"] = rv_total;
      }

      if (
        $("#rt_" + internal_code).is(":disabled") == false &&
        $("#rt_" + internal_code).is(":checked") == true
      ) {
        rt_total = $("#fee_rt_" + internal_code).html();
        rt_total = rt_total.replace("(", "");
        rt_total = rt_total.replace(")", "");
        reval_arr[internal_code]["RT"] = rt_total;
      }

      if ($("#xr_" + internal_code).is(":checked") == true) {
        xr_total = $("#fee_xr_" + internal_code).html();
        xr_total = xr_total.replace("(", "");
        xr_total = xr_total.replace(")", "");
        reval_arr[internal_code]["XR"] = xr_total;
      }

      if (
        $("#cv_" + internal_code).is(":disabled") == false &&
        $("#cv_" + internal_code).is(":checked") == true
      ) {
        cv_total = $("#fee_cv_" + internal_code).html();
        cv_total = cv_total.replace("(", "");
        cv_total = cv_total.replace(")", "");
        reval_arr[internal_code]["CV"] = cv_total;
      }
    }

    url_object = GetUrlParameters();
    var r = url_object["r"];
    var e = url_object["e"];
  }

  var myJSONText = JSON.stringify(reval_arr);
  $lstr_string = "&reg_no=" + encodeURIComponent(trim(r));
  $lstr_string += "&e=" + encodeURIComponent(trim(e));
  $lstr_string += "&grand_total=" + grand_total;
  $lstr_string += "&fpaymode=" + fpaymode;

  $lstr_string += "&myJSONText=" + myJSONText;
  $.ajax({
    type: "Post",
    url: $host_url + "SaveRevalution",
    data: $lstr_string,
    success: saveRevaluationresponce
  });
}

function saveRevaluationresponce($responce) {
  $responce = eval("(" + $responce + ")");
  if ($responce.error_code == 0) {
    if ($responce.data["fpaymode"] != "Other Banks") {
      $("#reval_details").html($responce.data["html"]);
    } else {
      var button = "";
      $.ajax({
        type: "POST",
        async: false,
        data:
          "appno=" +
          $responce.data["fappno"] +
          "&funivcode=" +
          $responce.data["funivcode"],
        url: "razorpay/pay.php",
        success: function(responce) {
          button = responce;
        }
      });

      var bankdet = $responce.data["masbank"];
      var str = `<style>.button {
	    				background-color: #4CAF50;
	   					border: none;
	    				color: white;
	    				padding: 15px 32px;
	    				text-align: center;
	    				text-decoration: none;
	    				display: inline-block;
	    				font-size: 16px;
	    				margin: 4px 2px;
	    				cursor: pointer;
					}</style>
				${
          $responce.data["html"]
        }<br/><table width = "80%" style = "margin :1% auto;border-collapse:collapse" border = "1" >
				<thead>
					<th>
						Sl. No.
					</th>
					<th>
						Bank
					</th>
					<th>
						Bank Charges
					</th>
					<th>
						Make Payment
					</th>
				</thead><tbody>`;
      var z = 1;
      for (var i = 0; i < $responce.data["masbank"].length; i++) {
        str += `<tr>
					 	<td width = "5%;" style = "text-align: center;">
							${z}
						</td>
						<td width = "15%;">
							<img  alt="${
                bankdet[i]["fbank"]
              }" style="margin: 5px auto;width: 70%;height: 30%;align-self: center;margin-left: 12%;"  src = "${
          bankdet[i]["fbanklog"]
        }" />
						</td>
						<td width = "40%;" >
							${bankdet[i]["fbankcharge"]}
						</td>`;
        if (bankdet[i]["fbank"] == "razorpay") {
          str += `<td width = "20%;">
							${button}
							</td>`;
        } else {
          str += `<td width = "20%;">
							<button id="paytm1" class = "button" style="width: 85%;margin-left: 7%;" onclick = "MakePayment('${
                bankdet[i]["fbank"]
              }','${$responce.data["fappno"]}','${
            $responce.data["funivcode"]
          }')">
							Make Payment
							</button>
							</td>`;
        }

        str += `</tr>`;
        z++;
      }
      str += `</tbody></table>`;
      $("#reval_details").html(str);
    }
  } else {
    alert($responce.data);
  }
}

//$("#mobile_no_div").hide();
//$("#applications").html(str);

function PrintRevaluationApplicationForm(app_no) {
  //$host_url = "http://results.logisys.org/bnu/app.php?a=";
  if (location.protocol != "https:") {
    var $host_url =
      "http://" + window.location.host + "/" + path_name + "/app.php?a=";
  } else {
    var $host_url =
      "https://" + window.location.host + "/" + path_name + "/app.php?a=";
  }
  window.location.href =
    $host_url + "PrintRevaluationApplicationForm&app_no=" + app_no;
}

function PrintRevaluationApplicationFormChallan(app_no) {
  window.location.href =
    $host_url + "PrintRevaluationApplicationFormChallan&app_no=" + app_no;
}

function trim($str) {
  return jQuery.trim($str);
}

function empty(mixed_var) {
  var key;
  if (
    mixed_var === "" ||
    mixed_var === 0 ||
    mixed_var === "0" ||
    mixed_var === null ||
    mixed_var === false ||
    typeof mixed_var === "undefined"
  ) {
    return true;
  }

  if (typeof mixed_var == "object") {
    for (key in mixed_var) {
      return false;
    }
    return true;
  }

  return false;
}

function in_array(needle, haystack, argStrict) {
  var key = "",
    strict = !!argStrict;
  if (strict) {
    for (key in haystack) {
      if (haystack[key] === needle) {
        return true;
      }
    }
  } else {
    for (key in haystack) {
      if (haystack[key] == needle) {
        return true;
      }
    }
  }
  return false;
}

function DownLoadUpload() {
  $("#tabs").load("src/download_upload.html");
}

function downloadFileFromServer() {
  if (trim(document.getElementById("download_upload_path").value) == "") {
    alert("Please Enter the Path.");
    document.getElementById("download_upload_path").focus();
    return;
  } else {
    window.location.href =
      $host_url +
      "downloadFileFromServer&download_file_path=" +
      $("#download_upload_path").val();
  }
}

function UploadFileToServer() {
  if (trim(document.getElementById("upload_to_server_file_name").value) == "") {
    alert("Please Enter the File Path.");
    document.getElementById("upload_to_server_file_name").focus();
    return;
  } else {
    ext = document.getElementById("upload_to_server_file_name").value;
    filepath = ext;
    ext = ext.substring(ext.length - 3, ext.length);
    ext = ext.toLowerCase();
    if (ext != "") {
      document.getElementById("form_upload_download_details").action =
        $host_url +
        "UploadFileToServer&filepath=" +
        filepath +
        "&storage_path=" +
        $("#download_upload_file_path").val();
      document.getElementById("form_upload_download_details").target = "_new";
      document.getElementById("form_upload_download_details").submit();
    } else {
      alert("Please select a File");
    }
  }
}

function setCookie(c_name, value, expiredays) {
  var exdate = new Date();
  exdate.setDate(exdate.getDate() + expiredays);
  document.cookie =
    c_name +
    "=" +
    escape(value) +
    (expiredays == null ? "" : ";expires=" + exdate.toGMTString());
}

function getCookie(c_name) {
  if (document.cookie.length > 0) {
    c_start = document.cookie.indexOf(c_name + "=");
    if (c_start != -1) {
      c_start = c_start + c_name.length + 1;
      c_end = document.cookie.indexOf(";", c_start);
      if (c_end == -1) c_end = document.cookie.length;
      return unescape(document.cookie.substring(c_start, c_end));
    }
  }
  return "";
}

function MakePayment(bank, appno, univcode) {
  /*if(bank != 'razorpay')
	{
		window.location.href="Paytm/pgRedirect.php?productinfo="+appno;
	}*/

  switch (bank) {
    case "paytm":
      window.location.href = "Paytm/pgRedirect.php?productinfo=" + appno;
      break;
    case "hdfc":
      window.location.href =
        "hdfc/ccavRequestHandler.php?productinfo=" +
        appno +
        "&funivcode=" +
        univcode;
      break;
    case "axis": {
      //	window.location.href="axis/sampleEasyPay.php?productinfo="+appno+"&funivcode="+univcode;
      //break;
      $.ajax({
        type: "POST",
        data: "productinfo=" + appno + "&funivcode=" + univcode,
        url: "axis/sampleEasyPay.php",
        success: function() {
          //button = responce;
        }
      });
    }
    default:
      break;
  }
}