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


Current Path : /var/www/html/gcg/adm_useless/src/
Upload File :
Current File : //var/www/html/gcg/adm_useless/src/appForm.php

<?php

function getStudentDetl($aobj_context)
{
	$appno = trim($aobj_context->mobj_data['appno']);

	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$query = "SELECT fappno, DATE_FORMAT(fappdate,'%d/%m/%Y') AS fappdate, fregno, fname, fdegree, college.fcollname, fcategory, ftotal, fpaystatus, s.fservname, DATE_FORMAT(fdob,'%d/%m/%Y') AS fdob, st.fmobile, st.femail, faddr1, faddr2, faddr3, faddr4, fverifystatus, fverifyremarks FROM servtran st INNER JOIN servtype s ON s.fservcode =  st.fservcode, college WHERE college.FCOLLCODE = st.FCOLLCODE AND fappno='$appno'";
	$result = $aobj_context->mobj_db->GetRow($query);

    //$html .="<div><h1>Hello...</h1>";
	$html .="<div class='row'>
    <div class='col-lg-12 col-md-12 col-sm-12 col-xs-12  m-b--50'>
        <div class='card'>
            <div class='header1 bg-cyan'>
                <h2>
                    Application Form
                </h2>
            </div>
            
            <div class='body'>														
            <form class='form-horizontal'>
                <div style='margin-left:-10px;'>
                	<div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left'  for='Application Number'>App. No.</label>
                    </div>
                    <div class='col-sm-4 col-md-2'>
                        <div class='form-group'>
                            <div class='form-line'>
                            	<input  id='appno1' type='text' value='{$result['fappno']}' class='form-control' disabled>
                            </div>
                        </div>
                    </div>
                </div>
                <div class='row clearfix'>
                        <div class='col-md-offset-2 col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='App. Date'>App. Date</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='date' value='{$result['fappdate']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='Candidate Name'>Candidate Name</label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='fname' value='{$result['fname']}' disabled>
                                </div>
                            </div>
                        </div>
                    	
                   
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Register Number'>Register Number</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='regno' value='{$result['fregno']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>
                   
	                   <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='college'>College </label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='college' value='{$result['fcollname']}' disabled>
                                </div>
                            </div>
                        </div>
                    	
                
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Category'>Category </label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control ' id='category' value='{$result['fcategory']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>

                        
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left m-l--10' for='Degree'>Degree </label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line m-l--10'>
                                    <input type='text' class='form-control' id='degree' value='{$result['fdegree']}' disabled>
                                </div>
                            </div>
                        </div>
                
                     <div class='row clearfix'>
                        <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='Date of Birth'> Date of Birth</label>
                        </div>
                        <div class='col-sm-4 col-md-2'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <input type='text' class='form-control' id='dob' value='{$result['fdob']}' disabled>
                                </div>
                            </div>
                        </div>
                    </div>

                
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left m-l--15' for='Postal Address'>Postal Address  </label>
                    </div>
                    <div class='col-sm-4 col-md-4'>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal1' value='{$result['faddr1']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal2' value='{$result['faddr2']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal3' value='{$result['faddr3']}' disabled>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='form-line m-l--10 m-b-5'>
                                <input type='text' class='form-control' id='postal4' value='{$result['faddr4']}' disabled>
                            </div>
                        </div>
                    </div>

                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='Mobile No.'> Mobile No.</label>
                    </div>
                    <div class='col-sm-4 col-md-3'>
                        <div class='form-group'>
                            <div class='form-line'>
                                <input type='text' class='form-control' id='mobile' value='{$result['fmobile']}' disabled>
                            </div>
                        </div>
                    </div>
                               
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='Email Id'> Email Id </label>
                    </div>
                    <div class='col-sm-4 col-md-3'>
                        <div class='form-group'>
                            <div class='form-line'>
                                <input type='text' class='form-control' id='email' value='{$result['femail']}' disabled>
                            </div>
                        </div>
                    </div>    


            	<div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                    <label class='pull-left' for=' Applicationfor'> Application for</label>
                </div>
                <div class='col-sm-4 col-md-4'>
                    <div class='form-group'>
                        <div class='form-line'>
                        	<input type='text' class='form-control' id=' applicationfor' value='{$result['fservname']}' disabled>
                        </div>
                    </div>
                </div>
                   
                <div class='row clearfix'>
                    <div class='col-lg-2 col-md-2 col-sm-4 col-xs-5 form-control-label'>
                        <label class='pull-left' for='amount'>Total amount  </label>
                    </div>
                    <div class='col-sm-4 col-md-2'>
                        <div class='form-group'>
                            <div class='form-line m-l--5'>
                            	<input type='text' class='form-control' id='amount' value='{$result['ftotal']}' disabled>
                            </div>
                        </div>
                    </div>
                </div>";

    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC); 
    $query = "SELECT st.fservname, famount, sf.ffeedesc FROM servdetl sd INNER JOIN servfee sf ON sd.ffeecode=sf.ffeecode, servtype st WHERE sf.fservcode = st.fservcode AND fappno='$appno'";
    $result1 = $aobj_context->mobj_db->GetAll($query);
    if($result1)
    {
        $i=1;

        $html .="<div class='header'>
                <h4 class='m-t--10 m-b--10'>
                    Service Details
                </h4>
            </div>
        <div class='row'><div class='col-md-12'><table id='mainTable' class='table table-striped table-condensed table-bordered'>
                        <thead>
                            <tr class='bg-cyan'>
                                <th>Sl. No.</th>
                                <th>Service Name</th>
                                <th>Amount</th>
                                <th>Description</th>
                            </tr>
                        </thead>
                        <tbody>";
         
        foreach($result1 as $key => $value)
        {
            $html .="<tr>";
            
            $html .="<td>
                    <span><center>{$i}</center></span>
                    </td>";
            $html .="<td>
                    {$value['fservname']}
                    </td>";
            $html .="<td>
                    <span style='float : right;'>{$value['famount']}</span>
                    </td>";
            $html .="<td>
                    {$value['ffeedesc']}
                    </td>";
            $html .="</tr>";
            $i++;
        }
        $html .= "</tbody></table></div></div>";
    }
                   
    $html .= "<div class='col-lg-2 col-md-1 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='remarks'>Remarks</label>
                        </div>
                        <div class='col-sm-4 col-md-4'>
                            <div class='form-group'>
                                <div class='form-line'>
                                    <textarea id='remarks1' class='form-control'>{$result['fverifyremarks']}</textarea>
                                </div>
                            </div>
                        </div>
             
                    <div class='row clearfix'>
                        <div class='col-lg-2 col-md-1 col-sm-4 col-xs-5 form-control-label'>
                            <label class='pull-left' for='status'>Status</label>
                        </div>
                        <div class='col-sm-2'>
                            <select id='status1' class='form-control show-tick' style='margin-left: -15px'>

                                <option value='pending'>Pending</option>
                                <option value='cleared'>Cleared</option>
                            </select>
                            <script>$('#status1').val('{$result['fverifystatus']}');</script>
                        </div>
                    </div>                
                <div class='row'>
                    <div class='col-md-offset-8 col-md-1'>
                    <button type='button' class='btn btn-primary' onclick='saveChanges()'>Save</button>
                    </div>
                    <div class='col-md-1'>
                    <button type='button' class='btn btn-secondary' data-dismiss='modal'>Close</button>
                    </div>
                </div>  

                </div>
                </form>
            </div>
        </div>
    </div>
    </div>";

	if($result)
	{
		$arr['html'] = $html;
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");	
		return; 
	}else
	{
		$arr = '';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");	
		return; 
	}
}


function saveVerificationDetails($aobj_context)
{
    $appno = trim($aobj_context->mobj_data['appno']);
    $remarks = trim($aobj_context->mobj_data['remarks']);
    $status = trim($aobj_context->mobj_data['status']);
    $user = $_SESSION['username'];

    $update_status = "update servtran set fverifyuser = '$user', fverifystatus = '$status', fverifyremarks = '$remarks', fverifydate = NOW() where fappno = '$appno'";
    //var_dump($update_status);
    $result = $aobj_context->mobj_db->Execute($update_status);
    if($result)
    {
        $arr = '';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
        return;
    }
    else
    {
        $arr = '';
        echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure"); 
    }
}

function getdropdownmenuvalues($aobj_context)
{
    $exam  = 'A';

    $query    = "SELECT distinct fdegree AS int_code, fdescpn AS val FROM degree
                  where ifnull(FFACCODE,'') = 'UG' and fexamno = '{$exam}' and ifnull(fadmdeg,'') = 'T'";
    $result   = $aobj_context->mobj_db->GetAll($query);
    $arr['UG'] = $result;  
    
    $query    = "SELECT distinct fdegree AS int_code, fdescpn AS val FROM degree
                where ifnull(FFACCODE,'') = 'PG' and fexamno = '{$exam}'and ifnull(fadmdeg,'') = 'T'";
    $result   = $aobj_context->mobj_db->GetAll($query);
    $arr['PG'] = $result;      
    
    $query    = "SELECT distinct fdegree AS int_code, fdescpn AS val FROM degree
                  where ifnull(FFACCODE,'') = 'PGD' and fexamno = '{$exam}' and ifnull(fadmdeg,'') = 'T'";
    $result   = $aobj_context->mobj_db->GetAll($query);
    $arr['PGD'] = $result;  
    
    $query = "select fdegree,group_concat(distinct fcombcode,'->',fcombdesc) as combination 
             from mascomb group by fdegree";
    $result5=$aobj_context->mobj_db->GetAll($query);
    $arr['combcode']=$result5;
    

    $query  = "select fdegree,ifnull(FMEDIUM,'') as medium
              from degree where ifnull(fadmdeg,'') = 'T' and fexamno = 'A'";
    $result = $aobj_context->mobj_db->GetAll($query);
    $arr['medium']=$result;

    $query  = "select distinct fcollcode as int_code,
                concat(fcollcode,' - ',fcollname,',',ftown)  as val
                from college where fcollcode in ('1001')";
    $result =$aobj_context->mobj_db->GetAll($query);
    $arr['centercode']=$result;

    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
    return;

}

function getsubjectdet($aobj_context)
{
    $combcode = trim($aobj_context->mobj_data['combcode']);
    $degree   = trim($aobj_context->mobj_data['degree']);
    $optional   = trim($aobj_context->mobj_data['optional']);
    $exam = 'A';
    $query = "select FSUBCODE,FSUBNAME,FSUBSHORT ,FMANDATORY from degree d inner join subject s on 
                s.FDEGREE=d.FDEGREE  and  d.FEXAMNO=s.FEXAMNO
                where d.FDEGREE='{$degree}' and s.FEXAMNO='{$exam}' and FSUBCODE ='{$optional}' group by  s.FSUBCODE 
                union
                select s.FSUBCODE,s.FSUBNAME,s.FSUBSHORT ,'T' as FMANDATORY from degree d inner join subject s on 
                s.FDEGREE=d.FDEGREE  and  d.FEXAMNO=s.FEXAMNO
                left join mascomb m on m.FDEGREE=d.FDEGREE and m.fcombcode = '{$combcode}'
                where d.FDEGREE='{$degree}'  and INSTR(m.FSUBCODE, s.FSUBCODE)  
                group by  s.FSUBCODE";

    $result   = $aobj_context->mobj_db->GetAll($query);

    
    $query1 = "select distinct FSUBCODE as int_code,FSUBNAME as val from 
        subject where FDEGREE='{$degree}' and FEXAMNO='{$exam}' and ifnull(FSUSPEND,'') <> 'T'
        and  fsubcode not in  (select  distinct fsubcode from mascomb 
        where  fdegree = '{$degree}' )";
    $result1   = $aobj_context->mobj_db->GetAll($query1);
    

     if(!$result1)
     {
        $query1 = "select distinct 'Not Applicable' as int_code,'Not Applicable' as val";
        $result1   = $aobj_context->mobj_db->GetAll($query1);
     }       


    $html = "<div class='row' style = 'padding:30px;'><center><div class=' col-md-offset-2 col-md-8'><table id='mainTable' class='table table-striped table-condensed table-bordered'>
                        <thead>
                            <tr class='bg-cyan'>
                                <th style = 'width:8%;'><center>Sl. No.</center></th>
                                <th style = 'width:10%;'><center>Subject Code</center></th>
                                <th style = 'width:70%;'>Subject Name</th>
                            </tr>
                        </thead>
                        <tbody>";
         
        
       
    $i = 1;
    if($result)
    {
        foreach($result as $key => $value)
        {
            $html .="<tr>";
            
            $html .="<td style = 'width:;'>
                    <span><center>{$i}</center></span>
                    </td>";
            $html .="<td style = 'width:;'>
                    <center>{$value['FSUBCODE']}</center>
                    </td>";
            $html .="<td style = 'width:;'>
                    <span style=''>{$value['FSUBNAME']}</span>
                    </td>";;
            $html .="</tr>";
            $i++;
        }
    } 
    
    $html .= "</tbody></table></div><center></div>";   


    $arr['html']=$html;
    $arr['option']=$result1;
    
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
    return;
}

function getfeedetl($aobj_context)
{
    $degree   = trim($aobj_context->mobj_data['degree']);
	$exam   = trim($aobj_context->mobj_data['exam']);
    $combcode_sub   = trim($aobj_context->mobj_data['combcode_sub']);
	$reg_no   = trim($aobj_context->mobj_data['reg_no']);
	
	//$exam = 'A';
	$query2    = "select ifnull(fadmfee,'') as fadmfee from regcandsum where fregno = '{$reg_no}'";
	$result2   = $aobj_context->mobj_db->GetRow($query2);
	if($result2['fadmfee'] != '')
	{
		$sum = $result2['fadmfee'];
	}
    else
	{
		$query = "select (ifnull(fadmfee,0)+ifnull(fadmfine,0)) as fadmfee  from degree where fdegree = '{$degree}' and fexamno = '{$exam}'";
  
		$result   = $aobj_context->mobj_db->GetRow($query);
		$sum = $result['fadmfee'];
	}
    $query1    = "SELECT payment_type AS int_code, bank_name AS val 
                  FROM acc_mas where payment_type in('DEBIT/CREDIT/NET BANKING','SBM')";
    $result1   = $aobj_context->mobj_db->GetAll($query1);
	
    
	//var_dump($combcode_sub);
	
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'A' and $combcode_sub == '202')
		$sum = '10345';
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'A' and $combcode_sub == '201')
		$sum = '10465';		
	
	
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'B' and $combcode_sub == '202')
		$sum = '9455';
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'B' and $combcode_sub == '201')
		$sum = '9575';
	
	
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'C' and $combcode_sub == '202')
		$sum = '8690';
	if(($degree == 'DUBS1' or $degree == 'DUBS') and $exam == 'C' and $combcode_sub == '201')
		$sum = '8690';
	
    $arr['payment'] = $result1;   
    $arr['sum'] = $sum;
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");  
    return;

}

?>