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.138.137.244
var $host_url="https://"+window.location.host+"/"+window.location.pathname.split('/')[1]+"/app.php?a=";
function stuRegNoRemoval()
{
$('#loadtab').load('html_modules/student_reg_remove.html?v='+version, () => {
loadUnivs('univname');
// $("#studinfo").hide();
});
}
function getStuDet(){
var univcode = $('#univname').val();
var studid = $("#studid").val();
// console.log("univcodestudid",univcode,studid);
var parameters = "&univcode="+univcode+"&studid="+studid;
$.ajax({
type: "POST",
url: $host_url+'stuRegRemove'+parameters,
success :function(response){
var {error_code, data, status} = response;
var data = response.data;
console.log("res",data);
html =``;
html= `<table class="table table-bordered table-hover">
<thead >
<tr class='bg-green'>
<th width='4%'><center>Sl. No.</center></th>
<th width='7%'><center>Univ. Code</center></th>
<th width='7%'><center>Reg. No.</center></th>
<th ><center>Student Name</center></th>
<th width='9%'><center>DOB</center></th>
<th width='9%'><center>Mobile</center></th>
<th width='9%'><center>Email</center></th>
<th width='9%'><center>Action</center></th>
</tr>`;
if(error_code == 0){
for(var i=0; i<data.length;i++){
var row = data[i];
var regno = row['fregno'];
html += `<tr>
<td><center>${i+1}</center></td>
<td><center>${row['funivcode']}</center></td>
<td style='text-align:center'>${row['fregno']}</td>
<td >${row['fname']}</td>
<td style='text-align:center'>${row['fdob']}</td>
<td style='text-align:center'>${row['fmobileno']}</td>
<td style='text-align:center'>${row['femail']}</td>
<td style='text-align:center'><button class="btn btn-indigo btn-sm waves-effect" onclick="delStudReg('${univcode}','${regno}')">DELETE</button></td>
</tr>
`;
}
}
if(error_code == -1){
html +=`<tr>
<td style='text-align:center' colspan = '10'><b>No details found for the given Reg. No.</b></td>
</tr>`;
console.log("Status",status);
}
html +=`</table>`;
$('#shwStud').html(html);
}
});
}
function delStudReg(univcode,regno){
console.log("deldeldel",univcode,regno);
if(confirm("Are you sure to delete")){
$.ajax({
type: "POST",
url: $host_url+'delStudReg&univcode='+univcode+'®no='+regno,
success:function(response){
console.log("response",response);
$("#shwStud").html("<div class='alert alert-success'>Student Delete Successfully!</div>");
setTimeout('$("#shwStud").hide();window.location.reload();', 3000);
}
});
}else{
console.log("Cancel");
return;
}
}
|