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.189.119
function Calluploadfiles()
{
$("#page_main_div").load('html_modules/upload_files.html',function()
{
document.getElementById('display_module_name').innerHTML = 'Upload Files';
document.getElementById('module_name_for_save').value = 'Upload Files';
clearCalluploadfiles();
getDefaultHeadFooterLinks("Upload Files");
}
);
}
function clearCalluploadfiles()
{
$("#degree_code").val('');
$("#exam_no").val('');
}
function saveUploadfiles()
{
if(document.getElementById('file_dispall').checked != true)
{
if(trim($('#coll_code').val()) == '')
{
alert("Select display for all or enter college code");
$("#coll_code").focus();
return;
}
}
if(trim($('#degree_code').val()) == '')
{
alert("Enter degree code ");
$("#degree_code").focus();
return;
}
if(trim($('#exam_no').val()) == '')
{
alert("Enter exam ");
$("#exam_no").focus();
return;
}
if(trim($('#subject_code').val()) == '')
{
alert("Enter degree code ");
$("#subject_code").focus();
return;
}
if(trim($('#upload_files').val()) == '')
{
alert("Browse file to upload");
$("#upload_files").focus();
return;
}
var displayAll ='';
if(document.getElementById('file_dispall').checked == true)
{
displayAll = 'All';
}
else
{
displayAll = trim($('#coll_code').val());
}
if(document.getElementById('docup_filetype').value == 'ResultStatement')
{
var valid_file_extentions = new Array("pdf");
}
else
{
var valid_file_extentions = new Array("jpeg","jpg",'png','gif');
}
var ext=$("#upload_files").val();
filepath=ext;
ext = ext.substring(ext.length-3,ext.length);
ext = ext.toLowerCase();
if(ext != "" && !in_array(ext,valid_file_extentions))
{
alert("Please select the valid file!");
return false;
}
var $lstr_data = '°reeCode='+trim($('#degree_code').val())+'&examNo='+trim($('#exam_no').val())+'&subject='+trim($('#subject_code').val())+"&displayAll="+displayAll+"&fileType="+trim(document.getElementById('docup_filetype').value);
$lstr_data+="&filepath="+filepath;
$upload = $host_url+"saveUploadFiles.demo&"+$lstr_data;
document.getElementById("form_module_image_upload").setAttribute("action",$upload);
return AIM.submit(document.getElementById("form_module_image_upload"), 'report_display',{'onComplete' : saveUploadfilesResponse});
}
function saveUploadfilesResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
alert($responce.data);
}
}
|