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 : 3.149.29.192


Current Path : /proc/thread-self/root/var/www/oasis/js/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/js/upload_details.js

//Uploading Details
function get_header() {
  window.open(
    $host_url +
      "getModuleDetailsHeaders.demo&schema_id=" +
      $g_user_schema_details_array.data[1][0].ref_s_user_schema_code +
      ""
  );
}
function getGroupDetailsHeader() {
  for (g = 0; g < $all_multi_groups.length; g++) {
    if ($all_multi_groups[g]["group_name"] == $upload_group_table_name) {
      var group_id = $all_multi_groups[g]["group_id"];
      var group_name = $all_multi_groups[g]["group_name"];
      var group_entry_table_name = $all_multi_groups[g]["group_table_name"];
    }
  }

  window.open(
    $host_url +
      "getGroupModuleDetailsHeaders.demo&schema_id=" +
      $g_user_schema_details_array.data[1][0].ref_s_user_schema_code +
      "&group_id=" +
      group_id +
      "&group_name=" +
      group_name +
      "&group_entry_table_name=" +
      group_entry_table_name
  );
}
function downloadModuleData() {
  window.open(
    $host_url +
      "downloadModuleData.demo&schema_id=" +
      $g_user_schema_details_array.data[1][0].ref_s_user_schema_code +
      ""
  );
}

function uploadModuleDetailsIntoDB($schema_id) {
  ext = document.getElementById("module_details_uploaded_file").value;
  filepath = ext;
  ext = ext.substring(ext.length - 3, ext.length);
  ext = ext.toLowerCase();
  if (ext != "") {
    if (ext == "xls") {
      document.getElementById("form_module_details_upload").action =
        $host_url +
        "uploadModuleDetailsIntoDB.demo&schema_id=" +
        $schema_id +
        "&filepath=" +
        filepath;
      document.getElementById("form_module_details_upload").target = "_new";
      // document.getElementById('form_module_details_upload').target='report_display';
      document.getElementById("form_module_details_upload").submit();
    } else
      alert(
        "You have selected a ." +
          ext +
          " file; Please select a valid .csv file "
      );
  } else alert("Please select a File");
}

function uploadModuleGroupDetailsIntoDB() {
  for (g = 0; g < $all_multi_groups.length; g++) {
    if ($all_multi_groups[g]["group_name"] == $upload_group_table_name) {
      var group_id = $all_multi_groups[g]["group_id"];
      var group_name = $all_multi_groups[g]["group_name"];
      var group_entry_table_name = $all_multi_groups[g]["group_table_name"];
    }
  }

  ext = document.getElementById("module_group_details_uploaded_file").value;
  filepath = ext;
  ext = ext.substring(ext.length - 3, ext.length);
  ext = ext.toLowerCase();
  if (ext != "") {
    if (ext == "xls") {
      /* document.getElementById('form_module_group_details_upload').action =  $host_url+"uploadModuleGroupDetailsIntoDB.demo&schema_id="+$schema_id
			                                                                       +"&filepath="+filepath+"&group_id="+group_id+"&group_name="+group_name
																				   +"&group_entry_table_name="+group_entry_table_name+"&login_ctr="+$("#login_counter").val();          
			 document.getElementById('form_module_group_details_upload').target='_new';
			 // document.getElementById('form_module_details_upload').target='report_display';
			 document.getElementById('form_module_group_details_upload').submit(); */

      var $upload;
      $upload = $host_url + "uploadModuleGroupDetailsIntoDB.demo";
      $upload += "&schema_id=" + $schema_id;
      $upload += "&filepath=" + filepath;
      $upload += "&group_id=" + group_id;
      $upload += "&group_name=" + group_name;
      $upload += "&login_ctr=" + $("#login_counter").val();

      document
        .getElementById("form_module_group_details_upload")
        .setAttribute("action", $upload);
      return AIM.submit(
        document.getElementById("form_module_group_details_upload"),
        "report_display",
        { onComplete: uploadBillResponce }
      );
    } else
      alert(
        "You have selected a ." +
          ext +
          " file; Please select a valid .csv file "
      );
  } else alert("Please select a File");
}
function uploadBillResponce($response) {
  $response = eval("(" + $response + ")");

  $("#dialog").dialog("close");
  alert($response.data);

  displayUserSchemaModuleGroupDetails(
    "user_schema_34_group_12",
    0,
    12,
    "main_group_grid_12"
  );
}