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.145.89.181
Current Path : /var/www/html/bcu/js/ |
| Current File : /var/www/html/bcu/js/admission_approve_05112018.js |
$g_se_degree='';
$g_se_exam='';
function returnMonthValue(val)
{
var month_array = new Array();
month_array['Jan'] = '01';
month_array['Feb'] = '02';
month_array['Mar'] = '03';
month_array['Apr'] = '04';
month_array['May'] = '05';
month_array['Jun'] = '06';
month_array['Jul'] = '07';
month_array['Aug'] = '08';
month_array['Sep'] = '09';
month_array['Oct'] = '10';
month_array['Nov'] = '11';
month_array['Dec'] = '12';
return month_array[val];
}
function returnMonthName(val)
{
var month_array = new Array();
month_array['Jan'] = '01';
month_array['Feb'] = '02';
month_array['Mar'] = '03';
month_array['Apr'] = '04';
month_array['May'] = '05';
month_array['Jun'] = '06';
month_array['Jul'] = '07';
month_array['Aug'] = '08';
month_array['Sep'] = '09';
month_array['Oct'] = '10';
month_array['Nov'] = '11';
month_array['Dec'] = '12';
return month_array[val];
}
function CallenableAdmissionApprove()
{
$("#page_main_div").load('html_modules/approve.html',function()
{
document.getElementById('display_module_name').innerHTML = ' Admission Approve ';
document.getElementById('module_name_for_save').value = 'Admission Approve';
gsl_no = 0;
getDefaultHeadFooterLinks('Admission Approve');
loadSelectDropdownList();
});
}
function loadSelectDropdownList()
{
$.ajax({
type: "POST",
url: $host_url+"GetAllSelectDropdown",
success: responceLoadSelectDropdownList
});
}
function responceLoadSelectDropdownList($responce)
{
$responce = eval('('+$responce+')');
document.getElementById('appcollege').options.length = 0;
var $lobj_Option = document.createElement("OPTION");
$lobj_Option.value = "";
$lobj_Option.text = "--Select--";
document.getElementById('appcollege').options[0]=($lobj_Option);
for($i=0;$i < $responce.data.length;$i++)
{
$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
$op.id=$responce.data[$i]['internal_code'];//specifying the id for options
document.getElementById('appcollege').options.add($op);
}
}
function GetCombination(degcode)
{
var appcollege = $("#appcollege").val();
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getCombinationapproved",
data:"°ree="+encodeURIComponent(trim(degcode))+"&fcollcode="+encodeURIComponent(trim(appcollege)),
success:function($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
document.getElementById('degcomb').options.length = 0;
var $lobj_Option = document.createElement("OPTION");
$lobj_Option.value = "";
$lobj_Option.text = "Select Combination";
document.getElementById('degcomb').options[0]=($lobj_Option);
for($i=0;$i < $responce.data.mascomb.length;$i++)
{
$op = new Option($responce.data.mascomb[$i]['internal_code'] + " - " + $responce.data.mascomb[$i]['value'], $responce.data.mascomb[$i]['internal_code']);
$op.id=$responce.data.mascomb[$i]['internal_code'];//specifying the id for options
document.getElementById('degcomb').options.add($op);
}
}
}
});
}
function loadCollegeDegree(collcode)
{
$.ajax({
type: "POST",
data:'&collcode='+collcode,
url: $host_url+"GetCollegeDegreeDropdown",
success: responceGetCollegeDegreeDropdown
});
}
function responceGetCollegeDegreeDropdown($responce)
{
$responce = eval('('+$responce+')');
document.getElementById('appdegree').options.length = 0;
var $lobj_Option = document.createElement("OPTION");
$lobj_Option.value = "All";
$lobj_Option.text = "All";
document.getElementById('appdegree').options[0]=($lobj_Option);
for($i=0;$i < $responce.data.length;$i++)
{
$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
$op.id=$responce.data[$i]['internal_code'];//specifying the id for options
document.getElementById('appdegree').options.add($op);
}
}
function loadCollegeDegreeComb(degcode)
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getCombinationNames",
data:"°ree="+encodeURIComponent(trim(degcode)),
success:function($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code==0)
{
document.getElementById('degcomb').options.length = 0;
var $lobj_Option = document.createElement("OPTION");
$lobj_Option.value = "All";
$lobj_Option.text = "All";
document.getElementById('degcomb').options[0]=($lobj_Option);
for($i=0;$i < $responce.data.length;$i++)
{
$op = new Option($responce.data[$i]['value'], $responce.data[$i]['internal_code']);
$op.id=$responce.data[$i]['internal_code'];//specifying the id for options
document.getElementById('degcomb').options.add($op);
}
}
else
{
document.getElementById('degcomb').options.length = 0;
var $lobj_Option = document.createElement("OPTION");
$lobj_Option.value = "All";
$lobj_Option.text = "All";
document.getElementById('degcomb').options[0]=($lobj_Option);
}
}
});
}
var gsrchColl='';
var gsrchDeg = '';
var gsrchComb = '';
var gsrchStatus = '';
function GetAdmissionList()
{
gsrchColl = $("#appcollege").val();
gsrchDeg = $("#appdegree").val();
gsrchComb = $("#degcomb").val();
gsrchStatus = $("#appr_status").val();
$.ajax({
type: "POST",
data:'&collcode='+$("#appcollege").val()+"°code="+$("#appdegree").val()
+"&combcode="+$("#degcomb").val()+"&apprstatus="+$("#appr_status").val(),
url: $host_url+"GetAdmissionList",
success: responceGetAdmissionList
});
}
var total;
function responceGetAdmissionList($responce)
{
$responce = eval('('+$responce+')');
total = $responce.data['cnt'];
$("#adm_application_details").html($responce.data['admtable']);
$("#adm_application_details").show();
//$("#adm_application_details").contents().find("body").append($responce.data);
/*var doc = document.getElementById('adm_application_details').contentWindow.document;
doc.open();
doc.write($responce.data);
*/
}
function ViewStudentDetailsForApprove(id,degree,collcode)
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getAppStudentDetails",
data:"sl_no="+id+"°ree="+degree+"&collcode="+collcode,
success: EditStudentDetailsForUpdateResponse
});
}
var gsl_no=0;
var gcollcode=0;
var gdegree=0;
function EditStudentDetailsForUpdateResponse($responce)
{
$responce = eval('(' + $responce + ')');
if($responce.error_code == 0)
{
$("#page_main_div").load('html_modules/admission_entryapp.html',function()
{
var option = '<option value="">--Select--</option>';
for (var j=2018;j>1980;j--)
{
option += "<option value='"+j+"'>"+j+"</option>";
}
$("#fyear").append(option);
var serv_arr = $responce.data['mascomb'];
var serv_title = '';
FillDropdownValues(serv_arr,'combination',serv_title);
var serv_arr = $responce.data['category'];
var serv_title = '';
FillDropdownValues(serv_arr,'degree_category',serv_title);
var serv_arr = $responce.data['degree'];
var serv_title = '';
FillDropdownValues(serv_arr,'student_entry_degree_code',serv_title);
var serv_arr = $responce.data['boards'];
var serv_title = '';
FillDropdownValues(serv_arr,'seUniversityName',serv_title);
var gender = $responce.data.perdetl['student_entry_gender'];
if(gender != "")
{
var $radios = $('input:radio[name=student_entry_gender]');
$radios.filter('[value='+gender+']').attr('checked', true);
}
$("#perdetl input[type=text],#perdet select").each(function(l)
{
$(this).val($responce.data.perdetl[$(this).attr('id')]);
$(this).attr('readonly', true);
});
$("#univdetl input[type=text],#univdetl select").each(function(l)
{
$(this).val($responce.data.perdetl[$(this).attr('id')]);
$(this).attr('readonly', true);
});
$("#subject_appearing").show();
$("#subject_appearing").html($responce.data.html);
$('#student_entry_degree_code').val($responce.data.perdetl['student_entry_degree_code']);
document.getElementById('student_entry_degree_code').readonly = true;
$('#combination').val($responce.data.perdetl['combination']);
document.getElementById('student_entry_degree_code').readonly = true;
$('#degree_category').val($responce.data.perdetl['degree_category']);
document.getElementById('student_entry_degree_code').readonly = true;
$('#student_entry_photo').attr('src',$responce.data.perdetl['student_entry_photo']);
$('#student_signature_photo').attr('src',$responce.data.perdetl['student_signature_photo']);
$('#student_entry_blood_grp').val($responce.data.perdetl['student_entry_blood_grp']);
$('#farea').val($responce.data.perdetl['farea']);
$('#student_entry_religion').val($responce.data.perdetl['student_entry_religion']);
gsl_no = $responce.data.perdetl['student_entry_admno'];
gcollcode = $responce.data.perdetl['collcode'];
gdegree = $responce.data.perdetl['student_entry_degree_code'];
let uploadtable = `<style type = "text/css">
.table-upd tbody tr td {
padding : 2px;
vertical-align:middle;
text-align: left;
}
.table-upd tbody upd-file {
display: inline !important;
}
.table-upd tbody input[type="file"] {
display: inline;
}
.table-upd tbody button {
padding : 7px;
margin: 15px;
}
.table-upd thead tr td {
text-align: center;
}
</style>
<table class='table table-bordered table-striped table-upd' id = "uploaddet">
<thead>
<tr class='ui-state-default ui-jqgrid-hdiv'>
<td style='padding:2px; width:30px;
border-left:1px solid #C5DBEC;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'
>Sl. No.
</td>
<td style='padding:2px; width:265px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;' >Description</td>
<td style='padding:2px; width:190px; border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
Upload</td>
<td style='padding:2px; width:65px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
File</td>
<td style='padding:2px; width:65px;
border-right:1px solid #C5DBEC;
border-bottom:1px solid #C5DBEC;'>
Remove File</td>
</tr>
</thead>
<tbody>`;
var masdoc = $responce.data.masdoc;
//console.log(masdoc);
let z = 1;
var alist = ''
$.each( masdoc, function( key, value )
{
alist = '';
if(value.file_path != '')
{
alist = `<a href = "${value.file_path}" target = '_blank'>${value.FFILENAME}</a>`;
}
uploadtable += `<tr class='ui-widget-content jqgrow'>
<td class='tbl_row_new' align='center'
style='border-left:1px solid #C5DBEC;
border-right:1px solid #C5DBEC; padding:2px;'>
${z}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' id = "doc_upload_${value.int_code}">${value.doc_type}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' >
<input type="file" readonly name="${value.FFILENAME}"
id="${value.FFILENAME}" class = "upd-file"
style="width:100px;padding:5px 0px;" />
<input type = "hidden" id = "h_${value.FFILENAME}">
<span class="raval_submit" style="margin-top: 2px;width:50px;
float:right;margin-left:0px;cursor: pointer;color:#545345;
line-height: 25px;font-size:12px;font-weight:bold;"
onclick= 'DisplayUserSelectedfile("${value.FFILENAME}")'>Upload</span>
</td>
<td class='tbl_row_new' style='border-right:1px solid #C5DBEC; padding:2px;' id="attach_td_${value.FFILENAME}">${alist}</td>
<td class='tbl_row_new' align='center' style='border-right:1px solid #C5DBEC; padding:2px;' >
<span class="raval_submit" style="margin-top: 2px;width:50px;
float:right;margin-left:0px;cursor: pointer;color:#545345;
line-height: 25px;font-size:12px;font-weight:bold;"
onclick= 'removedocument("${value.FFILENAME}")'>Remove</span>
</td>
</tr>`;
z++;
});
$('#upddet').html(uploadtable);
$("#fee_combination_div").show();
$("#fee_combination_div").html('');
$("#fee_combination_div").html($responce.data.fee_html);
});
}
else if(responce.error_code == -2)
{
DeletedRecords = 0;
alert('In Valid SL Number');
$("#student_entry_slno").val('');
document.getElementById('student_entry_slno').focus();
}
}
function FillDropdownValues(arr,ele_name,def_title)
{
document.getElementById(ele_name).options.length=0;
var option = "<option value=''>--Select--</option>";
for (let value of arr) {
option += "<option value='"+value.int_code+"'>"+value.val+"</option>";
}
$("#"+ele_name).append(option);
}
function saveApproveStatus()
{
$.ajax({
type: "POST",
//async:false,
url: $host_url+"updateAdmissionStatus",
data:"&fappno="+encodeURIComponent($("#student_entry_admno").val())+"&appstatus="+encodeURIComponent($("#approvestatus").val()),
success:function(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code == 0)
{
alert(responce.data);
gsl_no = 0;
}
}
});
}
/* function GetCombinationSubjectList(collcode,combcode)
{
if( jQuery.trim($("#student_entry_degree_code").val())!='')
{
$sl_no='';
$sl_no=encodeURIComponent(trim($("#student_entry_admno").val()));
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getAppStudsubApprTotal",
data:"degree_code="+$("#student_entry_degree_code").val()+"&exam="+$("#student_entry_exam").val() +
"&sl_no="+$sl_no+"&collcode="+collcode+
"&sub_degree="+encodeURIComponent(trim($("#student_entry_sub_degree_code").val()))+
"&combination="+combcode,
success: subjectAppearingTotalResponse
});
}
}
function subjectAppearingTotalResponse($responce)
{
$responce = eval('(' + $responce + ')');
$("#subject_appearing").show();
$("#subject_appearing").html($responce.data.html);
} */
function saveadmApproveStatus()
{
checked_admapp_nos=new Array();
var obj=$("input[id*='adm_check_box_']") ;
jQuery.each(obj, function(k, v) {
row_id=v['id'].split("_")[3];
if($(this).is(':checked'))
checked_admapp_nos.push(row_id);
});
// var apprremarks = document.getElementById('apprremarks').value;
if(checked_admapp_nos.length>0)
{
var parameter = "&arun="+checked_admapp_nos+"&apprremarks="+apprremarks;
}else
{
degree = document.getElementById('student_entry_degree_code').value;
slno = document.getElementById('student_entry_admno').value;
appr_status = document.getElementById('approvestatus').value;
if(appr_status == '')
{
alert('Select Status.');
return false;
}
var parameter = "°ree="+degree+"&slno="+slno+"&appr_status="+appr_status;
}
$.ajax({
type: "POST",
data:parameter,
url: $host_url+"updateadmAdmissionStatus",
success: ReceivceadmSelectedApplicationsResponce
});
}
function ReceivceadmSelectedApplicationsResponce(responce)
{
responce = eval('(' + responce + ')');
if(responce.error_code == 0)
{
alert(responce.data);
}
}
function backAdmissionList()
{
gsl_no = 0;
$("#page_main_div").load('html_modules/approve.html',function()
{
document.getElementById('display_module_name').innerHTML = ' Admission Approve ';
document.getElementById('module_name_for_save').value = 'Admission Approve';
getDefaultHeadFooterLinks('Admission Approve');
$.ajax({
type: "POST",
url: $host_url+"GetAllSelectDropdown",
success: function($responce)
{
$responce = eval('('+$responce+')');
var optionsAsString = "<option value=''> Select College </option>";
for(var i = 0; i < $responce.data.length; i++)
{
if($responce.data[i].internal_code == gsrchColl)
{
optionsAsString += "<option value='" + $responce.data[i].internal_code + "' selected>" + $responce.data[i].value + "</option>";
}
else
optionsAsString += "<option value='" + $responce.data[i].internal_code + "'>" + $responce.data[i].value + "</option>";
}
$("#appcollege" ).append( optionsAsString );
}
});
$.ajax({
type: "POST",
data:'&collcode='+gsrchColl,
url: $host_url+"GetCollegeDegreeDropdown",
success: function($responceDeg)
{
$responceDeg = eval('('+$responceDeg+')');
var optionsAsString = "<option value=''> Select College </option>";
for(var i = 0; i < $responceDeg.data.length; i++)
{
if($responceDeg.data[i].internal_code == gsrchDeg)
{
optionsAsString += "<option value='" + $responceDeg.data[i].internal_code + "' selected>" + $responceDeg.data[i].value + "</option>";
}
else
optionsAsString += "<option value='" + $responceDeg.data[i].internal_code + "'>" + $responceDeg.data[i].value + "</option>";
}
$("#appdegree" ).append( optionsAsString );
}
});
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getCombinationNames",
data:"°ree="+gsrchDeg,
success:function($responceComb)
{
$responceComb = eval('(' + $responceComb + ')');
var optionsAsString = "<option value=''> Select Combination </option>";
for(var i = 0; i < $responceComb.data.length; i++)
{
if($responceComb.data[i].internal_code == gsrchComb)
{
optionsAsString += "<option value='" + $responceComb.data[i].internal_code + "' selected>" + $responceComb.data[i].value + "</option>";
}
else
optionsAsString += "<option value='" + $responceComb.data[i].internal_code + "'>" + $responceComb.data[i].value + "</option>";
}
$("#degcomb" ).append( optionsAsString );
}
});
$("#appr_status").val(gsrchStatus);
$.ajax({
type: "POST",
data:'&collcode='+gsrchColl+"°code="+gsrchDeg
+"&combcode="+gsrchComb+"&apprstatus="+gsrchStatus,
url: $host_url+"GetAdmissionList",
success: responceGetAdmissionList
});
});
}
function Checkalladmapplication($id)
{
var k;
if(document.getElementById('arun').checked == true)
{
//alert(total);
for(k=1;k<=parseInt(total);k++)
{
var APPNO = document.getElementById("adm_check_box_"+k).value;
document.getElementById("adm_check_box_"+APPNO).checked=true;
}
}
else
{
for(k=1;k<=total;k++)
{
var APPNO = document.getElementById("adm_check_box_"+k).value;
document.getElementById("adm_check_box_"+APPNO).checked=false;
}
}
}
function getsubjectappAppearingTotal()
{
if( jQuery.trim($("#student_entry_degree_code").val())!='')
{
$sl_no='';
$sl_no=encodeURIComponent(trim($("#student_entry_slno").val()));
$.ajax({
type: "POST",
//async:false,
url: $host_url+"getAppStudsubApprTotal",
data:"degree_code="+encodeURIComponent(trim($("#student_entry_degree_code").val()))+"&exam="+$("#student_entry_exam").val() +"&sl_no="+$sl_no+"&sub_degree="+encodeURIComponent(trim($("#student_entry_sub_degree_code").val()))+"&collcode="+college_code,
success: subjectAppearingTotalResponse
});
}
}
function subjectAppearingTotalResponse($responce)
{
$responce = eval('(' + $responce + ')');
$g_subject_appearing=$responce.data;
$g_remaining_counter_inc=($responce.data.remaining_count);
$("#subject_appearing").show();
$("#subject_appearing").html($responce.data.html);
}
function admapprovelist()
{
var fcollcode = $("#appcollege").val();
var fdegree = $("#appdegree").val();
var fcombcode = $("#degcomb").val();
var fstatus = $("#appr_status").val();
if(fcollcode == '')
{
alert('Please Select College');
return;
}
parameters = "&fcollcode="+trim(fcollcode)+"&fdegree="+trim(fdegree)+"&fcombcode="+trim(fcombcode)+"&fstatus="+trim(fstatus);
window.location.href = $host_url+"PrintApprovalList.demo"+parameters;
return;
}
|