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


Current Path : /proc/thread-self/root/var/www/html/univadmin/js/
Upload File :
Current File : //proc/thread-self/root/var/www/html/univadmin/js/ruaspush.js

function loadRuasPush() {
    $('#loadtab').load('html_modules/ruaspush.html?v=' + version, () => {
        getDegName();        
    });
}

function getDegName() {
  $.ajax({
    type: 'GET',
    url: $host_url + 'getDegName',
    success: function (response) {
      var { error_code, data, status } = response;
      if (error_code == 0) {
        var degcode = data.degcode;
        var options = '';
        options += `<option value="">--Select--</option>`;

        for (var i = 0; i < degcode.length; i++) {
          options += `<option value="${degcode[i].fdegree}">${degcode[i].fdegree} - ${degcode[i].fdescpn}</options>`;
        }
        $('#degcode').html(options);
      }
    }
  });
}

function getSemDetl() {
  let degcode = document.getElementById('degcode').value;
  var parameters = "&degcode="+degcode;
  $.ajax({
    type: 'GET',
    url: $host_url + 'getSemDetl',
    data: parameters,
    success: function (response) {
      var { error_code, data, status } = response;
      console.log(response);
      if (error_code == 0) {
        var sem = data.sem;
        var options = '';
        options += `<option value="All">All</option>`;

        for (var i = 0; i < sem.length; i++) {
          options += `<option value="${sem[i].fexamno}">${sem[i].fexamno} - ${sem[i].fexamname}</options>`;
        }
        $('#sem').html(options);
      }
    }
  });
}

function getPushData() {

  let degcode = document.getElementById('degcode').value;
  let sem = document.getElementById('sem').value;
  let type = document.getElementById('type').value;
  let myear = document.getElementById('myear').value;
  let mexamtype = document.getElementById('mexamtype').value;
// console.log(degcode,sem);
if(degcode =='')
{
  alert("Please Select Degree");
  return;
}
if(sem =='')
{
  alert("Please Select Sem");
  return;
}
  var parameters = "&degcode="+degcode+"&sem="+sem+"&type="+type+"&myear="+myear+"&mexamtype="+mexamtype;

  $.ajax({
    type: 'GET',
    url: $host_url + 'getPushData',
    data: parameters,
    success: function (response) {
      var { error_code, data, status } = response;

       if (error_code == 0) {
        var submit = data.submit;
            console.log(data.submit);
            html = `<table class="table table-bordered table-hover col-lg-11 col-md-11 col-sm-12 col-xs-12 " id = "showExamTT">`;
            html += ` <tr class='bg-blue'>
            <th width='4%'><center>Sl. No.</center></th>
            <th width='25%'><center>Degree</center></th>
            <th width='13%'><center>Semester</center></th>
            <th width='13%'><center>Sub. Short</center></th>
            <th width='13%'><center>QP Code</center></th>
            <th width='7%'><center>Total Stud.</center></th>
            <th width='7%'><center>Data Pushed</center></th>
            <th width='7%'><center>Failed to Pushed</center></th>
            <th width='7%'><center>Pending</center></th>
            <th width='7%'><center>TDVS( PUSH )</center></th>
            </tr>`;
            var z = 0;
            for (var i = 0; i < submit.length; i++) 
            {
              console.log(i,submit);
              html += `<tr>
              <td><center>${i + 1}</center></td>
              <td >${submit[i].fdegree}-${submit[i].fdescpn}</td>
              <td style='text-align:center'>${submit[i].fexamname}</td>
              <td style='text-align:center'>${submit[i].fsubshort}</td>
              <td style='text-align:center'>${submit[i].fqpcode}</td>
              <td style='text-align:center'> <a href="#;" id="total" onclick="getttlcount('tot','${submit[i].fexamno}','${submit[i].fqpcode}')">${submit[i].totcnt}</a></td>
              <td style='text-align:center'><a href="#;" id="push" onclick="getttlcount('push','${submit[i].fexamno}','${submit[i].fqpcode}')">${submit[i].pushed}</a></td>
              <td style='text-align:center'><a href="#;" id="npush" onclick="getttlcount('failure','${submit[i].fexamno}','${submit[i].fqpcode}')">${submit[i].failurepush}</a></td>
              <td style='text-align:center'><a href="#;" id="fpush" onclick="getttlcount('pending','${submit[i].fexamno}','${submit[i].fqpcode}')">${submit[i].notpushed}</a></td>
              <td style='text-align:center'><a href="#;" id="fpush" onclick="pushTDVS('${submit[i].fexamno}','${submit[i].fdegree}','${submit[i].fqpcode}','${submit[i].fyear}','${submit[i].fexamtype}')">PUSH</a></td>
              </tr>
              `;
              z++;
            }
          } else {
            console.log("status", status);
          }
  
          // html += `</table>
          // <div class="text-center m-t-3">
          //   <button  type="button" class="m-t-5 btn btn-success waves-effect btn-lg" onclick = "saveExamTimetable()">Save</button>
          // </div>`;
  
          $("#showExamTT").html(html);
        }
   
  });
}

function getttlcount(type,sem,subshort){

  let degcode = $('#degcode').val();
  window.open(
    $host_url + "getmarkspushdetl"+"&degcode=" + degcode + "&type=" + type + "&sem=" + sem+"&subshort="+subshort,
  );
}

function pushTDVS(sem,degcode,qpcode,year,examtype)
{
  window.open(`https://universitysolutions.in/msruasapi/app.php?a=getStudResTDVS&degcode=${degcode}&sem=${sem}&qpcode=${qpcode}&year=${year}&examtype=${examtype}`,'_blank')
}

function PushMarksData()
{
  let degcode = document.getElementById('degcode').value;
  let sem = document.getElementById('sem').value;

  window.open(`https://universitysolutions.in/msruasapi/app.php?a=getStudRes&degcode=${degcode}&sem=${sem}`,'_blank')

}

{/* <td style='text-align:center'>
<input type = "text"  class="form-control" id = "dcode_${i}" 
value = "${submit[i].fdegree}"
onchange = "getexamdate('${i}')">
</td>
<td style='text-align:center'>
<input type = "text"  class="form-control" id = "tcode_${i}" 
value = "${submit[i].fdegree}"
onchange = "getexamtime('${i}')">
<input type = "hidden"  class="qpdet" id = "hqp_${i}" value = "F">
</td> */}