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.144.104.175


Current Path : /var/www/html/stph/js/
Upload File :
Current File : /var/www/html/stph/js/export_import_setup.js

$g_emport_table_setup="";
$g_import_table_setup="";
function LoadExportTablesSetup()
{ 
    $geditinternalcode=0;
	window.enable_proper_module="ExportTablesSetup";
	$("#page_main_div").load('html_modules/export_tables_setup.html',function()
	{		
	document.getElementById('display_module_name').innerHTML = 'Export Tables Setup';
	document.getElementById('module_name_for_save').value = 'saveExportTablesSetup'; 	
	document.getElementById('vertical_space_div').style.height='8px';
	//document.getElementById('college_degree_status_div').innerHTML ='';
	$g_emport_table_setup="";
	$.ajax({
		 type: "POST",
		 url: $host_url+"GetExportDetails.demo",		 
		 success:GetExportDetailsResponce
		}); 
	}
	);
   $('#module_details_div').hide();			
 }
 
 function GetExportDetailsResponce($responce)
   {                                                
    $responce = eval('(' + $responce + ')'); 	
	if( $responce.error_code=='0')	
     {
	  document.getElementById('export_table_setup_div').innerHTML= $responce.data.export_html;
	  $("#export_table_setup_div").show();	
	  $g_emport_table_setup=$responce.data.export_data;	
		document.getElementById('export_setup_storage_path').value = $responce.data.export_data[0].storage_path;	  	  
	  if($responce.data.export_data[0].is_zip==1)
		document.getElementById('export_setup_is_zip').checked=true;
		else 
		document.getElementById('export_setup_is_zip').checked=false;	  
     }
}

function saveExportTablesSetup()
{
var export_setup_arr = new Object();

for($i=0;$i<$g_emport_table_setup.length;$i++)
{
var id=$i;
export_setup_arr[$i]= new Object();
export_setup_arr[$i]['id']=id;
export_setup_arr[$i]['export_table_setup_table_name']=$("#export_table_setup_table_name_"+id).html();	

if(document.getElementById('export_table_setup_row_select_'+id).checked==true)
	{
	export_setup_arr[$i]['export_table_setup_row_select']='1';
	}
	else export_setup_arr[$i]['export_table_setup_row_select']='0';
	
$is_zip_check=0;
if(document.getElementById('export_setup_is_zip').checked==false)
 $is_zip_check=0;
else
 $is_zip_check=1;	
}

var myJSONExportSetupText = JSON.stringify(export_setup_arr);  
$lstr_data="export_setup_data="+myJSONExportSetupText; 	
$lstr_data+="&is_zip_check="+$is_zip_check; 	
$lstr_data+="&export_setup_storage_path="+encodeURIComponent(trim(document.getElementById('export_setup_storage_path').value));


$.ajax({
       type: "POST",
	   async:false,
	    url: $host_url+"saveExportTablesSetupDetails.demo",  
        data:$lstr_data,
       success: saveExportTablesSetupResponce
    });    
}
function saveExportTablesSetupResponce($responce)
{  
	$responce = eval('(' + $responce + ')');    
	if ($responce.error_code == 0)                                
	{
		alert($responce.data);	   
    }
    else
    {   
       alert('Insertion unsuccessfully!!');        
    }
    return;  
}
//################### IMPort SetUp Details########################
function LoadImportTablesSetup()
{
    $g_import_table_setup="";
    $geditinternalcode=0;
	window.enable_proper_module="ImportTablesSetup";
	$("#page_main_div").load('html_modules/import_tables_setup.html',function()
	{   		
	document.getElementById('display_module_name').innerHTML = 'Import Tables Setup';
	document.getElementById('module_name_for_save').value = 'saveImportTablesSetup'; 	
	document.getElementById('vertical_space_div').style.height='8px';
	//document.getElementById('college_degree_status_div').innerHTML ='';
	
	$.ajax({
		 type: "POST",
		 url: $host_url+"GetImportDetails.demo",		 
		 success:GetImportDetailsResponce
		});  	
    }
	);
	$('#module_details_div').hide();	
}
 function GetImportDetailsResponce($responce)
   {                                                
    $responce = eval('(' + $responce + ')'); 	
	if( $responce.error_code=='0')	
     {
	  document.getElementById('import_table_setup_div').innerHTML= $responce.data.import_html;
	  $("#import_table_setup_div").show();
       $g_import_table_setup=$responce.data.import_data;	 	  
	  document.getElementById('import_setup_storage_path').value = $responce.data.import_data[0].storage_path;	  
     }
}
function saveImportTablesSetup()
{
var import_setup_arr = new Object();

for($i=0;$i<$g_import_table_setup.length;$i++)
{
var id=$i;
import_setup_arr[$i]= new Object();
import_setup_arr[$i]['id']=id;
import_setup_arr[$i]['import_table_setup_table_name']=$("#import_table_setup_table_name_"+id).html();	
 
if(document.getElementById('import_table_setup_row_select_'+id).checked==true)
	{
	import_setup_arr[$i]['import_table_setup_row_select']='1';
	}
	else import_setup_arr[$i]['import_table_setup_row_select']='0';
	
if(document.getElementById('import_table_setup_row_delete_'+id).checked==true)
	{
	import_setup_arr[$i]['import_table_setup_row_delete']='1';
	}
	else import_setup_arr[$i]['import_table_setup_row_delete']='0';
}

var myJSONExportSetupText = JSON.stringify(import_setup_arr);  
$lstr_data="import_setup_data="+myJSONExportSetupText; 	
$lstr_data+="&import_setup_storage_path="+encodeURIComponent(trim(document.getElementById('import_setup_storage_path').value));


$.ajax({
       type: "POST",
	   async:false,
	    url: $host_url+"saveImportTablesSetupDetails.demo",  
        data:$lstr_data,
       success: saveImportTablesSetupDetailsResponce
    });    
}
function saveImportTablesSetupDetailsResponce($responce)
{  
	$responce = eval('(' + $responce + ')');    
	if ($responce.error_code == 0)                                
	{
		alert($responce.data);	   
    }
    else
    {   
       alert('Insertion unsuccessfully!!');        
    }
    return;  
}